本文整理了Java中com.hp.hpl.jena.graph.Triple.getSubject()
方法的一些代码示例,展示了Triple.getSubject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Triple.getSubject()
方法的具体详情如下:
包路径:com.hp.hpl.jena.graph.Triple
类名称:Triple
方法名:getSubject
暂无
代码示例来源: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
/**
* Register a new relation instance in the cache
*/
public synchronized void addRelation(Triple t) {
originalTriples.add(t);
addRelation(t.getSubject(), t.getObject());
}
代码示例来源: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: org.apache.clerezza.ext/org.apache.jena.jena-arq
public PatternTriple(Triple triple)
{
this(triple.getSubject(),
triple.getPredicate(),
triple.getObject()) ;
}
代码示例来源:origin: Quetzal-RDF/quetzal
protected Set<String> getAllVariables(Triple t) {
Set<String> ret = new HashSet<String>();
Node s = t.getSubject();
Node o = t.getObject();
if (s.isVariable()) {
ret.add(s.getName());
}
if (o.isVariable()) {
ret.add(o.getName());
}
return ret;
}
代码示例来源: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: org.apache.clerezza.ext/org.apache.jena.jena-core
@Override
public boolean accept( Triple t) {
if (t.getSubject().isLiteral()) return true;
Node n = t.getObject();
return n.isLiteral() && n.getLiteralDatatype() == FunctorDatatype.theFunctorDatatype;
}
};
代码示例来源: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());
}
内容来源于网络,如有侵权,请联系作者删除!