Class PajekParser
java.lang.Object
org.graphstream.stream.file.pajek.PajekParser
- All Implemented Interfaces:
PajekParserConstants,Parser
public class PajekParser extends Object implements Parser, PajekParserConstants
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.PajekParserTokenManagertoken_sourceGenerated Token Manager.Fields inherited from interface org.graphstream.stream.file.pajek.PajekParserConstants
A, A1, A2, AP, ARCS, ARCSLIST, B, BC, BOX, BW, C, COMMENT, CROSS, DEFAULT, DIAMOND, DIGIT, EDGES, EDGESLIST, ELLIPSE, EMPTY, EOF, EOL, FONT, FOS, H1, H2, HEXDIGIT, IC, INT, K1, K2, KEY, L, LA, LC, LP, LPHI, LR, MATRIX, NETWORK, P, PHI, Q, R, REAL, S, SIZE, STRING, tokenImage, TRIANGLE, VERTICES, W, XFACT, YFACT -
Constructor Summary
Constructors Constructor Description PajekParser(InputStream stream)Constructor with InputStream.PajekParser(InputStream stream, String encoding)Constructor with InputStream and supplied encodingPajekParser(Reader stream)Constructor.PajekParser(FileSourcePajek pajek, InputStream stream)PajekParser(FileSourcePajek pajek, Reader stream)PajekParser(PajekParserTokenManager tm)Constructor with generated Token Manager. -
Method Summary
Modifier and Type Method Description voidall()Unused rule, call it to slurp in the whole file.TokenanyGraphicAttribute()voidclose()Closes the parser, closing the opened stream.Stringcolor()voiddisable_tracing()Disable tracing.voidedge()voidedgeList()voidedges()voidenable_tracing()Enable tracing.voidEO()ParseExceptiongenerateParseException()Generate ParseException.TokengetNextToken()Get the next Token.TokengetToken(int index)Get the specific Token.StringkeyOrString()voidmatrix()ArrayList<String>matrixline(org.graphstream.stream.file.pajek.EdgeMatrix mat)voidnetwork()booleannext()Stringnumber()voidopen()Start parsing the stream.voidReInit(InputStream stream)Reinitialise.voidReInit(InputStream stream, String encoding)Reinitialise.voidReInit(Reader stream)Reinitialise.voidReInit(PajekParserTokenManager tm)Reinitialise.TokenvalidIdentifier()voidvertex()voidvertices()
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
PajekParser
-
PajekParser
-
PajekParser
Constructor with InputStream. -
PajekParser
Constructor with InputStream and supplied encoding -
PajekParser
Constructor. -
PajekParser
Constructor with generated Token Manager.
-
-
Method Details
-
open
public void open()Description copied from interface:ParserStart parsing the stream. -
close
Closes the parser, closing the opened stream.- Specified by:
closein interfaceParser- Throws:
IOException
-
all
Unused rule, call it to slurp in the whole file.- Specified by:
allin interfaceParser- Throws:
ParseException
-
next
- Specified by:
nextin interfaceParser- Returns:
- Throws:
ParseException
-
network
- Throws:
ParseException
-
vertices
- Throws:
ParseException
-
vertex
- Throws:
ParseException
-
edges
- Throws:
ParseException
-
edge
- Throws:
ParseException
-
edgeList
- Throws:
ParseException
-
matrix
- Throws:
ParseException
-
matrixline
public final ArrayList<String> matrixline(org.graphstream.stream.file.pajek.EdgeMatrix mat) throws ParseException- Throws:
ParseException
-
keyOrString
- Throws:
ParseException
-
number
- Throws:
ParseException
-
color
- Throws:
ParseException
-
EO
- Throws:
ParseException
-
anyGraphicAttribute
- Throws:
ParseException
-
validIdentifier
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-