com.simonstl.moe.namespace
Class NamespaceSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.HashSet
                    |
                    +--com.simonstl.moe.namespace.NamespaceSet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, ComponentCollectionI, ComponentSetI, NamespaceSetI, java.io.Serializable, java.util.Set

public class NamespaceSet
extends java.util.HashSet
implements NamespaceSetI

The NamespaceSet class is a NamespaceSetI, created by NamespaceContext.

This class is just getting started. There is no implementation of the extra methods in NamespaceI (getPrefix, getURI) at present.

Version 0.01 is Abstract class.

Version:
0.01 24 August 2001
Author:
Simon St.Laurent
See Also:
Serialized Form

Constructor Summary
NamespaceSet()
           
 
Method Summary
 java.lang.String getPrefix(java.lang.String URI)
          Given a prefix, it returns the URI to which that prefix maps.
 java.lang.String getURI(java.lang.String prefix)
          Given a URI, it returns the first prefix it finds matching it.
 void setParent(CoreComponentI _parent)
          Sets the parent objects on all the items contained in the Collection.
 java.lang.String toAttributes()
          Without a list of current namespaces, the collection should report itself as XML attributes with declarations for all namespaces used by those attributes.
 java.lang.String toAttributes(ComponentSet namespaceContext)
          Given a list of current namespaces, the collection should report itself as XML attributes without declarations for namespaces presently in use.
 java.lang.String toElements()
          Without a list of current namespaces, the collection should report itself as XML elements with declarations for all namespaces used by those attributes.
 java.lang.String toElements(ComponentSet namespaceContext)
          Given a list of current namespaces, the collection should report itself as XML elements without declarations for namespaces presently in use.
 java.lang.String toString()
          toString() should report as attributes for unordered content, elements for ordered.
 java.lang.String toString(ComponentSet namespaceContext)
          toString(ComponentSet namespaceContext) should report as attributes for unordered content, elements for ordered, with an understanding of the namespaces already declared.
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface com.simonstl.moe.ComponentSetI
clone
 

Constructor Detail

NamespaceSet

public NamespaceSet()
Method Detail

toString

public java.lang.String toString()
Description copied from interface: ComponentCollectionI
toString() should report as attributes for unordered content, elements for ordered.
Specified by:
toString in interface ComponentCollectionI
Overrides:
toString in class java.util.AbstractCollection

toString

public java.lang.String toString(ComponentSet namespaceContext)
Description copied from interface: ComponentCollectionI
toString(ComponentSet namespaceContext) should report as attributes for unordered content, elements for ordered, with an understanding of the namespaces already declared.
Specified by:
toString in interface ComponentCollectionI

toAttributes

public java.lang.String toAttributes(ComponentSet namespaceContext)
Description copied from interface: ComponentCollectionI
Given a list of current namespaces, the collection should report itself as XML attributes without declarations for namespaces presently in use.
Specified by:
toAttributes in interface ComponentCollectionI

toAttributes

public java.lang.String toAttributes()
Description copied from interface: ComponentCollectionI
Without a list of current namespaces, the collection should report itself as XML attributes with declarations for all namespaces used by those attributes.
Specified by:
toAttributes in interface ComponentCollectionI

toElements

public java.lang.String toElements(ComponentSet namespaceContext)
Description copied from interface: ComponentCollectionI
Given a list of current namespaces, the collection should report itself as XML elements without declarations for namespaces presently in use.
Specified by:
toElements in interface ComponentCollectionI

toElements

public java.lang.String toElements()
Description copied from interface: ComponentCollectionI
Without a list of current namespaces, the collection should report itself as XML elements with declarations for all namespaces used by those attributes.
Specified by:
toElements in interface ComponentCollectionI

getURI

public java.lang.String getURI(java.lang.String prefix)
Description copied from interface: NamespaceSetI
Given a URI, it returns the first prefix it finds matching it. Because multiple namespace prefixes may be mapped to a given URI, this may not return the expected prefix.
Specified by:
getURI in interface NamespaceSetI

getPrefix

public java.lang.String getPrefix(java.lang.String URI)
Description copied from interface: NamespaceSetI
Given a prefix, it returns the URI to which that prefix maps. This is a processed set of namespaces applying to a current context, so only one URI will be returned.
Specified by:
getPrefix in interface NamespaceSetI

setParent

public void setParent(CoreComponentI _parent)
Description copied from interface: ComponentCollectionI
Sets the parent objects on all the items contained in the Collection.
Specified by:
setParent in interface ComponentCollectionI