本文整理了Java中org.openrdf.query.Dataset.getDefaultInsertGraph()
方法的一些代码示例,展示了Dataset.getDefaultInsertGraph()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dataset.getDefaultInsertGraph()
方法的具体详情如下:
包路径:org.openrdf.query.Dataset
类名称:Dataset
方法名:getDefaultInsertGraph
[英]Gets the default insert graph URI of this dataset. An null value indicates that the store's default behaviour should be used, if not otherwise indicated in the operation.
[中]获取此数据集的默认插入图URI。如果操作中未另行指示,则null值表示应使用存储的默认行为。
代码示例来源:origin: org.openrdf.sesame/sesame-query
public IRI getDefaultInsertGraph() {
IRI graph = primary.getDefaultInsertGraph();
if (graph == null)
return fallback.getDefaultInsertGraph();
return graph;
}
代码示例来源:origin: org.openrdf.sesame/sesame-http-client
new BasicNameValuePair(Protocol.REMOVE_GRAPH_PARAM_NAME, String.valueOf(graphURI)));
if (dataset.getDefaultInsertGraph() != null) {
queryParams.add(new BasicNameValuePair(Protocol.INSERT_GRAPH_PARAM_NAME,
String.valueOf(dataset.getDefaultInsertGraph())));
代码示例来源:origin: org.openrdf.alibaba/alibaba-sail-auditing
@Override
public void executeDelete(UpdateExpr updateExpr, Dataset ds,
BindingSet bindings, Resource subj, URI pred, Value obj,
Resource... ctx) throws SailException {
URI bundle = ds == null ? null : ds.getDefaultInsertGraph();
if (bundle == null) {
removeStatements(subj, pred, obj, ctx);
} else {
URI entity = entityResolver.getEntity(updateExpr, ds, bindings);
removeInforming(bundle, entity, subj, pred, obj, ctx);
}
}
代码示例来源:origin: org.openrdf.alibaba/alibaba-sail-auditing
public synchronized URI getEntity(QueryModelNode node, Dataset dataset, BindingSet bindings) {
if (dataset == null || node == null)
return null;
URI activity = dataset.getDefaultInsertGraph();
if (activity == null || activity.stringValue().indexOf('#') >= 0)
return null;
代码示例来源:origin: org.openrdf.alibaba/alibaba-sail-auditing
@Override
public void executeUpdate(UpdateExpr updateExpr, Dataset ds,
BindingSet bindings, boolean includeInferred) throws SailException {
SailConnection remover = this;
final URI bundle = ds == null ? null : ds.getDefaultInsertGraph();
if (bundle != null) {
QueryModelNode node = updateExpr;
if (updateExpr instanceof Modify) {
node = ((Modify) updateExpr).getDeleteExpr();
}
final URI entity = entityResolver.getEntity(node, ds, bindings);
remover = new SailConnectionWrapper(this) {
public void removeStatements(Resource subj, URI pred,
Value obj, Resource... ctx) throws SailException {
removeInforming(bundle, entity, subj, pred, obj, ctx);
}
};
}
SailUpdateExecutor executor = new SailUpdateExecutor(remover, vf, false);
executor.executeUpdate(updateExpr, ds, bindings, includeInferred);
}
代码示例来源:origin: org.openrdf.sesame/sesame-repository-sail
@Override
protected void addStatement(Resource subj, IRI pred, Value obj, Resource ctxt) throws OpenRDFException
{
if (enforcesContext()) {
addStatement(uc, subj, pred, obj, contexts);
}
else {
if (uc != null && ctxt == null) {
final IRI insertGraph = uc.getDataset().getDefaultInsertGraph();
if (insertGraph != null) {
addStatement(uc, subj, pred, obj, insertGraph);
}
else {
addStatement(uc, subj, pred, obj);
}
}
else {
addStatement(uc, subj, pred, obj, ctxt);
}
}
}
代码示例来源:origin: blazegraph/database
private Dataset handleDataset(final AbstractTripleStore store, final Dataset dataset) {
if (dataset != null) {
DatasetImpl newDataset = new DatasetImpl();
for (final URI uri: dataset.getDefaultGraphs()) {
URI value = handleDatasetGraph(store, uri);
newDataset.addDefaultGraph(value);
}
for (final URI uri: dataset.getDefaultRemoveGraphs()) {
URI value = handleDatasetGraph(store, uri);
newDataset.addDefaultRemoveGraph(value);
}
for (final URI uri: dataset.getNamedGraphs()) {
URI value = handleDatasetGraph(store, uri);
newDataset.addNamedGraph(value);
}
URI value = handleDatasetGraph(store, dataset.getDefaultInsertGraph());
newDataset.setDefaultInsertGraph(value);
return newDataset;
}
return dataset;
}
代码示例来源:origin: com.blazegraph/bigdata-core
private Dataset handleDataset(final AbstractTripleStore store, final Dataset dataset) {
if (dataset != null) {
DatasetImpl newDataset = new DatasetImpl();
for (final URI uri: dataset.getDefaultGraphs()) {
URI value = handleDatasetGraph(store, uri);
newDataset.addDefaultGraph(value);
}
for (final URI uri: dataset.getDefaultRemoveGraphs()) {
URI value = handleDatasetGraph(store, uri);
newDataset.addDefaultRemoveGraph(value);
}
for (final URI uri: dataset.getNamedGraphs()) {
URI value = handleDatasetGraph(store, uri);
newDataset.addNamedGraph(value);
}
URI value = handleDatasetGraph(store, dataset.getDefaultInsertGraph());
newDataset.setDefaultInsertGraph(value);
return newDataset;
}
return dataset;
}
代码示例来源:origin: org.openrdf.sesame/sesame-repository-sail
IRI with = uc.getDataset().getDefaultInsertGraph();
if (with == null && toBeInserted.getContext() == null) {
con.addStatement(uc, toBeInserted.getSubject(), toBeInserted.getPredicate(),
代码示例来源:origin: org.openrdf.sesame/sesame-http-protocol
if (dataset.getDefaultInsertGraph() != null) {
xmlWriter.textElement(TransactionXMLConstants.DEFAULT_INSERT_GRAPH,
dataset.getDefaultInsertGraph().stringValue());
内容来源于网络,如有侵权,请联系作者删除!