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 Object
implements ReferenceCollector
Instances of this class are used to collect the references to
external resources (images, audio, video, XInclude, etc.) from an
AuthorDocumentModel
To be used when the document has been already parsed and its structure is already known
See URLCollectingReader
for collecting references from a document specified
by a URL-
Constructor Summary
ConstructorsConstructorDescriptionDocumentModelReferenceCollector
(AuthorDocumentModel model, ro.sync.exml.workspace.impl.references.CollectingStrategy collector) Creates a newDocumentModelReferenceCollector
with a given model and collecting strategy -
Method Summary
Modifier and TypeMethodDescriptionReturns a set of references collected from the document modelThe 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 Details
-
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 Details
-
collectReferences
Returns a set of references collected from the document model- Specified by:
collectReferences
in interfaceReferenceCollector
- Returns:
- a set of references
- See Also:
-
setErrorHandler
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
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
-