- java.lang.Object
-
- org.jgrapht.nio.json.JsonBaseListener
-
- org.jgrapht.nio.json.JSONEventDrivenImporter.NotifyJsonListener
-
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeListener
,JsonListener
- Enclosing class:
- JSONEventDrivenImporter
private class JSONEventDrivenImporter.NotifyJsonListener extends JsonBaseListener
-
-
Field Summary
Fields Modifier and Type Field Description private int
arrayLevel
private java.util.Map<java.lang.String,Attribute>
attributes
private static java.lang.String
GRAPH
private static java.lang.String
ID
private boolean
insideEdge
private boolean
insideEdges
private boolean
insideEdgesArray
private boolean
insideNode
private boolean
insideNodes
private boolean
insideNodesArray
private java.lang.String
nodeId
private int
objectLevel
private java.util.Deque<java.lang.String>
pairNames
private int
singletons
private java.lang.String
singletonsUUID
private static java.lang.String
SOURCE
private java.lang.String
sourceId
private static java.lang.String
TARGET
private java.lang.String
targetId
private static java.lang.String
WEIGHT
-
Constructor Summary
Constructors Modifier Constructor Description private
NotifyJsonListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enterArray(JsonParser.ArrayContext ctx)
Enter a parse tree produced byJsonParser.array()
.void
enterJson(JsonParser.JsonContext ctx)
Enter a parse tree produced byJsonParser.json()
.void
enterObj(JsonParser.ObjContext ctx)
Enter a parse tree produced byJsonParser.obj()
.void
enterPair(JsonParser.PairContext ctx)
Enter a parse tree produced byJsonParser.pair()
.void
enterValue(JsonParser.ValueContext ctx)
Enter a parse tree produced byJsonParser.value()
.void
exitArray(JsonParser.ArrayContext ctx)
Exit a parse tree produced byJsonParser.array()
.void
exitObj(JsonParser.ObjContext ctx)
Exit a parse tree produced byJsonParser.obj()
.void
exitPair(JsonParser.PairContext ctx)
Exit a parse tree produced byJsonParser.pair()
.private Attribute
readAttribute(JsonParser.ValueContext ctx)
private java.lang.String
readIdentifier(JsonParser.ValueContext ctx)
private java.lang.String
readString(JsonParser.ValueContext ctx)
private java.lang.String
unquote(java.lang.String value)
-
Methods inherited from class org.jgrapht.nio.json.JsonBaseListener
enterEveryRule, exitEveryRule, exitJson, exitValue, visitErrorNode, visitTerminal
-
-
-
-
Field Detail
-
GRAPH
private static final java.lang.String GRAPH
- See Also:
- Constant Field Values
-
ID
private static final java.lang.String ID
- See Also:
- Constant Field Values
-
WEIGHT
private static final java.lang.String WEIGHT
- 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
-
objectLevel
private int objectLevel
-
arrayLevel
private int arrayLevel
-
insideNodes
private boolean insideNodes
-
insideNodesArray
private boolean insideNodesArray
-
insideNode
private boolean insideNode
-
insideEdges
private boolean insideEdges
-
insideEdgesArray
private boolean insideEdgesArray
-
insideEdge
private boolean insideEdge
-
pairNames
private java.util.Deque<java.lang.String> pairNames
-
nodeId
private java.lang.String nodeId
-
sourceId
private java.lang.String sourceId
-
targetId
private java.lang.String targetId
-
attributes
private java.util.Map<java.lang.String,Attribute> attributes
-
singletons
private int singletons
-
singletonsUUID
private java.lang.String singletonsUUID
-
-
Method Detail
-
enterJson
public void enterJson(JsonParser.JsonContext ctx)
Description copied from class:JsonBaseListener
Enter a parse tree produced byJsonParser.json()
.The default implementation does nothing.
- Specified by:
enterJson
in interfaceJsonListener
- Overrides:
enterJson
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
enterObj
public void enterObj(JsonParser.ObjContext ctx)
Description copied from class:JsonBaseListener
Enter a parse tree produced byJsonParser.obj()
.The default implementation does nothing.
- Specified by:
enterObj
in interfaceJsonListener
- Overrides:
enterObj
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
exitObj
public void exitObj(JsonParser.ObjContext ctx)
Description copied from class:JsonBaseListener
Exit a parse tree produced byJsonParser.obj()
.The default implementation does nothing.
- Specified by:
exitObj
in interfaceJsonListener
- Overrides:
exitObj
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
enterArray
public void enterArray(JsonParser.ArrayContext ctx)
Description copied from class:JsonBaseListener
Enter a parse tree produced byJsonParser.array()
.The default implementation does nothing.
- Specified by:
enterArray
in interfaceJsonListener
- Overrides:
enterArray
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
exitArray
public void exitArray(JsonParser.ArrayContext ctx)
Description copied from class:JsonBaseListener
Exit a parse tree produced byJsonParser.array()
.The default implementation does nothing.
- Specified by:
exitArray
in interfaceJsonListener
- Overrides:
exitArray
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
enterPair
public void enterPair(JsonParser.PairContext ctx)
Description copied from class:JsonBaseListener
Enter a parse tree produced byJsonParser.pair()
.The default implementation does nothing.
- Specified by:
enterPair
in interfaceJsonListener
- Overrides:
enterPair
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
exitPair
public void exitPair(JsonParser.PairContext ctx)
Description copied from class:JsonBaseListener
Exit a parse tree produced byJsonParser.pair()
.The default implementation does nothing.
- Specified by:
exitPair
in interfaceJsonListener
- Overrides:
exitPair
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
enterValue
public void enterValue(JsonParser.ValueContext ctx)
Description copied from class:JsonBaseListener
Enter a parse tree produced byJsonParser.value()
.The default implementation does nothing.
- Specified by:
enterValue
in interfaceJsonListener
- Overrides:
enterValue
in classJsonBaseListener
- Parameters:
ctx
- the parse tree
-
readAttribute
private Attribute readAttribute(JsonParser.ValueContext ctx)
-
unquote
private java.lang.String unquote(java.lang.String value)
-
readString
private java.lang.String readString(JsonParser.ValueContext ctx)
-
readIdentifier
private java.lang.String readIdentifier(JsonParser.ValueContext ctx)
-
-