Class NamespaceCollection

java.lang.Object
org.pentaho.reporting.libraries.xmlns.writer.NamespaceCollection

public class NamespaceCollection extends Object
Holds a set of namespace definitions that have been declared in a libbase-configuration.
Author:
Thomas Morgner
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(org.pentaho.reporting.libraries.base.config.Configuration config, String prefix)
    Configures the namespace collection and adds all namespace definitions found in the configuration under the given prefix to the collection.
    Returns all known namespaces for which definitions exist in this collection.
    Returns the prefered namespace prefix for the given namespace URI.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NamespaceCollection

      public NamespaceCollection()
      Default constructor.
  • Method Details

    • configure

      public void configure(org.pentaho.reporting.libraries.base.config.Configuration config, String prefix)
      Configures the namespace collection and adds all namespace definitions found in the configuration under the given prefix to the collection.
      Parameters:
      config - the configuration from where to read the namespaces.
      prefix - the configuration prefix for filtering the configuration entries.
    • getPrefix

      public String getPrefix(String uri)
      Returns the prefered namespace prefix for the given namespace URI.
      Parameters:
      uri - the namespace for which a prefix should be looked up.
      Returns:
      the defined prefix.
    • getDefinedUris

      public String[] getDefinedUris()
      Returns all known namespaces for which definitions exist in this collection.
      Returns:
      the defined uris as array.