本文整理了Java中org.apache.clerezza.commons.rdf.Triple.getObject()
方法的一些代码示例,展示了Triple.getObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Triple.getObject()
方法的具体详情如下:
包路径:org.apache.clerezza.commons.rdf.Triple
类名称:Triple
方法名:getObject
暂无
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.enhancer.engines.entitylinking.engine
@Override
public Object transform(Object input) {
return ((Triple)input).getObject();
}
};
代码示例来源:origin: org.apache.clerezza/rdf.utils
@Override
public RDFTerm next() {
final Triple triple = triples.next();
if (triple != null) {
return triple.getObject();
} else {
return null;
}
}
代码示例来源:origin: apache/clerezza
@Override
public RDFTerm next() {
final Triple triple = triples.next();
if (triple != null) {
return triple.getObject();
} else {
return null;
}
}
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.enhancer.servicesapi
@Override
public T next() {
return literalFactory.createObject(type, (Literal)results.next().getObject());
}
@Override
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.enhancer.servicesapi
@Override
public String next() {
return ((Literal)results.next().getObject()).getLexicalForm();
}
@Override
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.enhancer.servicesapi
public static void addDependend(Collection<BlankNodeOrIRI> collection, Graph executionPlan, BlankNodeOrIRI executionNode){
for(Iterator<Triple> it = executionPlan.filter(executionNode, DEPENDS_ON, null);
it.hasNext();collection.add((BlankNodeOrIRI)it.next().getObject()));
}
public static boolean isOptional(Graph executionPlan, BlankNodeOrIRI executionNode) {
代码示例来源:origin: org.apache.clerezza.commons-rdf/commons-rdf-impl-utils
static Set<BlankNode> getBNodes(Collection<Triple> s) {
Set<BlankNode> result = new HashSet<BlankNode>();
for (Triple triple : s) {
if (triple.getSubject() instanceof BlankNode) {
result.add((BlankNode) triple.getSubject());
}
if (triple.getObject() instanceof BlankNode) {
result.add((BlankNode) triple.getObject());
}
}
return result;
}
代码示例来源:origin: org.apache.clerezza.commons-rdf/commons-rdf-impl-utils
private static boolean isGrounded(Triple triple) {
if (triple.getSubject() instanceof BlankNode) {
return false;
}
if (triple.getObject() instanceof BlankNode) {
return false;
}
return true;
}
代码示例来源:origin: apache/stanbol
@Override
public String next() {
return ((Literal)results.next().getObject()).getLexicalForm();
}
@Override
代码示例来源:origin: apache/stanbol
@Override
public boolean matches(Triple t) {
return
objectUri != null
&& t.getPredicate().equals(predicateUri)
&& t.getObject().equals(objectUri)
;
}
}
代码示例来源:origin: org.apache.clerezza/rdf.core
private void readList(BlankNodeOrIRI list, Graph permissionMGraph, LinkedList<String> target) {
if (list.equals(rdfNil)) {
return;
}
Triple restTriple = permissionMGraph.filter(list, rest, null).next();
BlankNodeOrIRI restList = (BlankNodeOrIRI) restTriple.getObject();
readList(restList, permissionMGraph, target);
Triple firstTriple = permissionMGraph.filter(list, first, null).next();
Literal firstValue = (Literal) firstTriple.getObject();
String value = LiteralFactory.getInstance().createObject(String.class, firstValue);
target.addFirst(value);
}
代码示例来源:origin: org.apache.clerezza.commons-rdf/commons-rdf-impl-utils
private static Triple map(Triple triple, Map<BlankNode, BlankNode> map) {
final BlankNodeOrIRI oSubject = triple.getSubject();
BlankNodeOrIRI subject = oSubject instanceof BlankNode ?
map.get((BlankNode)oSubject) : oSubject;
RDFTerm oObject = triple.getObject();
RDFTerm object = oObject instanceof BlankNode ?
map.get((BlankNode)oObject) : oObject;
return new TripleImpl(subject, triple.getPredicate(), object);
}
代码示例来源:origin: org.apache.clerezza/rdf.core
private void removeExistingRequiredReadPermissions(IRI GraphUri,
Graph permissionMGraph) {
try {
Triple t = permissionMGraph.filter(GraphUri, readPermissionListProperty, null).next();
RDFTerm list = t.getObject();
removeList((BlankNodeOrIRI) list, permissionMGraph);
permissionMGraph.remove(t);
} catch (NoSuchElementException e) {
//There was no existing to remove
}
}
代码示例来源:origin: org.apache.clerezza.commons-rdf/commons-rdf-impl-utils
@Override
public boolean contains(Object o) {
if (!(o instanceof Triple)) {
return false;
}
Triple t = (Triple) o;
return filter(t.getSubject(), t.getPredicate(), t.getObject()).hasNext();
}
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.commons.indexedgraph
@Override
public int compare(Triple a, Triple b) {
int c = IndexedGraph.compare(a.getPredicate(), b.getPredicate(), hashCodeConflictMap);
if (c == 0) {
c = IndexedGraph.compare(a.getObject(), b.getObject(), hashCodeConflictMap);
if (c == 0) {
c = IndexedGraph.compare(a.getSubject(), b.getSubject(), hashCodeConflictMap);
}
}
return c;
}
};
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.commons.indexedgraph
@Override
public int compare(Triple a, Triple b) {
int c = IndexedGraph.compare(a.getObject(), b.getObject(), hashCodeConflictMap);
if (c == 0) {
c = IndexedGraph.compare(a.getSubject(), b.getSubject(), hashCodeConflictMap);
if (c == 0) {
c = IndexedGraph.compare(a.getPredicate(), b.getPredicate(), hashCodeConflictMap);
}
}
return c;
}
};
代码示例来源:origin: apache/stanbol
@Override
public int compare(Triple a, Triple b) {
int c = IndexedGraph.compare(a.getSubject(), b.getSubject(), hashCodeConflictMap);
if (c == 0) {
c = IndexedGraph.compare(a.getPredicate(), b.getPredicate(), hashCodeConflictMap);
if (c == 0) {
c = IndexedGraph.compare(a.getObject(), b.getObject(), hashCodeConflictMap);
}
}
return c;
}
};
代码示例来源:origin: org.apache.clerezza/rdf.utils
private Triple toSourceTriple(Triple triple) {
if (triple == null) {
return null;
}
return new TripleImpl(toSourceRDFTerm(triple.getSubject()),
triple.getPredicate(), toSourceRDFTerm(triple.getObject()));
}
代码示例来源:origin: org.apache.clerezza/rdf.utils
private Triple toTargetTriple(Triple triple) {
if (triple == null) {
return null;
}
return new TripleImpl(toTargetRDFTerm(triple.getSubject()),
triple.getPredicate(), toTargetRDFTerm(triple.getObject()));
}
代码示例来源:origin: org.apache.clerezza/rdf.core.test
@Test
public void testUseTypedLiterals() {
Graph graph = getEmptyGraph();
Assert.assertEquals(0, graph.size());
Literal value = new TypedLiteralImpl("<elem>value</elem>",xmlLiteralType);
final TripleImpl triple1 = new TripleImpl(uriRef1, uriRef2, value);
graph.add(triple1);
Iterator<Triple> tripleIter = graph.filter(uriRef1, uriRef2, null);
Assert.assertTrue(tripleIter.hasNext());
RDFTerm gotValue = tripleIter.next().getObject();
Assert.assertEquals(value, gotValue);
}
内容来源于网络,如有侵权,请联系作者删除!