Class ShapeModel3DXMLHandler

java.lang.Object
org.xml.sax.helpers.DefaultHandler
mgui.io.domestic.shapes.xml.ShapeModel3DXMLHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class ShapeModel3DXMLHandler
extends org.xml.sax.helpers.DefaultHandler
XML handler for a ShapeModel3D object.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected boolean model_is_loading  
    protected java.lang.String model_name  
    protected java.lang.String model_unit  
    protected java.lang.String root_dir  
    protected ShapeModel3D shape_model  
    protected ShapeSet3DXMLHandler shape_set_xml_handler  
  • Constructor Summary

    Constructors
    Constructor Description
    ShapeModel3DXMLHandler()
    Instantiates a handler with no pre-specified shape model.
    ShapeModel3DXMLHandler​(ShapeModel3D model)
    Instantiates a handler with a specified ShapeModel3D.
  • Method Summary

    Modifier and Type Method Description
    void characters​(char[] ch, int start, int length)  
    void endElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName)  
    java.lang.String getRootDir()  
    ShapeModel3D getShapeModel()  
    void setRootDir​(java.lang.String dir)  
    void startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)  

    Methods inherited from class org.xml.sax.helpers.DefaultHandler

    endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.xml.sax.ContentHandler

    declaration
  • Field Details

    • shape_model

      protected ShapeModel3D shape_model
    • shape_set_xml_handler

      protected ShapeSet3DXMLHandler shape_set_xml_handler
    • model_is_loading

      protected boolean model_is_loading
    • model_name

      protected java.lang.String model_name
    • model_unit

      protected java.lang.String model_unit
    • root_dir

      protected java.lang.String root_dir
  • Constructor Details

    • ShapeModel3DXMLHandler

      public ShapeModel3DXMLHandler()
      Instantiates a handler with no pre-specified shape model. A new model will be created.
      Parameters:
      model -
    • ShapeModel3DXMLHandler

      public ShapeModel3DXMLHandler​(ShapeModel3D model)
      Instantiates a handler with a specified ShapeModel3D. This handler will expect a shape model as input.
      Parameters:
      model -
  • Method Details

    • getShapeModel

      public ShapeModel3D getShapeModel()
    • setRootDir

      public void setRootDir​(java.lang.String dir)
    • getRootDir

      public java.lang.String getRootDir()
    • 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 interface org.xml.sax.ContentHandler
      Overrides:
      startElement in class org.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 interface org.xml.sax.ContentHandler
      Overrides:
      endElement in class org.xml.sax.helpers.DefaultHandler
      Throws:
      org.xml.sax.SAXException
    • characters

      public void characters​(char[] ch, int start, int length) throws org.xml.sax.SAXException
      Specified by:
      characters in interface org.xml.sax.ContentHandler
      Overrides:
      characters in class org.xml.sax.helpers.DefaultHandler
      Throws:
      org.xml.sax.SAXException