Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.chisel
Class ProcessedFile  view ProcessedFile download ProcessedFile.java

java.lang.Object
  extended bycom.trapezium.factory.FactoryData
      extended bycom.trapezium.chisel.ProcessedFile
All Implemented Interfaces:
com.trapezium.factory.DocumentLoader, java.io.Serializable

public class ProcessedFile
extends com.trapezium.factory.FactoryData
implements java.io.Serializable

a ProcessedFile object is a FactoryData object that knows how to load itself, reload itself from its original source, and save itself.


Nested Class Summary
(package private)  class ProcessedFile.ChiselOptionSettings
          ChiselOptionSettings saves the settings for a specific chisel
(package private)  class ProcessedFile.ChiselSessionEntry
           
(package private)  class ProcessedFile.SaveThread
           
(package private)  class ProcessedFile.Session
          The Session class tracks all the operations done on the file being processed.
(package private)  class ProcessedFile.SessionEntry
          SessionEntry is the base class for all entries
(package private)  class ProcessedFile.VersionSessionEntry
           
 
Field Summary
(package private)  int cleanCount
           
(package private)  com.trapezium.edit.Document doc
           
(package private) static int id
           
(package private)  java.lang.String infoProfile
          Update the summary info in all the chisel rows.
(package private)  com.trapezium.factory.FactoryChain loader
          way to create the data given the source
(package private)  int myId
           
(package private)  boolean newlyOpened
           
(package private)  com.trapezium.factory.QueuedRequestFactory parser
           
(package private)  com.trapezium.factory.FactoryResponseListener parsingListener
           
(package private)  java.awt.MenuItem redoItem
           
(package private)  int saveAsCounter
          generate a name for "save as", just the file name, with an appended save as counter (local to the processed file).
(package private)  ProcessedFile.SaveThread saver
           
(package private)  boolean saving
           
(package private)  ProcessedFile.Session session
           
(package private)  java.util.Date startTime
          kick off the loader chain of processing
(package private)  com.trapezium.factory.QueuedRequestFactory tokenFactory
           
(package private)  java.awt.MenuItem undoItem
           
(package private)  int versionNumber
           
(package private)  int X3DsaveAsCounter
           
 
Fields inherited from class com.trapezium.factory.FactoryData
 
Constructor Summary
ProcessedFile()
           
ProcessedFile(java.lang.String source)
           
 
Method Summary
 void addFactory(com.trapezium.factory.QueuedRequestFactory f)
           
 void addFactory(com.trapezium.factory.QueuedRequestFactory f, com.trapezium.factory.QueuedRequestFactory prev)
           
 void addOptimizer(Optimizer o)
           
 void asciiSave()
          Save the file in text format
 void asciiSave(java.io.File file, boolean gzip, boolean x3d)
          Save the file in text format
 void chiselWith(Optimizer chisel)
          store info about which chisel is operating on this file
 void clear_undo()
           
 void disableChisel(java.lang.String chiselName)
           
(package private)  void dump(java.lang.String loc)
           
 void enableChisel(java.lang.String chiselName, com.trapezium.factory.FactoryResponseListener theListener)
           
 java.lang.String generateChiseledName()
           
 java.lang.String generateGzipName()
          generate a name for gzip, name.chiseled.wrz
 java.lang.String generateGzipName(boolean stripNumber)
          Generate a name for gzip, name.chiseled.wrz.
 java.lang.String generateGzipSaveAsName()
          generate a name for gzip save as, name_.chiseled.wrz
 void generateHtml(java.lang.String htmlFileName, java.lang.String wrlFileName, java.lang.String originalName)
          Generate an HTML report for the chisel session.
 java.lang.String generateName()
          Generate local name for file
 java.lang.String generateName(boolean stripNumber)
          Generate a name for file.
 java.lang.String generateSaveAsName()
           
 java.lang.String generateX3dName()
           
 java.lang.String generateX3dSaveAsName()
           
 java.lang.String getBaseFilePath()
           
 int getCleanCount()
           
 com.trapezium.edit.Document getDocument()
          Get the Document associated with this ProcessedFile
 int getId()
           
 java.lang.String getLocalName()
           
 java.lang.String getName()
           
 java.lang.String getNameWithoutPath()
           
 java.lang.String getNameWithoutVersion()
           
 com.trapezium.factory.QueuedRequestFactory getParserFactory()
           
 java.util.Date getStartTime()
           
 com.trapezium.factory.QueuedRequestFactory getTokenFactory()
           
 int getVersion()
          Get the version number for the file
 java.lang.String getVersionString()
          Get the version number as a String
 void gzipSave()
          Save the file in gzip format
 void initProgressIndicator(java.lang.String title)
           
 void insertFactory(com.trapezium.factory.QueuedRequestFactory f)
           
 boolean isNewlyOpened()
           
 void load()
           
(package private)  void load(boolean resetStartTime)
          Start running loader factories.
 void markPercent()
          Save the current percent reduction in the session object
(package private)  void markVersion(int version)
          Save the current version in the session object
 void mergeErrors(java.util.BitSet errorMarks, java.util.BitSet warningMarks, java.util.BitSet nonconformanceMarks)
           
 void notNewlyOpened()
           
 void reload(java.lang.Object scene)
          DocumentLoader interface
 void removeFactory(java.lang.String factoryName)
           
 void removeSerialFiles()
          Remove all resialized files
 void setCleanCount(int ccval)
           
 void setDocument(com.trapezium.edit.Document doc)
          Set the Document associated with this ProcessedFile
 void setDoneListener(com.trapezium.factory.FactoryResponseListener f)
          Set who is going to be called when each stage of the loader is done
 void setParsingListener(com.trapezium.factory.FactoryResponseListener f)
           
 void setRedoItem(java.awt.MenuItem redoItem)
           
(package private)  void setRowInfo(ChiselRow cr, boolean flag)
           
 void setUndoItem(java.awt.MenuItem undoItem)
           
 void setVersion(int versionNo)
          Set the version number for the file
 void synchTokenEditor()
           
 boolean updateInfo()
           
(package private)  boolean updateListener(int count, java.lang.String strheader, com.trapezium.factory.FactoryResponseListener frl, java.lang.StringBuffer testProfile)
          Update a single listener text field, sets the text and checks box off.
 void waitForSave()
           
 void wipeout()
           
 void x3dSave()
           
 
Methods inherited from class com.trapezium.factory.FactoryData
disableParse, enableParse, errorsCreated, getAborted, getAction, getChainDone, getError, getErrorSummaryString, getFactoryName, getFactoryNumber, getFile, getFirstErrorLine, getLineSource, getLintInfo, getNodeVerifyChecksEnabled, getNumberErrors, getNumberNonconformances, getNumberOfLines, getNumberWarnings, getOriginalName, getPath, getPercentX100, getPolygonCount, getScene, getSizeInBytes, getSizePercent, getSizeReductionPercent, getTokenEditor, getUrl, getUsageChecksEnabled, getValidated, hasErrors, hasLintInfo, hasWarnings, isDirty, isGzipped, isParseDisabled, isParseEnabled, isTemporary, mergeLintErrors, popFactoryInfo, pushFactoryInfo, setAborted, setAction, setChainDone, setChainListener, setCurrentNumberErrors, setError, setFactoryChain, setFactoryName, setFactoryNumber, setFile, setGzip, setLintInfo, setNodeVerifyChecksEnabled, setNumberOfLines, setPolygonCount, setPreviousNumberErrors, setScene, setTemporary, setTokenEditor, setUrl, setUsageChecksEnabled, setValidated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loader

com.trapezium.factory.FactoryChain loader
way to create the data given the source


parser

com.trapezium.factory.QueuedRequestFactory parser

tokenFactory

com.trapezium.factory.QueuedRequestFactory tokenFactory

session

ProcessedFile.Session session

id

static int id

myId

int myId

newlyOpened

boolean newlyOpened

versionNumber

int versionNumber

infoProfile

java.lang.String infoProfile
Update the summary info in all the chisel rows.


cleanCount

int cleanCount

parsingListener

com.trapezium.factory.FactoryResponseListener parsingListener

saveAsCounter

int saveAsCounter
generate a name for "save as", just the file name, with an appended save as counter (local to the processed file).


X3DsaveAsCounter

int X3DsaveAsCounter

doc

com.trapezium.edit.Document doc

undoItem

java.awt.MenuItem undoItem

redoItem

java.awt.MenuItem redoItem

startTime

java.util.Date startTime
kick off the loader chain of processing


saving

boolean saving

saver

ProcessedFile.SaveThread saver
Constructor Detail

ProcessedFile

public ProcessedFile()

ProcessedFile

public ProcessedFile(java.lang.String source)
Method Detail

wipeout

public void wipeout()

getParserFactory

public com.trapezium.factory.QueuedRequestFactory getParserFactory()

getTokenFactory

public com.trapezium.factory.QueuedRequestFactory getTokenFactory()

isNewlyOpened

public boolean isNewlyOpened()

notNewlyOpened

public void notNewlyOpened()

getVersion

public int getVersion()
Get the version number for the file


getVersionString

public java.lang.String getVersionString()
Get the version number as a String


setVersion

public void setVersion(int versionNo)
Set the version number for the file


initProgressIndicator

public void initProgressIndicator(java.lang.String title)

updateListener

boolean updateListener(int count,
                       java.lang.String strheader,
                       com.trapezium.factory.FactoryResponseListener frl,
                       java.lang.StringBuffer testProfile)
Update a single listener text field, sets the text and checks box off.


setCleanCount

public void setCleanCount(int ccval)

getCleanCount

public int getCleanCount()

updateInfo

public boolean updateInfo()

setRowInfo

void setRowInfo(ChiselRow cr,
                boolean flag)

reload

public void reload(java.lang.Object scene)
DocumentLoader interface

Specified by:
reload in interface com.trapezium.factory.DocumentLoader

setParsingListener

public void setParsingListener(com.trapezium.factory.FactoryResponseListener f)

mergeErrors

public void mergeErrors(java.util.BitSet errorMarks,
                        java.util.BitSet warningMarks,
                        java.util.BitSet nonconformanceMarks)

setDoneListener

public void setDoneListener(com.trapezium.factory.FactoryResponseListener f)
Set who is going to be called when each stage of the loader is done


enableChisel

public void enableChisel(java.lang.String chiselName,
                         com.trapezium.factory.FactoryResponseListener theListener)

disableChisel

public void disableChisel(java.lang.String chiselName)

removeFactory

public void removeFactory(java.lang.String factoryName)

getId

public int getId()

generateName

public java.lang.String generateName()
Generate local name for file


generateName

public java.lang.String generateName(boolean stripNumber)
Generate a name for file.


generateX3dName

public java.lang.String generateX3dName()

generateChiseledName

public java.lang.String generateChiseledName()

getLocalName

public java.lang.String getLocalName()

generateSaveAsName

public java.lang.String generateSaveAsName()

generateX3dSaveAsName

public java.lang.String generateX3dSaveAsName()

generateGzipName

public java.lang.String generateGzipName()
generate a name for gzip, name.chiseled.wrz


generateGzipName

public java.lang.String generateGzipName(boolean stripNumber)
Generate a name for gzip, name.chiseled.wrz.


generateGzipSaveAsName

public java.lang.String generateGzipSaveAsName()
generate a name for gzip save as, name_.chiseled.wrz


addFactory

public void addFactory(com.trapezium.factory.QueuedRequestFactory f)

addOptimizer

public void addOptimizer(Optimizer o)

addFactory

public void addFactory(com.trapezium.factory.QueuedRequestFactory f,
                       com.trapezium.factory.QueuedRequestFactory prev)

insertFactory

public void insertFactory(com.trapezium.factory.QueuedRequestFactory f)

getBaseFilePath

public java.lang.String getBaseFilePath()

getNameWithoutPath

public java.lang.String getNameWithoutPath()

getNameWithoutVersion

public java.lang.String getNameWithoutVersion()

getName

public java.lang.String getName()

setUndoItem

public void setUndoItem(java.awt.MenuItem undoItem)

setRedoItem

public void setRedoItem(java.awt.MenuItem redoItem)

clear_undo

public void clear_undo()

removeSerialFiles

public void removeSerialFiles()
Remove all resialized files


getDocument

public com.trapezium.edit.Document getDocument()
Get the Document associated with this ProcessedFile


setDocument

public void setDocument(com.trapezium.edit.Document doc)
Set the Document associated with this ProcessedFile


load

public void load()

load

void load(boolean resetStartTime)
Start running loader factories.


getStartTime

public java.util.Date getStartTime()

asciiSave

public void asciiSave()
Save the file in text format


gzipSave

public void gzipSave()
Save the file in gzip format


x3dSave

public void x3dSave()

asciiSave

public void asciiSave(java.io.File file,
                      boolean gzip,
                      boolean x3d)
Save the file in text format


waitForSave

public void waitForSave()

synchTokenEditor

public void synchTokenEditor()

dump

void dump(java.lang.String loc)

chiselWith

public void chiselWith(Optimizer chisel)
store info about which chisel is operating on this file


markVersion

void markVersion(int version)
Save the current version in the session object


markPercent

public void markPercent()
Save the current percent reduction in the session object


generateHtml

public void generateHtml(java.lang.String htmlFileName,
                         java.lang.String wrlFileName,
                         java.lang.String originalName)
Generate an HTML report for the chisel session.