Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.run.xml
Class QualifiedName

java.lang.Object
  extended by com.tangosol.run.xml.QualifiedName


public class QualifiedName
extends java.lang.Object

A QualifiedName is a useful class to separately capture the xml namespace prefix and local name of xml elements and attributes as a single object (instead of having to parse them out of Strings all the time). For example, the xmlName "movie:definition" has the namespace prefix "movie" and the local name "definition". If there is no namespace prefix declared, the prefix is always returned as "".

Author:
bko 2011.06.22

Constructor Summary
QualifiedName(QualifiedName qualifiedName, java.lang.String localName)
          Standard Constructor (using a specified QualifiedName for the prefix).
QualifiedName(java.lang.String xmlName)
          Standard Constructor.
QualifiedName(java.lang.String prefix, java.lang.String localName)
          Standard Constructor.
QualifiedName(XmlElement xmlElement)
          Standard Constructor.

 

Method Summary
 boolean equals(java.lang.Object other)
          
 java.lang.String getLocalName()
          Returns the local name of the QualifiedName.
 java.lang.String getName()
          Returns the entire qualified name, including the prefix and local name.
 java.lang.String getPrefix()
          Returns the xml prefix of the QualifiedName.
 int hashCode()
          
 boolean hasPrefix()
          Returns boolean based on if the QualifiedName has a namespace prefix.
 java.lang.String toString()
          

 

Constructor Detail

QualifiedName

public QualifiedName(java.lang.String xmlName)
              throws java.util.UnknownFormatConversionException
Standard Constructor.
Parameters:
xmlName - The name of an xml element/attribute from which to create a qualified name. Must be of the format "prefix:name" or simply "name" (in which case the prefix is considered "")
Throws:
java.util.UnknownFormatConversionException - When the specified xmlName is invalid (contains mulitple :'s)

QualifiedName

public QualifiedName(XmlElement xmlElement)
              throws java.util.UnknownFormatConversionException
Standard Constructor.
Parameters:
xmlElement - An XmlElement from which to return the QualifiedName
Throws:
java.util.UnknownFormatConversionException - When the specified xmlElement is invalid (contains mulitple :'s)

QualifiedName

public QualifiedName(QualifiedName qualifiedName,
                     java.lang.String localName)
Standard Constructor (using a specified QualifiedName for the prefix).
Parameters:
qualifiedName - The QualifiedName on which to base the new QualifiedName.
localName - The local name for the new QualifiedName.

QualifiedName

public QualifiedName(java.lang.String prefix,
                     java.lang.String localName)
Standard Constructor.
Parameters:
prefix - The xmlns prefix for the QualifiedName
localName - The localname for the QualifiedName

Method Detail

equals

public boolean equals(java.lang.Object other)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getPrefix

public java.lang.String getPrefix()
Returns the xml prefix of the QualifiedName.
Returns:
Returns "" if the name is not qualified with a namespace prefix

getLocalName

public java.lang.String getLocalName()
Returns the local name of the QualifiedName.
Returns:
Returns the local part of a qualified name.

getName

public java.lang.String getName()
Returns the entire qualified name, including the prefix and local name.
Returns:
A string containing the entire qualified name, including prefix and local name.

hasPrefix

public boolean hasPrefix()
Returns boolean based on if the QualifiedName has a namespace prefix.
Returns:
true If the QualifiedName has an xmlns prefix

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.