|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.mrg.parser.XMLGraphParser
public class XMLGraphParser
Parses the contents of an RDF/XML file into a graph representation.
| Constructor Summary | |
|---|---|
XMLGraphParser(File f)
Create a graph from a File. |
|
XMLGraphParser(File f,
GraphFactory graphFactory)
Create a graph from a file and a graph factory. |
|
XMLGraphParser(InputStream is)
Create a graph from an InputStream. |
|
XMLGraphParser(InputStream is,
GraphFactory graphFactory)
Create a graph from an InputStream and a graph factory. |
|
XMLGraphParser(String s)
Create a graph from a string. |
|
XMLGraphParser(String s,
GraphFactory graphFactory)
Create a graph from a string and a graph factory. |
|
| Method Summary | |
|---|---|
protected void |
error(Exception arg0,
String arg1)
Log an exception as an error. |
void |
error(SAXParseException e)
Indicates an error detected in the XML stream. |
protected void |
error(String msg)
General error logging. |
void |
fatalError(SAXParseException e)
Indicates an unrecoverable error in the XML stream. |
WritableGraph |
getGraph()
Gets the parsed graph. |
long |
getProcessedRows()
Return the number of rows parsed. |
void |
statement(AResource subject,
AResource predicate,
ALiteral obj)
Called to record a statement in the input. |
void |
statement(AResource subject,
AResource predicate,
AResource obj)
Called to record a statement in the input. |
void |
warning(SAXParseException e)
Indicates a warning condition in the XML stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLGraphParser(String s)
throws ParseException,
IOException
s - The string containing the RDF/XML.
ParseException
IOException
public XMLGraphParser(InputStream is)
throws ParseException,
IOException
is - The input stream with the graph data.
ParseException
IOException
public XMLGraphParser(File f)
throws ParseException,
IOException
f - The File with the graph data.
ParseException
IOException
public XMLGraphParser(String s,
GraphFactory graphFactory)
throws ParseException,
IOException
s - The string containing the RDF/XML.graphFactory - A mechanism for creating a graph to populate.
ParseException
IOException
public XMLGraphParser(File f,
GraphFactory graphFactory)
throws ParseException,
IOException
f - The file containing the RDF/XML.graphFactory - A mechanism for creating a graph to populate.
ParseException
IOException
public XMLGraphParser(InputStream is,
GraphFactory graphFactory)
throws ParseException,
IOException
is - The input stream with the graph data.graphFactory - A mechanism for creating a graph to populate.
ParseException
IOException| Method Detail |
|---|
public WritableGraph getGraph()
getGraph in interface GraphParserpublic long getProcessedRows()
getProcessedRows in interface GraphParserprotected void error(String msg)
protected void error(Exception arg0,
String arg1)
public void statement(AResource subject,
AResource predicate,
ALiteral obj)
statement in interface StatementHandlersubject - The subject of the triple.predicate - The predicate of the triple.obj - The literal object of the triple.
public void statement(AResource subject,
AResource predicate,
AResource obj)
statement in interface StatementHandlersubject - The subject of the triple.predicate - The predicate of the triple.obj - The object resource of the triple.public void error(SAXParseException e)
error in interface ErrorHandlere - The exception describing the error condition.
public void fatalError(SAXParseException e)
throws SAXException
fatalError in interface ErrorHandlere - The exception describing the error condition.
ParseException - The exception that will halt the parsing process after this method has completed.
SAXExceptionpublic void warning(SAXParseException e)
warning in interface ErrorHandlere - The exception describing the warning condition.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||