com.spire.pdf.interchange.metadata
Class PdfXmpNamespace

java.lang.Object
  extended by com.spire.pdf.interchange.metadata.PdfXmpNamespace

public class PdfXmpNamespace
extends java.lang.Object

The pdf xmp namespace.


Constructor Summary
PdfXmpNamespace(java.lang.String namespaceUri, java.lang.String namespacePrefix)
           
 
Method Summary
 java.lang.String getNamespacePrefix()
          The prefix for the namespace.
 java.lang.String getNamespaceUri()
          The URI for the namespace.
static java.lang.String registerNamespace(java.lang.String namespaceUri, java.lang.String suggestedNamespacePrefix)
          Register a namespace URI with a suggested prefix.
static void resetNamespaces()
          Resets the schema registry to its original state (creates a new one).
 

Constructor Detail

PdfXmpNamespace

public PdfXmpNamespace(java.lang.String namespaceUri,
                       java.lang.String namespacePrefix)
Method Detail

registerNamespace

public static java.lang.String registerNamespace(java.lang.String namespaceUri,
                                                 java.lang.String suggestedNamespacePrefix)
Register a namespace URI with a suggested prefix. It is not an error if the URI is already registered, no matter what the prefix is. If the URI is not registered but the suggested prefix is in use, a unique prefix is created from the suggested one. The actual registered prefix is always returned. The function result tells if the registered prefix is the suggested one. Note: No checking is presently done on either the URI or the prefix.

Parameters:
namespaceUri - The URI for the namespace. Must be a valid XML URI.
suggestedNamespacePrefix - The suggested prefix to be used if the URI is not yet registered. Must be a valid XML name.
Returns:
Returns the registered prefix for this URI, is equal to the suggestedPrefix if the namespace hasn't been registered before, otherwise the existing prefix.

resetNamespaces

public static void resetNamespaces()
Resets the schema registry to its original state (creates a new one). Resets the schema registry to its original state (creates a new one). Be careful this might break all existing XMPMeta-objects and should be used only for testing purposes.


getNamespaceUri

public java.lang.String getNamespaceUri()
The URI for the namespace. Must be a valid XML URI.


getNamespacePrefix

public java.lang.String getNamespacePrefix()
The prefix for the namespace. Must be a valid XML name.

Returns: