harmonic.mz.file
Class MVGFileOpener
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--harmonic.mz.file.MVGFileOpener
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public class MVGFileOpener
- extends org.xml.sax.helpers.DefaultHandler
This class is responsible for opening model files in the MVG format.
To retrieve a model from file instantiate a MVGFileOpener with the
the models filename, and call read(), which returns a the root of the
models tree.
|
Constructor Summary |
MVGFileOpener(java.lang.String _filename)
Construct a MVGFileOpener with the specified file name |
| 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 |
bDebug
public boolean bDebug
MVGFileOpener
public MVGFileOpener(java.lang.String _filename)
throws java.lang.Exception
- Construct a MVGFileOpener with the specified file name
cancelFileOpen
public static void cancelFileOpen(java.lang.String filename)
scanForType
public java.util.Vector scanForType(java.lang.String nodeType)
throws java.lang.Exception
java.lang.Exception
read
public DataNode read()
throws java.lang.Exception
java.lang.Exception
findClass
public java.lang.Class findClass(java.lang.String type)
startElement
public void startElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw,
org.xml.sax.Attributes attrs)
- Specified by:
startElement in interface org.xml.sax.ContentHandler- Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
characters
public void characters(char[] ch,
int start,
int length)
- Specified by:
characters in interface org.xml.sax.ContentHandler- Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
endElement
public void endElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw)
- Specified by:
endElement in interface org.xml.sax.ContentHandler- Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
textKey
public java.lang.Object textKey(DataNode node)
nodeFromNumber
public DataNode nodeFromNumber(int number)
fromLinkPointer
public DataNode fromLinkPointer(DataNode holdingNode,
java.lang.String entry)
- File concern. Return node corisponding to file link key.