public boolean handledRemove(Triple triple) { graph.delete(triple) ; return true ; }
@Override public void delete(Triple t) throws DeleteDeniedException { graph.delete(t) ; }
/** * <p> * Delete the given triple from the union model; the actual component model to * be updated will be the designated (or default) {@linkplain #getBaseGraph updateable} graph. * </p> * * @param t A triple to from the union graph * @exception JenaException if the union does not contain any sub-graphs yet */ @Override public void performDelete( Triple t ) { getRequiredBaseGraph().delete( t ); }
/** Add a triple to the difference: add it to the left operand, and remove it from the right operand. */ @Override public void performAdd( Triple t ) { L.add( t ); R.delete( t ); }
@Override public void delete(Quad quad) { if ( isDefaultGraph(quad) ) graph.delete(quad.asTriple()) ; else throw new UnsupportedOperationException("DatasetGraphOne.delete/named graph") ; }
@Override public void delete(Node g , Node s, Node p, Node o) { if ( Quad.isDefaultGraph(g) ) graph.delete(new Triple(s, p, o)) ; else throw new UnsupportedOperationException("DatasetGraphOne.delete/named graph") ; }
@Override public void delete(Quad quad) { if ( isDefaultGraph(quad) ) graph.delete(quad.asTriple()) ; else throw new UnsupportedOperationException("DatasetGraphOne.delete/named graph") ; }
public boolean performRemove(Triple triple) { if (!contains(triple)) { return false; } jenaGraph.delete(tria2JenaUtil.convertTriple(triple)); return true; }
@Override public void delete(Triple t) { base.delete(t) ; getEventManager().notifyDeleteTriple(this, t) ; }
/** * Remove the triple, ie, remove it from the adds, add it to the removals. */ @Override public void performDelete(Triple t) { L.delete(t) ; if (base.contains(t)) R.add(t) ; }
/** * Removes the triple t (if possible) from the set belonging to this graph. */ @Override public synchronized void performDelete(Triple t) { version++; engine.checkSafeToUpdate(); fdata.getGraph().delete(t); this.setPreparedState(false); }
@Override public void delete(Quad quad) { Graph g = fetchGraph(quad.getGraph()) ; g.delete(quad.asTriple()) ; }
/** * Removes the triple t (if possible) from the set belonging to this graph. */ @Override public synchronized void performDelete(Triple t) { fdata.getGraph().delete(t); if (this.isPrepared()) { transitiveEngine.delete(t); } } /**
@Override public Model remove( Resource s, Property p, RDFNode o ) { graph.delete( Triple.create( s.asNode(), p.asNode(), o.asNode() ) ); return this; }
@Override public void removeStatement(org.ontoware.rdf2go.model.node.Resource subject, URI predicate, org.ontoware.rdf2go.model.node.Node object) throws ModelRuntimeException { assertModel(); log.debug("removing a statement (" + subject + "," + predicate + "," + object + ")"); this.modificationCount++; this.jenaModel.getGraph().delete( new Triple( TypeConversion.toJenaNode(subject, this.jenaModel), TypeConversion.toJenaNode( predicate, this.jenaModel), TypeConversion.toJenaNode(object, this.jenaModel))); }
public static void removeAll(Graph g, Node s, Node p, Node o) { ExtendedIterator<Triple> it = g.find(s, p, o); try { while (it.hasNext()) { Triple t = it.next(); g.delete(t); it.remove(); } } finally { it.close(); } }
public void remove(Node node, Triple triple) { if ( node == null ) node = Node.ANY ; //QueryIterator qIter = nodesReifTriple(node, triple) ; Set<Triple> triples = new HashSet<Triple>(); triplesToZap(triples, node, rdfType, statement) ; triplesToZap(triples, node, subject, triple.getSubject()) ; triplesToZap(triples, node, predicate, triple.getPredicate()) ; triplesToZap(triples, node, object, triple.getObject()) ; for ( Triple t : triples ) graph.delete(t) ; }
public void clearGraph() { if ( graph != null ) { Iterator<Triple> iter = Iter.convert(graph.find(Node.ANY, Node.ANY, Node.ANY)) ; List<Triple> triples = Iter.toList(iter) ; for ( Triple t : triples ) graph.delete(t) ; } }
@Test(expected=ConcurrentModificationException.class) public void mrswGraph3() { Model m = create().getDefaultModel() ; Resource r = m.createResource("x") ; ExtendedIterator<Statement> iter1 = m.listStatements(r, null, (RDFNode)null) ; assertNotNull(iter1.next()) ; Triple t = SSE.parseTriple("(<y> <p> 99)") ; m.getGraph().delete(t) ; // Bad iter1.hasNext(); }