edu.iris.dmc.pdcc.builder
Class PdccMiniSeedExportBuilder

java.lang.Object
  extended byedu.iris.Fissures.seed.builder.ExportBuilder
      extended byedu.iris.Fissures.seed.builder.SeedExportBuilder
          extended byedu.iris.dmc.pdcc.builder.PdccMiniSeedExportBuilder

public class PdccMiniSeedExportBuilder
extends SeedExportBuilder

Concrete builder class for exporting Blockette objects to a miniSEED archive file structure and tabulating the stored data in the form of database table objects that can then be processed by PdccDbExportBuilder. This class and PdccDbExportBuilder will have to be mediated by a master process so that both run in sequence with the associated ExportDirector.

Version:
1/12/2004
Author:
Robert Casey, IRIS DMC

Nested Class Summary
 
Nested classes inherited from class edu.iris.Fissures.seed.builder.ExportBuilder
ExportBuilder.LogicalRecord
 
Field Summary
 
Fields inherited from class edu.iris.Fissures.seed.builder.ExportBuilder
builderType, endOfGroup, endOfLogical, endOfPhysical, exportMold, exportScript, logicalPerPhysical, logicalRecord, logicalRecordCount, logicalRecordLength, logicalRecords, nestingDepth, nestingScore, outputStream, penDown, physicalRecordLength, recordPadding, scriptCursor, scriptNesting, vaxOrder
 
Constructor Summary
PdccMiniSeedExportBuilder(java.lang.String configFile, java.lang.String sessionConfigName, PdccTableContainer tblContainer)
          Same as above except no database configuration name is used, so use the default database configuration.
PdccMiniSeedExportBuilder(java.lang.String configFile, java.lang.String sessionConfigName, java.lang.String dbConfigName, PdccTableContainer tblContainer)
          Create an instance of the miniSEED export builder, accepting the specified configuration file, the session configuration name, the database configuration name, and an instance of a table container object.
 
Method Summary
 void finish()
          inherited method that finalizes the export of data records to the filesystem.
protected  void padPhysical()
          override the parent class functionality to prevent null padding at the end of the last file that we write out.
 void splitToFiles(boolean verbose)
          set up splitting to files in some form of filepath structure.
protected  void startNewLogical(SeedObject obj, boolean continuation)
          Inherited method that adds functionality to generate table records while the data logical records are being written.
protected  void volumeFinish()
          this method is called as the final cleanup process after the last logical record has been queued for output to the output stream.
protected  boolean writeRecord()
          override superclass method with some safety checks
 
Methods inherited from class edu.iris.Fissures.seed.builder.SeedExportBuilder
checkTrigger, getEndTime, packToRecord, setDatalessMode, setDefaultMode, setMiniMode, setOrganizationName, setVolumeLabel
 
Methods inherited from class edu.iris.Fissures.seed.builder.ExportBuilder
build, close, getNext, getType, open, padLogical, push, setLogicalRecLen, setPhysicalRecLen, setVaxOrder, startVolume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdccMiniSeedExportBuilder

public PdccMiniSeedExportBuilder(java.lang.String configFile,
                                 java.lang.String sessionConfigName,
                                 java.lang.String dbConfigName,
                                 PdccTableContainer tblContainer)
                          throws java.lang.Exception
Create an instance of the miniSEED export builder, accepting the specified configuration file, the session configuration name, the database configuration name, and an instance of a table container object. dbConfigName may be set to null in order to use the session config's default database.


PdccMiniSeedExportBuilder

public PdccMiniSeedExportBuilder(java.lang.String configFile,
                                 java.lang.String sessionConfigName,
                                 PdccTableContainer tblContainer)
                          throws java.lang.Exception
Same as above except no database configuration name is used, so use the default database configuration.

Method Detail

splitToFiles

public void splitToFiles(boolean verbose)
                  throws java.lang.Exception
set up splitting to files in some form of filepath structure. detect start and end of data traces and record information to database table record objects.

Throws:
java.lang.Exception

volumeFinish

protected void volumeFinish()
                     throws BuilderException
this method is called as the final cleanup process after the last logical record has been queued for output to the output stream. we will take advantage of this to tabulate the data trace statistics for the very last data trace.

Overrides:
volumeFinish in class SeedExportBuilder
Throws:
BuilderException

finish

public void finish()
            throws java.lang.Exception
inherited method that finalizes the export of data records to the filesystem. The file writing thread will finish file writing independently. Let's put in a wait lock to make sure the thread finishes.

Overrides:
finish in class ExportBuilder
Throws:
java.lang.Exception

writeRecord

protected boolean writeRecord()
                       throws java.lang.Exception
override superclass method with some safety checks

Overrides:
writeRecord in class ExportBuilder
Throws:
java.lang.Exception

padPhysical

protected void padPhysical()
                    throws java.lang.Exception
override the parent class functionality to prevent null padding at the end of the last file that we write out. We don't need physical record padding for archival storage

Overrides:
padPhysical in class ExportBuilder
Throws:
java.lang.Exception

startNewLogical

protected void startNewLogical(SeedObject obj,
                               boolean continuation)
                        throws java.lang.Exception
Inherited method that adds functionality to generate table records while the data logical records are being written. Only generates a new table record when a new data trace is started. When we encounter a blockette that has an attached tableRecord, then we have to assume that the data is already in the filesystem, therefore do not write to the filesystem again.

Overrides:
startNewLogical in class SeedExportBuilder
Throws:
java.lang.Exception


brought to you by Incorporated Research Institutions for Seismology
June 29 2006