Package gov.nih.mipav.model.file
Class FilePolylineVOIXML.MyXMLHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
gov.nih.mipav.model.file.FilePolylineVOIXML.MyXMLHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
- Enclosing class:
FilePolylineVOIXML
Handle events generated while parsing the XML file.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMyXMLHandler(Vector<WildMagic.LibFoundation.Mathematics.Vector3f> cVector) Construct our custom XML data handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) DOCUMENT ME!voidendElement(String namespaceURI, String localName, String qName) Parser calls this when the end tag of each element is reached.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts) Parser calls this for each element in a document.Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, 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
-
coordVector
The contours of the VOI we are building. -
currentKey
The current XML tag we are parsing. -
elementBuffer
The data for the current element being parsed.
-
-
Constructor Details
-
MyXMLHandler
Construct our custom XML data handler.- Parameters:
voi- the VOI we should build from the XML file data
-
-
Method Details
-
characters
public void characters(char[] ch, int start, int length) DOCUMENT ME!- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Parameters:
ch- char[]start- intlength- int
-
endElement
Parser calls this when the end tag of each element is reached. Data collected in the elementbuffer is generally saved to the image info.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Parameters:
namespaceURI- the namespace (not used)localName- the current tag we are parsingqName- ? (not used)- Throws:
SAXException- if there is a problem with the parser
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException Parser calls this for each element in a document.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Parameters:
namespaceURI- the namespace (not used)localName- the current tag we are parsingqName- ? (not used)atts- attributes for the current tag- Throws:
SAXException- if there is a problem with the parser
-