faa.tg.aidl
Class AidlWriter

java.lang.Object
  extended by faa.tg.filters.AbstractFilter
      extended by faa.tg.aidl.AidlWriter
All Implemented Interfaces:
StdWriter, DoesFinal, Filter, FilterableListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class AidlWriter
extends AbstractFilter
implements StdWriter

Converts TGF Ac States into XML See the source AidlWriter.java

Version:
$Id: AidlWriter.java,v 1.4 2008/05/27 12:49:44 samf Exp $
Author:
Sam Fullerton, L-3 Titan
See Also:
Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  java.util.Hashtable<Acid,AidlAcWriter> innerList
           
private  boolean isWritable
           
private  java.lang.String outputFileTemplate
           
(package private) static long serialVersionUID
           
 
Fields inherited from class faa.tg.filters.AbstractFilter
DEFAULT_PASS_THROUGH, listeners, passThrough
 
Constructor Summary
AidlWriter()
          Constructor
AidlWriter(java.lang.String outputFile)
          Constructor
 
Method Summary
 java.lang.Object clone()
          Creates a new Object with the same output file
 void closeAll()
          Flushes output and closes all output files.
 void doFinal()
          Does final activities for writer: flushes output and closes file.
 java.lang.String getOutputFileName()
          Returns the name of the file to write the output to
 java.lang.String getOutputFileTemplate()
          Gets the name of the directory to output reports to as a String.
 void handleObject(Filterable evt)
          handle incoming event
 boolean isWritableFile()
          Returns whether output file is writable
static void main(java.lang.String[] args)
          Main Method
 void setOutputFileName(java.lang.String outputFileName)
          Set output file name Required by StdWriter interface
 void setOutputFileTemplate(java.lang.String outputFileTemplate)
          Sets the template for the output file names to write reports to.
 
Methods inherited from class faa.tg.filters.AbstractFilter
addFilterableListener, fire, getPassThrough, removeFilterableListener, setPassThrough, substituteFileVariables
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface faa.tg.filters.Filter
addFilterableListener, fire, getPassThrough, removeFilterableListener, setPassThrough
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

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

See Also:
Constant Field Values

isWritable

private boolean isWritable

outputFileTemplate

private java.lang.String outputFileTemplate

innerList

private java.util.Hashtable<Acid,AidlAcWriter> innerList
Constructor Detail

AidlWriter

public AidlWriter()
Constructor


AidlWriter

public AidlWriter(java.lang.String outputFile)
Constructor

Parameters:
outputFile - - where to write output to
Method Detail

closeAll

public void closeAll()
Flushes output and closes all output files.

Specified by:
closeAll in interface StdWriter

doFinal

public void doFinal()
Does final activities for writer: flushes output and closes file.

Specified by:
doFinal in interface StdWriter
Specified by:
doFinal in interface DoesFinal

getOutputFileName

public java.lang.String getOutputFileName()
Returns the name of the file to write the output to

Specified by:
getOutputFileName in interface StdWriter
Returns:
A string containing the output destination.

isWritableFile

public boolean isWritableFile()
Returns whether output file is writable

Specified by:
isWritableFile in interface StdWriter
Returns:
Returns whether the file used is writable.

setOutputFileName

public void setOutputFileName(java.lang.String outputFileName)
Set output file name Required by StdWriter interface

Specified by:
setOutputFileName in interface StdWriter
Parameters:
outputFileName - - the name of the file to write the output to

setOutputFileTemplate

public void setOutputFileTemplate(java.lang.String outputFileTemplate)
Sets the template for the output file names to write reports to. The asterisk character '*' in the template is substituted for the class name of the object being written to the report. If a template is given that does not contain an asterisk, the template is assumed to be a directory name and "/*.xml" is appended to create the template.

Parameters:
outputFileTemplate - - The new output file template as a String.

clone

public java.lang.Object clone()
Creates a new Object with the same output file

Specified by:
clone in interface StdWriter
Overrides:
clone in class java.lang.Object
Returns:
Returns a clone of this object

handleObject

public void handleObject(Filterable evt)
handle incoming event

Specified by:
handleObject in interface StdWriter
Specified by:
handleObject in interface FilterableListener
Specified by:
handleObject in class AbstractFilter
Parameters:
evt - The event containing the Filterable object.

getOutputFileTemplate

public java.lang.String getOutputFileTemplate()
Gets the name of the directory to output reports to as a String.

Returns:
Returns the report directory in String format.

main

public static void main(java.lang.String[] args)
Main Method

Parameters:
args - - command line args