public final class XMPSchemaRegistryImpl extends Object implements XMPSchemaRegistry, XMPConst
ARRAY_ITEM_NAME, ARRAY_LAST_ITEM, FALSESTR, NS_ADOBESTOCKPHOTO, NS_ASF, NS_BWF, NS_CAMERARAW, NS_CREATOR_ATOM, NS_DC, NS_DC_DEPRECATED, NS_DICOM, NS_DM, NS_EXIF, NS_EXIF_AUX, NS_EXIFX, NS_IPTCCORE, NS_IPTCEXT, NS_IX, NS_JP2K, NS_JPEG, NS_PDF, NS_PDFA_EXTENSION, NS_PDFA_FIELD, NS_PDFA_ID, NS_PDFA_PROPERTY, NS_PDFA_SCHEMA, NS_PDFA_TYPE, NS_PDFUA_ID, NS_PDFX, NS_PDFX_ID, NS_PHOTOSHOP, NS_PLUS, NS_PNG, NS_PSALBUM, NS_RDF, NS_RIFFINFO, NS_SCRIPT, NS_SWF, NS_TIFF, NS_TRANSIENT, NS_TXMP, NS_WAV, NS_X, NS_XML, NS_XMP, NS_XMP_BJ, NS_XMP_MM, NS_XMP_NOTE, NS_XMP_RIGHTS, RDF_TYPE, TAG_XAPMETA, TAG_XMPMETA, TRUESTR, TYPE_DIMENSIONS, TYPE_FONT, TYPE_GRAPHICS, TYPE_IDENTIFIERQUAL, TYPE_IMAGE, TYPE_MANIFESTITEM, TYPE_PAGEDFILE, TYPE_RESOURCEEVENT, TYPE_RESOURCEREF, TYPE_ST_JOB, TYPE_ST_VERSION, TYPE_TEXT, X_DEFAULT, XML_LANG, XMP_PI
Constructor and Description |
---|
XMPSchemaRegistryImpl()
Performs the initialisation of the registry with the default namespaces, aliases and global options.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteNamespace(String namespaceURI)
Deletes a namespace from the registry.
|
XMPAliasInfo |
findAlias(String qname)
Searches for registered aliases.
|
XMPAliasInfo[] |
findAliases(String aliasNS)
Collects all aliases that are contained in the provided namespace.
|
Map |
getAliases() |
String |
getNamespacePrefix(String namespaceURI)
Obtain the prefix for a registered namespace URI.
|
Map |
getNamespaces() |
String |
getNamespaceURI(String namespacePrefix)
Obtain the URI for a registered namespace prefix.
|
Map |
getPrefixes() |
String |
registerNamespace(String namespaceURI, String suggestedPrefix)
Register a namespace URI with a suggested prefix.
|
XMPAliasInfo |
resolveAlias(String aliasNS, String aliasProp)
Determines if a name is an alias, and what it is aliased to.
|
public XMPSchemaRegistryImpl()
public String registerNamespace(String namespaceURI, String suggestedPrefix) throws XMPException
XMPSchemaRegistry
Note: No checking is presently done on either the URI or the prefix.
registerNamespace
in interface XMPSchemaRegistry
namespaceURI
- The URI for the namespace. Must be a valid XML URI.
suggestedPrefix
- The suggested prefix to be used if the URI is not yet registered. Must be a valid XML name.
XMPException
- If the parameters are not accordingly set
XMPSchemaRegistry.registerNamespace(String, String)
public void deleteNamespace(String namespaceURI)
XMPSchemaRegistry
Does nothing if the URI is not registered, or if the namespaceURI parameter is null or the empty string.
Note: Not yet implemented.
deleteNamespace
in interface XMPSchemaRegistry
namespaceURI
- The URI for the namespace.
XMPSchemaRegistry.deleteNamespace(String)
public String getNamespacePrefix(String namespaceURI)
XMPSchemaRegistry
It is not an error if the namespace URI is not registered.
getNamespacePrefix
in interface XMPSchemaRegistry
namespaceURI
- The URI for the namespace. Must not be null or the empty string.
XMPSchemaRegistry.getNamespacePrefix(String)
public String getNamespaceURI(String namespacePrefix)
XMPSchemaRegistry
It is not an error if the namespace prefix is not registered.
getNamespaceURI
in interface XMPSchemaRegistry
namespacePrefix
- The prefix for the namespace. Must not be null or the empty string.
XMPSchemaRegistry.getNamespaceURI(String)
public Map getNamespaces()
getNamespaces
in interface XMPSchemaRegistry
XMPSchemaRegistry.getNamespaces()
public Map getPrefixes()
getPrefixes
in interface XMPSchemaRegistry
XMPSchemaRegistry.getPrefixes()
public XMPAliasInfo resolveAlias(String aliasNS, String aliasProp)
XMPSchemaRegistry
resolveAlias
in interface XMPSchemaRegistry
aliasNS
- The namespace URI of the alias. Must not be null
or the empty string.
aliasProp
- The name of the alias. May be an arbitrary path expression path, must not be null
or the empty string.
XMPAliasInfo
for the given alias namespace and property or null
if there is no such alias.
XMPSchemaRegistry.resolveAlias(String, String)
public XMPAliasInfo findAlias(String qname)
XMPSchemaRegistry
findAlias
in interface XMPSchemaRegistry
qname
- an XML conform qname
XMPSchemaRegistry.findAlias(java.lang.String)
public XMPAliasInfo[] findAliases(String aliasNS)
XMPSchemaRegistry
findAliases
in interface XMPSchemaRegistry
aliasNS
- a schema namespace URI
XMPSchemaRegistry.findAliases(String)
public Map getAliases()
getAliases
in interface XMPSchemaRegistry
XMPAliasInfo
-object.
XMPSchemaRegistry.getAliases()
Copyright © 1998–2019. All rights reserved.