public class CompositeMetadataHandler extends Object implements IirdsMetadataHandler
addMetadataHandler(IirdsMetadataHandler)
. The methods delegate to
all member handler.Constructor and Description |
---|
CompositeMetadataHandler() |
CompositeMetadataHandler(String name,
IirdsMetadataHandler... handlers)
Create a composite metadata handler and provide the handlers
|
Modifier and Type | Method and Description |
---|---|
void |
addMetadataHandler(IirdsMetadataHandler handler)
Add an metadata handler
|
void |
addMetadataHandlers(Collection<IirdsMetadataHandler> handlers)
Adds metadata handlers
|
void |
addToModel(ToCNode node,
org.apache.jena.rdf.model.Model model)
Adds extracted metadata of a topic or map to the iiRDS RDF model.
|
void |
completeModel(ToCNode root,
org.apache.jena.rdf.model.Model model)
Perform any post-processes on the iiRDS RDF model, after all metadata
handlers have done their extraction and model update jobs.
|
void |
extractMetadata(ToCNode node,
Document document)
Extract metadata from an XML DOM of a topic or map.
|
List<IirdsMetadataHandler> |
getMetadataHandlers() |
String |
getName()
The name this metadata handler can be activated by from the
dita
command via parameters |
void |
setName(String name) |
String |
toString() |
public CompositeMetadataHandler()
public CompositeMetadataHandler(String name, IirdsMetadataHandler... handlers)
name
- the name of this handlerhandlers
- the handlers making up this composite metadata handlerpublic String getName()
IirdsMetadataHandler
dita
command via parametersgetName
in interface IirdsMetadataHandler
public void setName(String name)
public List<IirdsMetadataHandler> getMetadataHandlers()
public void addMetadataHandlers(Collection<IirdsMetadataHandler> handlers)
handlers
- the metadata handlers to addpublic void addMetadataHandler(IirdsMetadataHandler handler)
handler
- the metadata handler to addpublic void extractMetadata(ToCNode node, Document document)
IirdsMetadataHandler
ToCNode.setProperty(String, Object)
.
The key of the property should reflect the element / attribute where the
metadata come form in order to achieve unique keys for the properties.extractMetadata
in interface IirdsMetadataHandler
node
- the ToC node contextdocument
- the DOM to extract frompublic void addToModel(ToCNode node, org.apache.jena.rdf.model.Model model)
IirdsMetadataHandler
ToCNode.getProperty(String)
. The iiRDS InformationUnit
has
already been created when this method gets called and is accessible via
ToCNode.getInformationUnit()
addToModel
in interface IirdsMetadataHandler
node
- the ToC node contextmodel
- the RDF model (graph) to work with and updatepublic void completeModel(ToCNode root, org.apache.jena.rdf.model.Model model)
IirdsMetadataHandler
access
and manipulate any child nodes.completeModel
in interface IirdsMetadataHandler
root
- the ToC node contextmodel
- the RDF model (graph) to work withCopyright © 2024. All rights reserved.