Class DocumentModelReferenceCollector
- java.lang.Object
-
- ro.sync.ecss.extensions.api.webapp.references.DocumentModelReferenceCollector
-
- All Implemented Interfaces:
ReferenceCollector
@API(type=NOT_EXTENDABLE, src=PUBLIC) public class DocumentModelReferenceCollector extends java.lang.Object implements ReferenceCollector
Instances of this class are used to collect the references to external resources (images, audio, video, XInclude, etc.) from anAuthorDocumentModel
To be used when the document has been already parsed and its structure is already known SeeURLCollectingReader
for collecting references from a document specified by a URL
-
-
Constructor Summary
Constructors Constructor Description DocumentModelReferenceCollector(AuthorDocumentModel model, ro.sync.exml.workspace.impl.references.CollectingStrategy collector)
Creates a newDocumentModelReferenceCollector
with a given model and collecting strategy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Reference>
collectReferences()
Returns a set of references collected from the document modelErrorHandler
getErrorHandler()
The error handler returned by this collector will always be null.void
setErrorHandler(ErrorHandler errorHandler)
Setting an error handler for this reference collector has no effect.
-
-
-
Constructor Detail
-
DocumentModelReferenceCollector
public DocumentModelReferenceCollector(AuthorDocumentModel model, ro.sync.exml.workspace.impl.references.CollectingStrategy collector)
Creates a newDocumentModelReferenceCollector
with a given model and collecting strategy- Parameters:
model
- the document modelcollector
- the collecting strategy
-
-
Method Detail
-
collectReferences
public java.util.Set<Reference> collectReferences()
Returns a set of references collected from the document model- Specified by:
collectReferences
in interfaceReferenceCollector
- Returns:
- a set of references
- See Also:
ReferenceCollector.collectReferences()
-
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
Setting an error handler for this reference collector has no effect. Any errors during the extractions of the references are only logged- Specified by:
setErrorHandler
in interfaceReferenceCollector
-
getErrorHandler
public ErrorHandler getErrorHandler()
The error handler returned by this collector will always be null. The metod is implemented to maintain backward compatibility with the API- Specified by:
getErrorHandler
in interfaceReferenceCollector
- Returns:
- the error handler - always null
-
-