org.apache.shindig.protocol.conversion.xstream
Class NamespaceSet

java.lang.Object
  extended by org.apache.shindig.protocol.conversion.xstream.NamespaceSet

public class NamespaceSet
extends Object

A container class that defines namespaces and subsequent element named for an element in the output stack. A set of active namespaces are defined by addNamespace and a name to prefixed name translation is specified by addPrefixedElement.


Constructor Summary
NamespaceSet()
           
 
Method Summary
 void addNamespace(String nsAttribute, String namespace)
          Add a namespace to the list.
 void addPrefixedElement(String elementName, String namespacedElementName)
          Add a localname translation.
 String getElementName(String name)
          Convert an element name, if necessary.
 Set<Map.Entry<String,String>> nameSpaceEntrySet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceSet

public NamespaceSet()
Method Detail

addNamespace

public void addNamespace(String nsAttribute,
                         String namespace)
Add a namespace to the list.

Parameters:
nsAttribute - the attribute to be used to specify the namespace
namespace - the namespace URI

addPrefixedElement

public void addPrefixedElement(String elementName,
                               String namespacedElementName)
Add a localname translation.

Parameters:
elementName - the local name of the element
namespacedElementName - the final name of the element with prefix.

getElementName

public String getElementName(String name)
Convert an element name, if necessary.

Parameters:
name - the name to be converted.
Returns:
the converted name, left as is if no conversion was required.

nameSpaceEntrySet

public Set<Map.Entry<String,String>> nameSpaceEntrySet()
Returns:
an Set of entries containing the namespace attributes and uris, attributes in the key, uri's in the value or each entry.


Copyright © 2007-2012. All Rights Reserved.