public interface IirdsMetadataHandler
There are three stages:
extractMetadata(ToCNode, Document)
addToModel(ToCNode, Model)
completeModel(ToCNode, Model)
Metadata handlers might extract and set metadata or even just run any post-processing to finalize the iiRDS RDF model.
Implementations should not store any state related information concerning an
exctraction in the instance. The instance must be re-usable for different
extractions. Store any state information in the ToCNode
provided in
the instance methods called.
Modifier and Type | Method and Description |
---|---|
void |
addToModel(ToCNode node,
org.apache.jena.rdf.model.Model model)
Adds extracted metadata of a topic or map to the iiRDS RDF model.
|
default 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.
|
String |
getName()
The name this metadata handler can be activated by from the
dita
command via parameters |
String getName()
dita
command via parametersvoid extractMetadata(ToCNode node, Document document)
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.node
- the ToC node contextdocument
- the DOM to extract fromvoid addToModel(ToCNode node, org.apache.jena.rdf.model.Model model)
ToCNode.getProperty(String)
. The iiRDS InformationUnit
has
already been created when this method gets called and is accessible via
ToCNode.getInformationUnit()
node
- the ToC node contextmodel
- the RDF model (graph) to work with and updatedefault void completeModel(ToCNode root, org.apache.jena.rdf.model.Model model)
access
and manipulate any child nodes.root
- the ToC node contextmodel
- the RDF model (graph) to work withCopyright © 2024. All rights reserved.