|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.Fissures.seed.builder.ExportBuilder
public abstract class ExportBuilder
Generic Builder class for exporting objects from the Object Container to a particular file or data stream format.
Nested Class Summary | |
---|---|
protected class |
ExportBuilder.LogicalRecord
Inner class representing a single logical record. |
Field Summary | |
---|---|
protected java.lang.String |
builderType
|
protected boolean |
endOfGroup
|
protected boolean |
endOfLogical
|
protected boolean |
endOfPhysical
|
protected java.util.Vector |
exportMold
|
protected java.lang.String[] |
exportScript
|
protected int |
logicalPerPhysical
|
protected ExportBuilder.LogicalRecord |
logicalRecord
|
protected int |
logicalRecordCount
|
protected int |
logicalRecordLength
|
protected java.util.Vector |
logicalRecords
|
protected int |
nestingDepth
|
protected int[] |
nestingScore
|
protected java.io.OutputStream |
outputStream
|
protected boolean |
padEnabledFlag
|
protected boolean |
penDown
|
protected int |
physicalRecordLength
|
protected byte |
recordPadding
|
protected int |
scriptCursor
|
protected int[] |
scriptNesting
|
protected boolean |
vaxOrder
|
Constructor Summary | |
---|---|
ExportBuilder()
Create an export builder. |
|
ExportBuilder(java.io.OutputStream outStream)
Create an export builder connected to an output stream. |
Method Summary | |
---|---|
int |
build(java.lang.Object obj)
Build object into the export volume. |
protected abstract boolean |
checkTrigger(java.lang.String s)
Check provided string from export script to see if it's meant to trigger a special action. |
void |
close()
Close output export stream. |
void |
finish()
Implement final volume closure operations. |
int |
getNext()
Get next script element. |
java.lang.String |
getType()
This method returns the type of builder we are in the form of a unique string. |
boolean |
isPaddingEnabled()
Determines if padding is enabled or not. |
void |
open(java.io.OutputStream outStream)
Open output stream for export. |
protected abstract void |
packToRecord()
Pack (append) a byte array into a logical record. |
protected void |
padLogical()
Pad the end of a logical record with recordPadding bytes. |
protected void |
padPhysical()
Pad the end of a physical record with recordPadding bytes. |
protected void |
push(java.lang.Object obj)
Push next source object into export mold. |
void |
setLogicalRecLen(int len)
Set the logical record length of the output volume. |
void |
setPaddingEnabled(boolean b)
Sets if padding is enabled or not. |
void |
setPhysicalRecLen(int len)
Set the physical record length of the output volume. |
void |
setVaxOrder(boolean flag)
Set the word-order flag for the output volume (NOT CURRENTLY IMPLEMENTED). |
protected abstract void |
startNewLogical(SeedObject obj,
boolean continuation)
Create a new logical record and place it in the logicalRecord instance variable SeedObject is an object to be put into the new logical record, which can help to identify the traits that that logical record will have. |
void |
startVolume()
Trigger start of a new volume. |
protected abstract void |
volumeFinish()
Perform any finishing operations to the export volume |
protected boolean |
writeRecord()
Write a physical record of logical records to the output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String builderType
protected java.io.OutputStream outputStream
protected java.lang.String[] exportScript
protected int scriptCursor
protected int[] scriptNesting
protected int nestingDepth
protected int[] nestingScore
protected int logicalRecordLength
protected int physicalRecordLength
protected int logicalPerPhysical
protected int logicalRecordCount
protected java.util.Vector logicalRecords
protected java.util.Vector exportMold
protected byte recordPadding
protected boolean padEnabledFlag
protected boolean vaxOrder
protected boolean endOfGroup
protected boolean endOfLogical
protected boolean endOfPhysical
protected boolean penDown
protected ExportBuilder.LogicalRecord logicalRecord
Constructor Detail |
---|
public ExportBuilder()
public ExportBuilder(java.io.OutputStream outStream) throws BuilderException
BuilderException
Method Detail |
---|
public java.lang.String getType() throws BuilderException
BuilderException
public boolean isPaddingEnabled()
public void open(java.io.OutputStream outStream) throws BuilderException
BuilderException
public void close()
public void setLogicalRecLen(int len)
public void setPaddingEnabled(boolean b)
b
- true if padding is enabled, false otherwise.public void setPhysicalRecLen(int len)
public void setVaxOrder(boolean flag)
public void startVolume() throws BuilderException
BuilderException
public int getNext() throws java.lang.Exception
java.lang.Exception
public int build(java.lang.Object obj) throws java.lang.Exception
java.lang.Exception
public void finish() throws java.lang.Exception
java.lang.Exception
protected void push(java.lang.Object obj) throws java.lang.Exception
java.lang.Exception
protected boolean writeRecord() throws java.lang.Exception
java.lang.Exception
protected void padLogical()
protected void padPhysical() throws java.lang.Exception
java.lang.Exception
protected abstract void packToRecord() throws java.lang.Exception
java.lang.Exception
protected abstract boolean checkTrigger(java.lang.String s) throws java.lang.Exception
java.lang.Exception
protected abstract void volumeFinish() throws BuilderException
BuilderException
protected abstract void startNewLogical(SeedObject obj, boolean continuation) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |