Interface MetadataEmbedder
- All Superinterfaces:
ContentWorker
- All Known Implementing Classes:
AbstractMappingMetadataExtracter,AsynchronousExtractor,RFC822MetadataExtracter,XmlMetadataExtracter,XPathMetadataExtracter
Interface for writing metadata properties back into the content file.
- Author:
- Ray Gauss II
-
Method Summary
Modifier and TypeMethodDescriptionvoidembed(Map<QName, Serializable> properties, ContentReader reader, ContentWriter writer) Embeds the given properties into the file specified by the given content writer. *default voidembed(NodeRef nodeRef, Map<QName, Serializable> properties, ContentReader reader, ContentWriter writer) Identical toembed(Map, ContentReader, ContentWriter)but with the addition of theNodeRefbeing acted on.booleanisEmbeddingSupported(String mimetype) Determines if the extracter works against the given mimetype.
-
Method Details
-
isEmbeddingSupported
Determines if the extracter works against the given mimetype.- Parameters:
mimetype- the document mimetype- Returns:
- Returns true if the mimetype is supported, otherwise false.
-
embed
void embed(Map<QName, Serializable> properties, ContentReader reader, ContentWriter writer) throws ContentIOExceptionEmbeds the given properties into the file specified by the given content writer. *The embedding viability can be determined by an up front call to
isEmbeddingSupported(String).The source mimetype must be available on the
ContentAccessor.getMimetype()method of the writer.- Parameters:
properties- the model properties to embedreader- the reader for the original source content filewriter- the writer for the content after metadata has been embedded- Throws:
ContentIOException
-
embed
default void embed(NodeRef nodeRef, Map<QName, Serializable> properties, ContentReader reader, ContentWriter writer) throws ContentIOExceptionIdentical toembed(Map, ContentReader, ContentWriter)but with the addition of theNodeRefbeing acted on. By default, the method without theNodeRefis called.- Parameters:
nodeRef- the node being acted on.properties- the model properties to embedreader- the reader for the original source content filewriter- the writer for the content after metadata has been embedded- Throws:
ContentIOException
-