wt.series
Class MultilevelSeries

java.lang.Object
  extended bywt.series.Series
      extended bywt.series.MultilevelSeries
All Implemented Interfaces:
Cloneable, Externalizable, NetFactor, ObjectMappable, Serializable
Direct Known Subclasses:
HarvardSeries

public abstract class MultilevelSeries
extends Series
implements Externalizable

Defines a sequencing model of a multilevel series where each level is of another subclassed simple (non-multilevel) series.

For example, this series could be 3 levels deep where the first level may be an integer series, and the second and third a character series. Thus, level one would produce increments like 1, 2, 3, etc. Levels two and three would produce increments like A, B, C, etc.



Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static Integer depth
           
static String DEPTH
          Label for the attribute; The maximum depth of levels the series can nest.
static long EXTERNALIZATION_VERSION_UID
           
private  Integer level
           
static String LEVEL
          Label for the attribute; The current level within a series that marks the depth.
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static String[] subseries
           
static String SUBSERIES
          Label for the attribute; The one or more subseries that constitute each level of the series.
 
Fields inherited from class wt.series.Series
VALUE
 
Constructor Summary
MultilevelSeries()
           
 
Method Summary
protected abstract  Integer calculateLevel(String aValue)
          

Supported API: false
 void decrement()
          Decrements the subvalue at the current level within the series to the next adjacent value.
 boolean equals(Series object)
          Tests if the subvalue at the current level within this series is equal to the subvalue at the current level within given one and returns true.
static Integer getDepth()
          Gets the value of the attribute: DEPTH.
 Integer getLevel()
          Gets the value of the attribute: LEVEL.
static String[] getSubseries()
          Gets the value of the attribute: SUBSERIES.
 Series getSubvalue()
          Gets the subvalue at the current level within the series.
 boolean greaterThan(Series object)
          Tests if the subvalue at the current level within this series is greater than to the subvalue at the current level within given one and returns true.
 void increment()
          Increments the subvalue at the current level within the series to the next adjacent value.
 void intSetLevel(Integer a_Level)
           
 boolean lessThan(Series object)
          Tests if the subvalue at the current level within this series is less than to the subvalue at the current level within given one and returns true.
static MultilevelSeries newMultilevelSeries(String userClassName)
          Makes a new instance where the value is set to the given array of series.
static MultilevelSeries newMultilevelSeries(String userClassName, String value)
          Makes a new instance where the value is set to the given value.
static MultilevelSeries newMultilevelSeries(String userClassName, String value, Integer level)
          Makes a new instance where the value is set to the given value and level.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(MultilevelSeries thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void reset()
          Resets the subvalue at the current level within the series to its min.
protected static void setDepth(Integer a_Depth)
          Sets the value of the attribute: DEPTH.
protected  void setLevel(Integer a_Level)
          Sets the value of the attribute: LEVEL.
protected static void setSubseries(String[] a_Subseries)
          Sets the value of the attribute: SUBSERIES.
protected  void setSubvalue(Series aValue)
          Sets the subvalue at the current level within the series.
 void toLeft()
          Moves the current level one to the left.
 void toRight()
          Moves the current level one to the right.
protected abstract  void validateArgs(String aValue, Integer aLevel)
          

Supported API: false
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.series.Series
clone, getClassInfo, getValue, newSeries, newSeries, readVersion, setValue, setValueWithoutValidating, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.NetFactor
getConceptualClassname
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DEPTH

public static final String DEPTH
Label for the attribute; The maximum depth of levels the series can nest.

Supported API: true

See Also:
Constant Field Values

depth

private static Integer depth

SUBSERIES

public static final String SUBSERIES
Label for the attribute; The one or more subseries that constitute each level of the series.

Supported API: true

See Also:
Constant Field Values

subseries

private static String[] subseries

LEVEL

public static final String LEVEL
Label for the attribute; The current level within a series that marks the depth.

Supported API: true

See Also:
Constant Field Values

level

private Integer level

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

MultilevelSeries

public MultilevelSeries()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class Series
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class Series
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(MultilevelSeries thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class Series
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class Series
Parameters:
input -
Throws:
SQLException
DatastoreException

getDepth

public static Integer getDepth()
Gets the value of the attribute: DEPTH. The maximum depth of levels the series can nest.

Supported API: true

Returns:
Integer

setDepth

protected static void setDepth(Integer a_Depth)
                        throws WTPropertyVetoException
Sets the value of the attribute: DEPTH. The maximum depth of levels the series can nest.

Supported API: true

Parameters:
a_Depth -
Throws:
WTPropertyVetoException

getSubseries

public static String[] getSubseries()
Gets the value of the attribute: SUBSERIES. The one or more subseries that constitute each level of the series.

Supported API: true

Returns:
String[]

setSubseries

protected static void setSubseries(String[] a_Subseries)
                            throws WTPropertyVetoException
Sets the value of the attribute: SUBSERIES. The one or more subseries that constitute each level of the series.

Supported API: true

Parameters:
a_Subseries -
Throws:
WTPropertyVetoException

getLevel

public Integer getLevel()
Gets the value of the attribute: LEVEL. The current level within a series that marks the depth.

Supported API: true

Returns:
Integer

setLevel

protected void setLevel(Integer a_Level)
Sets the value of the attribute: LEVEL. The current level within a series that marks the depth.

Supported API: true

Parameters:
a_Level -

newMultilevelSeries

public static final MultilevelSeries newMultilevelSeries(String userClassName)
                                                  throws SeriesException
Makes a new instance where the value is set to the given array of series.

Supported API: true

Parameters:
userClassName -
Returns:
MultilevelSeries
Throws:
SeriesException

newMultilevelSeries

public static final MultilevelSeries newMultilevelSeries(String userClassName,
                                                         String value)
                                                  throws SeriesException
Makes a new instance where the value is set to the given value.

Supported API: true

Parameters:
userClassName -
value -
Returns:
MultilevelSeries
Throws:
SeriesException

newMultilevelSeries

public static final MultilevelSeries newMultilevelSeries(String userClassName,
                                                         String value,
                                                         Integer level)
                                                  throws SeriesException
Makes a new instance where the value is set to the given value and level.

Supported API: true

Parameters:
userClassName -
value -
level -
Returns:
MultilevelSeries
Throws:
SeriesException

reset

public void reset()
           throws SeriesException,
                  WTPropertyVetoException
Resets the subvalue at the current level within the series to its min.

Supported API: true

Specified by:
reset in class Series
Throws:
SeriesException
WTPropertyVetoException

increment

public void increment()
               throws SeriesException,
                      WTPropertyVetoException
Increments the subvalue at the current level within the series to the next adjacent value.

Supported API: true

Specified by:
increment in class Series
Throws:
SeriesException
WTPropertyVetoException

decrement

public void decrement()
               throws SeriesException,
                      WTPropertyVetoException
Decrements the subvalue at the current level within the series to the next adjacent value.

Supported API: true

Specified by:
decrement in class Series
Throws:
SeriesException
WTPropertyVetoException

equals

public boolean equals(Series object)
Tests if the subvalue at the current level within this series is equal to the subvalue at the current level within given one and returns true. Otherwise, returns false.

Supported API: true

Specified by:
equals in class Series
Parameters:
object -
Returns:
boolean

lessThan

public boolean lessThan(Series object)
Tests if the subvalue at the current level within this series is less than to the subvalue at the current level within given one and returns true. Otherwise, returns false.

Supported API: true

Specified by:
lessThan in class Series
Parameters:
object -
Returns:
boolean

greaterThan

public boolean greaterThan(Series object)
Tests if the subvalue at the current level within this series is greater than to the subvalue at the current level within given one and returns true. Otherwise, returns false.

Supported API: true

Specified by:
greaterThan in class Series
Parameters:
object -
Returns:
boolean

toLeft

public void toLeft()
            throws SeriesException,
                   WTPropertyVetoException
Moves the current level one to the left.

Supported API: true

Throws:
SeriesException
WTPropertyVetoException

toRight

public void toRight()
             throws SeriesException,
                    WTPropertyVetoException
Moves the current level one to the right.

Supported API: true

Throws:
SeriesException
WTPropertyVetoException

getSubvalue

public Series getSubvalue()
                   throws SeriesException,
                          WTPropertyVetoException
Gets the subvalue at the current level within the series.

Supported API: true

Returns:
Series
Throws:
SeriesException
WTPropertyVetoException

setSubvalue

protected void setSubvalue(Series aValue)
                    throws WTPropertyVetoException
Sets the subvalue at the current level within the series.

Supported API: true

Parameters:
aValue -
Throws:
WTPropertyVetoException

calculateLevel

protected abstract Integer calculateLevel(String aValue)


Supported API: false

Parameters:
aValue -
Returns:
Integer

validateArgs

protected abstract void validateArgs(String aValue,
                                     Integer aLevel)
                              throws SeriesException


Supported API: false

Parameters:
aValue -
aLevel -
Throws:
SeriesException

intSetLevel

public void intSetLevel(Integer a_Level)