- java.lang.Object
-
- org.jgrapht.nio.gml.GmlBaseListener
-
- org.jgrapht.nio.gml.GmlEventDrivenImporter.NotifyGmlListener
-
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeListener
,GmlListener
- Enclosing class:
- GmlEventDrivenImporter
private class GmlEventDrivenImporter.NotifyGmlListener extends GmlBaseListener
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Attribute>
attributes
private static java.lang.String
EDGE
private static java.lang.String
GRAPH
private static java.lang.String
ID
private boolean
insideEdge
private boolean
insideGraph
private boolean
insideNode
private int
level
private int
maxNodeId
private static java.lang.String
NODE
private java.lang.Integer
nodeId
private java.util.List<GmlEventDrivenImporter.Singleton>
singletons
private static java.lang.String
SOURCE
private java.lang.Integer
sourceId
private java.lang.StringBuilder
stringBuffer
private static java.lang.String
TARGET
private java.lang.Integer
targetId
private java.lang.Double
weight
private static java.lang.String
WEIGHT
-
Constructor Summary
Constructors Modifier Constructor Description private
NotifyGmlListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enterGml(GmlParser.GmlContext ctx)
Enter a parse tree produced byGmlParser.gml()
.void
enterListKeyValue(GmlParser.ListKeyValueContext ctx)
Enter a parse tree produced by theListKeyValue
labeled alternative inGmlParser.keyValuePair()
.void
enterNumberKeyValue(GmlParser.NumberKeyValueContext ctx)
Enter a parse tree produced by theNumberKeyValue
labeled alternative inGmlParser.keyValuePair()
.void
enterStringKeyValue(GmlParser.StringKeyValueContext ctx)
Enter a parse tree produced by theStringKeyValue
labeled alternative inGmlParser.keyValuePair()
.void
exitListKeyValue(GmlParser.ListKeyValueContext ctx)
Exit a parse tree produced by theListKeyValue
labeled alternative inGmlParser.keyValuePair()
.void
notifySingletons()
private Attribute
parseNumberAttribute(java.lang.String value)
-
Methods inherited from class org.jgrapht.nio.gml.GmlBaseListener
enterEveryRule, exitEveryRule, exitGml, exitNumberKeyValue, exitStringKeyValue, visitErrorNode, visitTerminal
-
-
-
-
Field Detail
-
NODE
private static final java.lang.String NODE
- See Also:
- Constant Field Values
-
EDGE
private static final java.lang.String EDGE
- See Also:
- Constant Field Values
-
GRAPH
private static final java.lang.String GRAPH
- See Also:
- Constant Field Values
-
WEIGHT
private static final java.lang.String WEIGHT
- See Also:
- Constant Field Values
-
ID
private static final java.lang.String ID
- See Also:
- Constant Field Values
-
SOURCE
private static final java.lang.String SOURCE
- See Also:
- Constant Field Values
-
TARGET
private static final java.lang.String TARGET
- See Also:
- Constant Field Values
-
insideGraph
private boolean insideGraph
-
insideNode
private boolean insideNode
-
insideEdge
private boolean insideEdge
-
level
private int level
-
nodeId
private java.lang.Integer nodeId
-
sourceId
private java.lang.Integer sourceId
-
targetId
private java.lang.Integer targetId
-
weight
private java.lang.Double weight
-
attributes
private java.util.Map<java.lang.String,Attribute> attributes
-
stringBuffer
private java.lang.StringBuilder stringBuffer
-
maxNodeId
private int maxNodeId
-
singletons
private java.util.List<GmlEventDrivenImporter.Singleton> singletons
-
-
Method Detail
-
notifySingletons
public void notifySingletons()
-
enterGml
public void enterGml(GmlParser.GmlContext ctx)
Description copied from class:GmlBaseListener
Enter a parse tree produced byGmlParser.gml()
.The default implementation does nothing.
- Specified by:
enterGml
in interfaceGmlListener
- Overrides:
enterGml
in classGmlBaseListener
- Parameters:
ctx
- the parse tree
-
enterNumberKeyValue
public void enterNumberKeyValue(GmlParser.NumberKeyValueContext ctx)
Description copied from class:GmlBaseListener
Enter a parse tree produced by theNumberKeyValue
labeled alternative inGmlParser.keyValuePair()
.The default implementation does nothing.
- Specified by:
enterNumberKeyValue
in interfaceGmlListener
- Overrides:
enterNumberKeyValue
in classGmlBaseListener
- Parameters:
ctx
- the parse tree
-
enterListKeyValue
public void enterListKeyValue(GmlParser.ListKeyValueContext ctx)
Description copied from class:GmlBaseListener
Enter a parse tree produced by theListKeyValue
labeled alternative inGmlParser.keyValuePair()
.The default implementation does nothing.
- Specified by:
enterListKeyValue
in interfaceGmlListener
- Overrides:
enterListKeyValue
in classGmlBaseListener
- Parameters:
ctx
- the parse tree
-
exitListKeyValue
public void exitListKeyValue(GmlParser.ListKeyValueContext ctx)
Description copied from class:GmlBaseListener
Exit a parse tree produced by theListKeyValue
labeled alternative inGmlParser.keyValuePair()
.The default implementation does nothing.
- Specified by:
exitListKeyValue
in interfaceGmlListener
- Overrides:
exitListKeyValue
in classGmlBaseListener
- Parameters:
ctx
- the parse tree
-
enterStringKeyValue
public void enterStringKeyValue(GmlParser.StringKeyValueContext ctx)
Description copied from class:GmlBaseListener
Enter a parse tree produced by theStringKeyValue
labeled alternative inGmlParser.keyValuePair()
.The default implementation does nothing.
- Specified by:
enterStringKeyValue
in interfaceGmlListener
- Overrides:
enterStringKeyValue
in classGmlBaseListener
- Parameters:
ctx
- the parse tree
-
parseNumberAttribute
private Attribute parseNumberAttribute(java.lang.String value)
-
-