本文整理了Java中fr.inria.corese.kgram.core.Query.isRelax
方法的一些代码示例,展示了Query.isRelax
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.isRelax
方法的具体详情如下:
包路径:fr.inria.corese.kgram.core.Query
类名称:Query
方法名:isRelax
[英]To relax types on other property than rdf:type
[中]要释放rdf以外的其他属性上的类型,请执行以下操作:type
代码示例来源:origin: fr.inria.corese/kgram
public boolean isRecordEdge(){
return isRule() || isRelax();
}
代码示例来源:origin: Wimmics/corese
boolean isType(Edge edge, Environment env) {
return graph.isType(edge) || env.getQuery().isRelax(edge);
}
代码示例来源:origin: Wimmics/corese
/**
* Iterator of Entity that performs local Ontology match.match() Enable to
* have a local ontology in case of several graphs with local ontologies In
* addition, with rdfs entailment, ?x a us:Person return one occurrence of
* each value of ?x
*/
Iterable<Edge> localMatch(Iterable<Edge> it, Node gNode, Edge edge, Environment env) {
if (isMatch && !env.getQuery().isRelax()) {
MatchIterator mit = new MatchIterator(it, gNode, edge, graph, env, match);
return mit;
} else {
// if query is relax, we want all types to find best match
// hence skip MatchIterator
return it;
}
}
代码示例来源:origin: fr.inria.corese/kgram
boolean needEdge(){
return getGlobalQuery().isRelax() || getGlobalQuery().isRule();
}
代码示例来源:origin: Wimmics/corese
@Override
public boolean match(Edge q, Edge r, Environment env) {
if (graph.getProxy().isType(q)) { //(q.getLabel().equals(RDF.TYPE)){
return matchType(q, r, env);
}
if (env.getQuery() != null && env.getQuery().isRelax(q)) {
return matchType(q, r, env);
}
if (!q.getLabel().equals(Graph.TOPREL)
&& !q.getLabel().equals(r.getLabel())) {
return false;
}
int max = q.nbNode();
if (max > r.nbNode()) {
return false;
}
for (int i = 0; i < max; i++) {
Node qNode = q.getNode(i);
Node node = r.getNode(i);
if (!match(qNode, node, env)) {
return false;
}
}
return true;
}
代码示例来源:origin: fr.inria.corese/corese-core
@Override
public boolean match(Edge q, Edge r, Environment env) {
if (graph.getProxy().isType(q)) { //(q.getLabel().equals(RDF.TYPE)){
return matchType(q, r, env);
}
if (env.getQuery() != null && env.getQuery().isRelax(q)) {
return matchType(q, r, env);
}
if (!q.getLabel().equals(Graph.TOPREL)
&& !q.getLabel().equals(r.getLabel())) {
return false;
}
int max = q.nbNode();
if (max > r.nbNode()) {
return false;
}
for (int i = 0; i < max; i++) {
Node qNode = q.getNode(i);
Node node = r.getNode(i);
if (!match(qNode, node, env)) {
return false;
}
}
return true;
}
代码示例来源:origin: Wimmics/corese
if ((g.isType(qEdge) || env.getQuery().isRelax(qEdge))
&& qEdge.getNode(1).isConstant()) {
代码示例来源:origin: Wimmics/corese
if (query != null && query.isRelax()) {
return true;
代码示例来源:origin: fr.inria.corese/corese-core
if (query != null && query.isRelax()) {
return true;
内容来源于网络,如有侵权,请联系作者删除!