本文整理了Java中com.hp.hpl.jena.graph.Triple.getPredicate()
方法的一些代码示例,展示了Triple.getPredicate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Triple.getPredicate()
方法的具体详情如下:
包路径:com.hp.hpl.jena.graph.Triple
类名称:Triple
方法名:getPredicate
暂无
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
public PatternTriple(Triple triple)
{
this(triple.getSubject(),
triple.getPredicate(),
triple.getObject()) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
private Map<Node, List<Node>> groupByPredicates(Collection<Triple> cluster)
{
SortedMap<Node, List<Node>> x = new TreeMap<Node, List<Node>>(compPredicates) ;
for ( Triple t : cluster )
{
Node p = t.getPredicate() ;
if ( ! x.containsKey(p) )
x.put(p, new ArrayList<Node>()) ;
x.get(p).add(t.getObject()) ;
}
return x ;
}
代码示例来源:origin: com.github.ansell.pellet/pellet-query
private boolean hasObject(Node subj, Node pred) {
for( final Iterator<Triple> i = triples.iterator(); i.hasNext(); ) {
Triple t = i.next();
if( subj.equals( t.getSubject() ) && pred.equals( t.getPredicate() ) )
return true;
}
return false;
}
代码示例来源:origin: com.hp.hpl.jena/arq
public PatternTriple(Triple triple)
{
this(triple.getSubject(),
triple.getPredicate(),
triple.getObject()) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
@Override
public boolean accept(Triple triple)
{
return triple.getPredicate().equals(subject) ||
triple.getPredicate().equals(predicate) ||
triple.getPredicate().equals(object) ||
( triple.getPredicate().equals(rdfType) && triple.getObject().equals(statement) ) ;
}} ;
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
@Override
public boolean accept(Triple t) {
if (t.getSubject().isLiteral()) return true;
if (t.getPredicate().isBlank() || t.getPredicate().isLiteral()) return true;
return false;
}
} ) );
代码示例来源:origin: com.hp.hpl.jena/arq
public Quad(Node graph, Triple triple)
{
this(graph, triple.getSubject(), triple.getPredicate(), triple.getObject()) ;
}
代码示例来源:origin: Quetzal-RDF/quetzal
protected boolean isTripleAbsentFromAbox(Triple qt) {
Node pred = qt.getPredicate();
if (pred.isURI() && isGeneratedRole(pred.getURI())) {
return true;
} else if (pred.isURI() && pred.getURI().equals(RDFConstants.RDF_TYPE)) {
Node obj = qt.getObject();
if (obj.isURI() && isGeneratedClass(obj.getURI())) {
return true;
}
}
return false;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
public Quad(Node graph, Triple triple)
{
this(graph, triple.getSubject(), triple.getPredicate(), triple.getObject()) ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
/** Check a triple - assumes individual nodes are legal */
public boolean check(Triple triple, long line, long col)
{
return checkTriple(triple.getSubject(), triple.getPredicate(), triple.getObject(), line, col) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/**
* Return true if the triple is already in either the graph or the stack.
* I.e. it has already been deduced.
*/
@Override
public boolean contains(Triple t) {
// Can't use stackCache.contains because that does not do semantic equality
return contains(t.getSubject(), t.getPredicate(), t.getObject());
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
static public void output(Writer out, Triple triple, Prologue prologue, NodeToLabel labelPolicy)
{
Node s = triple.getSubject() ;
Node p = triple.getPredicate() ;
Node o = triple.getObject() ;
output(out, s, p, o, null, prologue, labelPolicy) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/**
* Return true if the triple is already in either the graph or the stack.
* I.e. it has already been deduced.
*/
@Override
public boolean contains(Triple t) {
// Can't use stackCache.contains because that does not do semantic equality
return contains(t.getSubject(), t.getPredicate(), t.getObject());
}
代码示例来源:origin: com.hp.hpl.jena/arq
static public void output(Writer out, Triple triple, Node graphNode, Prologue prologue, NodeToLabel labelPolicy)
{
Node s = triple.getSubject() ;
Node p = triple.getPredicate() ;
Node o = triple.getObject() ;
output(out, s, p, o, graphNode, prologue, labelPolicy) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-core
/**
* @see com.hp.hpl.jena.reasoner.rulesys.RuleContext#contains(com.hp.hpl.jena.graph.Triple)
*/
@Override
public boolean contains(Triple t) {
return contains(t.getSubject(), t.getPredicate(), t.getObject());
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
/** Check a triple - assumes individual nodes are legal */
public boolean check(Triple triple, long line, long col)
{
return checkTriple(triple.getSubject(), triple.getPredicate(), triple.getObject(), line, col) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
static public void output(Writer out, Triple triple, Node graphNode, Prologue prologue, NodeToLabel labelPolicy)
{
Node s = triple.getSubject() ;
Node p = triple.getPredicate() ;
Node o = triple.getObject() ;
output(out, s, p, o, graphNode, prologue, labelPolicy) ;
}
代码示例来源:origin: com.hp.hpl.jena/arq
static public void output(Writer out, Triple triple, Prologue prologue, NodeToLabel labelPolicy)
{
Node s = triple.getSubject() ;
Node p = triple.getPredicate() ;
Node o = triple.getObject() ;
output(out, s, p, o, null, prologue, labelPolicy) ;
}
代码示例来源:origin: org.apache.clerezza.ext/org.apache.jena.jena-arq
@Override public void triple(Triple triple)
{
dsg.add(Quad.defaultGraphNodeGenerated, triple.getSubject(), triple.getPredicate(), triple.getObject()) ;
//throw new IllegalStateException("Triple passed to dataset parsing") ;
}
代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.entityhub.indexing.source.jenatdb
@Override
final public void triple(Triple triple) {
triple(triple.getSubject(),triple.getPredicate(),triple.getObject());
}
内容来源于网络,如有侵权,请联系作者删除!