Package org.iirds.dita.ot.plugin.contrib
Class AudiencePropertyHandler
java.lang.Object
org.iirds.dita.ot.plugin.contrib.AudiencePropertyHandler
- All Implemented Interfaces:
IirdsMetadataHandler
Extracts roles from the
audience attribute on the root element of
topics and and the root map. Groups names in the attribute value get ignored.
Only items outside of groups and group members are taken into account.- Author:
- Martin Kreutzer, Empolis Information Management GmbH
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static org.slf4j.Logger(package private) static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToModel(ToCNode root, org.apache.jena.rdf.model.Model model) Adds extracted metadata of a topic or map to the iiRDS RDF model.voidextractMetadata(ToCNode node, Document document) Extract metadata from an XML DOM of a topic or map.getName()The name this metadata handler can be activated by from theditacommand via parameterstoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.iirds.dita.ot.plugin.spi.IirdsMetadataHandler
completeModel
-
Field Details
-
PROP_AUDIENCE
- See Also:
-
logger
static org.slf4j.Logger logger
-
-
Constructor Details
-
AudiencePropertyHandler
public AudiencePropertyHandler()
-
-
Method Details
-
getName
Description copied from interface:IirdsMetadataHandlerThe name this metadata handler can be activated by from theditacommand via parameters- Specified by:
getNamein interfaceIirdsMetadataHandler- Returns:
- the unique name, should be short and comprehensible to users of the DITA OT.
-
toString
-
extractMetadata
Description copied from interface:IirdsMetadataHandlerExtract metadata from an XML DOM of a topic or map. Implementations should store the extracted metadata viaToCNode.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.- Specified by:
extractMetadatain interfaceIirdsMetadataHandler- Parameters:
node- the ToC node contextdocument- the DOM to extract from
-
addToModel
Description copied from interface:IirdsMetadataHandlerAdds extracted metadata of a topic or map to the iiRDS RDF model. Implementations shall access the extracted metadata viaToCNode.getProperty(String). The iiRDSInformationUnithas already been created when this method gets called and is accessible viaToCNode.getInformationUnit()- Specified by:
addToModelin interfaceIirdsMetadataHandler- Parameters:
root- the ToC node contextmodel- the RDF model (graph) to work with and update
-