org.reprap
Class RFO.XMLIn

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.reprap.RFO.XMLIn
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Enclosing class:
RFO

 class RFO.XMLIn
extends org.xml.sax.helpers.DefaultHandler


Field Summary
private  java.lang.String element
          The current XML item
private  java.lang.String filetype
          What type of file (Only STLs supported at the moment).
private  STLObject firstSTL
          The first of a list of STLs being read.
private  java.lang.String location
          File location for reading (eg for an input STL file).
private  java.lang.String material
          The name of the material (i.e.
private  double[] mElements
          Transfom matrix to get an item in the right place.
private  RFO rfo
          The rfo that we are reading in
private  int rowNumber
           
private  STLObject stl
          The STL being read
private  javax.media.j3d.Transform3D transform
           
 
Constructor Summary
RFO.XMLIn(java.lang.String legendFile, RFO r)
          Open up legendFile and use it to build RFO rfo.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Nothing to do for characters in between.
 void endDocument()
          End the XML document - no action needed.
 void endElement(java.lang.String uri, java.lang.String name, java.lang.String qName)
          End an element
private  void setMToIdentity()
          Initialise the matrix to the identity matrix.
 void startDocument()
          Begin the XML document - no action needed.
 void startElement(java.lang.String uri, java.lang.String name, java.lang.String qName, org.xml.sax.Attributes atts)
          Start an element
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rfo

private RFO rfo
The rfo that we are reading in


stl

private STLObject stl
The STL being read


firstSTL

private STLObject firstSTL
The first of a list of STLs being read.


element

private java.lang.String element
The current XML item


location

private java.lang.String location
File location for reading (eg for an input STL file).


filetype

private java.lang.String filetype
What type of file (Only STLs supported at the moment).


material

private java.lang.String material
The name of the material (i.e. extruder) that this item is made from.


mElements

private double[] mElements
Transfom matrix to get an item in the right place.


transform

private javax.media.j3d.Transform3D transform

rowNumber

private int rowNumber
Constructor Detail

RFO.XMLIn

RFO.XMLIn(java.lang.String legendFile,
          RFO r)
Open up legendFile and use it to build RFO rfo.

Parameters:
legendFile -
r -
Method Detail

setMToIdentity

private void setMToIdentity()
Initialise the matrix to the identity matrix.


startDocument

public void startDocument()
Begin the XML document - no action needed.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler

endDocument

public void endDocument()
End the XML document - no action needed.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler

startElement

public void startElement(java.lang.String uri,
                         java.lang.String name,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
Start an element

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String uri,
                       java.lang.String name,
                       java.lang.String qName)
End an element

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
Nothing to do for characters in between.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler