public class TDBSink extends AbstractBufferingSink implements org.dice_research.squirrel.sink.triplebased.AdvancedTripleBasedSink, org.dice_research.squirrel.sink.Sink
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private org.dice_research.squirrel.data.uri.CrawleableUri |
metaDataGraphUri
Uri for the MetaData graph, will be stored in the default graph
|
private String |
queryDatasetURI
The URI of the DB in which querys can be performed.
|
private String |
updateDatasetURI
The URI of the DB in which updates can be performed.
|
private String |
updateMetaDataUri
The URI to the metadata DB in which updates can be performed.
|
bufferSize, DEFAULT_BUFFER_SIZE| Constructor and Description |
|---|
TDBSink(String host,
String port,
String updateAppendix,
String queryAppendix,
String updateMetaDataAppendix,
String queryMetaDataAppendix)
Constructor of SparqlBasedSink.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addData(org.dice_research.squirrel.data.uri.CrawleableUri uri,
InputStream stream) |
void |
addMetaData(org.apache.jena.rdf.model.Model model) |
void |
flushMetadata() |
String |
getGraphId(org.dice_research.squirrel.data.uri.CrawleableUri uri)
Get the id of the graph in which the given uri is stored.
|
List<org.apache.jena.graph.Triple> |
getTriplesForGraph(org.dice_research.squirrel.data.uri.CrawleableUri uri) |
String |
getUpdateDatasetURI() |
protected void |
sendQuads(org.dice_research.squirrel.data.uri.CrawleableUri uri,
Collection<org.apache.jena.sparql.core.Quad> buffer) |
protected void |
sendTriples(org.dice_research.squirrel.data.uri.CrawleableUri uri,
Collection<org.apache.jena.graph.Triple> triples)
Method to send all buffered triples to the database
|
addQuad, addTriple, closeSinkForUri, openSinkForUriclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTripleprivate static final org.slf4j.Logger LOGGER
private final String updateMetaDataUri
private String updateDatasetURI
private String queryDatasetURI
private org.dice_research.squirrel.data.uri.CrawleableUri metaDataGraphUri
public TDBSink(String host, String port, String updateAppendix, String queryAppendix, String updateMetaDataAppendix, String queryMetaDataAppendix)
host - The host name of the sink.port - The port of the sink.updateAppendix - The update appendix for the content dataqueryAppendix - The query appendix for the content dataupdateMetaDataAppendix - The update appendix for the meta dataqueryMetaDataAppendix - The query appendix for the meta datapublic List<org.apache.jena.graph.Triple> getTriplesForGraph(org.dice_research.squirrel.data.uri.CrawleableUri uri)
getTriplesForGraph in interface org.dice_research.squirrel.sink.triplebased.AdvancedTripleBasedSinkprotected void sendTriples(org.dice_research.squirrel.data.uri.CrawleableUri uri,
Collection<org.apache.jena.graph.Triple> triples)
sendTriples in class AbstractBufferingSinkuri - the crawled CrawleableUritripleList - the list of Triples regarding that uripublic void addMetaData(org.apache.jena.rdf.model.Model model)
addMetaData in interface org.dice_research.squirrel.sink.Sinkpublic void addData(org.dice_research.squirrel.data.uri.CrawleableUri uri,
InputStream stream)
addData in interface org.dice_research.squirrel.sink.UnstructuredDataSinkpublic String getGraphId(org.dice_research.squirrel.data.uri.CrawleableUri uri)
uri - The given uri.public String getUpdateDatasetURI()
protected void sendQuads(org.dice_research.squirrel.data.uri.CrawleableUri uri,
Collection<org.apache.jena.sparql.core.Quad> buffer)
sendQuads in class AbstractBufferingSinkpublic void flushMetadata()
flushMetadata in interface org.dice_research.squirrel.sink.SinkCopyright © 2017–2020. All rights reserved.