org.opensaml.xml.util
Class AttributeMap

java.lang.Object
  extended by org.opensaml.xml.util.AttributeMap
All Implemented Interfaces:
java.util.Map<javax.xml.namespace.QName,java.lang.String>

@NotThreadSafe
public class AttributeMap
extends java.lang.Object
implements java.util.Map<javax.xml.namespace.QName,java.lang.String>

A map of attribute names and attribute values that invalidates the DOM of the attribute owning XMLObject when the attributes change. Note:


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
AttributeMap(XMLObject newOwner)
          Constructor.
 
Method Summary
 void clear()
          
 boolean containsKey(java.lang.Object key)
          
 boolean containsValue(java.lang.Object value)
          
 void deregisterID(javax.xml.namespace.QName attributeName)
          Deregister an attribute as having a type of ID.
 java.util.Set<java.util.Map.Entry<javax.xml.namespace.QName,java.lang.String>> entrySet()
          Returns the set of entries.
 java.lang.String get(java.lang.Object key)
          
 boolean isEmpty()
          
 boolean isIDAttribute(javax.xml.namespace.QName attributeName)
          Check whether a given attribute is locally registered as having an ID type within this AttributeMap instance.
 java.util.Set<javax.xml.namespace.QName> keySet()
          Returns the set of keys.
 java.lang.String put(javax.xml.namespace.QName attributeName, java.lang.String value)
          
 void putAll(java.util.Map<? extends javax.xml.namespace.QName,? extends java.lang.String> t)
          
 void registerID(javax.xml.namespace.QName attributeName)
          Register an attribute as having a type of ID.
 java.lang.String remove(java.lang.Object key)
          
 int size()
          
 java.util.Collection<java.lang.String> values()
          Returns the values in this map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

AttributeMap

public AttributeMap(XMLObject newOwner)
             throws java.lang.NullPointerException
Constructor.

Parameters:
newOwner - the XMLObject that owns these attributes
Throws:
java.lang.NullPointerException - thrown if the given XMLObject is null
Method Detail

put

public java.lang.String put(javax.xml.namespace.QName attributeName,
                            java.lang.String value)

Specified by:
put in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

clear

public void clear()

Specified by:
clear in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

keySet

public java.util.Set<javax.xml.namespace.QName> keySet()
Returns the set of keys.

Specified by:
keySet in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>
Returns:
unmodifiable set of keys

size

public int size()

Specified by:
size in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

containsKey

public boolean containsKey(java.lang.Object key)

Specified by:
containsKey in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

containsValue

public boolean containsValue(java.lang.Object value)

Specified by:
containsValue in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

get

public java.lang.String get(java.lang.Object key)

Specified by:
get in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

remove

public java.lang.String remove(java.lang.Object key)

Specified by:
remove in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

putAll

public void putAll(java.util.Map<? extends javax.xml.namespace.QName,? extends java.lang.String> t)

Specified by:
putAll in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>

values

public java.util.Collection<java.lang.String> values()
Returns the values in this map.

Specified by:
values in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>
Returns:
an unmodifiable collection of values

entrySet

public java.util.Set<java.util.Map.Entry<javax.xml.namespace.QName,java.lang.String>> entrySet()
Returns the set of entries.

Specified by:
entrySet in interface java.util.Map<javax.xml.namespace.QName,java.lang.String>
Returns:
unmodifiable set of entries

registerID

public void registerID(javax.xml.namespace.QName attributeName)
Register an attribute as having a type of ID.

Parameters:
attributeName - the QName of the ID attribute to be registered

deregisterID

public void deregisterID(javax.xml.namespace.QName attributeName)
Deregister an attribute as having a type of ID.

Parameters:
attributeName - the QName of the ID attribute to be de-registered

isIDAttribute

public boolean isIDAttribute(javax.xml.namespace.QName attributeName)
Check whether a given attribute is locally registered as having an ID type within this AttributeMap instance.

Parameters:
attributeName - the QName of the attribute to be checked for ID type.
Returns:
true if attribute is registered as having an ID type.


Copyright © 2006-2010 Internet2. All Rights Reserved.