com.simonstl.moe
Class ComponentSet
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--java.util.HashSet
|
+--com.simonstl.moe.ComponentSet
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, ComponentCollectionI, ComponentSetI, java.io.Serializable, java.util.Set
- public class ComponentSet
- extends java.util.HashSet
- implements ComponentSetI
The ComponentSet class extends HashSet to support unordered content (typically but not necessarily attributes) for document components.
Version 0.01 is based on the ComponentCollection class from FragmentFilter.
- Version:
- 0.01 24 August 2001
- Author:
- Simon St.Laurent
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
clone()
|
void |
setParent(CoreComponentI _parent)
Sets the parent objects on all the items contained in the Collection. |
java.lang.String |
toAttributes()
Warning: namespace collisions are possible in 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, 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.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
ComponentSet
public ComponentSet()
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()
- Warning: namespace collisions are possible in attributes. Whichever namespace is encountered last will be the one declared.
- 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
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
clone
public java.lang.Object clone()
- Specified by:
clone
in interface ComponentSetI
- Overrides:
clone
in class java.util.HashSet