本文整理了Java中org.apache.jena.query.Query.visit
方法的一些代码示例,展示了Query.visit
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.visit
方法的具体详情如下:
包路径:org.apache.jena.query.Query
类名称:Query
方法名:visit
暂无
代码示例来源:origin: apache/jena
public static Query shallowCopy(Query query) {
QueryShallowCopy copy = new QueryShallowCopy();
query.visit(copy);
Query q2 = copy.newQuery;
return q2;
}
代码示例来源:origin: SmartDataAnalytics/jena-sparql-api
public static Query shallowCopy(Query query) {
QueryShallowCopy copy = new QueryShallowCopy() ;
query.visit(copy) ;
Query q2 = copy.newQuery ;
return q2 ;
}
代码示例来源:origin: apache/jena
public static int calc(Query query)
{
QueryHashCodeWorker visitor = new QueryHashCodeWorker() ;
query.visit(visitor) ;
return visitor.calculatedHashCode() ;
}
代码示例来源:origin: apache/jena
/** Format the query
*
* @param writer IndentedWriter
* @param outSyntax Syntax URI
*/
public void serialize(IndentedWriter writer, Syntax outSyntax)
{
// Try to use a serializer factory if available
QuerySerializerFactory factory = SerializerRegistry.get().getQuerySerializerFactory(outSyntax);
QueryVisitor serializer = factory.create(outSyntax, this, writer);
this.visit(serializer);
}
}
代码示例来源:origin: apache/jena
public static boolean equals(Query query1, Query query2)
{
if ( query1 == query2 ) return true ;
query1.setResultVars() ;
query2.setResultVars() ;
QueryCompare visitor = new QueryCompare(query1) ;
try {
query2.visit(visitor) ;
} catch ( ComparisonException ex)
{
return false ;
}
return visitor.isTheSame() ;
}
代码示例来源:origin: apache/jena
@Override
public void visit(ElementSubQuery el) {
out.print("{ ");
out.incIndent(INDENT);
Query q = el.getQuery();
// Serialize with respect to the existing context
QuerySerializerFactory factory = SerializerRegistry.get().getQuerySerializerFactory(Syntax.syntaxARQ);
QueryVisitor serializer = factory.create(Syntax.syntaxARQ, context, out);
q.visit(serializer);
out.decIndent(INDENT);
out.print("}");
}
内容来源于网络,如有侵权,请联系作者删除!