|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwalker.StaxParser
public class StaxParser
Created by IntelliJ IDEA. User: andy Date: Mar 23, 2010
Field Summary | |
---|---|
static boolean |
initialized
|
static long |
jumpLineOffset
|
static long |
jumpOffset
|
static boolean |
MONITOR
|
static boolean |
RELATIVE_TIMESTAMPS
|
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
---|
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Constructor Summary | |
---|---|
StaxParser(java.lang.String fileName,
ExperimentState state,
double timestamp)
Default Constructor. |
Method Summary | |
---|---|
void |
createReader(double timestamp)
Creates a new extended xml stream reader starting from the supplied position. |
void |
createReaderOld(long position)
Creates a new extended xml stream reader starting from the supplied position. |
java.lang.String |
getFileName()
|
ExtendedXMLStreamReader |
getReader()
|
ExperimentState |
getState()
|
protected void |
link(boolean defaultMode)
Reads a single Link element and moves the stream to the following element. |
protected void |
node(boolean defaultMode)
Reads a single node element and moves the stream to the following element. |
boolean |
walk(ExtendedXMLStreamReader reader,
ExperimentState state,
double speed,
double fps)
Main method for 'walking' a trace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean initialized
public static long jumpLineOffset
public static long jumpOffset
public static final boolean MONITOR
public static final boolean RELATIVE_TIMESTAMPS
Constructor Detail |
---|
public StaxParser(java.lang.String fileName, ExperimentState state, double timestamp) throws java.io.IOException
fileName
- the file name of the wiseml file.state
- the Experiment state that is going to be associated with this parser.timestamp
- the position of the file to start parsing. -1 means parse from the beginning.
java.io.IOException
- if there is no such file.Method Detail |
---|
public void createReader(double timestamp) throws javax.xml.stream.XMLStreamException, java.io.IOException, badSyntaxException, endDocumentException
timestamp
- where to position the stream in the wiseml file. -1 means the beginning of the file.
javax.xml.stream.XMLStreamException
- if the ExtendedXMLStreamReader encounters a problem while created or preparsing.
java.io.IOException
- if there is no such file.
badSyntaxException
- is case of a wiseml bad syntax.
endDocumentException
- if it encounters the end of the file.public void createReaderOld(long position) throws javax.xml.stream.XMLStreamException, java.io.IOException, badSyntaxException
position
- where to position the stream in the wiseml file. -1 means the beginning of the file.
javax.xml.stream.XMLStreamException
- if the ExtendedXMLStreamReader encounters a problem while created or preparsing.
java.io.IOException
- if there is no such file.
badSyntaxException
- is case of a wiseml bad syntax.public java.lang.String getFileName()
public ExtendedXMLStreamReader getReader()
public ExperimentState getState()
protected void link(boolean defaultMode) throws badSyntaxException, javax.xml.stream.XMLStreamException, badSetupException, endDocumentException
defaultMode
- true only for parsing the defaultNode, false for parsing topology
badSyntaxException
- if the wiseml file has bad syntax
javax.xml.stream.XMLStreamException
- if there is a problem with xml syntax.
badSetupException
- in case of a misconfirguration in the experiment.
endDocumentException
- if it encounters the end of the file.protected void node(boolean defaultMode) throws badSyntaxException, javax.xml.stream.XMLStreamException, endDocumentException
defaultMode
- true only for parsing the defaultNode, false for parsing topology
badSyntaxException
- if the wiseml file has bad syntax
javax.xml.stream.XMLStreamException
- if there is a problem with xml syntax.
endDocumentException
- if it encounters the end of the file.public boolean walk(ExtendedXMLStreamReader reader, ExperimentState state, double speed, double fps) throws badSyntaxException, javax.xml.stream.XMLStreamException, badSetupException, endDocumentException
reader
- the extended xml reader that keeps the stream position.state
- the state to update.speed
- is the number of experiment seconds per one experiment second.fps
- is the number of frames per second of visualization.
badSyntaxException
- when a found element either not exists or it doesn't match the expectedElement.
javax.xml.stream.XMLStreamException
- in case of a problem with xml syntax.
badSetupException
- in case of a misconfirguration in the experiment
endDocumentException
- if it encounters the end of the file.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |