本文整理了Java中org.apache.clerezza.commons.rdf.Graph.contains()
方法的一些代码示例,展示了Graph.contains()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.contains()
方法的具体详情如下:
包路径:org.apache.clerezza.commons.rdf.Graph
类名称:Graph
方法名:contains
暂无
代码示例来源:origin: org.apache.clerezza/rdf.core
@Override
public Boolean run() {
return graph.contains(o);
}
});
代码示例来源:origin: apache/clerezza
@Override
public Boolean run() {
return graph.contains(o);
}
});
代码示例来源:origin: org.apache.clerezza/rdf.core.test
@Override
public boolean contains(Object o) {
return wrapped.contains(o);
}
代码示例来源:origin: apache/clerezza
@Override
public boolean contains(Object o) {
return wrapped.contains(o);
}
代码示例来源:origin: apache/clerezza
@Override
public boolean contains(Object o) {
checkRead();
return wrapped.contains((Triple) o);
}
代码示例来源:origin: org.apache.clerezza/rdf.core
@Override
public boolean contains(Object o) {
checkRead();
return wrapped.contains((Triple) o);
}
代码示例来源:origin: org.apache.clerezza.commons-rdf/commons-rdf-impl-utils
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;
}
代码示例来源:origin: org.apache.clerezza/rdf.utils
@Override
public boolean contains(Object o) {
return base.contains(toSourceTriple((Triple)o));
}
代码示例来源:origin: apache/clerezza
@Override
public boolean contains(Object o) {
return base.contains(toSourceTriple((Triple)o));
}
代码示例来源:origin: apache/stanbol
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) {
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza
@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.");
}
}
}
代码示例来源:origin: apache/stanbol
@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.");
}
}
}
代码示例来源:origin: org.apache.clerezza/rdf.core.test
@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));
}
代码示例来源:origin: apache/clerezza
@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));
}
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.enhancer.servicesapi
if(em.contains(new TripleImpl(executionPlanNode, ExecutionPlan.HAS_EXECUTION_NODE, engineExecution))){
extractEnhancementProperties(engineExProps,em, engineExecution, "Engine Execution");
代码示例来源:origin: apache/stanbol
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));
代码示例来源:origin: org.apache.clerezza/rdf.core.test
@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));
}
代码示例来源:origin: apache/clerezza
@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));
}
代码示例来源:origin: org.apache.clerezza/rdf.core.test
@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));
}
代码示例来源:origin: apache/clerezza
@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));
}
内容来源于网络,如有侵权,请联系作者删除!