use of org.eclipse.rdf4j.http.protocol.transaction.operations.RemoveStatementsOperation in project rdf4j by eclipse.
the class HTTPRepositoryConnection method removeWithoutCommit.
@Override
protected void removeWithoutCommit(Resource subject, IRI predicate, Value object, Resource... contexts) throws RepositoryException {
if (this.getRepository().useCompatibleMode()) {
txn.add(new RemoveStatementsOperation(subject, predicate, object, contexts));
return;
}
flushTransactionState(Protocol.Action.DELETE);
if (toRemove == null) {
toRemove = new LinkedHashModel();
}
if (subject == null) {
subject = SESAME.WILDCARD;
}
if (predicate == null) {
predicate = SESAME.WILDCARD;
}
if (object == null) {
object = SESAME.WILDCARD;
}
toRemove.add(subject, predicate, object, contexts);
}
use of org.eclipse.rdf4j.http.protocol.transaction.operations.RemoveStatementsOperation in project rdf4j by eclipse.
the class TransactionSAXParser method createRemoveStatementsOperation.
private TransactionOperation createRemoveStatementsOperation() throws SAXException {
if (parsedValues.size() < 3) {
throw new SAXException("At least three values required for RemoveStatementsOperation, found: " + parsedValues.size());
}
try {
Resource subject = (Resource) parsedValues.get(0);
IRI predicate = (IRI) parsedValues.get(1);
Value object = parsedValues.get(2);
Resource[] contexts = createContexts(3);
parsedValues.clear();
return new RemoveStatementsOperation(subject, predicate, object, contexts);
} catch (ClassCastException e) {
throw new SAXException("Invalid argument(s) for RemoveStatementsOperation", e);
}
}
Aggregations