org.opensaml.xml
Class Namespace

java.lang.Object
  extended by org.opensaml.xml.Namespace

public class Namespace
extends java.lang.Object

Data structure for representing XML namespace attributes.


Constructor Summary
Namespace()
          Constructor.
Namespace(java.lang.String uri, java.lang.String prefix)
          Constructor.
 
Method Summary
 boolean alwaysDeclare()
          Gets wether this namespace should always be declared when marshalling, even if it was already declared on an ancestral element.
protected  void constructStringRepresentation()
          Constructs an XML namespace declaration string representing this namespace.
 boolean equals(java.lang.Object obj)
          Checks if the given object is the same as this Namespace.
 java.lang.String getNamespacePrefix()
          Gets the prefix of the namespace.
 java.lang.String getNamespaceURI()
          Gets the URI of the namespace.
 int hashCode()
          
 void setAlwaysDeclare(boolean shouldAlwaysDeclare)
          Sets wether this namespace should always be declared when marshalling, even if it was already declared on an ancestral element.
 void setNamespacePrefix(java.lang.String newPrefix)
          Sets the prefix of the namespace.
 void setNamespaceURI(java.lang.String newURI)
          Sets the URI of the namespace.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Namespace

public Namespace()
Constructor.


Namespace

public Namespace(java.lang.String uri,
                 java.lang.String prefix)
Constructor.

Parameters:
uri - the URI of the namespace
prefix - the prefix of the namespace
Method Detail

getNamespacePrefix

public java.lang.String getNamespacePrefix()
Gets the prefix of the namespace.

Returns:
the prefix of the namespace, may be null if this is a default namespace

setNamespacePrefix

public void setNamespacePrefix(java.lang.String newPrefix)
Sets the prefix of the namespace.

Parameters:
newPrefix - the prefix of the namespace

getNamespaceURI

public java.lang.String getNamespaceURI()
Gets the URI of the namespace.

Returns:
the URI of the namespace

setNamespaceURI

public void setNamespaceURI(java.lang.String newURI)
Sets the URI of the namespace.

Parameters:
newURI - the URI of the namespace

alwaysDeclare

public boolean alwaysDeclare()
Gets wether this namespace should always be declared when marshalling, even if it was already declared on an ancestral element.

Returns:
true if this namespace should always be declared, false if not

setAlwaysDeclare

public void setAlwaysDeclare(boolean shouldAlwaysDeclare)
Sets wether this namespace should always be declared when marshalling, even if it was already declared on an ancestral element.

Parameters:
shouldAlwaysDeclare - true if this namespace should always be declared, false if not

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Checks if the given object is the same as this Namespace. This is true if:

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:

constructStringRepresentation

protected void constructStringRepresentation()
Constructs an XML namespace declaration string representing this namespace.



Copyright © 2006-2012 Internet2. All Rights Reserved.