- 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>attributesprivate static java.lang.StringEDGEprivate static java.lang.StringGRAPHprivate static java.lang.StringIDprivate booleaninsideEdgeprivate booleaninsideGraphprivate booleaninsideNodeprivate intlevelprivate intmaxNodeIdprivate static java.lang.StringNODEprivate java.lang.IntegernodeIdprivate java.util.List<GmlEventDrivenImporter.Singleton>singletonsprivate static java.lang.StringSOURCEprivate java.lang.IntegersourceIdprivate java.lang.StringBuilderstringBufferprivate static java.lang.StringTARGETprivate java.lang.IntegertargetIdprivate java.lang.Doubleweightprivate static java.lang.StringWEIGHT
-
Constructor Summary
Constructors Modifier Constructor Description privateNotifyGmlListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenterGml(GmlParser.GmlContext ctx)Enter a parse tree produced byGmlParser.gml().voidenterListKeyValue(GmlParser.ListKeyValueContext ctx)Enter a parse tree produced by theListKeyValuelabeled alternative inGmlParser.keyValuePair().voidenterNumberKeyValue(GmlParser.NumberKeyValueContext ctx)Enter a parse tree produced by theNumberKeyValuelabeled alternative inGmlParser.keyValuePair().voidenterStringKeyValue(GmlParser.StringKeyValueContext ctx)Enter a parse tree produced by theStringKeyValuelabeled alternative inGmlParser.keyValuePair().voidexitListKeyValue(GmlParser.ListKeyValueContext ctx)Exit a parse tree produced by theListKeyValuelabeled alternative inGmlParser.keyValuePair().voidnotifySingletons()private AttributeparseNumberAttribute(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:GmlBaseListenerEnter a parse tree produced byGmlParser.gml().The default implementation does nothing.
- Specified by:
enterGmlin interfaceGmlListener- Overrides:
enterGmlin classGmlBaseListener- Parameters:
ctx- the parse tree
-
enterNumberKeyValue
public void enterNumberKeyValue(GmlParser.NumberKeyValueContext ctx)
Description copied from class:GmlBaseListenerEnter a parse tree produced by theNumberKeyValuelabeled alternative inGmlParser.keyValuePair().The default implementation does nothing.
- Specified by:
enterNumberKeyValuein interfaceGmlListener- Overrides:
enterNumberKeyValuein classGmlBaseListener- Parameters:
ctx- the parse tree
-
enterListKeyValue
public void enterListKeyValue(GmlParser.ListKeyValueContext ctx)
Description copied from class:GmlBaseListenerEnter a parse tree produced by theListKeyValuelabeled alternative inGmlParser.keyValuePair().The default implementation does nothing.
- Specified by:
enterListKeyValuein interfaceGmlListener- Overrides:
enterListKeyValuein classGmlBaseListener- Parameters:
ctx- the parse tree
-
exitListKeyValue
public void exitListKeyValue(GmlParser.ListKeyValueContext ctx)
Description copied from class:GmlBaseListenerExit a parse tree produced by theListKeyValuelabeled alternative inGmlParser.keyValuePair().The default implementation does nothing.
- Specified by:
exitListKeyValuein interfaceGmlListener- Overrides:
exitListKeyValuein classGmlBaseListener- Parameters:
ctx- the parse tree
-
enterStringKeyValue
public void enterStringKeyValue(GmlParser.StringKeyValueContext ctx)
Description copied from class:GmlBaseListenerEnter a parse tree produced by theStringKeyValuelabeled alternative inGmlParser.keyValuePair().The default implementation does nothing.
- Specified by:
enterStringKeyValuein interfaceGmlListener- Overrides:
enterStringKeyValuein classGmlBaseListener- Parameters:
ctx- the parse tree
-
parseNumberAttribute
private Attribute parseNumberAttribute(java.lang.String value)
-
-