Class MipavGraphXMLContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
gov.nih.mipav.view.graphVisualization.MipavGraphXMLContentHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Parses the MIPAX Graph XML file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected hypergraph.graphApi.Elementprotected StringBufferprotected hypergraph.graphApi.Graphprivate MipavSAXReader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String namespaceURI, String localName, String qName) protected voidEnd Edge element.protected voidEnds the Graph.protected voidCalled when the end of the Label element is found.protected voidCalled when the end of the Node Element is found.Returns the MipavSAXReader.voidsetReader(MipavSAXReader reader) Sets the MipavSAXReader.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts) protected voidstartElementEdge(Attributes atts) Called when the Edge start element is found.protected voidstartElementGraph(Attributes atts) Called when the Graph start element is found.protected voidstartElementLabel(Attributes atts) Called when the start of the Label element is found.protected voidstartElementNode(Attributes atts) Called when the start of a Node Element is found.Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
reader
-
graph
protected hypergraph.graphApi.Graph graph -
currentElement
protected hypergraph.graphApi.Element currentElement -
currentText
-
-
Constructor Details
-
MipavGraphXMLContentHandler
public MipavGraphXMLContentHandler()Creates the content handler.
-
-
Method Details
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
getReader
Returns the MipavSAXReader.- Returns:
-
setReader
Sets the MipavSAXReader.- Parameters:
reader-
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
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
Called when the Edge start element is found.- Parameters:
atts-
-
startElementGraph
Called when the Graph start element is found.- Parameters:
atts-
-
startElementLabel
Called when the start of the Label element is found.- Parameters:
atts-
-
startElementNode
Called when the start of a Node Element is found.- Parameters:
atts-
-