Codota Logo
TripleMatch
Code IndexAdd Codota to your IDE (free)

How to use
TripleMatch
in
com.hp.hpl.jena.graph

Best Java code snippets using com.hp.hpl.jena.graph.TripleMatch (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

@Override
public ExtendedIterator<Triple> find( TripleMatch m ) {
  return find(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject());
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
   Answer an ExtendedIterator over all the triples in this graph that match the
   triple-pattern <code>m</code>. Delegated to the store.
 */
@Override public ExtendedIterator<Triple> graphBaseFind( TripleMatch m ) 
{ return store.find( m.asTriple() ); }
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m) {
  if ( m == null ) m = Triple.ANY ;
  Node s = m.getMatchSubject() ;
  Node p = m.getMatchPredicate() ;
  Node o = m.getMatchObject() ;
  return graphBaseFind(s, p, o) ;
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
{
  return new TripleMatchIterator(m.asTriple(), db.iterator()) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * Returns an iterator over Triples.
 *
 * <p>This code used to have the .filterKeep component uncommented. We
 * think this is because of earlier history, before .matches on a literal node
 * was implemented as sameValueAs rather than equals. If it turns out that
 * the filter is needed, it can be commented back in, AND a corresponding
 * filter added to find(Node x 3) -- and test cases, of course.
 */
@Override
public ExtendedIterator<Triple> graphBaseFind(TripleMatch m) {
  return graphBaseFind(m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject())
     // .filterKeep(new TripleMatchFilter(m.asTriple()))
     ;
}
origin: com.hp.hpl.jena/arq

@Override
public ExtendedIterator<Triple> graphBaseFind( TripleMatch m ) 
{
  Iterator<Triple> iter = triples.iterator() ;
  return 
    SimpleEventManager.notifyingRemove( this, iter ) 
    .filterKeep ( new TripleMatchFilterEquality( m.asTriple() ) );
}
 
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

@Override
protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
{
  Iterator<Triple> iter = triples.iterator() ;
  return 
    SimpleEventManager.notifyingRemove( this, iter ) 
    .filterKeep ( new TripleMatchFilterEquality( m.asTriple() ) );
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

  @Override
  protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
  {
    List<Triple> results = new ArrayList<Triple>() ;
    
    Iterator<Quad> iter = findNG(graphName, m.getMatchSubject(), m.getMatchPredicate(), m.getMatchObject()) ;
    for ( ; iter.hasNext() ; )
      results.add(iter.next().asTriple()) ;
    return WrappedIterator.create(results.iterator()) ;
  }
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

@Override
protected ExtendedIterator<Triple> graphBaseFind( final TripleMatch m )
{
  ExtendedIterator<Triple> iter =null;
  if (iteratorDeleteAllowed)
  {
    
    iter =
      SimpleEventManager.notifyingRemove( this, triples.iterator() );
  }
  else
  {
    iter = WrappedIterator.createNoRemove( triples.iterator() );
  }
  return iter 
      .filterKeep ( new TripleMatchFilterEquality( m.asTriple() ) );
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * Constructor - builds a pattern from a standard triple match.
 * Node that any filter part of the triple match will not be
 * represented within the pattern and will need to be checked
 * for separately.
 */
public TriplePattern(TripleMatch match) {
  this.subject   = normalize(match.getMatchSubject());
  this.predicate = normalize(match.getMatchPredicate());
  this.object    = normalize(match.getMatchObject());
}

origin: org.appdapter/org.appdapter.lib.remote

@Override public ExtendedIterator<Triple> find(TripleMatch arg0) {
  //log.info("find(TripleMatch) " + arg0);
  Triple t = arg0.asTriple();
  return find(t.getSubject(), t.getPredicate(), t.getObject());
}
origin: org.apache.clerezza/rdf.jena.facade

IRI predicate = null;
RDFTerm object = null;
if (m.getMatchSubject() != null) {
  if (m.getMatchSubject().isLiteral()) {
    return Collections.EMPTY_SET.iterator();
  subject = jena2TriaUtil.convertNonLiteral(m.getMatchSubject());
  if (subject == null) {
    return Collections.EMPTY_SET.iterator();
if (m.getMatchObject() != null) {
  object = jena2TriaUtil.convertJenaNode2Resource(m.getMatchObject());
  if (object == null) {
    return Collections.EMPTY_SET.iterator();
if (m.getMatchPredicate() != null) {
  if (!m.getMatchPredicate().isURI()) {
    return Collections.EMPTY_SET.iterator();
  predicate = jena2TriaUtil.convertJenaUri2UriRef(m.getMatchPredicate());
origin: org.appdapter/org.appdapter.lib.remote

@Override public ExtendedIterator<Triple> find(TripleMatch arg0) {
  //log.info("find(TripleMatch) " + arg0);
  Triple t = arg0.asTriple();
  return find(t.getSubject(), t.getPredicate(), t.getObject());
}
origin: com.hp.hpl.jena/arq

private QueryIterator nodesReifTriple(Node node, TripleMatch triple)
{
  Binding b = BindingRoot.create() ;
  
  if ( node == Node.ANY )
    node = null ;
  
  if ( node != null || triple != null )
  {
    b = new BindingMap(b) ;
    if ( node != null )
      bind(b, reifNodeVar, node) ; 
    if ( triple != null )
    {
      bind(b, varS, triple.getMatchSubject()) ;
      bind(b, varP, triple.getMatchPredicate()) ;
      bind(b, varO, triple.getMatchObject()) ;
    }
  }
  
  Plan plan = factory.create(op, ds, b, null) ;
  QueryIterator qIter = plan.iterator() ;
  return qIter ;
}
 
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

public ExtendedIterator<Triple> find( TripleMatch tm )
   Triple t = tm.asTriple();
   Node pm = t.getPredicate();
   Node om = t.getObject();
origin: com.hp.hpl.jena/arq

@Override
protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
  Node s = m.getMatchSubject() ;
  Var sVar = null ;
  if ( s == null )
  Node p = m.getMatchPredicate() ;
  Var pVar = null ;
  if ( p == null )
  Node o = m.getMatchObject() ;
  Var oVar = null ;
  if ( o == null )
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
  Node s = m.getMatchSubject() ;
  Var sVar = null ;
  if ( s == null )
  Node p = m.getMatchPredicate() ;
  Var pVar = null ;
  if ( p == null )
  Node o = m.getMatchObject() ;
  Var oVar = null ;
  if ( o == null )
origin: Quetzal-RDF/quetzal

Node subNode = m.getMatchSubject();
Node preNode = m.getMatchPredicate();
Node objNode = m.getMatchObject();
boolean exception = false;
boolean directAccess = !((subNode == null || subNode.equals(Node.ANY)) && !(objNode == null || objNode.equals(Node.ANY)));
origin: com.hp.hpl.jena/arq

@Override
protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
  Node s = m.getMatchSubject() ;
  Var sVar = null ;
  if ( s == null )
  Node p = m.getMatchPredicate() ;
  Var pVar = null ;
  if ( p == null )
  Node o = m.getMatchObject() ;
  Var oVar = null ;
  if ( o == null )
com.hp.hpl.jena.graphTripleMatch

Javadoc

Interface for triple matching; may become obsolete. do not assume this is stable. Triple matches are defined by subject, predicate, and object, and may be converted to triples [which in fact subsume the work of TripleMatch].

Most used methods

  • getMatchObject
    If it is known that all triples selected by this match will have a common object, return that node,
  • getMatchPredicate
    If it is known that all triples selected by this match will have a common predicate, return that nod
  • getMatchSubject
    If it is known that all triples selected by this filter will have a common subject, return that node
  • asTriple
    Answer a Triple capturing this match.

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now