com.crystaldecisions.sdk.occa.report.data
Class GroupPath

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by com.crystaldecisions.sdk.occa.report.lib.ClonableList<E>
                  extended by com.crystaldecisions.sdk.occa.report.lib.ControllableList<E>
                      extended by com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector<java.lang.Object>
                          extended by com.crystaldecisions.sdk.occa.report.data.GroupPath
All Implemented Interfaces:
IGroupPath, IClone, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.Object>, java.util.Collection<java.lang.Object>, java.util.List<java.lang.Object>, java.util.RandomAccess

public class GroupPath
extends ReportSDKVector<java.lang.Object>
implements IGroupPath

This object is used to identify the location of a node in the totaller tree. In a string format, the group path is represented by a group path name or a string of numbers separated by a dash. The group path string is stored as an array.

There are two ways to modify the group path: Retrieve the path using the toString() method, modify the string, and store it using the fromString(java.lang.String) method. You can manipulate the items contained in this object by using the add, remove, and getItem methods inherited from java.util.List.

Note: This will not alter the totaller tree, only the GroupPath object, even if you have retrieved the group path from a totaller node.

When possible, use the interface IGroupPath to manipulate the GroupPath object.

See Also:
Serialized Form

Constructor Summary
GroupPath()
           
GroupPath(GroupPath src)
           
 
Method Summary
 void copyTo(java.lang.Object destObject, boolean deepCopy)
           Copies the contents of the object into the object specified by the first parameter.
 java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
           For internal use only.
 void endElement(java.lang.String eleName, java.util.Map objState)
           For internal use only.
 void fromString(java.lang.String stringValue)
          This method accepts a new group path string, parses it, and updates the Item array.
 boolean getByValue()
           For internal use only.
 java.lang.Object getQualifierItem(int index)
          Returns the qualifier part of the group name path (for example, /Country[USA] will return Country).
 java.lang.Object getValueItem(int index)
          Returns the value part of the group name path (for example, /Country[USA] will return USA).
 boolean hasContent(java.lang.Object destObj)
           Searches this GroupPath object to see if it contains the specified Object.
 void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
           For internal use only.
 void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt)
           For internal use only.
 void save(XMLWriter writer, XMLSerializationContext ctxt)
           For internal use only.
 void saveContents(XMLWriter writer, XMLSerializationContext ctxt)
           For internal use only.
 void setByValue(boolean byValue)
           For internal use only.
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
           For internal use only.
 int[] toIntArray()
          Returns the group path in an int array format.
 java.lang.String toString()
          Returns the group path in a string format.
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ReportSDKVector
add, add, addElement, elementAt, insertElementAt, isDirectlyControllable, removeAllElements
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ControllableList
addAll, addAll, clear, doControllerModification, enumerateMembers, getControllableMixin, iterator, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.lib.ClonableList
clone, findIndexOf
 
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

GroupPath

public GroupPath(GroupPath src)

GroupPath

public GroupPath()
Method Detail

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)

Copies the contents of the object into the object specified by the first parameter.

Overrides:
copyTo in class ControllableList<java.lang.Object>
Parameters:
destObject - The object that will contain a copy.
deepCopy - true if the method is to copy objects that are referenced by the object and false otherwise. If deepCopy is false and the object references other objects or collections, these objects and/or collections will not be copied; a reference to the objects referenced by the object will be kept though. If deepCopy is false and you modify the destObject parameter, the original object reflects these changes.

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)

For internal use only.

Overrides:
createMember in class ClonableList<java.lang.Object>

endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)

For internal use only.

Overrides:
endElement in class ClonableList<java.lang.Object>

fromString

public void fromString(java.lang.String stringValue)
Description copied from interface: IGroupPath

This method accepts a new group path string, parses it, and updates the Item array. You may use this method, or any of the methods that act on the item array, to modify the group path.

Specified by:
fromString in interface IGroupPath
Parameters:
stringValue - The new group path as a String.

getQualifierItem

public java.lang.Object getQualifierItem(int index)
Description copied from interface: IGroupPath

Returns the qualifier part of the group name path (for example, /Country[USA] will return Country).

Specified by:
getQualifierItem in interface IGroupPath
Parameters:
index - The position of the node in the tree, as it is represented in the group path string. For example, if the group string is /Country[USA]/ Region[California]/City[Los Angeles], then the value 2 returns City.
Returns:
The qualifier part of the group name as an object.

getValueItem

public java.lang.Object getValueItem(int index)
Description copied from interface: IGroupPath

Returns the value part of the group name path (for example, /Country[USA] will return USA).

Specified by:
getValueItem in interface IGroupPath
Parameters:
index - The position of the node in the tree, as it is represented in the group path string. For example, if the group string is /Country[USA]/ Region[California]/City[Los Angeles], then the value 2 returns City.
Returns:
java.lang.Object

hasContent

public boolean hasContent(java.lang.Object destObj)

Searches this GroupPath object to see if it contains the specified Object.

Overrides:
hasContent in class ClonableList<java.lang.Object>
Parameters:
destObj - The Object to search for.
Returns:
true if this collection contains the specified Object, false otherwise.

readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)

For internal use only.

Overrides:
readElement in class ClonableList<java.lang.Object>

save

public void save(XMLWriter writer,
                 XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Overrides:
save in class ClonableList<java.lang.Object>
Throws:
java.io.IOException

save

public void save(XMLWriter writer,
                 java.lang.String sTag,
                 XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Overrides:
save in class ClonableList<java.lang.Object>
Throws:
java.io.IOException

saveContents

public void saveContents(XMLWriter writer,
                         XMLSerializationContext ctxt)
                  throws java.io.IOException

For internal use only.

Overrides:
saveContents in class ClonableList<java.lang.Object>
Throws:
java.io.IOException

startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)

For internal use only.

Overrides:
startElement in class ClonableList<java.lang.Object>

toIntArray

public int[] toIntArray()
Description copied from interface: IGroupPath

Returns the group path in an int array format.

Specified by:
toIntArray in interface IGroupPath
Returns:
An array of int values that represent the group path.

toString

public java.lang.String toString()
Description copied from interface: IGroupPath

Returns the group path in a string format. The string value can be either a group path name (for example, /Canada/BC/Vancouver) or a series of numbers indicating each segment of the path in the group from the top-most node to the node represented by the group path. The numbers are separated by a dash.

Specified by:
toString in interface IGroupPath
Overrides:
toString in class java.util.AbstractCollection<java.lang.Object>
Returns:
The group path as a String.

getByValue

public boolean getByValue()

For internal use only.


setByValue

public void setByValue(boolean byValue)

For internal use only.