@Test public void deleteSingleProperty() { Graph g = new SimpleGraph(); BlankNode bNode1 = new BlankNode() { }; BlankNode bNode2 = new BlankNode() { }; IRI property1 = new IRI("http: IRI property2 = new IRI("http: g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("literal"))); g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("bla bla"))); g.add(new TripleImpl(bNode1, property2, property1)); g.add(new TripleImpl(property1, property1, new PlainLiteralImpl("bla bla"))); g.add(new TripleImpl(bNode2, property1, new PlainLiteralImpl("bla bla"))); GraphNode n = new GraphNode(bNode1, g); n.deleteProperty(property1, new PlainLiteralImpl("literal")); Assert.assertEquals(4, g.size()); }
public void deleteProperty(IRI predicate, RDFTerm object) { if (resource instanceof BlankNodeOrIRI) { graph.remove(new TripleImpl((BlankNodeOrIRI) resource, predicate, object)); } }
GraphNode { public void deleteProperty(IRI predicate, RDFTerm object) { if (resource instanceof BlankNodeOrIRI) { graph.remove(new TripleImpl((BlankNodeOrIRI) resource, predicate, object)); } } }
GraphNode { public void deleteProperty(IRI predicate, RDFTerm object) { if (resource instanceof BlankNodeOrIRI) { graph.remove(new TripleImpl((BlankNodeOrIRI) resource, predicate, object)); } } GraphNode(RDFTerm resource, Graph graph); }
GraphNode { public void deleteProperty(IRI predicate, RDFTerm object) { if (resource instanceof BlankNodeOrIRI) { graph.remove(new TripleImpl((BlankNodeOrIRI) resource, predicate, object)); } } GraphNode(RDFTerm resource, Graph graph); Graph getGraph(); RDFTerm getNode(); void deleteNodeContext(); ImmutableGraph getNodeContext(); Iterator<Literal> getLiterals(IRI property); int countObjects(IRI property); Iterator<RDFTerm> getObjects(IRI property); boolean hasProperty(IRI property, RDFTerm object); int countSubjects(IRI property); Iterator<BlankNodeOrIRI> getSubjects(IRI property); Iterator<IRI> getIRIObjects(IRI property); Iterator<IRI> getProperties(); Iterator<IRI> getInverseProperties(); void addProperty(IRI predicate, RDFTerm object); void addPropertyValue(IRI property, Object value); void addInverseProperty(IRI predicate, RDFTerm subject); List<RDFTerm> asList(); void deleteProperties(IRI predicate); void deleteProperty(IRI predicate, RDFTerm object); @Override String toString(); GraphNode replaceWith(BlankNodeOrIRI replacement); GraphNode replaceWith(BlankNodeOrIRI replacement, boolean checkPredicates); Iterator<GraphNode> getObjectNodes(IRI property); Iterator<GraphNode> getSubjectNodes(IRI property); @Override boolean equals(Object obj); @Override int hashCode(); Lock readLock(); Lock writeLock(); }
GraphNode { public void deleteProperty(IRI predicate, RDFTerm object) { if (resource instanceof BlankNodeOrIRI) { graph.remove(new TripleImpl((BlankNodeOrIRI) resource, predicate, object)); } } GraphNode(RDFTerm resource, Graph graph); Graph getGraph(); RDFTerm getNode(); void deleteNodeContext(); ImmutableGraph getNodeContext(); Iterator<Literal> getLiterals(IRI property); int countObjects(IRI property); Iterator<RDFTerm> getObjects(IRI property); boolean hasProperty(IRI property, RDFTerm object); int countSubjects(IRI property); Iterator<BlankNodeOrIRI> getSubjects(IRI property); Iterator<IRI> getIRIObjects(IRI property); Iterator<IRI> getProperties(); Iterator<IRI> getInverseProperties(); void addProperty(IRI predicate, RDFTerm object); void addPropertyValue(IRI property, Object value); void addInverseProperty(IRI predicate, RDFTerm subject); List<RDFTerm> asList(); void deleteProperties(IRI predicate); void deleteProperty(IRI predicate, RDFTerm object); @Override String toString(); GraphNode replaceWith(BlankNodeOrIRI replacement); GraphNode replaceWith(BlankNodeOrIRI replacement, boolean checkPredicates); Iterator<GraphNode> getObjectNodes(IRI property); Iterator<GraphNode> getSubjectNodes(IRI property); @Override boolean equals(Object obj); @Override int hashCode(); Lock readLock(); Lock writeLock();  }