edu.iris.Fissures.seed.builder
Class SeedMMAPImportBuilder

java.lang.Object
  extended by edu.iris.Fissures.seed.builder.ObjectBuilder
      extended by edu.iris.Fissures.seed.builder.SeedMMAPImportBuilder

public class SeedMMAPImportBuilder
extends ObjectBuilder

Concrete builder class for SEED Objects, specifically for creating memory mapped references to the imported file. Registers itself to a concrete Import Director. Creates and writes to a SeedVolumeMMAPContainer.

Version:
1/15/2010
Author:
Robert Casey, IRIS DMC

Field Summary
protected  Blockette prevBlockette
           
 
Fields inherited from class edu.iris.Fissures.seed.builder.ObjectBuilder
buildContainer, builderType, buildFilterVector, continuationFlag, currentObject, largeCoeffFlag, recordBeginFlag, recordType, volumeNumber
 
Constructor Summary
SeedMMAPImportBuilder()
          Create a SEED object builder.
SeedMMAPImportBuilder(java.lang.String journalFile)
          Create a SEED Object Builder with reference to the indicated journal backing file
 
Method Summary
 int build(byte[] nextRecord)
          Construct a Blockette object by reading from the start of the indicated byte array.
 int build(java.lang.String blocketteSpec)
          Construct a Blockette object from the delimited String.
 void reset()
          Reset the builder to its initial state.
 int store()
          Store created SEED object to the SEED MMAP object container.
 
Methods inherited from class edu.iris.Fissures.seed.builder.ObjectBuilder
getContainer, getObject, getType, getVolume, incrementVolume, registerFilter, removeCurrent, setContinuationFlag, setLargeCoeffFlag, setRecordBeginFlag, setRecordType, setVolume, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prevBlockette

protected Blockette prevBlockette
Constructor Detail

SeedMMAPImportBuilder

public SeedMMAPImportBuilder()
Create a SEED object builder.


SeedMMAPImportBuilder

public SeedMMAPImportBuilder(java.lang.String journalFile)
                      throws BuilderException
Create a SEED Object Builder with reference to the indicated journal backing file

Throws:
BuilderException
Method Detail

build

public int build(byte[] nextRecord)
          throws java.lang.Exception
Construct a Blockette object by reading from the start of the indicated byte array. Result gets assigned to currentObject var. Return the number of bytes processed/read for blockette.

Specified by:
build in class ObjectBuilder
Throws:
java.lang.Exception

build

public int build(java.lang.String blocketteSpec)
          throws java.lang.Exception
Construct a Blockette object from the delimited String. Only accepts standard delimiters '|' and '^'. Return the length in bytes of the processed String as a confirmation of success. Return -1 on failure.

Specified by:
build in class ObjectBuilder
Throws:
java.lang.Exception

store

public int store()
          throws java.lang.Exception
Store created SEED object to the SEED MMAP object container.

Specified by:
store in class ObjectBuilder
Throws:
java.lang.Exception

reset

public void reset()
Reset the builder to its initial state. Generally used during volume transitions.

Specified by:
reset in class ObjectBuilder