faa.tg.prep.aces
Class AcesSplitter

java.lang.Object
  extended by faa.tg.prep.aces.AcesSplitter

public class AcesSplitter
extends java.lang.Object

 Class AcesSplitter takes a zip archive of a consolidate aces file
 and splits it into the desired aces records.
 
See the source: AcesSplitter.java

Version:
$Id: AcesSplitter.java,v 3.4 2008/12/31 23:45:07 lykensj Exp $
Author:
Jim Mauroff, FAA/ACT-510

Field Summary
private  java.lang.String currentToken
           
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  java.io.DataOutputStream dos
          Class variables.
private  java.io.DataOutputStream dtdos
           
private  java.util.Hashtable files
           
private  boolean hostCheckBox
           
private  java.io.DataOutputStream hostos
           
private  int index
           
private  boolean itsDefault
           
private  boolean listOnly
           
private  int offset
           
private  java.lang.String path
           
private  java.lang.StringBuffer stringBuffer
           
private  java.lang.String xmlpath
           
private  java.io.DataOutputStream xos
           
 
Constructor Summary
AcesSplitter()
          Another constructor: Need to call load before splitting a file.
AcesSplitter(java.util.Vector v)
          The constructor
 
Method Summary
 void createHostFile(java.io.InputStream is, java.lang.String fileName)
           
 void createXmlFile(java.io.InputStream is)
           
 void hostOutput(boolean hcb)
          Used to set Records to be output in host format or not
 void listAcesRecords(java.io.InputStream is)
          Lists the aces records contained in the AIP zip file.
 void load(java.util.Vector v)
          used by GUI to load the hash table
private  void loadHashTableDefaults(java.util.Vector v)
          loads the desired subfiles into hash table
static void main(java.lang.String[] args)
          main - used for command line execution
 void setWorkingDirectory(java.lang.String path)
          Used to set the path to the working directory.
 void setXmlDirectory(java.lang.String path)
          Used to set the location of your Xml File
 void split(java.io.InputStream is)
          Splits the AIP zip file into desired aces records (those loaded into hash table).
private  boolean testForEndOfAcesRecord(java.lang.String line)
          Determines if and end of record sets has been encountered (a single $ that is preceded and followed by a space).
private  boolean testForStartOfAcesRecord(java.lang.String line)
          Determins if a desired aces record has been encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

dos

private java.io.DataOutputStream dos
Class variables.


xos

private java.io.DataOutputStream xos

dtdos

private java.io.DataOutputStream dtdos

hostos

private java.io.DataOutputStream hostos

files

private java.util.Hashtable files

listOnly

private boolean listOnly

itsDefault

private boolean itsDefault

hostCheckBox

private boolean hostCheckBox

currentToken

private java.lang.String currentToken

stringBuffer

private java.lang.StringBuffer stringBuffer

index

private int index

offset

private int offset

path

private java.lang.String path

xmlpath

private java.lang.String xmlpath
Constructor Detail

AcesSplitter

public AcesSplitter(java.util.Vector v)
The constructor


AcesSplitter

public AcesSplitter()
Another constructor: Need to call load before splitting a file.

Method Detail

load

public void load(java.util.Vector v)
used by GUI to load the hash table


hostOutput

public void hostOutput(boolean hcb)
Used to set Records to be output in host format or not


setWorkingDirectory

public void setWorkingDirectory(java.lang.String path)
Used to set the path to the working directory.


setXmlDirectory

public void setXmlDirectory(java.lang.String path)
Used to set the location of your Xml File


listAcesRecords

public void listAcesRecords(java.io.InputStream is)
Lists the aces records contained in the AIP zip file.


split

public void split(java.io.InputStream is)
Splits the AIP zip file into desired aces records (those loaded into hash table).


createXmlFile

public void createXmlFile(java.io.InputStream is)

createHostFile

public void createHostFile(java.io.InputStream is,
                           java.lang.String fileName)

loadHashTableDefaults

private void loadHashTableDefaults(java.util.Vector v)
loads the desired subfiles into hash table


testForStartOfAcesRecord

private boolean testForStartOfAcesRecord(java.lang.String line)
Determins if a desired aces record has been encountered. Creates the data output stream and names the file.

Parameters:
line - The current line to be parsed

testForEndOfAcesRecord

private boolean testForEndOfAcesRecord(java.lang.String line)
Determines if and end of record sets has been encountered (a single $ that is preceded and followed by a space).

Parameters:
line - The current line to be parsed

main

public static void main(java.lang.String[] args)
main - used for command line execution