edu.iris.Fissures.seed.app
Class Jseedr

java.lang.Object
  extended by edu.iris.Fissures.seed.app.Jseedr

public class Jseedr
extends java.lang.Object

Application pulling together all functionality of the FISSURES SEED classes to implement front-to-end SEED processing operations.

Version:
April 2013
Author:
Robert Casey, IRIS DMC, Sid Hellman, ISTI, Kevin Frechette, ISTI

Constructor Summary
Jseedr()
          Create Jseedr session.
Jseedr(SeedObjectContainer container)
          Create Jseedr session for export with already provided SeedObjectContainer
Jseedr(java.lang.String storeFile)
          Create Jseedr session with assigned serialization file.
 
Method Summary
 SeedBuilderFilter addNewFilter()
          Append a builder filter to a list of filters and return a handle to it.
 SeedBuilderFilter addTemplateFilter()
          Create a new template filter and add it to the template filter vector.
 void exportTo(java.io.DataOutputStream outStream)
          Export data in container to specified output stream.
 void exportTo(java.lang.String outFile)
          Export data in container to specified output filename.
 SeedObjectContainer getContainer()
          Get the SEED object container used for this session.
 ExportBuilder getNewExportBuilder(java.lang.String type)
          Generate and return a new instance of export builder of the specified type.
 SeedBuilderFilter getNewFilter()
          Reset filter list and return a new filter.
 ImportDirector getNewImportDirector(java.lang.String type)
          Generate and return a new instance of import director of the specified type.
 ExportTemplate getNewTemplate()
          Create a new export template and return a handle to it.
 SeedBuilderFilter getTemplateFilter()
          Force the creation of a new, empty filter vector.
 void importFrom(java.io.DataInputStream inStream)
          Import data from specified input stream.
 void importFrom(java.io.DataInputStream inStream, java.io.DataOutputStream outStream)
          Import data from specified input stream.
 void importFrom(java.lang.String inFile)
          Import data from specified input filename.
 void importFrom(java.lang.String inFile, java.lang.String outFile)
          Import data from specified input filename.
 void importResp(java.lang.String respFile)
          Import data from a RESP file using SHAPE code provided by ISTI
static void main(java.lang.String[] args)
          Method used in shell invocation of Jseedr.
 void setVerboseMode(boolean mode)
          Set to TRUE to turn verbose mode on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jseedr

public Jseedr()
       throws java.lang.Exception
Create Jseedr session.

Throws:
java.lang.Exception

Jseedr

public Jseedr(java.lang.String storeFile)
       throws java.lang.Exception
Create Jseedr session with assigned serialization file. Serialization storage is managed by the concrete Object Builder class. Stored objects are moved to the serialization file to conserve memory.

Throws:
java.lang.Exception

Jseedr

public Jseedr(SeedObjectContainer container)
       throws java.lang.Exception
Create Jseedr session for export with already provided SeedObjectContainer

Throws:
java.lang.Exception
Method Detail

importFrom

public void importFrom(java.io.DataInputStream inStream)
                throws java.lang.Exception
Import data from specified input stream.

Parameters:
inStream - input stream to import from
Throws:
java.lang.Exception - if there is a problem reading the data

importFrom

public void importFrom(java.io.DataInputStream inStream,
                       java.io.DataOutputStream outStream)
                throws java.lang.Exception
Import data from specified input stream. Print ASCII representation of input stream to specified output stream.

Parameters:
inStream - input stream to import from
outStream - ASCII representation of input stream will go through here
Throws:
java.lang.Exception - if there is a problem reading the data

importFrom

public void importFrom(java.lang.String inFile)
                throws java.lang.Exception
Import data from specified input filename.

Parameters:
inFile - the input filename to read from
Throws:
java.lang.Exception - if there is a problem reading the file

importFrom

public void importFrom(java.lang.String inFile,
                       java.lang.String outFile)
                throws java.lang.Exception
Import data from specified input filename. Print ASCII representation of input file to specified output filename.

Parameters:
inFile - the input filename to read from
outFile - ASCII representation of input stream will be written to this file
Throws:
java.lang.Exception - if there is a problem reading the file

importResp

public void importResp(java.lang.String respFile)
                throws java.lang.Exception
Import data from a RESP file using SHAPE code provided by ISTI

Parameters:
respFile - RESP file to be read in by SHAPE code
Throws:
java.lang.Exception

exportTo

public void exportTo(java.io.DataOutputStream outStream)
              throws java.lang.Exception
Export data in container to specified output stream.

Parameters:
outStream - exported data format will be written to this stream
Throws:
java.lang.Exception - if there is a problem writing the data

exportTo

public void exportTo(java.lang.String outFile)
              throws java.lang.Exception
Export data in container to specified output filename. Use the parameter "MULTI" to override the opening of a single file, since some data types need to build multiple files using export builder.

Throws:
java.lang.Exception

getNewImportDirector

public ImportDirector getNewImportDirector(java.lang.String type)
                                    throws BuilderException
Generate and return a new instance of import director of the specified type.

Throws:
BuilderException

getNewExportBuilder

public ExportBuilder getNewExportBuilder(java.lang.String type)
                                  throws java.lang.Exception
Generate and return a new instance of export builder of the specified type.

Throws:
java.lang.Exception

addNewFilter

public SeedBuilderFilter addNewFilter()
Append a builder filter to a list of filters and return a handle to it.


getNewFilter

public SeedBuilderFilter getNewFilter()
Reset filter list and return a new filter.


getNewTemplate

public ExportTemplate getNewTemplate()
Create a new export template and return a handle to it.


addTemplateFilter

public SeedBuilderFilter addTemplateFilter()
Create a new template filter and add it to the template filter vector. If a vector does not exist, create one. Return a handle to the new filter.


getTemplateFilter

public SeedBuilderFilter getTemplateFilter()
Force the creation of a new, empty filter vector. A new template filter is created, added to the vector, and returned.


getContainer

public SeedObjectContainer getContainer()
Get the SEED object container used for this session. This is created by the assigned concrete Object Builder.


setVerboseMode

public void setVerboseMode(boolean mode)
Set to TRUE to turn verbose mode on. Verbose mode prints that status of running to stderr.


main

public static void main(java.lang.String[] args)
Method used in shell invocation of Jseedr. String arguments can be supplied. Run without arguments to get usage message.