Interface RelaxNGProvider

  • All Known Implementing Classes:
    StandardRelaxNGProvider

    public interface RelaxNGProvider
    Provides all available RelaxNG schema resources and referenced includes. The returned streams shall contain the Relax NG source files.
    • Method Detail

      • getSchema

        InputStream getSchema​(String namespaceURI)
                       throws IOException
        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 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).
        Parameters:
        namespaceURI - the namespace URI of the schema according to the XMP specification
        Returns:
        Returns the RelaxNG resource as stream
        Throws:
        IOException - Forwards exceptions that occur during schema file loading.
      • getInclude

        InputStream getInclude​(String includeName)
                        throws IOException
        Provides a RelaxNG include, referenced by its name
        Parameters:
        resourceName - the name of the resource, usually a file name, e.g. "include.rng".
        Returns:
        Returns the RelaxNG resource as stream or null if it has not been found.
        Throws:
        IOException - Forwards exceptions that occur during schema file loading.
      • isAvailable

        boolean isAvailable​(String namespaceURI)
        Checks if a schema (identified by its URI) can be provided. The result of this call has to be symmetric to 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.
        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.
      • getRuntimeDecorators

        Map<XMPPath,​Map<QName,​Map<String,​String>>> getRuntimeDecorators()
        Runtime decorators are applied to the schema once it is parsed and are stored in the schema model:
        • The Map key is an XMPPath which models a path such as "xmpDM:duration.xmpDM:scale".
        • The value is another Map, where the keys are QNames of decorators.
        • Each decorator value is a property/value list.
        Note:
        Returns:
      • getNamespaces

        Set<String> getNamespaces()
        Deprecated.
        TODO Check if this is really needed.
        Returns a list of all schema namespaces that this provider can deliver.
        Returns:
        Returns a list of all available schema namespaces of this provider.