public class GMLParser extends java.lang.Object implements Parser, GMLParserConstants
Modifier and Type | Field and Description |
---|---|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
GMLParserTokenManager |
token_source
Generated Token Manager.
|
Constructor and Description |
---|
GMLParser(FileSourceGML gml,
java.io.InputStream stream) |
GMLParser(FileSourceGML gml,
java.io.Reader stream) |
GMLParser(GMLParserTokenManager tm)
Constructor with generated Token Manager.
|
GMLParser(java.io.InputStream stream)
Constructor with InputStream.
|
GMLParser(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
GMLParser(java.io.Reader stream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
all()
Parse the whole stream.
|
void |
close()
Closes the parser, closing the opened stream.
|
void |
diGraphStart() |
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
void |
graphEnd() |
void |
graphStart() |
boolean |
isInGraph() |
java.lang.String |
keyValue(org.graphstream.stream.file.gml.KeyValues values)
A set of key and value, the value can recursively be a list of key-values.
|
org.graphstream.stream.file.gml.KeyValues |
list()
A list of key values, all values are stored in a KeyValues object.
|
boolean |
next() |
org.graphstream.stream.file.gml.KeyValues |
nextEvents()
The top-level method to be called by the file source.
|
void |
open()
Start parsing the stream.
|
void |
ReInit(GMLParserTokenManager tm)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise.
|
void |
ReInit(java.io.Reader stream)
Reinitialise.
|
void |
start()
Unused rule, call it to slurp in the whole file.
|
boolean |
step() |
java.lang.Object |
value(java.lang.String key)
A value for a key, either a number, a string or a recursive list of
key-values.
|
public GMLParserTokenManager token_source
public Token token
public Token jj_nt
public GMLParser(FileSourceGML gml, java.io.InputStream stream)
public GMLParser(FileSourceGML gml, java.io.Reader stream)
public GMLParser(java.io.InputStream stream)
public GMLParser(java.io.InputStream stream, java.lang.String encoding)
public GMLParser(java.io.Reader stream)
public GMLParser(GMLParserTokenManager tm)
public boolean isInGraph()
public void open() throws java.io.IOException, ParseException
Parser
open
in interface Parser
ParseException
java.io.IOException
public boolean next() throws java.io.IOException, ParseException
next
in interface Parser
ParseException
java.io.IOException
public boolean step() throws java.io.IOException, ParseException
java.io.IOException
ParseException
public void close() throws java.io.IOException
public final void start() throws ParseException
ParseException
public final void all() throws ParseException, java.io.IOException
Parser
all
in interface Parser
ParseException
java.io.IOException
public final void graphStart() throws ParseException
ParseException
public final void diGraphStart() throws ParseException
ParseException
public final void graphEnd() throws ParseException
ParseException
public final org.graphstream.stream.file.gml.KeyValues nextEvents() throws ParseException
ParseException
public final org.graphstream.stream.file.gml.KeyValues list() throws ParseException
ParseException
public final java.lang.String keyValue(org.graphstream.stream.file.gml.KeyValues values) throws ParseException
ParseException
public final java.lang.Object value(java.lang.String key) throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(GMLParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()