public IRI getDefaultInsertGraph() { IRI graph = primary.getDefaultInsertGraph(); if (graph == null) return fallback.getDefaultInsertGraph(); return graph; }
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())));
@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); } }
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;
@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); }
@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); } } }
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; }
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; }
IRI with = uc.getDataset().getDefaultInsertGraph(); if (with == null && toBeInserted.getContext() == null) { con.addStatement(uc, toBeInserted.getSubject(), toBeInserted.getPredicate(),
if (dataset.getDefaultInsertGraph() != null) { xmlWriter.textElement(TransactionXMLConstants.DEFAULT_INSERT_GRAPH, dataset.getDefaultInsertGraph().stringValue());