wt.series
Class HarvardSeries

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

public class HarvardSeries
extends MultilevelSeries
implements Externalizable

Defines a sequencing model of another subclassed series separated by a delimiter. In the classic definition a harvard series is like 1, 1.1, 1.1.1, etc.

This harvard series can contain any other predefined subclassed series. For example, a harvard series could be like A, A.A, A.A.A, etc.

Use the newHarvardSeries static factory method(s), not the HarvardSeries constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: true

See Also:
Serialized Form

Nested Class Summary
private static class HarvardSeries.SeriesProperties
           
 
Field Summary
private static String CLASSNAME
           
private static String DEFAULT
           
private static Character delimiter
           
static String DELIMITER
          Label for the attribute; The delimiter that separates to adjacent subvalues within the series.
static long EXTERNALIZATION_VERSION_UID
           
private static Set FAILED_CLASSES
           
private static Integer NO_ARG_LEVEL
           
private static String NO_ARG_VALUE
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String SERIES_NAME
          Label for the attribute.
private static String SERIES_NAMES
           
private static Hashtable seriesMap
           
private  String seriesName
           
 
Fields inherited from class wt.series.MultilevelSeries
DEPTH, LEVEL, SUBSERIES
 
Fields inherited from class wt.series.Series
VALUE
 
Constructor Summary
HarvardSeries()
           
HarvardSeries(String seriesName)
           
 
Method Summary
protected  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.
 String getConceptualClassname()
          Deprecated.  
static Character getDelimiter()
          Gets the value of the attribute: DELIMITER.
 Character getSeriesDelimiter()
           
 Integer getSeriesDepth()
           
 String getSeriesName()
          Gets the value of the attribute: SERIES_NAME.
 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.
protected  void initialize()
          

Supported API: true
protected  void initialize(Series[] values)
          Supports initialization, following construction of an instance.
protected  void initialize(String seriesName, Series[] values)
          Supports initialization, following construction of an instance.
 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.
private  HarvardSeries.SeriesProperties lookInMap()
           
static HarvardSeries newHarvardSeries()
          Makes a new instance.
static HarvardSeries newHarvardSeries(Series[] values)
          Makes a new instance where the value is set to the given array of series.
static HarvardSeries newHarvardSeries(String seriesName, Series[] values)
          Makes a new instance where the value is set to the given array of series.
 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(HarvardSeries 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 setDelimiter(Character a_Delimiter)
          Sets the value of the attribute: DELIMITER.
 void setSubvalue(Series aValue)
          Sets the subvalue at the current level within the series.
 void setValue(String a_Value)
          Sets the value of the attribute: VALUE.
private  int smallestLevelOf(HarvardSeries left, HarvardSeries right)
           
 void toLeft()
          Moves the current level one to the left.
 void toRight()
          Moves the current level one to the right.
protected  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.MultilevelSeries
getDepth, getLevel, getSubseries, intSetLevel, newMultilevelSeries, newMultilevelSeries, newMultilevelSeries, readVersion, setDepth, setLevel, setSubseries
 
Methods inherited from class wt.series.Series
clone, getClassInfo, getValue, newSeries, newSeries, readVersion, setValueWithoutValidating, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DELIMITER

public static final String DELIMITER
Label for the attribute; The delimiter that separates to adjacent subvalues within the series.

Supported API: true

See Also:
Constant Field Values

delimiter

private static Character delimiter

SERIES_NAME

public static final String SERIES_NAME
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

seriesName

private String seriesName

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

seriesMap

private static Hashtable seriesMap

DEFAULT

private static final String DEFAULT
See Also:
Constant Field Values

SERIES_NAMES

private static final String SERIES_NAMES
See Also:
Constant Field Values

NO_ARG_VALUE

private static final String NO_ARG_VALUE

NO_ARG_LEVEL

private static final Integer NO_ARG_LEVEL

FAILED_CLASSES

private static final Set FAILED_CLASSES
Constructor Detail

HarvardSeries

public HarvardSeries()

HarvardSeries

public HarvardSeries(String seriesName)
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 MultilevelSeries
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 MultilevelSeries
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(HarvardSeries 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 MultilevelSeries
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 MultilevelSeries
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getDelimiter

public static Character getDelimiter()
Gets the value of the attribute: DELIMITER. The delimiter that separates to adjacent subvalues within the series.

Supported API: true

Returns:
Character

setDelimiter

protected static void setDelimiter(Character a_Delimiter)
                            throws WTPropertyVetoException
Sets the value of the attribute: DELIMITER. The delimiter that separates to adjacent subvalues within the series.

Supported API: true

Parameters:
a_Delimiter -
Throws:
WTPropertyVetoException

getSeriesName

public String getSeriesName()
Gets the value of the attribute: SERIES_NAME.

Supported API: false

Returns:
String

newHarvardSeries

public static HarvardSeries newHarvardSeries()
                                      throws SeriesException,
                                             WTPropertyVetoException
Makes a new instance.

Supported API: true

Returns:
HarvardSeries
Throws:
SeriesException
WTPropertyVetoException

newHarvardSeries

public static HarvardSeries newHarvardSeries(Series[] values)
                                      throws SeriesException,
                                             WTPropertyVetoException
Makes a new instance where the value is set to the given array of series.

Supported API: true

Parameters:
values -
Returns:
HarvardSeries
Throws:
SeriesException
WTPropertyVetoException

initialize

protected void initialize(Series[] values)
                   throws SeriesException,
                          WTPropertyVetoException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
values -
Throws:
SeriesException
WTPropertyVetoException

reset

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

Supported API: true

Overrides:
reset in class MultilevelSeries
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

Overrides:
increment in class MultilevelSeries
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

Overrides:
decrement in class MultilevelSeries
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

Overrides:
equals in class MultilevelSeries
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

Overrides:
lessThan in class MultilevelSeries
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

Overrides:
greaterThan in class MultilevelSeries
Parameters:
object -
Returns:
boolean

toLeft

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

Supported API: true

Overrides:
toLeft in class MultilevelSeries
Throws:
SeriesException
WTPropertyVetoException

toRight

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

Supported API: true

Overrides:
toRight in class MultilevelSeries
Throws:
SeriesException
WTPropertyVetoException

getSubvalue

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

Supported API: true

Overrides:
getSubvalue in class MultilevelSeries
Returns:
Series
Throws:
SeriesException
WTPropertyVetoException

setSubvalue

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

Supported API: true

Overrides:
setSubvalue in class MultilevelSeries
Parameters:
aValue -
Throws:
WTPropertyVetoException

initialize

protected void initialize()
                   throws WTPropertyVetoException


Supported API: true

Throws:
WTPropertyVetoException

newHarvardSeries

public static HarvardSeries newHarvardSeries(String seriesName,
                                             Series[] values)
                                      throws SeriesException,
                                             WTPropertyVetoException
Makes a new instance where the value is set to the given array of series.

Supported API: true

Parameters:
seriesName -
values -
Returns:
HarvardSeries
Throws:
SeriesException
WTPropertyVetoException

initialize

protected void initialize(String seriesName,
                          Series[] values)
                   throws SeriesException,
                          WTPropertyVetoException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
seriesName -
values -
Throws:
SeriesException
WTPropertyVetoException

calculateLevel

protected Integer calculateLevel(String aValue)


Supported API: false

Specified by:
calculateLevel in class MultilevelSeries
Parameters:
aValue -
Returns:
Integer

validateArgs

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


Supported API: false

Specified by:
validateArgs in class MultilevelSeries
Parameters:
aValue -
aLevel -
Throws:
SeriesException

setValue

public void setValue(String a_Value)
              throws WTPropertyVetoException
Description copied from class: Series
Sets the value of the attribute: VALUE. The current value of an increment in the series.

Supported API: true

Overrides:
setValue in class Series
Parameters:
a_Value -
Throws:
WTPropertyVetoException

smallestLevelOf

private int smallestLevelOf(HarvardSeries left,
                            HarvardSeries right)

getSeriesDelimiter

public Character getSeriesDelimiter()

getSeriesDepth

public Integer getSeriesDepth()

lookInMap

private HarvardSeries.SeriesProperties lookInMap()