public class SesameSink extends Object implements TripleSink
TripleSink which feeds triples from Semargl's pipeline to Sesame's RDFHandler.
List of supported options:
| Modifier and Type | Field and Description |
|---|---|
protected org.openrdf.rio.RDFHandler |
handler |
static String |
RDF_HANDLER_PROPERTY
Used as a key with
setProperty(String, Object) method. |
static String |
VALUE_FACTORY_PROPERTY
Used as a key with
setProperty(String, Object) method. |
protected org.openrdf.model.ValueFactory |
valueFactory |
| Modifier | Constructor and Description |
|---|---|
protected |
SesameSink(org.openrdf.rio.RDFHandler handler) |
| 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.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object) |
void |
addTypedLiteral(String subj,
String pred,
String content,
String type) |
static TripleSink |
connect(org.openrdf.rio.RDFHandler handler)
Instantiates sink for specified Sesame
RDFHandler |
void |
endStream() |
void |
setBaseUri(String baseUri) |
boolean |
setProperty(String key,
Object value) |
void |
startStream() |
public static final String RDF_HANDLER_PROPERTY
setProperty(String, Object) method.
Allows to specify Sesame's RDF handler.
Subclass of RDFHandler must be passed as a value.public static final String VALUE_FACTORY_PROPERTY
setProperty(String, Object) method.
Allows to specify Sesame's value factory used to generate statemets.
Subclass of ValueFactory must be passed as a value.protected org.openrdf.rio.RDFHandler handler
protected org.openrdf.model.ValueFactory valueFactory
public static TripleSink connect(org.openrdf.rio.RDFHandler handler)
RDFHandlerhandler - RDFHandler 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 TripleSinkprotected void addTriple(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object)
public void startStream()
throws ParseException
startStream in interface DataSinkParseExceptionpublic void endStream()
throws ParseException
endStream in interface DataSinkParseExceptionpublic boolean setProperty(String key, Object value)
setProperty in interface DataSinkpublic void setBaseUri(String baseUri)
setBaseUri in interface DataSinkCopyright © 2012-2013. All Rights Reserved.