|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.mrg.parser.N3GraphParser
public class N3GraphParser
Parses the contents of an N3 file into a graph representation.
| Constructor Summary | |
|---|---|
N3GraphParser(File f)
Create a graph from a file. |
|
N3GraphParser(File f,
GraphFactory graphFactory)
Create a graph from a file. |
|
N3GraphParser(InputStream is)
Create a graph from an InputStream. |
|
N3GraphParser(InputStream is,
GraphFactory graphFactory)
Create a graph from an InputStream. |
|
N3GraphParser(String s)
Create a graph from a string. |
|
N3GraphParser(String s,
GraphFactory graphFactory)
Create a graph from a string. |
|
| Method Summary | |
|---|---|
void |
endFormula(int line,
int col)
This function handles formulas, but we ignore them. |
protected void |
error(String msg)
General error logging. |
WritableGraph |
getGraph()
Retrieves the ResultSet that this parser built. |
long |
getProcessedRows()
Return the number of rows parsed. |
void |
prefix(int line,
int col,
String prefix,
String iri)
Shouldn't need to know about prefixes at this level. |
void |
startFormula(int line,
int col)
This function handles formulas, but we ignore them. |
void |
triple(int line,
int col,
Triple triple)
Collect a triple from the parser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public N3GraphParser(String s)
throws ParseException,
IOException
s - The string containing the N3.
ParseException
IOException
public N3GraphParser(File f)
throws ParseException,
IOException
f - The file containing the N3.
ParseException
IOException
public N3GraphParser(InputStream is)
throws ParseException,
IOException
is - The input stream with the graph data.
ParseException
IOException
public N3GraphParser(String s,
GraphFactory graphFactory)
throws ParseException,
IOException
s - The string containing the N3.graphFactory - A mechanism for creating a graph to populate.
ParseException
IOException
public N3GraphParser(File f,
GraphFactory graphFactory)
throws ParseException,
IOException
f - The file containing the N3.graphFactory - A mechanism for creating a graph to populate.
ParseException
IOException
public N3GraphParser(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)
public void triple(int line,
int col,
Triple triple)
triple in interface TurtleEventHandlerline - The line number that the parser has reached.col - The column number that the parser has reached.triple - The parsed triple/
public void prefix(int line,
int col,
String prefix,
String iri)
prefix in interface TurtleEventHandlerline - The line number that the parser has reached.col - The column number that the parser has reached.prefix - The prefix to be mapped.iri - The IRI to map the prefix to.
public void endFormula(int line,
int col)
endFormula in interface TurtleEventHandlerline - The line number that the parser has reached.col - The column number that the parser has reached.
public void startFormula(int line,
int col)
startFormula in interface TurtleEventHandlerline - The line number that the parser has reached.col - The column number that the parser has reached.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||