Package org.opensaml.core.xml
Class Namespace
java.lang.Object
org.opensaml.core.xml.Namespace
public class Namespace extends Object
Data structure for representing XML namespace attributes.
-
Field Summary
Fields Modifier and Type Field Description private String
namespacePrefix
Prefix of the namespace.private String
namespaceURI
URI of the namespace.private String
nsStr
String representation of this namespace. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected void
constructStringRepresentation()
Constructs an XML namespace declaration string representing this namespace.boolean
equals(Object obj)
Checks if the given object is the same as this Namespace.String
getNamespacePrefix()
Gets the prefix of the namespace.String
getNamespaceURI()
Gets the URI of the namespace.int
hashCode()
String
toString()
-
Field Details
-
namespaceURI
URI of the namespace. -
namespacePrefix
Prefix of the namespace. -
nsStr
String representation of this namespace.
-
-
Constructor Details
-
Namespace
Constructor.- Parameters:
uri
- the URI of the namespaceprefix
- the prefix of the namespace
-
-
Method Details
-
getNamespacePrefix
Gets the prefix of the namespace.- Returns:
- the prefix of the namespace, may be null if this is a default namespace
-
getNamespaceURI
Gets the URI of the namespace.- Returns:
- the URI of the namespace
-
toString
-
hashCode
public int hashCode() -
equals
Checks if the given object is the same as this Namespace. This is true if:- The given object is of type
Namespace
- The given object's namespace URI is the same as this object's namespace URI
- The given object's namespace prefix is the same as this object's namespace prefix
- The given object is of type
-
constructStringRepresentation
protected void constructStringRepresentation()Constructs an XML namespace declaration string representing this namespace.
-