openllet.query.sparqldl.model.QueryImpl.getClasses()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中openllet.query.sparqldl.model.QueryImpl.getClasses方法的一些代码示例,展示了QueryImpl.getClasses的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryImpl.getClasses方法的具体详情如下:
包路径:openllet.query.sparqldl.model.QueryImpl
类名称:QueryImpl
方法名:getClasses

QueryImpl.getClasses介绍

暂无

代码示例

代码示例来源:origin: Galigator/openllet

/**
 * {@inheritDoc} TODO
 */
@Override
public ATermAppl rollUpTo(final ATermAppl var, final Collection<ATermAppl> stopList, final boolean stopOnConstants)
{
  if (getDistVarsForType(VarType.LITERAL).contains(var) && !getDistVarsForType(VarType.INDIVIDUAL).contains(var) && !_individualsAndLiterals.contains(var))
    throw new InternalReasonerException("Trying to roll up to the variable '" + var + "' which is not distinguished and _individual.");
  ATermList classParts = ATermUtils.EMPTY_LIST;
  final Set<ATermAppl> visited = new HashSet<>();
  if (stopOnConstants)
    visited.addAll(getConstants());
  final Collection<QueryAtom> inEdges = findAtoms(QueryPredicate.PropertyValue, null, null, var);
  for (final QueryAtom a : inEdges)
    classParts = classParts.append(rollEdgeIn(QueryPredicate.PropertyValue, a, visited, stopList));
  final Collection<QueryAtom> outEdges = findAtoms(QueryPredicate.PropertyValue, var, null, null);
  for (final QueryAtom a : outEdges)
    classParts = classParts.append(rollEdgeOut(QueryPredicate.PropertyValue, a, visited, stopList));
  classParts = classParts.concat(getClasses(var));
  return ATermUtils.makeAnd(classParts);
}

代码示例来源:origin: com.github.galigator.openllet/openllet-query

/**
 * {@inheritDoc} TODO
 */
@Override
public ATermAppl rollUpTo(final ATermAppl var, final Collection<ATermAppl> stopList, final boolean stopOnConstants)
{
  if (getDistVarsForType(VarType.LITERAL).contains(var) && !getDistVarsForType(VarType.INDIVIDUAL).contains(var) && !_individualsAndLiterals.contains(var))
    throw new InternalReasonerException("Trying to roll up to the variable '" + var + "' which is not distinguished and _individual.");
  ATermList classParts = ATermUtils.EMPTY_LIST;
  final Set<ATermAppl> visited = new HashSet<>();
  if (stopOnConstants)
    visited.addAll(getConstants());
  final Collection<QueryAtom> inEdges = findAtoms(QueryPredicate.PropertyValue, null, null, var);
  for (final QueryAtom a : inEdges)
    classParts = classParts.append(rollEdgeIn(QueryPredicate.PropertyValue, a, visited, stopList));
  final Collection<QueryAtom> outEdges = findAtoms(QueryPredicate.PropertyValue, var, null, null);
  for (final QueryAtom a : outEdges)
    classParts = classParts.append(rollEdgeOut(QueryPredicate.PropertyValue, a, visited, stopList));
  classParts = classParts.concat(getClasses(var));
  return ATermUtils.makeAnd(classParts);
}

代码示例来源:origin: Galigator/openllet

/**
 * {@inheritDoc} TODO
 */
@Override
public ATermAppl rollUpTo(final ATermAppl var, final Collection<ATermAppl> stopList, final boolean stopOnConstants)
{
  if (getDistVarsForType(VarType.LITERAL).contains(var) && !getDistVarsForType(VarType.INDIVIDUAL).contains(var) && !_individualsAndLiterals.contains(var))
    throw new InternalReasonerException("Trying to roll up to the variable '" + var + "' which is not distinguished and _individual.");
  ATermList classParts = ATermUtils.EMPTY_LIST;
  final Set<ATermAppl> visited = new HashSet<>();
  if (stopOnConstants)
    visited.addAll(getConstants());
  final Collection<QueryAtom> inEdges = findAtoms(QueryPredicate.PropertyValue, null, null, var);
  for (final QueryAtom a : inEdges)
    classParts = classParts.append(rollEdgeIn(QueryPredicate.PropertyValue, a, visited, stopList));
  final Collection<QueryAtom> outEdges = findAtoms(QueryPredicate.PropertyValue, var, null, null);
  for (final QueryAtom a : outEdges)
    classParts = classParts.append(rollEdgeOut(QueryPredicate.PropertyValue, a, visited, stopList));
  classParts = classParts.concat(getClasses(var));
  return ATermUtils.makeAnd(classParts);
}

代码示例来源:origin: Galigator/openllet

final ATermList temp = getClasses(subj);
  if (temp.getLength() == 0)
ATermList targetClasses = getClasses(subj);

代码示例来源:origin: com.github.galigator.openllet/openllet-query

final ATermList temp = getClasses(subj);
  if (temp.getLength() == 0)
ATermList targetClasses = getClasses(subj);

代码示例来源:origin: com.github.galigator.openllet/openllet-query

final ATermList temp = getClasses(obj);
  if (temp.getLength() == 0)
ATermList targetClasses = getClasses(obj);

代码示例来源:origin: Galigator/openllet

final ATermList temp = getClasses(obj);
  if (temp.getLength() == 0)
ATermList targetClasses = getClasses(obj);

代码示例来源:origin: Galigator/openllet

final ATermList temp = getClasses(obj);
  if (temp.getLength() == 0)
ATermList targetClasses = getClasses(obj);

代码示例来源:origin: Galigator/openllet

final ATermList temp = getClasses(subj);
  if (temp.getLength() == 0)
ATermList targetClasses = getClasses(subj);

相关文章