|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler
nz.ac.waikato.mcennis.rat.parser.xmlHandler.GraphReader
public class GraphReader
SAX XML parser that reads serialized MemGraph graphs. The DTD of the file created is as follows:
<!DOCTYPE dataObject [ <!ELEMENT dataObject (graph)> <!ELEMENT graph (graphClass,graphName,graphProperties*,pathSet*,user*,userLink*,graph*)> <!ELEMENT graphClass (#PCDATA)> <!ELEMENT graphName (#PCDATA)> <!ELEMENT graphProperties (gClass,gValueClass,gType,gValue+)> <!ELEMENT gClass (#PCDATA)> <!ELEMENT gValueClass (#PCDATA)> <!ELEMENT gType (#PCDATA)> <!ELEMENT gValue (#PCDATA)> <!ELEMENT pathSet (path+)> <!ELEMENT path (actor+)> <!ELEMENT actor (actorType,actorID)> <!ELEMENT actorType (#PCDATA)> <!ELEMENT actorID (#PCDATA)> <!ELEMENT user (userClass,ID,properties*,page*)> <!ELEMENT ID (#PCDATA)> <!ELEMENT properties (propertiesClass,valueClass,type,value*)> <!ELEMENT type (#PCDATA)> <!ELEMENT value (#PCDATA)> <!ELEMENT valueClass (#PCDATA)> <!ELEMENT userLink (uClass,uStrength,uSourceType,uSourceID,uDestinationType,uDestinationID,uProperties)> <!ELEMENT uClass (#PCDATA)> <!ELEMENT uSourceType (#PCDATA)> <!ELEMENT uSourceID (#PCDATA)> <!ELEMENT uStrength (#PCDATA)> <!ELEMENT uDestinationType (#PCDATA)> <!ELEMENT uDestinationID (#PCDATA)> <!ELEMENT uProperties (uPropertiesClass,uValueClass,uPropertiesType,uPropertiesValue+)> <!ELEMENT uPropertiesClass (#PCDATA)> <!ELEMENT uPropertiesValueClass (#PCDATA)> <!ELEMENT uPropertiesType (#PCDATA)> <!ELEMENT uPropertiesValue (#PCDATA)> <!ELEMENT page (#PCDATA)> ]>FIX: page should allow a type declaration
| Field Summary |
|---|
| Fields inherited from class nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler |
|---|
properties, site |
| Constructor Summary | |
|---|---|
GraphReader()
Creates a new instance of MemGraphReader |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
Handler |
duplicate()
Create a complete duplicate of this class |
void |
endDocument()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
ParsedObject |
get()
Return the underlying parsed object |
void |
set(ParsedObject o)
Set the underlying parsed object for parsing |
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setGraph(Graph type)
Set the graph from which to load the data from the parsed object |
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
| Methods inherited from class nz.ac.waikato.mcennis.rat.parser.xmlHandler.Handler |
|---|
check, check, error, fatalError, getName, getParameter, getParameter, init, setCrawler, setName, setProperties, warning |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphReader()
| Method Detail |
|---|
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
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic ParsedObject get()
Handler
get in class Handler
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void setGraph(Graph type)
type - graph to be loaded by this parserpublic Handler duplicate()
Handler
duplicate in class Handlerpublic void set(ParsedObject o)
Handler
set in class Handlero - underlying parsed objectpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandler
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||