Class StandardRelaxNGProvider

  • All Implemented Interfaces:
    RelaxNGProvider

    public class StandardRelaxNGProvider
    extends java.lang.Object
    implements RelaxNGProvider
    The standard RelaxNG-provider provides access to standard Relax-NG resources present inside this bundle.
    • Constructor Summary

      Constructors 
      Constructor Description
      StandardRelaxNGProvider()
      Default constructor which uses the default manifest file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getInclude​(java.lang.String includeName)
      Provides a RelaxNG include, referenced by its name
      java.util.Set<java.lang.String> getNamespaces()
      Returns a list of all schema namespaces that this provider can deliver.
      java.util.Map<XMPPath,​java.util.Map<javax.xml.namespace.QName,​java.util.Map<java.lang.String,​java.lang.String>>> getRuntimeDecorators()
      No default runtime decorators.
      java.io.InputStream getSchema​(java.lang.String namespaceURI)
      Provides a RelaxNG resource by its namespace URI.
      boolean isAvailable​(java.lang.String namespaceURI)
      Checks if a schema (identified by its URI) can be provided.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StandardRelaxNGProvider

        public StandardRelaxNGProvider()
                                throws SchemaServiceException
        Default constructor which uses the default manifest file.
        Throws:
        SchemaServiceException - Thrown if the input files are not found or could not be loaded.
    • Method Detail

      • getSchema

        public java.io.InputStream getSchema​(java.lang.String namespaceURI)
                                      throws java.io.IOException
        Description copied from interface: RelaxNGProvider
        Provides a RelaxNG resource by its namespace URI. null is returned if there is no resource available for this namespace. If only the existence shall be checked, the call RelaxNGProvider.isAvailable(String) should be used. Note: The provider contains only "top-level" XMP schemas (such as Dublin Core) and no XMP type schemas (such as Dimensions).
        Specified by:
        getSchema in interface RelaxNGProvider
        Parameters:
        namespaceURI - the namespace URI of the schema according to the XMP specification
        Returns:
        Returns the RelaxNG resource as stream
        Throws:
        java.io.IOException - Forwards exceptions that occur during schema file loading.
        See Also:
        RelaxNGProvider.getSchema(java.lang.String)
      • getInclude

        public java.io.InputStream getInclude​(java.lang.String includeName)
                                       throws java.io.IOException
        Description copied from interface: RelaxNGProvider
        Provides a RelaxNG include, referenced by its name
        Specified by:
        getInclude in interface RelaxNGProvider
        Returns:
        Returns the RelaxNG resource as stream or null if it has not been found.
        Throws:
        java.io.IOException - Forwards exceptions that occur during schema file loading.
        See Also:
        RelaxNGProvider.getInclude(java.lang.String)
      • isAvailable

        public boolean isAvailable​(java.lang.String namespaceURI)
        Description copied from interface: RelaxNGProvider
        Checks if a schema (identified by its URI) can be provided. The result of this call has to be symmetric to RelaxNGProvider.getSchema(String). Note: For all namespaces where isAvailable() returns true, the method getSchema() has to return a result as well. Note: a call to this method should only check whether the RelaxNG resource is available, and should not already load the resource.
        Specified by:
        isAvailable in interface RelaxNGProvider
        Parameters:
        namespaceURI - the namespace URI of the schema according to the XMP specification
        Returns:
        Returns true if the schema is registered. This does not imply that it can be loaded successfully.
        See Also:
        RelaxNGProvider.isAvailable(java.lang.String)
      • getNamespaces

        public java.util.Set<java.lang.String> getNamespaces()
        Description copied from interface: RelaxNGProvider
        Returns a list of all schema namespaces that this provider can deliver.
        Specified by:
        getNamespaces in interface RelaxNGProvider
        Returns:
        Returns a list of all available schema namespaces of this provider.
        See Also:
        RelaxNGProvider.getNamespaces()