org.opensaml.xml.util
Class AttributeMap

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

@NotThreadSafe
public class AttributeMap
extends Object
implements Map<QName,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
Map.Entry<K,V>
 
Constructor Summary
AttributeMap(XMLObject newOwner)
          Constructor.
 
Method Summary
 void clear()
          
 boolean containsKey(Object key)
          
 boolean containsValue(Object value)
          
 void deregisterID(QName attributeName)
          Deregister an attribute as having a type of ID.
 Set<Map.Entry<QName,String>> entrySet()
          Returns the set of entries.
 String get(Object key)
          
 boolean isEmpty()
          
 boolean isIDAttribute(QName attributeName)
          Check whether a given attribute is locally registered as having an ID type within this AttributeMap instance.
 Set<QName> keySet()
          Returns the set of keys.
 String put(QName attributeName, String value)
          
 void putAll(Map<? extends QName,? extends String> t)
          
 void registerID(QName attributeName)
          Register an attribute as having a type of ID.
 String remove(Object key)
          
 int size()
          
 Collection<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 NullPointerException
Constructor.

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

put

public String put(QName attributeName,
                  String value)

Specified by:
put in interface Map<QName,String>

clear

public void clear()

Specified by:
clear in interface Map<QName,String>

keySet

public Set<QName> keySet()
Returns the set of keys.

Specified by:
keySet in interface Map<QName,String>
Returns:
unmodifiable set of keys

size

public int size()

Specified by:
size in interface Map<QName,String>

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Map<QName,String>

containsKey

public boolean containsKey(Object key)

Specified by:
containsKey in interface Map<QName,String>

containsValue

public boolean containsValue(Object value)

Specified by:
containsValue in interface Map<QName,String>

get

public String get(Object key)

Specified by:
get in interface Map<QName,String>

remove

public String remove(Object key)

Specified by:
remove in interface Map<QName,String>

putAll

public void putAll(Map<? extends QName,? extends String> t)

Specified by:
putAll in interface Map<QName,String>

values

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

Specified by:
values in interface Map<QName,String>
Returns:
an unmodifiable collection of values

entrySet

public Set<Map.Entry<QName,String>> entrySet()
Returns the set of entries.

Specified by:
entrySet in interface Map<QName,String>
Returns:
unmodifiable set of entries

registerID

public void registerID(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(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(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.