Package com.adobe.xmp.schema.service
Class StandardRelaxNGProvider
- java.lang.Object
-
- com.adobe.xmp.schema.service.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.InputStreamgetInclude(java.lang.String includeName)Provides a RelaxNG include, referenced by its namejava.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.InputStreamgetSchema(java.lang.String namespaceURI)Provides a RelaxNG resource by its namespace URI.booleanisAvailable(java.lang.String namespaceURI)Checks if a schema (identified by its URI) can be provided.
-
-
-
Constructor Detail
-
StandardRelaxNGProvider
public StandardRelaxNGProvider() throws SchemaServiceExceptionDefault 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.IOExceptionDescription copied from interface:RelaxNGProviderProvides a RelaxNG resource by its namespace URI.nullis returned if there is no resource available for this namespace. If only the existence shall be checked, the callRelaxNGProvider.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:
getSchemain interfaceRelaxNGProvider- 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.IOExceptionDescription copied from interface:RelaxNGProviderProvides a RelaxNG include, referenced by its name- Specified by:
getIncludein interfaceRelaxNGProvider- Returns:
- Returns the RelaxNG resource as stream or
nullif 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:RelaxNGProviderChecks if a schema (identified by its URI) can be provided. The result of this call has to be symmetric toRelaxNGProvider.getSchema(String). Note: For all namespaces where isAvailable() returnstrue, 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:
isAvailablein interfaceRelaxNGProvider- 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:RelaxNGProviderReturns a list of all schema namespaces that this provider can deliver.- Specified by:
getNamespacesin interfaceRelaxNGProvider- Returns:
- Returns a list of all available schema namespaces of this provider.
- See Also:
RelaxNGProvider.getNamespaces()
-
getRuntimeDecorators
public 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.- Specified by:
getRuntimeDecoratorsin interfaceRelaxNGProvider- Returns:
- See Also:
RelaxNGProvider.getRuntimeDecorators()
-
-