Package org.iirds.dita.ot.plugin

# Class CompositeIRIHandler

java.lang.Object
org.iirds.dita.ot.plugin.CompositeIRIHandler

All Implemented Interfaces:
  `IRIHandler`

public class CompositeIRIHandler extends Object implements IRIHandler
A composite IRI handler. It consists of other IRI handlers added by `addIRIHandler(IRIHandler)`. The interface methods delegate to all member handlers.

Author:
  Martin Kreutzer, Empolis Information Management GmbH

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CompositeIRIHandler()`
  `CompositeIRIHandler(String name, IRIHandler... handlers)`
  Create a composite metadata handler and provide the handlers

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addIRIHandler(IRIHandler handler)`
  Add an metadata handler
  `void`
  `addIRIHandlers(Collection<IRIHandler> handlers)`
  Adds metadata handlers
  `String`
  `getDocumentOrTopicIRI(ToCNode node)`
  Generate IRI for a an iiRDS Topic or Document.
  `String`
  `getInfoObjectIRI(ToCNode node)`
  Generate IRI for a an iiRDS InformationObject.
  `List<IRIHandler>`
  `getIRIHandlers()`
  `String`
  `getMetadataIRI(ToCNode node, String classURI, String label, String context)`
  Generate IRI for a a metadata string property.
  `String`
  `getName()`
  The unique name of this IRI provider
  `String`
  `getPackageIRI(ToCNode node)`
  Generate IRI for a an iiRDS Package.
  `void`
  `setName(String name)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CompositeIRIHandler

    public CompositeIRIHandler()

  - ### CompositeIRIHandler

    public CompositeIRIHandler(String name, IRIHandler... handlers)
    Create a composite metadata handler and provide the handlers
    Parameters:
      `name` - the name of the this composite IRI handler
      `handlers` - the handlers making up this composite metadata handler

- ## Method Details

  - ### getName

    public String getName()
    Description copied from interface: `IRIHandler`
    The unique name of this IRI provider
    Specified by:
      `getName` in interface `IRIHandler`
    Returns:
      the name of this handler

  - ### setName

    public void setName(String name)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getIRIHandlers

    public List<IRIHandler> getIRIHandlers()
    Returns:
      unmodifiable list of metadata handlers composing this metadata handler

  - ### addIRIHandlers

    public void addIRIHandlers(Collection<IRIHandler> handlers)
    Adds metadata handlers
    Parameters:
      `handlers` - the metadata handlers to add

  - ### addIRIHandler

    public void addIRIHandler(IRIHandler handler)
    Add an metadata handler
    Parameters:
      `handler` - the metadata handler to add

  - ### getInfoObjectIRI

    public String getInfoObjectIRI(ToCNode node)
    Description copied from interface: `IRIHandler`
    Generate IRI for a an iiRDS InformationObject. Implementation may use external services to lookup IRIs or use properties of the node
    Specified by:
      `getInfoObjectIRI` in interface `IRIHandler`
    Parameters:
      `node` - the node for which to generated
    Returns:
      the generated IRI as String or null

  - ### getDocumentOrTopicIRI

    public String getDocumentOrTopicIRI(ToCNode node)
    Description copied from interface: `IRIHandler`
    Generate IRI for a an iiRDS Topic or Document. Implementation may use external services to lookup IRIs or use properties of the node
    Specified by:
      `getDocumentOrTopicIRI` in interface `IRIHandler`
    Parameters:
      `node` - the node for which to generated
    Returns:
      the generated IRI as String or null

  - ### getPackageIRI

    public String getPackageIRI(ToCNode node)
    Description copied from interface: `IRIHandler`
    Generate IRI for a an iiRDS Package. Implementation may use external services to lookup IRIs or use properties of the node
    Specified by:
      `getPackageIRI` in interface `IRIHandler`
    Parameters:
      `node` - the node for which to generated (usually the root node)
    Returns:
      the generated IRI as String

  - ### getMetadataIRI

    public String getMetadataIRI(ToCNode node, String classURI, String label, String context)
    Description copied from interface: `IRIHandler`
    Generate IRI for a a metadata string property. Implementation may use external services to lookup IRIs or use properties of the node
    Specified by:
      `getMetadataIRI` in interface `IRIHandler`
    Parameters:
      `node` - the node the metadata belongs to
      `classURI` - the URI of the RDF metadata class
      `label` - something like a label of metadata value
      `context` - an additional context, usually the property name at the node hinting the source of the metadata value
    Returns:
      the generated IRI as String