com.bankframe.examples.txnhandler.connector.coboltest.parser.cobol
Class CobolGroup

java.lang.Object
  extended by com.bankframe.examples.txnhandler.connector.coboltest.parser.cobol.CobolGroup

public class CobolGroup
extends Object

This class represent a Cobol Group


Field Summary
static short MAX_LEVEL_NUMBER
          The maximum allowed level value
static short MIN_LEVEL_NUMBER
          The minimum allowed level value
static short[] SPECIAL_LEVEL_NUMBERS
          The other special levels ---XY
 
Constructor Summary
CobolGroup(short level, String name)
          CobolGroup constructor
CobolGroup(short level, String name, CobolGroup parentGroup)
          CobolGroup constructor
 
Method Summary
 void addCobolElementryDataItem(CobolElementryDataItem dataItem)
          This method adds a Cobol data item to this group.
 void addGroup(CobolGroup group)
          This method adds a Cobol group to this CobolGroup.
 Iterator getItems()
           
 short getLevel()
          This method gets the Cobol level number of this record.
 long getMaximumOccurs()
          This method gets the maximum number of times the group occurs.
 long getMinimumOccurs()
          This method gets the minimum number of times the group occurs.
 String getName()
          This method gets the name of this group.
 Object getNextItem()
          This method gets the next data structure (Group/DataItem) in the collection of elements which belong to this record.
 boolean hasMoreItems()
          This method determines if this Group contains anymore data structures.
 boolean isNextItemElementryDataItem()
          This method determines if the next datastructure which is part of this group is a CobolElementryDataItem.
 boolean isNextItemGroup()
          This method determines if the next datastructure which is part of this group is a CobolGroup.
 boolean isSpecialLevelNumber(short levelNumber)
          Insert the method's description here.
 void setMaximumOccurs(long occurs)
          This method sets the maximum number of times the group occurs.
 void setMinimumOccurs(long occurs)
          This method sets the minimum number of times the group occurs.
 void setParentGroup(CobolGroup parentGroup)
          This method set the Parent group of this group
 String toString()
          just4test
 String toString(int level)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_LEVEL_NUMBER

public static final short MIN_LEVEL_NUMBER
The minimum allowed level value

See Also:
Constant Field Values

MAX_LEVEL_NUMBER

public static final short MAX_LEVEL_NUMBER
The maximum allowed level value

See Also:
Constant Field Values

SPECIAL_LEVEL_NUMBERS

public static final short[] SPECIAL_LEVEL_NUMBERS
The other special levels ---XY

Constructor Detail

CobolGroup

public CobolGroup(short level,
                  String name)
           throws InvalidCobolLevelException
CobolGroup constructor

Parameters:
level - the cobol level number
name - the name of the group
Throws:
InvalidCobolLevelException

CobolGroup

public CobolGroup(short level,
                  String name,
                  CobolGroup parentGroup)
           throws InvalidCobolLevelException
CobolGroup constructor

Parameters:
level - the cobol level number
name - the name of the group
parentGroup - the parent of this group. Null if group has no parent;
Throws:
InvalidCobolLevelException
Method Detail

addCobolElementryDataItem

public void addCobolElementryDataItem(CobolElementryDataItem dataItem)
This method adds a Cobol data item to this group.

Parameters:
dataItem - the CobolElementryDataItem to add to this record.

addGroup

public void addGroup(CobolGroup group)
This method adds a Cobol group to this CobolGroup.

Parameters:
group - the CobolGroup to add.

getItems

public Iterator getItems()

getLevel

public short getLevel()
This method gets the Cobol level number of this record.

Returns:
the record level number.

getMaximumOccurs

public long getMaximumOccurs()
This method gets the maximum number of times the group occurs.

Returns:
the maximum number of times the group occurs.

getMinimumOccurs

public long getMinimumOccurs()
This method gets the minimum number of times the group occurs.

Returns:
the minimum number of times the group occurs.

getName

public String getName()
This method gets the name of this group.

Returns:
the group name.

getNextItem

public Object getNextItem()
This method gets the next data structure (Group/DataItem) in the collection of elements which belong to this record.

Returns:
Object the next data structure.

hasMoreItems

public boolean hasMoreItems()
This method determines if this Group contains anymore data structures.

Returns:
true if more elements exist otherwise false;

isNextItemElementryDataItem

public boolean isNextItemElementryDataItem()
This method determines if the next datastructure which is part of this group is a CobolElementryDataItem.

Returns:
true if the next item is a CobolElementryDataItem otherwise false.

isNextItemGroup

public boolean isNextItemGroup()
This method determines if the next datastructure which is part of this group is a CobolGroup.

Returns:
true if the next item is a CobolGroup otherwise false.

isSpecialLevelNumber

public boolean isSpecialLevelNumber(short levelNumber)
Insert the method's description here. Creation date: (8/3/2001 10:51:17 AM)

Parameters:
levelNumber - short
Returns:
boolean

setMaximumOccurs

public void setMaximumOccurs(long occurs)
This method sets the maximum number of times the group occurs.

Parameters:
occurs - the maximum number of times the group occurs.

setMinimumOccurs

public void setMinimumOccurs(long occurs)
This method sets the minimum number of times the group occurs.

Parameters:
occurs - the minimum number of times the group occurs.

setParentGroup

public void setParentGroup(CobolGroup parentGroup)
This method set the Parent group of this group

Parameters:
parentGroup - the parent of this group

toString

public String toString()
just4test

Overrides:
toString in class Object

toString

public String toString(int level)


Copyright © 2005, 2007, Oracle. All rights reserved.