Class MipavGraphXMLContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- gov.nih.mipav.view.graphVisualization.MipavGraphXMLContentHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler
public class MipavGraphXMLContentHandler extends org.xml.sax.helpers.DefaultHandlerParses the MIPAX Graph XML file.
-
-
Field Summary
Fields Modifier and Type Field Description protected hypergraph.graphApi.ElementcurrentElementprotected java.lang.StringBuffercurrentTextprotected hypergraph.graphApi.Graphgraphprivate MipavSAXReaderreader
-
Constructor Summary
Constructors Constructor Description MipavGraphXMLContentHandler()Creates the content handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendDocument()voidendElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)protected voidendElementEdge()End Edge element.protected voidendElementGraph()Ends the Graph.protected voidendElementLabel()Called when the end of the Label element is found.protected voidendElementNode()Called when the end of the Node Element is found.MipavSAXReadergetReader()Returns the MipavSAXReader.voidsetReader(MipavSAXReader reader)Sets the MipavSAXReader.voidstartElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)protected voidstartElementEdge(org.xml.sax.Attributes atts)Called when the Edge start element is found.protected voidstartElementGraph(org.xml.sax.Attributes atts)Called when the Graph start element is found.protected voidstartElementLabel(org.xml.sax.Attributes atts)Called when the start of the Label element is found.protected voidstartElementNode(org.xml.sax.Attributes atts)Called when the start of a Node Element is found.
-
-
-
Field Detail
-
reader
private MipavSAXReader reader
-
graph
protected hypergraph.graphApi.Graph graph
-
currentElement
protected hypergraph.graphApi.Element currentElement
-
currentText
protected java.lang.StringBuffer currentText
-
-
Method Detail
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Overrides:
charactersin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
endDocument
public void endDocument() throws org.xml.sax.SAXException- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
endDocumentin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Overrides:
endElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
getReader
public MipavSAXReader getReader()
Returns the MipavSAXReader.- Returns:
-
setReader
public void setReader(MipavSAXReader reader)
Sets the MipavSAXReader.- Parameters:
reader-
-
startElement
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Overrides:
startElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
endElementEdge
protected void endElementEdge()
End Edge element.
-
endElementGraph
protected void endElementGraph()
Ends the Graph.
-
endElementLabel
protected void endElementLabel()
Called when the end of the Label element is found.
-
endElementNode
protected void endElementNode()
Called when the end of the Node Element is found.
-
startElementEdge
protected void startElementEdge(org.xml.sax.Attributes atts)
Called when the Edge start element is found.- Parameters:
atts-
-
startElementGraph
protected void startElementGraph(org.xml.sax.Attributes atts)
Called when the Graph start element is found.- Parameters:
atts-
-
startElementLabel
protected void startElementLabel(org.xml.sax.Attributes atts)
Called when the start of the Label element is found.- Parameters:
atts-
-
startElementNode
protected void startElementNode(org.xml.sax.Attributes atts)
Called when the start of a Node Element is found.- Parameters:
atts-
-
-