org.dspace.app.xmlui.wing
Class AttributeMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,String>
          extended by org.dspace.app.xmlui.wing.AttributeMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>

public class AttributeMap
extends HashMap<String,String>

A simplified Wing version of an AttributeMap. If a namespace is set it is applied to all attributes in the Map. This is typically not what one would expect but it makes the syntax easier for Wing Elements. Either all the attributes come from one namespace or the other, but never two at the same time.

Author:
Scott Phillips
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
AttributeMap()
           
 
Method Summary
 Namespace getNamespace()
           
 String put(String key, boolean value)
          Another variation of the put method to convert boolean values into strings.
 String put(String key, int value)
          Another variation of the put method to convert integer values into strings.
 void setNamespace(Namespace namespace)
          Set the namespace for all attributes contained within this map.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

AttributeMap

public AttributeMap()
Method Detail

setNamespace

public void setNamespace(Namespace namespace)
Set the namespace for all attributes contained within this map.

Parameters:
namespace - The new namespace.

getNamespace

public Namespace getNamespace()
Returns:
The namespace for all the attributes contained within this map.

put

public String put(String key,
                  int value)
Another variation of the put method to convert integer values into strings.

Parameters:
key - The attribute's name.
value - The value of the attribute.
Returns:

put

public String put(String key,
                  boolean value)
Another variation of the put method to convert boolean values into strings. The values "yes" or "no" will be used in replacement of the boolean value.

Parameters:
key -
value -
Returns:


Copyright © 2012 DuraSpace. All Rights Reserved.