|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.Fissures.seed.builder.ObjectBuilder
public abstract class ObjectBuilder
This class is the abstract representation of all builders for the SEED classes framework. The primary builder class derived from this will be for building SEED objects, but the design is being left open for other types of things to be built on the import end of things.
Field Summary | |
---|---|
protected ObjectContainer |
buildContainer
|
protected java.lang.String |
builderType
|
protected java.util.Vector |
buildFilterVector
|
protected boolean |
continuationFlag
|
protected java.lang.Object |
currentObject
|
protected boolean |
largeCoeffFlag
|
protected boolean |
recordBeginFlag
|
protected char |
recordType
|
protected int |
volumeNumber
|
Constructor Summary | |
---|---|
ObjectBuilder()
Create a new object builder. |
Method Summary | |
---|---|
abstract int |
build(byte[] record)
This is the generic build function that the caller uses to have objects constructed. |
abstract int |
build(java.lang.String delStr)
Construct an object or objects from the delimited String. |
ObjectContainer |
getContainer()
Return the persistent storage container to the caller. |
java.lang.Object |
getObject()
Return the most recently built object to the caller. |
java.lang.String |
getType()
Get Object Builder type. |
int |
getVolume()
Get the volume number that this builder is currently set at. |
void |
incrementVolume()
Increment the volume number when a new data stream is being read in. |
void |
registerFilter(BuilderFilter bf)
Register an instantiated BuilderFilter with this builder. |
void |
removeCurrent()
Delete current object from the Builder. |
abstract void |
reset()
Reset the builder to its initial state. |
void |
setContinuationFlag(boolean flag)
This method flags that the arriving record section is a continuation of a previous record section. |
void |
setLargeCoeffFlag(boolean flag)
Set this flag to true when the current input group represents a continuation of coefficients, where the previous group ran out of characters to represent the entire dataset. |
void |
setRecordBeginFlag(boolean flag)
Set this flag to true if the incoming record section originated from the beginning of a logical record. |
void |
setRecordType(byte recType)
Indicate the type of record the object is being built from. |
void |
setVolume(int volNum)
Set the volume number to specific starting value. |
abstract int |
store()
Store object to concrete Object Container. |
java.lang.String |
toString()
Display a String representation of the Builder's current object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String builderType
protected ObjectContainer buildContainer
protected java.lang.Object currentObject
protected java.util.Vector buildFilterVector
protected char recordType
protected boolean continuationFlag
protected boolean recordBeginFlag
protected boolean largeCoeffFlag
protected int volumeNumber
Constructor Detail |
---|
public ObjectBuilder()
Method Detail |
---|
public void registerFilter(BuilderFilter bf) throws BuilderException
The BuilderFilter acts as a 'request module' or 'query module' that will restrict what objects are built and stored, based on the restriction parameters contained in the registered BuilderFilter object attached to this Builder.
Because a single BuilderFilter parameter is an OR condition (such as you get a positive response for a station match if ANY ONE of the stations in the list matches), to have a list of separate, internally bound conditions (such as one station ask for long-period data, but another station ask for broadband data), each condition 'cluster' must be contained in a separate BuilderFilter.
For this reason, the registerFilter method accepts multiple builderFilters to be registered with it, each representing a separate nucleus of acceptable values all bound to each other. Simply call registerFilter multiple times, each with a different BuilderFilter instance and each will be added to a Vector. Once registered, a BuilderFilter cannot be unregistered.
BuilderException
public java.lang.String getType() throws BuilderException
BuilderException
public java.lang.Object getObject()
public ObjectContainer getContainer() throws BuilderException
BuilderException
public java.lang.String toString()
toString
in class java.lang.Object
public void setRecordType(byte recType)
public void setContinuationFlag(boolean flag)
public void setRecordBeginFlag(boolean flag)
public void setLargeCoeffFlag(boolean flag)
public void removeCurrent()
public int getVolume()
public void incrementVolume()
public void setVolume(int volNum)
volNum
- volume number to set topublic abstract int build(byte[] record) throws java.lang.Exception
java.lang.Exception
public abstract int build(java.lang.String delStr) throws java.lang.Exception
java.lang.Exception
public abstract int store() throws java.lang.Exception
java.lang.Exception
public abstract void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |