@Override public Boolean run() { return graph.contains(o); } });
@Override public Boolean run() { return graph.contains(o); } });
@Override public boolean contains(Object o) { return wrapped.contains(o); }
@Override public boolean contains(Object o) { return wrapped.contains(o); }
@Override public boolean contains(Object o) { checkRead(); return wrapped.contains((Triple) o); }
@Override public boolean contains(Object o) { checkRead(); return wrapped.contains((Triple) o); }
private static boolean checkMapping(Graph g1, Graph g2, Map<BlankNode, BlankNode> map) { for (Triple triple : g1) { if (!g2.contains(map(triple, map))) { return false; } } return true; }
@Override public boolean contains(Object o) { return base.contains(toSourceTriple((Triple)o)); }
@Override public boolean contains(Object o) { return base.contains(toSourceTriple((Triple)o)); }
BlankNodeOrIRI subject = textAnnotationsIterator.next().getSubject(); if (enhancements.contains(new TripleImpl(subject, RDF_TYPE, ENHANCER_TEXTANNOTATION))) { Integer start = EnhancementEngineHelper.get(enhancements, subject, ENHANCER_START, Integer.class, literalFactory); if (start != null) {
@Override public void removeDependency(OWLOntologyID dependent, OWLOntologyID dependency) { if (dependent == null) throw new IllegalArgumentException("dependent cannot be null"); if (dependency == null) throw new IllegalArgumentException("dependency cannot be null"); log.debug("Removing dependency."); log.debug(" ... dependent : {}", dependent); log.debug(" ... dependency : {}", dependency); IRI depy = buildResource(dependency); synchronized (meta) { Set<OWLOntologyID> aliases = listAliases(dependent); aliases.add(dependent); for (OWLOntologyID depalias : aliases) { IRI dep = buildResource(depalias); Triple t = new TripleImpl(dep, DEPENDS_ON_URIREF, depy); boolean found = false; if (meta.contains(t)) { found = true; meta.remove(t); } t = new TripleImpl(depy, HAS_DEPENDENT_URIREF, dep); if (meta.contains(t)) { found = true; meta.remove(t); } if (!found) log.warn("No such dependency found."); else log.debug("DONE removing dependency."); } } }
@Override public void removeDependency(OWLOntologyID dependent, OWLOntologyID dependency) { if (dependent == null) throw new IllegalArgumentException("dependent cannot be null"); if (dependency == null) throw new IllegalArgumentException("dependency cannot be null"); log.debug("Removing dependency."); log.debug(" ... dependent : {}", dependent); log.debug(" ... dependency : {}", dependency); IRI depy = buildResource(dependency); synchronized (meta) { Set<OWLOntologyID> aliases = listAliases(dependent); aliases.add(dependent); for (OWLOntologyID depalias : aliases) { IRI dep = buildResource(depalias); Triple t = new TripleImpl(dep, DEPENDS_ON_URIREF, depy); boolean found = false; if (meta.contains(t)) { found = true; meta.remove(t); } t = new TripleImpl(depy, HAS_DEPENDENT_URIREF, dep); if (meta.contains(t)) { found = true; meta.remove(t); } if (!found) log.warn("No such dependency found."); else log.debug("DONE removing dependency."); } } }
@Test public void testContainsIfEmpty() throws Exception { Graph graph = getEmptyGraph(); final Triple triple= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/alice"); Assert.assertFalse(graph.contains(triple)); }
@Test public void testContainsIfEmpty() throws Exception { Graph graph = getEmptyGraph(); final Triple triple= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/alice"); Assert.assertFalse(graph.contains(triple)); }
if(em.contains(new TripleImpl(executionPlanNode, ExecutionPlan.HAS_EXECUTION_NODE, engineExecution))){ extractEnhancementProperties(engineExProps,em, engineExecution, "Engine Execution");
if (meta.contains(new TripleImpl(candidate, RDF.type, SPACE_URIREF))) { RDFTerm rScope; Iterator<Triple> parentSeeker = meta.filter(candidate, IS_SPACE_CORE_OF_URIREF, null); break; } else if (meta.contains(new TripleImpl(candidate, RDF.type, SESSION_URIREF))) { String sessionId = candidate.getUnicodeString().substring(prefix_session.length()); handles.add(sessionManager.getSession(sessionId));
@Test public void testContainsIfContained() throws Exception { Graph graph = getEmptyGraph(); final Triple triple= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/alice"); Assert.assertTrue(graph.add(triple)); Assert.assertTrue(graph.contains(triple)); }
@Test public void testContainsIfContained() throws Exception { Graph graph = getEmptyGraph(); final Triple triple= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/alice"); Assert.assertTrue(graph.add(triple)); Assert.assertTrue(graph.contains(triple)); }
@Test public void testContainsIfNotContained() throws Exception { Graph graph = getEmptyGraph(); final Triple tripleAdd= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/alice"); final Triple tripleTest= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/bob"); Assert.assertTrue(graph.add(tripleAdd)); Assert.assertFalse(graph.contains(tripleTest)); }
@Test public void testContainsIfNotContained() throws Exception { Graph graph = getEmptyGraph(); final Triple tripleAdd= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/alice"); final Triple tripleTest= createTriple( "http://example.org/ontology/Person", "http://example.org/ontology/hasName", "http://example.org/people/bob"); Assert.assertTrue(graph.add(tripleAdd)); Assert.assertFalse(graph.contains(tripleTest)); }