XMPConst
, XMPSchemaRegistry
public final class XMPSchemaRegistryImpl extends java.lang.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 | Description |
---|---|
XMPSchemaRegistryImpl() |
Performs the initialisation of the registry with the default namespaces, aliases and global
options.
|
Modifier and Type | Method | Description |
---|---|---|
void |
deleteNamespace(java.lang.String namespaceURI) |
Deletes a namespace from the registry.
|
XMPAliasInfo |
findAlias(java.lang.String qname) |
Searches for registered aliases.
|
XMPAliasInfo[] |
findAliases(java.lang.String aliasNS) |
Collects all aliases that are contained in the provided namespace.
|
java.util.Map |
getAliases() |
|
java.lang.String |
getNamespacePrefix(java.lang.String namespaceURI) |
Obtain the prefix for a registered namespace URI.
|
java.util.Map |
getNamespaces() |
|
java.lang.String |
getNamespaceURI(java.lang.String namespacePrefix) |
Obtain the URI for a registered namespace prefix.
|
java.util.Map |
getPrefixes() |
|
java.lang.String |
registerNamespace(java.lang.String namespaceURI,
java.lang.String suggestedPrefix) |
Register a namespace URI with a suggested prefix.
|
XMPAliasInfo |
resolveAlias(java.lang.String aliasNS,
java.lang.String aliasProp) |
Determines if a name is an alias, and what it is aliased to.
|
public XMPSchemaRegistryImpl()
public java.lang.String registerNamespace(java.lang.String namespaceURI, java.lang.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 setXMPSchemaRegistry.registerNamespace(String, String)
public void deleteNamespace(java.lang.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 java.lang.String getNamespacePrefix(java.lang.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 java.lang.String getNamespaceURI(java.lang.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 java.util.Map getNamespaces()
getNamespaces
in interface XMPSchemaRegistry
XMPSchemaRegistry.getNamespaces()
public java.util.Map getPrefixes()
getPrefixes
in interface XMPSchemaRegistry
XMPSchemaRegistry.getPrefixes()
public XMPAliasInfo resolveAlias(java.lang.String aliasNS, java.lang.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(java.lang.String qname)
XMPSchemaRegistry
findAlias
in interface XMPSchemaRegistry
qname
- an XML conform qnameXMPSchemaRegistry.findAlias(java.lang.String)
public XMPAliasInfo[] findAliases(java.lang.String aliasNS)
XMPSchemaRegistry
findAliases
in interface XMPSchemaRegistry
aliasNS
- a schema namespace URIXMPSchemaRegistry.findAliases(String)
public java.util.Map getAliases()
getAliases
in interface XMPSchemaRegistry
XMPAliasInfo
-object.XMPSchemaRegistry.getAliases()
Copyright © 1998–2018. All rights reserved.