public interface XMPSchemaRegistry
Aliases in XMP serve the same purpose as Windows file shortcuts, Macintosh file aliases, or UNIX file symbolic links. The aliases are simply multiple names for the same property. One distinction of XMP aliases is that they are ordered, there is an alias name pointing to an actual name. The primary significance of the actual name is that it is the preferred name for output, generally the most widely recognized name.
The names that can be aliased in XMP are restricted. The alias must be a top level property name, not a field within a structure or an element within an array. The actual may be a top level property name, the first element within a top level array, or the default element in an alt-text array. This does not mean the alias can only be a simple property. It is OK to alias a top level structure or array to an identical top level structure or array, or to the first item of an array of structures.
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.
|
String registerNamespace(String namespaceURI, String suggestedPrefix) throws XMPException
Note: No checking is presently done on either the URI or the prefix.
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
String getNamespacePrefix(String namespaceURI)
It is not an error if the namespace URI is not registered.
namespaceURI
- The URI for the namespace. Must not be null or the empty string.
String getNamespaceURI(String namespacePrefix)
It is not an error if the namespace prefix is not registered.
namespacePrefix
- The prefix for the namespace. Must not be null or the empty string.
Map getNamespaces()
Map getPrefixes()
void deleteNamespace(String namespaceURI)
Does nothing if the URI is not registered, or if the namespaceURI parameter is null or the empty string.
Note: Not yet implemented.
namespaceURI
- The URI for the namespace.
XMPAliasInfo resolveAlias(String aliasNS, String aliasProp)
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.
XMPAliasInfo[] findAliases(String aliasNS)
aliasNS
- a schema namespace URI
XMPAliasInfo findAlias(String qname)
qname
- an XML conform qname
Map getAliases()
XMPAliasInfo
-object.
Copyright © 1998–2022. All rights reserved.