本文整理了Java中org.apache.jena.graph.Triple.isConcrete()
方法的一些代码示例,展示了Triple.isConcrete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Triple.isConcrete()
方法的具体详情如下:
包路径:org.apache.jena.graph.Triple
类名称:Triple
方法名:isConcrete
暂无
代码示例来源:origin: apache/jena
/**
Answer true iff this graph contains <code>t</code>. If <code>t</code>
happens to be concrete, then we hand responsibility over to the store.
Otherwise we use the default implementation.
*/
@Override public boolean graphBaseContains( Triple t )
{ return t.isConcrete() ? store.contains( t ) : super.graphBaseContains( t ); }
代码示例来源:origin: apache/jena
/**
Answer true iff this triple can be compared for sameValueAs by .equals(),
ie, it is a concrete triple with a non-literal object.
*/
protected final boolean isSafeForEquality( Triple t )
{ return t.isConcrete() && !t.getObject().isLiteral(); }
}
代码示例来源:origin: org.apache.jena/jena-core
/**
Answer true iff this graph contains <code>t</code>. If <code>t</code>
happens to be concrete, then we hand responsibility over to the store.
Otherwise we use the default implementation.
*/
@Override public boolean graphBaseContains( Triple t )
{ return t.isConcrete() ? store.contains( t ) : super.graphBaseContains( t ); }
代码示例来源:origin: org.apache.jena/jena-core
/**
Answer true iff this triple can be compared for sameValueAs by .equals(),
ie, it is a concrete triple with a non-literal object.
*/
protected final boolean isSafeForEquality( Triple t )
{ return t.isConcrete() && !t.getObject().isLiteral(); }
}
代码示例来源:origin: apache/jena
@Override
public Iterator<Triple> apply(final Binding b) {
// Iteration is a new mapping of bnodes.
bNodeMap.clear();
List<Triple> tripleList = new ArrayList<>(triples.size());
for ( Triple triple : triples ) {
Triple q = subst(triple, b, bNodeMap);
if ( !q.isConcrete() || !ModelUtils.isValidAsStatement(q.getSubject(), q.getPredicate(), q.getObject()) ) {
// Log.warn(TemplateLib.class, "Unbound quad:
// "+FmtUtils.stringForQuad(quad)) ;
continue;
}
tripleList.add(q);
}
return tripleList.iterator();
}
}));
代码示例来源:origin: apache/jena
while (iter.hasNext()) {
Statement stmt = iter.next();
if (stmt.asTriple().isConcrete()) {
if (!m2.contains(stmt)) {
System.out.print("< ");
while (iter.hasNext()) {
Statement stmt = iter.next();
if (stmt.asTriple().isConcrete()) {
if (!m1.contains(stmt)) {
System.out.print("> ");
代码示例来源:origin: org.apache.jena/jena-cmds
while (iter.hasNext()) {
Statement stmt = iter.next();
if (stmt.asTriple().isConcrete()) {
if (!m2.contains(stmt)) {
System.out.print("< ");
while (iter.hasNext()) {
Statement stmt = iter.next();
if (stmt.asTriple().isConcrete()) {
if (!m1.contains(stmt)) {
System.out.print("> ");
代码示例来源:origin: com.github.galigator.openllet/openllet-jena
if (!pattern.isConcrete())
代码示例来源:origin: Galigator/openllet
if (!pattern.isConcrete())
代码示例来源:origin: apache/jena
public void testConcrete()
{
assertTrue( NodeCreateUtils.createTriple( "S P O" ).isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S P 11").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S P _X").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S _P 11").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "_S _P _O").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "10 11 12").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "?? P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S ?? 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S P ??").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "?S P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S ?P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S P ?O").isConcrete() );
}
代码示例来源:origin: org.apache.jena/jena-core
public void testConcrete()
{
assertTrue( NodeCreateUtils.createTriple( "S P O" ).isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S P 11").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S P _X").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S _P 11").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "_S _P _O").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "10 11 12").isConcrete() );
assertTrue( NodeCreateUtils.createTriple( "S P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "?? P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S ?? 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S P ??").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "?S P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S ?P 11").isConcrete() );
assertFalse( NodeCreateUtils.createTriple( "S P ?O").isConcrete() );
}
代码示例来源:origin: Galigator/openllet
if (!pattern.isConcrete())
代码示例来源:origin: apache/jena
@Override
public void remove(Node s, Node p, Node o) throws UpdateDeniedException,
DeleteDeniedException, AuthenticationRequiredException {
checkUpdate();
Triple t = new Triple(s, p, o);
if (t.isConcrete()) {
checkDelete(t);
} else {
ExtendedIterator<Triple> iter = holder.getBaseItem().find(
Triple.ANY);
while (iter.hasNext()) {
checkDelete(iter.next());
}
}
holder.getBaseItem().remove(s, p, o);
}
代码示例来源:origin: apache/jena
@Override
protected boolean accepts(Object key, TripleWritable tuple) {
Triple t = tuple.get();
if (!t.isConcrete())
return false;
// Ground if all nodes are URI/Literal
return (t.getSubject().isURI() || t.getSubject().isLiteral())
&& (t.getPredicate().isURI() || t.getPredicate().isLiteral())
&& (t.getObject().isURI() || t.getObject().isLiteral());
}
内容来源于网络,如有侵权,请联系作者删除!