Package org.iirds.dita.ot.plugin.contrib
Class DefaultIRIHandler
java.lang.Object
org.iirds.dita.ot.plugin.contrib.DefaultIRIHandler
- All Implemented Interfaces:
IRIHandler
Default implementation of
IRIHandler.- Author:
- Martin Kreutzer, Empolis Information Management GmbH
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetDocumentOrTopicIRI(ToCNode node) The IRI of topic and maps follows the scheme "urn:ditaid:" ":" <id of topic or map> ":" <hash of content preprocessed by DITA-OT>.getInfoObjectIRI(ToCNode node) The IRI of information objects follows the scheme "urn:ditaid:" ":" <id of topic or map>.getMetadataIRI(ToCNode node, String classURI, String label, String context) Generate IRI for a a metadata string property.getName()The unique name of this IRI providergetPackageIRI(ToCNode root) The IRI of a package is freshly generated UUID.toString()
-
Field Details
-
DITAIDPREFIX
- See Also:
-
-
Constructor Details
-
DefaultIRIHandler
public DefaultIRIHandler()
-
-
Method Details
-
getName
Description copied from interface:IRIHandlerThe unique name of this IRI provider- Specified by:
getNamein interfaceIRIHandler- Returns:
- the name of this handler
-
encode
-
getInfoObjectIRI
The IRI of information objects follows the scheme "urn:ditaid:" ":" <id of topic or map>. When no id present, then an UUID URN is returned.- Specified by:
getInfoObjectIRIin interfaceIRIHandler- Parameters:
node- the node for which to generated- Returns:
- the generated IRI as String or null
-
getMetadataIRI
Description copied from interface:IRIHandlerGenerate IRI for a a metadata string property. Implementation may use external services to lookup IRIs or use properties of the node- Specified by:
getMetadataIRIin interfaceIRIHandler- Parameters:
node- the node the metadata belongs toclassURI- the URI of the RDF metadata classlabel- something like a label of metadata valuecontext- an additional context, usually the property name at the node hinting the source of the metadata value- Returns:
- the generated IRI as String
-
getDocumentOrTopicIRI
The IRI of topic and maps follows the scheme "urn:ditaid:" ":" <id of topic or map> ":" <hash of content preprocessed by DITA-OT>. When no id present, then an UUID URN is returned.- Specified by:
getDocumentOrTopicIRIin interfaceIRIHandler- Parameters:
node- the node for which to generated- Returns:
- the generated IRI as String or null
- See Also:
-
getPackageIRI
The IRI of a package is freshly generated UUID.- Specified by:
getPackageIRIin interfaceIRIHandler- Parameters:
root- the node for which to generated (usually the root node)- Returns:
- the generated IRI as String
- See Also:
-
toString
-