oracle.cabo.share.xml
Class NamespaceURI

java.lang.Object
  |
  +--oracle.cabo.share.xml.NamespaceURI

public final class NamespaceURI
extends java.lang.Object

Utility class to parse a string of the form namespacePrefix:name


Constructor Summary
NamespaceURI(java.lang.String namespace, java.lang.String name)
           
 
Method Summary
static NamespaceURI create(ParseContext context, java.lang.String namespaceURI, java.lang.String defaultNamespace)
          parses a string of the form namespacePrefix:name
 java.lang.String getName()
           
 java.lang.String getNamespace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceURI

public NamespaceURI(java.lang.String namespace,
                    java.lang.String name)
Method Detail

getNamespace

public java.lang.String getNamespace()
Returns:
the namespace of this URI

getName

public java.lang.String getName()
Returns:
the name portion of this URI

create

public static NamespaceURI create(ParseContext context,
                                  java.lang.String namespaceURI,
                                  java.lang.String defaultNamespace)
parses a string of the form namespacePrefix:name
Parameters:
context - the context to look up namespace prefixes and grab the ErrorLog from
namespaceURI - the string to parse. If there is no namespace prefix in this string, a private, default namespace will be used.
defaultNamespace - the default namespace to use, if no prefix was provided in namespaceURI.
Returns:
an object from which you can pull out the namespace and the name, or null if the string couldn't be parsed (in which case an error will be logged in the ErrorLog.
See Also:
ParseContext.getErrorLog()