|
|||||||||
| Home >> All >> org >> media >> [ mn8 overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.media.mn8
Class mn8XMLReader

java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.media.mn8.mn8XMLReader
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public class mn8XMLReader
- extends org.xml.sax.helpers.DefaultHandler
- implements org.xml.sax.EntityResolver
- extends org.xml.sax.helpers.DefaultHandler
Class that reads an String containing a well formated XML document and creates an Concept from it's content.
- Version:
- $Revision: 1.8 $ $Date: 2002/07/24 23:25:47 $
| Field Summary | |
private java.util.Stack |
_elStack
|
private org.media.mn8.concepts.ElementConcept |
_flexConcept
|
private java.lang.String |
_locationURI
|
private static java.lang.String |
_startUrl
|
private org.xml.sax.XMLReader |
_xmlReader
|
| Constructor Summary | |
protected |
mn8XMLReader()
|
| Method Summary | |
(package private) void |
appendString(org.media.mn8.concepts.ElementConcept toElem,
java.lang.String value)
|
void |
characters(char[] ch,
int start,
int length)
Receive notification of character data inside an element. |
void |
endDocument()
Receive notification of the end of the document. |
void |
endElement(java.lang.String uri,
java.lang.String localname,
java.lang.String qname)
Receive notification of the end of an element. |
org.media.mn8.concepts.ElementConcept |
getFlexFromXML(org.media.mn8.concepts.StringConcept xmlDocument)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receive notification of ignorable whitespace in element content. |
void |
parse(java.lang.String value)
|
void |
processChar(java.lang.String val)
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Allow the application to resolve external entities. |
void |
startDocument()
Receive notification of the beginning of the document. |
void |
startElement(java.lang.String uri,
java.lang.String localname,
java.lang.String qname,
org.xml.sax.Attributes attributes)
Receive notification of the start of an element. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, notationDecl, processingInstruction, 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 |
_xmlReader
private org.xml.sax.XMLReader _xmlReader
_flexConcept
private org.media.mn8.concepts.ElementConcept _flexConcept
_elStack
private java.util.Stack _elStack
_startUrl
private static java.lang.String _startUrl
_locationURI
private java.lang.String _locationURI
| Constructor Detail |
mn8XMLReader
protected mn8XMLReader()
| Method Detail |
parse
public void parse(java.lang.String value) throws org.xml.sax.SAXException, java.io.IOException
getFlexFromXML
public org.media.mn8.concepts.ElementConcept getFlexFromXML(org.media.mn8.concepts.StringConcept xmlDocument)
startDocument
public void startDocument()
throws org.xml.sax.SAXException
- Description copied from class:
org.xml.sax.helpers.DefaultHandler - Receive notification of the beginning of the document.
By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).
- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler
endDocument
public void endDocument()
throws org.xml.sax.SAXException
- Description copied from class:
org.xml.sax.helpers.DefaultHandler - Receive notification of the end of the document.
By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).
- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler
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
- Description copied from class:
org.xml.sax.helpers.DefaultHandler - Receive notification of the start of an element.
By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).
- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler
endElement
public void endElement(java.lang.String uri, java.lang.String localname, java.lang.String qname) throws org.xml.sax.SAXException
- Description copied from class:
org.xml.sax.helpers.DefaultHandler - Receive notification of the end of an element.
By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).
- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Description copied from class:
org.xml.sax.helpers.DefaultHandler - Receive notification of character data inside an element.
By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).
- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Description copied from class:
org.xml.sax.helpers.DefaultHandler - Receive notification of ignorable whitespace in element content.
By default, do nothing. Application writers may override this method to take specific actions for each chunk of ignorable whitespace (such as adding data to a node or buffer, or printing it to a file).
- Specified by:
ignorableWhitespacein interfaceorg.xml.sax.ContentHandler
processChar
public void processChar(java.lang.String val)
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
- Description copied from interface:
org.xml.sax.EntityResolver - Allow the application to resolve external entities.
The parser will call this method before opening any external entity except the top-level document entity. Such entities include the external DTD subset and external parameter entities referenced within the DTD (in either case, only if the parser reads external parameter entities), and external general entities referenced within the document element (if the parser reads external general entities). The application may request that the parser locate the entity itself, that it use an alternative URI, or that it use data provided by the application (as a character or byte input stream).
Application writers can use this method to redirect external system identifiers to secure and/or local URIs, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box). Neither XML nor SAX specifies a preferred policy for using public or system IDs to resolve resources. However, SAX specifies how to interpret any InputSource returned by this method, and that if none is returned, then the system ID will be dereferenced as a URL.
If the system identifier is a URL, the SAX parser must resolve it fully before reporting it to the application.
- Specified by:
resolveEntityin interfaceorg.xml.sax.EntityResolver
appendString
void appendString(org.media.mn8.concepts.ElementConcept toElem, java.lang.String value)
|
|||||||||
| Home >> All >> org >> media >> [ mn8 overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC