|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.Fissures.seed.builder.ExportBuilder
edu.iris.Fissures.seed.builder.BasicExportBuilder
public class BasicExportBuilder
Nested Class Summary | |
---|---|
protected static class |
BasicExportBuilder.ChannelInfo
Store channel info for export. |
protected static class |
BasicExportBuilder.ComplexNumber
|
protected class |
BasicExportBuilder.DataInfo
Data info for export. |
protected static class |
BasicExportBuilder.EventInfo
Store optional event info for export. |
protected static class |
BasicExportBuilder.ResponseInfo
Store optional response info for export. |
protected static class |
BasicExportBuilder.StationInfo
Store station info for Export. |
Nested classes/interfaces inherited from class edu.iris.Fissures.seed.builder.ExportBuilder |
---|
ExportBuilder.LogicalRecord |
Field Summary | |
---|---|
protected BasicExportBuilder.ChannelInfo |
currentChannel
|
protected BasicExportBuilder.StationInfo |
currentStation
|
static java.lang.String |
EMPTY_TEXT
Empty text. |
protected BasicExportBuilder.EventInfo |
eventInfo
|
protected boolean |
padFlag
|
protected java.util.List |
stationList
|
static double |
TWO_PI
|
static java.lang.Double |
ZERO_NUMBER
Zero number. |
Fields inherited from class edu.iris.Fissures.seed.builder.ExportBuilder |
---|
builderType, endOfGroup, endOfLogical, endOfPhysical, exportMold, exportScript, logicalPerPhysical, logicalRecord, logicalRecordCount, logicalRecordLength, logicalRecords, nestingDepth, nestingScore, outputStream, padEnabledFlag, penDown, physicalRecordLength, recordPadding, scriptCursor, scriptNesting, vaxOrder |
Constructor Summary | |
---|---|
|
BasicExportBuilder()
Create a basic export builder. |
protected |
BasicExportBuilder(boolean padFlag,
java.lang.String scriptString)
Create a basic export builder. |
Method Summary | |
---|---|
static java.lang.Number |
blkGetNumber(Blockette blk,
int fieldNum)
Gets the number value from the Blockette. |
static java.lang.Number |
blkGetNumber(Blockette blk,
int fieldNum,
int fieldIndex)
Gets the number value from the Blockette. |
static java.lang.Number |
blkGetNumber(Blockette blk,
int fieldNum,
int fieldIndex,
java.lang.Number defaultValue)
Gets the number value from the Blockette. |
static java.lang.String |
blkGetString(Blockette blk,
int fieldNum)
Gets the string value from the Blockette. |
static java.lang.String |
blkGetString(Blockette blk,
int fieldNum,
int fieldIndex)
Gets the string value from the Blockette. |
static Btime |
blkGetTime(Blockette blk,
int fieldNum)
Gets the time value from the Blockette. |
static Btime |
blkGetTime(Blockette blk,
int fieldNum,
int fieldIndex)
Gets the time value from the Blockette. |
protected boolean |
checkTrigger(java.lang.String s)
Check provided string from export script to see if it's meant to trigger a special action. |
protected void |
clearDataInfo()
Clears the data info. |
static java.lang.Double |
convertNumber(java.lang.Number n)
Convert Type B (Hz) to Type A (rad/sec). |
protected Blockette |
find_type_32(java.lang.String source_lookup_code)
Find blockette type 32. |
protected Blockette |
find_type_33(java.lang.String instrument_code)
Find blockette type 33. |
protected Blockette |
find_type_34(java.lang.String signal_units_code)
Find blockette type 34. |
protected BasicExportBuilder.ChannelInfo |
findChannelInfo(BasicExportBuilder.DataInfo dataInfo,
BasicExportBuilder.StationInfo stationInfo)
Gets the channel information for the data. |
protected BasicExportBuilder.StationInfo |
findStationInfo(BasicExportBuilder.DataInfo dataInfo)
Gets the station information for the data. |
protected BasicExportBuilder.DataInfo |
getDataInfo(int index)
Gets the data information for the specified index. |
static Btime |
getEndTime(Btime startTime,
int numSamples,
int srFactor,
int srMult)
Get the end time (as a Btime object). |
static Btime |
getEndTime(Btime startTime,
java.lang.Number numSamples,
java.lang.Number srFactor,
java.lang.Number srMult)
Get the end time (as a Btime object). |
protected float[] |
getFloatData()
Get the waveform data as floating point values. |
protected int[] |
getIntegerData()
Get the waveform data as integer values. |
protected void |
initExportScript(java.lang.String scriptString)
Initializes the export script array from the script string. |
protected void |
output_info()
Output the information. |
protected void |
packToRecord()
Pack (append) a byte array into a logical record. |
protected void |
packToRecord(Blockette blk)
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 |
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. |
protected void |
volumeFinish()
Finish up volume export operations. |
Methods inherited from class edu.iris.Fissures.seed.builder.ExportBuilder |
---|
build, close, finish, getNext, getType, isPaddingEnabled, open, push, setLogicalRecLen, setPaddingEnabled, setPhysicalRecLen, setVaxOrder, startVolume, writeRecord |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final boolean padFlag
public static java.lang.Double ZERO_NUMBER
public static java.lang.String EMPTY_TEXT
public static final double TWO_PI
protected java.util.List stationList
protected BasicExportBuilder.StationInfo currentStation
protected BasicExportBuilder.ChannelInfo currentChannel
protected BasicExportBuilder.EventInfo eventInfo
Constructor Detail |
---|
public BasicExportBuilder()
protected BasicExportBuilder(boolean padFlag, java.lang.String scriptString)
padFlag
- true to pad, false otherwise.scriptString
- the script string.getNext
Method Detail |
---|
public static java.lang.Number blkGetNumber(Blockette blk, int fieldNum)
blk
- the Blockette.fieldNum
- the field number.
public static java.lang.Number blkGetNumber(Blockette blk, int fieldNum, int fieldIndex)
blk
- the Blockette.fieldNum
- the field number.fieldIndex
- the field index or 0 if none.
public static java.lang.Number blkGetNumber(Blockette blk, int fieldNum, int fieldIndex, java.lang.Number defaultValue)
blk
- the Blockette.fieldNum
- the field number.fieldIndex
- the field index or 0 if none.defaultValue
- the default value to use for error.
public static java.lang.String blkGetString(Blockette blk, int fieldNum)
blk
- the Blockette.fieldNum
- the field number.
public static java.lang.String blkGetString(Blockette blk, int fieldNum, int fieldIndex)
blk
- the Blockette.fieldNum
- the field number.fieldIndex
- the field index or 0 if none.
public static Btime blkGetTime(Blockette blk, int fieldNum) throws java.lang.Exception
blk
- the Blockette.fieldNum
- the field number.
java.lang.Exception
- if error.public static Btime blkGetTime(Blockette blk, int fieldNum, int fieldIndex) throws java.lang.Exception
blk
- the Blockette.fieldNum
- the field number.fieldIndex
- the field index or 0 if none.
java.lang.Exception
- if error.public static java.lang.Double convertNumber(java.lang.Number n)
n
- the Type B (Hz) number.
public static Btime getEndTime(Btime startTime, java.lang.Number numSamples, java.lang.Number srFactor, java.lang.Number srMult) throws java.lang.Exception
startTime
- the start time.numSamples
- the number of samples.srFactor
- sample rate factor.srMult
- sample rate multiplier.
java.lang.Exception
- if error.public static Btime getEndTime(Btime startTime, int numSamples, int srFactor, int srMult) throws java.lang.Exception
startTime
- the start time.numSamples
- the number of samples.srFactor
- sample rate factor.srMult
- sample rate multiplier.
java.lang.Exception
- if error.protected Blockette find_type_32(java.lang.String source_lookup_code)
source_lookup_code
- the source lookup code.
protected Blockette find_type_33(java.lang.String instrument_code)
instrument_code
- the instrument code.
protected Blockette find_type_34(java.lang.String signal_units_code)
signal_units_code
- the signal units code.
protected final void initExportScript(java.lang.String scriptString)
scriptString
- the script string.getNext
protected void padLogical()
padLogical
in class ExportBuilder
protected void padPhysical() throws java.lang.Exception
padPhysical
in class ExportBuilder
java.lang.Exception
- if error.protected void packToRecord() throws java.lang.Exception
packToRecord
in class ExportBuilder
java.lang.Exception
- if error.protected void packToRecord(Blockette blk) throws java.lang.Exception
blk
- the blockette.
java.lang.Exception
- if error.protected void clearDataInfo()
protected BasicExportBuilder.DataInfo getDataInfo(int index)
index
- the index.
protected float[] getFloatData()
protected int[] getIntegerData()
protected boolean checkTrigger(java.lang.String s) throws java.lang.Exception
checkTrigger
in class ExportBuilder
s
- the string.
java.lang.Exception
- if error.protected void volumeFinish() throws BuilderException
volumeFinish
in class ExportBuilder
BuilderException
- if error.protected void output_info()
protected void startNewLogical(SeedObject obj, boolean continuation) throws java.lang.Exception
startNewLogical
in class ExportBuilder
obj
- the SEED object.continuation
- true if continuation, false otherwise.
If SeedObject is null, this implies that a blank logical record is being created.
continuation, when set to true, can mark the logical record as a
continuation of the last one.
java.lang.Exception
- if error.protected BasicExportBuilder.ChannelInfo findChannelInfo(BasicExportBuilder.DataInfo dataInfo, BasicExportBuilder.StationInfo stationInfo)
dataInfo
- the data information.stationInfo
- the station information.
protected BasicExportBuilder.StationInfo findStationInfo(BasicExportBuilder.DataInfo dataInfo)
dataInfo
- the data information.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |