- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.jgrapht.nio.gexf.SimpleGEXFEventDrivenImporter.GEXFHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
- Enclosing class:
- SimpleGEXFEventDrivenImporter
private class SimpleGEXFEventDrivenImporter.GEXFHandler extends org.xml.sax.helpers.DefaultHandler
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ATTRIBUTE
private static java.lang.String
ATTRIBUTE_ID
private static java.lang.String
ATTRIBUTE_TITLE
private static java.lang.String
ATTRIBUTE_TYPE
private static java.lang.String
ATTRIBUTES
private static java.lang.String
ATTRIBUTES_CLASS
private java.lang.String
attributesClass
private static java.lang.String
ATTVALUE
private static java.lang.String
ATTVALUE_FOR
private static java.lang.String
ATTVALUE_VALUE
private static java.lang.String
ATTVALUES
private Triple<java.lang.String,java.lang.String,java.lang.Double>
currentEdge
private java.lang.String
currentNode
private static java.lang.String
EDGE
private static java.lang.String
EDGE_ID
private static java.lang.String
EDGE_SOURCE
private static java.lang.String
EDGE_TARGET
private static java.lang.String
EDGE_WEIGHT
private java.util.Map<java.lang.String,SimpleGEXFEventDrivenImporter.Attribute>
edgeValidAttributes
private static java.lang.String
GRAPH
private int
insideAttribute
private int
insideAttributes
private int
insideAttValue
private int
insideAttValues
private int
insideEdge
private int
insideGraph
private int
insideNode
private static java.lang.String
NODE
private static java.lang.String
NODE_ID
private java.util.Map<java.lang.String,SimpleGEXFEventDrivenImporter.Attribute>
nodeValidAttributes
-
Constructor Summary
Constructors Constructor Description GEXFHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
void
error(org.xml.sax.SAXParseException e)
void
fatalError(org.xml.sax.SAXParseException e)
private java.util.Optional<java.lang.String>
findAttribute(java.lang.String localName, org.xml.sax.Attributes attributes)
void
startDocument()
void
startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
void
warning(org.xml.sax.SAXParseException e)
-
-
-
Field Detail
-
GRAPH
private static final java.lang.String GRAPH
- See Also:
- Constant Field Values
-
NODE
private static final java.lang.String NODE
- See Also:
- Constant Field Values
-
NODE_ID
private static final java.lang.String NODE_ID
- See Also:
- Constant Field Values
-
EDGE
private static final java.lang.String EDGE
- See Also:
- Constant Field Values
-
EDGE_ID
private static final java.lang.String EDGE_ID
- See Also:
- Constant Field Values
-
EDGE_SOURCE
private static final java.lang.String EDGE_SOURCE
- See Also:
- Constant Field Values
-
EDGE_TARGET
private static final java.lang.String EDGE_TARGET
- See Also:
- Constant Field Values
-
EDGE_WEIGHT
private static final java.lang.String EDGE_WEIGHT
- See Also:
- Constant Field Values
-
ATTRIBUTES
private static final java.lang.String ATTRIBUTES
- See Also:
- Constant Field Values
-
ATTRIBUTES_CLASS
private static final java.lang.String ATTRIBUTES_CLASS
- See Also:
- Constant Field Values
-
ATTRIBUTE
private static final java.lang.String ATTRIBUTE
- See Also:
- Constant Field Values
-
ATTRIBUTE_ID
private static final java.lang.String ATTRIBUTE_ID
- See Also:
- Constant Field Values
-
ATTRIBUTE_TITLE
private static final java.lang.String ATTRIBUTE_TITLE
- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE
private static final java.lang.String ATTRIBUTE_TYPE
- See Also:
- Constant Field Values
-
ATTVALUES
private static final java.lang.String ATTVALUES
- See Also:
- Constant Field Values
-
ATTVALUE
private static final java.lang.String ATTVALUE
- See Also:
- Constant Field Values
-
ATTVALUE_FOR
private static final java.lang.String ATTVALUE_FOR
- See Also:
- Constant Field Values
-
ATTVALUE_VALUE
private static final java.lang.String ATTVALUE_VALUE
- See Also:
- Constant Field Values
-
insideGraph
private int insideGraph
-
insideNode
private int insideNode
-
currentNode
private java.lang.String currentNode
-
insideEdge
private int insideEdge
-
currentEdge
private Triple<java.lang.String,java.lang.String,java.lang.Double> currentEdge
-
insideAttributes
private int insideAttributes
-
attributesClass
private java.lang.String attributesClass
-
insideAttribute
private int insideAttribute
-
insideAttValues
private int insideAttValues
-
insideAttValue
private int insideAttValue
-
nodeValidAttributes
private java.util.Map<java.lang.String,SimpleGEXFEventDrivenImporter.Attribute> nodeValidAttributes
-
edgeValidAttributes
private java.util.Map<java.lang.String,SimpleGEXFEventDrivenImporter.Attribute> edgeValidAttributes
-
-
Method Detail
-
startDocument
public void startDocument() throws org.xml.sax.SAXException
- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startDocument
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
warning
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
- Specified by:
warning
in interfaceorg.xml.sax.ErrorHandler
- Overrides:
warning
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
error
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
- Specified by:
error
in interfaceorg.xml.sax.ErrorHandler
- Overrides:
error
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
fatalError
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
- Specified by:
fatalError
in interfaceorg.xml.sax.ErrorHandler
- Overrides:
fatalError
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
findAttribute
private java.util.Optional<java.lang.String> findAttribute(java.lang.String localName, org.xml.sax.Attributes attributes)
-
-