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

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

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

Triple.create介绍

暂无

代码示例

代码示例来源:origin: fr.inria.eventcloud/eventcloud-api

/**
 * Returns the {@link Triple} value associated to the quadruple by cutting
 * the graph value.
 * 
 * @return the {@link Triple} value associated to the quadruple by cutting
 *         the graph value.
 */
public Triple toTriple() {
  return Triple.create(this.nodes[1], this.nodes[2], this.nodes[3]);
}

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

public static GraphEvents remove( Node s, Node p, Node o )
  { return new GraphEvents( "remove", Triple.create( s, p, o ) ){
    @Override
    public Triple getTriple() { return (Triple)content; }
   };
  }

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

private static void registerHandler( Node s, Node p, Node o, TripleQueryHandler handler ) {
  Triple pattern = Triple.create( s, p, o );
  
  if( log.isLoggable( Level.FINE ) )
    log.fine( "Registering handler for pattern: " + pattern );
  
  Object prev = QUERY_HANDLERS.put( pattern, handler );
  if( prev != null ) {
    if( log.isLoggable( Level.SEVERE ) )
      log.severe( "Existing handler found for pattern: " + pattern );			
  }
}

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

public Triple map1( ATermAppl p ) {
     return Triple.create( s, JenaUtils.makeGraphNode( p ), o );
  }
};

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

public Triple map1( ATermAppl s ) {
     return Triple.create( JenaUtils.makeGraphNode( s ), p, o );
  }
};

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

public Triple map1( ATermAppl o ) {
     return Triple.create( s, p, JenaUtils.makeGraphNode( o ) );
  }
};

代码示例来源:origin: com.github.ansell.pellet/pellet-common

protected void addClasses(Collection<ATermAppl> classes) {
  for (ATermAppl c : classes) {
    Node n = m_Names.get(c);
    m_Facts.add(Triple.create(n, PRED_SUB, n));
    m_Facts.add(Triple.create(n, PRED_SUB, TOP));
  }
}

代码示例来源:origin: net.sourceforge.owlapi/pellet-core-ignazio1977

protected void addClasses(Collection<ATermAppl> classes) {
  for (ATermAppl c : classes) {
    Node n = m_Names.get(c);
    m_Facts.add(Triple.create(n, PRED_SUB, n));
    m_Facts.add(Triple.create(n, PRED_SUB, TOP));
  }
}

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

/**
   Answer <code>true</code> if this graph contains <code>(s, p, o)</code>;
   this canonical implementation cannot be over-ridden. 
*/
@Override
public final boolean contains( Node s, Node p, Node o ) {
  checkOpen();
  return contains( Triple.create( s, p, o ) );
}

代码示例来源:origin: com.hp.hpl.jena/arq

/**
    Answer <code>true</code> if this graph contains <code>(s, p, o)</code>;
    this canonical implementation cannot be over-ridden. 
 */
public final boolean contains( Node s, Node p, Node o ) {
  checkOpen();
  return contains( Triple.create( s, p, o ) );
}

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

@Override
  public void derive(Node s, Node p, Node o)
  {
    if ( isTriple )
      output.triple(Triple.create(s,p,o)) ;
    else
      output.quad(Quad.create(g,s,p,o)) ;
  }
} ;

代码示例来源:origin: com.hp.hpl.jena/arq

private Triple convert(AResource s, AResource p, AResource o)
{
  return Triple.create(convert(s), convert(p), convert(o));
}

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

@Override
public Triple asTriple() {
  return Triple.create( subject.asNode(), predicate.asNode(), object.asNode() );
}

代码示例来源:origin: com.hp.hpl.jena/arq

private Triple convert(AResource s, AResource p, ALiteral o)
{
  Node object = convert(o) ;
  checker.check(object, -1, -1) ;
  return Triple.create(convert(s), convert(p), object);
}

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

@Override
public Model remove( Resource s, Property p, RDFNode o ) {
  graph.delete( Triple.create( s.asNode(), p.asNode(), o.asNode() ) );
  return this;
}

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

@Override
  public ExtendedIterator<Triple> find(KnowledgeBase kb, PelletInfGraph pellet, Node subj, Node pred, Node obj) {
    return contains( kb, pellet.getLoader(), subj, pred, obj )
      ? new SingletonIterator<Triple>( Triple.create( subj, pred, obj ) )
      : NullIterator.<Triple>instance();
  }            
}

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

private Triple convert(AResource s, AResource p, ALiteral o)
{
  Node object = convert(o) ;
  checker.check(object, -1, -1) ;
  return Triple.create(convert(s), convert(p), object);
}

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

@Override
public Model add( Resource s, Property p, RDFNode o )  {
  modelReifier.noteIfReified( s, p, o );
  graph.add( Triple.create( s.asNode(), p.asNode(), o.asNode() ) );
  return this;
}

代码示例来源:origin: epimorphics/elda

private Triple rename(Triple t) {
  Node S = t.getSubject(), P = t.getPredicate(), O = t.getObject();
  Node newS = rename(S), newP = rename(P), newO = rename(O);
  if (newS == S && newP == P && newO == O) return t;
  return Triple.create(newS, newP, newO);
}

代码示例来源:origin: net.sourceforge.owlapi/pellet-jena-ignazio1977

public boolean entails(Triple pattern) {
  prepare();
  
  if( isSyntaxTriple( pattern ) ) {
    return true;
  }
  
  if( isBnodeTypeQuery( pattern ) ) {
    return !containsTriple( Triple.create( pattern.getObject(), RDFS.subClassOf.asNode(), OWL.Nothing.asNode() ) );
  }
  else {
    return containsTriple( pattern );
  }
}

相关文章