org.alfresco.service.namespace
Class QNameMap

java.lang.Object
  extended by org.alfresco.service.namespace.QNameMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class QNameMap
extends java.lang.Object
implements java.util.Map, java.lang.Cloneable, java.io.Serializable

A Map that holds as it's key a QName stored in it's internal String representation. Calls to get and put automatically map the key to and from the QName representation.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry
 
Field Summary
protected  java.util.Map contents
           
protected static org.apache.commons.logging.Log logger
           
protected  NamespacePrefixResolverProvider provider
           
 
Constructor Summary
protected QNameMap()
          Constructor for Serialization mechanism
  QNameMap(NamespacePrefixResolverProvider provider)
          Constructor
 
Method Summary
 void clear()
           
 java.lang.Object clone()
          Shallow copy the map by copying keys and values into a new QNameMap
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
 java.util.Map getMapOfQNames()
           
protected  NamespacePrefixResolver getResolver()
          Helper to return a NamespacePrefixResolver instance - should -always- be used rather than holding onto a reference on the heap.
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
 int size()
           
 java.lang.String toString()
          Override Object.toString() to provide useful debug output
 java.util.Collection values()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

logger

protected static org.apache.commons.logging.Log logger

contents

protected java.util.Map contents

provider

protected NamespacePrefixResolverProvider provider
Constructor Detail

QNameMap

public QNameMap(NamespacePrefixResolverProvider provider)
Constructor

Parameters:
provider - Mandatory NamespacePrefixResolverProvider helper

QNameMap

protected QNameMap()
Constructor for Serialization mechanism

Method Detail

getResolver

protected final NamespacePrefixResolver getResolver()
Helper to return a NamespacePrefixResolver instance - should -always- be used rather than holding onto a reference on the heap.

Returns:
NamespacePrefixResolver

size

public final int size()
Specified by:
size in interface java.util.Map
See Also:
Map.size()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map
See Also:
Map.isEmpty()

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map
See Also:
Map.containsValue(java.lang.Object)

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
See Also:
Map.get(java.lang.Object)

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map
See Also:
java.util.Map#put(K, V)

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map
See Also:
Map.remove(java.lang.Object)

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map
See Also:
Map.putAll(java.util.Map)

clear

public void clear()
Specified by:
clear in interface java.util.Map
See Also:
Map.clear()

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map
See Also:
Map.keySet()

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map
See Also:
Map.values()

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map
See Also:
Map.entrySet()

toString

public java.lang.String toString()
Override Object.toString() to provide useful debug output

Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Shallow copy the map by copying keys and values into a new QNameMap

Overrides:
clone in class java.lang.Object

getMapOfQNames

public java.util.Map getMapOfQNames()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.