public class ClerezzaSink extends Object implements TripleSink
TripleSink which feeds triples from Semargl's pipeline to Clerezza's MGraph.
List of supported options:
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.clerezza.rdf.core.MGraph |
graph |
static String |
OUTPUT_GRAPH_PROPERTY |
| Modifier | Constructor and Description |
|---|---|
protected |
ClerezzaSink(org.apache.clerezza.rdf.core.MGraph graph) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNonLiteral(String subj,
String pred,
String obj) |
void |
addPlainLiteral(String subj,
String pred,
String content,
String lang) |
protected void |
addTriple(org.apache.clerezza.rdf.core.NonLiteral subj,
org.apache.clerezza.rdf.core.UriRef pred,
org.apache.clerezza.rdf.core.Resource obj)
Callback method for handling Clerezza triples.
|
void |
addTypedLiteral(String subj,
String pred,
String content,
String type) |
static TripleSink |
connect(org.apache.clerezza.rdf.core.MGraph graph)
Instantiates sink for specified Clerezza
MGraph |
void |
endStream() |
void |
setBaseUri(String baseUri) |
boolean |
setProperty(String key,
Object value) |
void |
startStream() |
public static final String OUTPUT_GRAPH_PROPERTY
protected org.apache.clerezza.rdf.core.MGraph graph
public static TripleSink connect(org.apache.clerezza.rdf.core.MGraph graph)
MGraphgraph - graph to sink triples topublic final void addNonLiteral(String subj, String pred, String obj)
addNonLiteral in interface TripleSinkpublic final void addPlainLiteral(String subj, String pred, String content, String lang)
addPlainLiteral in interface TripleSinkpublic final void addTypedLiteral(String subj, String pred, String content, String type)
addTypedLiteral in interface TripleSinkpublic boolean setProperty(String key, Object value)
setProperty in interface DataSinkprotected void addTriple(org.apache.clerezza.rdf.core.NonLiteral subj,
org.apache.clerezza.rdf.core.UriRef pred,
org.apache.clerezza.rdf.core.Resource obj)
subj - triple's subjectpred - triple's predicateobj - triple's objectpublic void startStream()
throws ParseException
startStream in interface DataSinkParseExceptionpublic void endStream()
throws ParseException
endStream in interface DataSinkParseExceptionpublic void setBaseUri(String baseUri)
setBaseUri in interface DataSinkCopyright © 2012–2013. All rights reserved.