com.hp.hpl.jena.graph.Triple.matches()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(139)

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

Triple.matches介绍

暂无

代码示例

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

@Override
public boolean containsBySameValueAs( Triple t )
  {
  int i = size;
  while (i > 0) if (t.matches( elements[--i])) return true;
  return false;
  }

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/** 
   The object is wanted.
   @param t The object to accept or reject.  Must be a Triple
   @return true if the object is wanted.
*/
@Override
public boolean accept( Triple t ) 
  { return tMatch.matches( t ); }
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
   Add the triple <code>t</code> to this list if it is matched by the pattern.
*/
@Override
public void add( Triple t ) { if (match.matches( t )) triples.add( t ); }

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

protected boolean slowContains( Triple t )
  { 
  Iterator<Triple> it = elements.iterator();
  while (it.hasNext())
    if (t.matches( it.next() )) return true;
  return false;
  }

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

protected int findSlotBySameValueAs( Triple key )
  {
  int index = initialIndexFor( key );
  while (true)
    {
    Object current = keys[index];
    if (current == null) return index;
    if (key.matches( (Triple) current )) return ~index;
    if (--index < 0) index += capacity;
    }
  }

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core

protected boolean slowContains( Triple t )
  { 
  TripleBunch s = bunchMap.get( getIndexField( t ) );
  if (s == null)
    return false;
  else
    {
    Iterator<Triple> it = s.iterator();
    while (it.hasNext()) if (t.matches( it.next() )) return true;
    return false;
    }
  }

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
  protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
  {
    List<Triple> results = new ArrayList<Triple>() ;
    for ( Triple t : triples )
      if ( t.matches(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()) )
        results.add(t) ;
    return WrappedIterator.create(results.iterator()) ;
  }
}

代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

private boolean matches(Triple t, Node s, Node p, Node o)
{
  s = nullAsAny(s) ;
  p = nullAsAny(p) ;
  o = nullAsAny(o) ;
  return t.matches(s,p,o) ;
}

相关文章