|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.adt.topology.object.properties.PropertyObject
com.ibm.adt.topology.object.properties.PropertyList
public class PropertyList
PropertyList is a component of the TopologyObject properties heirachy. It serves as the root PropertyObject in a TopologyObjects' property heirarchy, and provides the basis for building a navigable property structure that can be queried. PropertyList can contain any number of named properties encapsulated in a Property object. A Property object serves as the anchor for an individual named property, and it's value can be basic strings, other PropertyLists, PropertyArrays, or any other serializeable Java object. Using these PropertyObjects, a very complex property heiarchy can be constructed.
The format of a TopologyObject property heirarchy is as follows:
TopologyObject (must contain only one root PropertyList) PropertyList (may contain any number of Property objects) Property (value will contain one of the following...) PropertyArray (contains any number of one of the following...) PropertyList (may nest other Property objects) PropertyValue (encapsulates Object) PropertyList (may nest other Property objects) PropertyValue (encapsulates Object)PropertyObject instances may be nested any number of layers deep to create the specific property heirarchy that is desired. Once the root PropertyList is constructed, the PropertyList is finalized using the finalizePropertyTree() method.
Property
,
PropertyValue
,
PropertyArray
,
Serialized FormField Summary | |
---|---|
static int |
DEFAULT_COMPARATOR_KEY
Default comparator key value that can be specified when custom comparators are not required. |
static int |
IGNORE_COMPARATOR_KEY
Comparator key value that can be specified when a comparator should ignore the values of this PropertyList. |
Fields inherited from class com.ibm.adt.topology.object.properties.PropertyObject |
---|
hashCode, name |
Constructor Summary | |
---|---|
PropertyList()
Creates a PropertyList object. |
|
PropertyList(int comparatorKey)
Creates a PropertyList object with the specified comparatorKey. |
Method Summary | |
---|---|
(package private) void |
add(Property property)
Adds Property to Property without enforcing unique name requirements. |
void |
addAll(PropertyList properties)
Adds a collection of Property(s) to add to this PropertyList. |
void |
addProperty(Property property)
Adds a Property to the PropertyList. |
void |
copyAll(PropertyList properties,
boolean overwrite)
Copies a collection of Property(s) to this PropertyList. |
boolean |
equals(java.lang.Object o)
|
(package private) void |
finalizeProperty()
Finalizes the PropertyObject structure. |
void |
finalizePropertyTree(TopologyObject topologyObject)
Finalizes the property tree structure and makes it navigable and queryable. |
PropertyList |
findProperties(java.lang.String searchText,
boolean isCaseSensitive,
boolean isCollectionName,
boolean isPropertyName,
boolean isPropertyValue)
Search the PropertyList for occurrences of properties that match the specified criteria and return the matches in the form of a PropertyList. |
int |
getComparatorKey()
Returns the comparator key for this PropertyList. |
Property |
getProperty(java.lang.String name)
Get the Property object with the specified name. |
java.util.Collection |
getPropertyKeys()
Returns a collection of all keys contained in this PropertyList. |
PropertyObject |
getPropertyValue(java.lang.String key)
Retreive the Property value associated with the specified property key. |
int |
hashCode()
|
boolean |
isEmpty()
Test whether the PropertyList is empty. |
java.util.Iterator |
iterator()
Returns an Iterator for the PropertyList. |
java.lang.String |
peek()
Returns string that peeks the property value. |
boolean |
remove(Property property)
Removes the specified Property object from this PropertyList. |
void |
setComparatorKey(int comparatorKey)
Sets the comparator key for this PropertyList or overrides the comparatorKey specified in the constructor. |
int |
size()
Returns the size of the PropertyList. |
java.lang.Object[] |
toArray()
Returns the PropertyList as an array of Property objects. |
java.lang.String |
toString()
Returns the PropertyList formatted as a String. |
java.io.OutputStream |
toXML()
Returns the PropertyList in XML format as defined by TopologyObjectProperties.xsd. |
Methods inherited from class com.ibm.adt.topology.object.properties.PropertyObject |
---|
getKey, getName, getOrdinal, getParent, getRoot, setParent, setRoot |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_COMPARATOR_KEY
public static final int IGNORE_COMPARATOR_KEY
Constructor Detail |
---|
public PropertyList(int comparatorKey)
comparatorKey
- public PropertyList()
Method Detail |
---|
public final java.util.Collection getPropertyKeys()
public final Property getProperty(java.lang.String name)
name
-
public final PropertyList findProperties(java.lang.String searchText, boolean isCaseSensitive, boolean isCollectionName, boolean isPropertyName, boolean isPropertyValue) throws TopologyException
searchText
- -
a regular expression string to match againstisCaseSensitive
- -
true to search with case sensitivityisCollectionName
- -
true to return property collections if property name matches a
collection propertyisPropertyName
- -
true to search property namesisPropertyValue
- -
true to search property values
TopologyException
public final PropertyObject getPropertyValue(java.lang.String key) throws TopologyException
key
- -
The key of the property
TopologyException
- if invalid key is specifiedpublic final java.io.OutputStream toXML() throws TopologyException
TopologyException
public final void addAll(PropertyList properties)
properties
- public final void copyAll(PropertyList properties, boolean overwrite) throws TopologyException
properties
- overwrite
-
TopologyException
public final boolean remove(Property property)
property
- public final java.lang.Object[] toArray()
public final java.util.Iterator iterator()
public final boolean isEmpty()
public final int size()
public final void addProperty(Property property) throws TopologyException
property
- -
Property to add to this PropertyList.
TopologyException
- if name is not uniquepublic final java.lang.String toString()
toString
in class java.lang.Object
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public final int getComparatorKey()
public final void setComparatorKey(int comparatorKey)
comparatorKey
- the comparator key to setpublic final void finalizePropertyTree(TopologyObject topologyObject)
public final java.lang.String peek()
PropertyObject
peek
in class PropertyObject
final void add(Property property)
property
- Property to add to this PropertyList.final void finalizeProperty()
PropertyObject
finalizeProperty
in class PropertyObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |