Codota Logo
Triple.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.hp.hpl.jena.graph.Triple
constructor

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

  • Common ways to obtain Triple
private void myMethod () {
Triple t =
  • Codota IconExtendedIterator extendedIterator;extendedIterator.next()
  • Codota IconNode s;Node p;Node o;new Triple(s, p, o)
  • Codota IconNode s;Node p;Node o;Triple.create(s, p, o)
  • Smart code suggestions by Codota
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/** Get as a triple - useful because quads often come in blocks for the same graph */  
public Triple asTriple()
{ 
  return new Triple(subject, predicate, object) ;
}

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

@Override void addSuccessors( Node base, TransitiveGraphCache tgc, ArrayList<Triple> result )
  {
  for (Iterator<GraphNode> j = components.iterator(); j.hasNext(); ) 
    {
    result.add( new Triple(base, tgc.closedPredicate, j.next().rdfNode) );
    }
  }

origin: com.hp.hpl.jena/arq

/** Return as a triple when the path is a simple, 1-link, else return null */ 
public Triple asTriple()
{ 
  if ( triple != null )
    return triple ;
  
  if ( path instanceof P_Link )
    triple = new Triple(subject, ((P_Link)path).getNode(), object) ;
  return triple ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public TriplePath(Node s, Path path, Node o)
{
  this.subject = s ;
  this.object = o ;
  if ( path instanceof P_Link )
  {
    this.predicate = ((P_Link)path).getNode() ;
    triple = new Triple(subject, this.predicate , o) ;
  } else
    this.predicate = null ;
  this.path = path ;
}

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

/** Return as a triple when the path is a simple, 1-link, else return null */ 
public Triple asTriple()
{ 
  if ( triple != null )
    return triple ;
  
  if ( path instanceof P_Link )
    triple = new Triple(subject, ((P_Link)path).getNode(), object) ;
  return triple ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public void visit(P_Link pathNode)
{
  Op op = new OpTriple(new Triple(subject, pathNode.getNode(), object)) ;
  result = op  ;
}

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

@Override
public void add(Node g , Node s, Node p, Node o)
{
  if (  Quad.isDefaultGraph(g) )
    graph.add(new Triple(s, p, o)) ;
  else
    throw new UnsupportedOperationException("DatasetGraphOne.add/named graph") ;
}

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

@Override
public void delete(Node g , Node s, Node p, Node o)
{
  if (  Quad.isDefaultGraph(g) )
    graph.delete(new Triple(s, p, o)) ;
  else
    throw new UnsupportedOperationException("DatasetGraphOne.delete/named graph") ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

final public void Object(Node s, Node p) throws ParseException {
               Node o ;
 o = GraphNode();
 Triple t = new Triple(s,p,o) ;
 emitTriple(token.beginLine, token.beginColumn, t) ;
}
origin: com.hp.hpl.jena/arq

protected void insert(TripleCollector acc, Node s, Node p, Path path, Node o)
{
  if ( p == null )
    acc.addTriplePath(new TriplePath(s, path, o)) ;
  else
    acc.addTriple(new Triple(s, p, o)) ;
}
 
origin: openimaj/openimaj

@Override
public Triple read(Kryo kryo, Input input, Class<Triple> type) {
  final Node s = (Node) kryo.readClassAndObject(input);
  final Node p = (Node) kryo.readClassAndObject(input);
  final Node o = (Node) kryo.readClassAndObject(input);
  return new Triple(s, p, o);
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

protected void insert(TripleCollectorMark acc, int index, Node s, Node p, Path path, Node o)
{
  if ( p == null )
    acc.addTriplePath(index, new TriplePath(s, path, o)) ;
  else
    acc.addTriple(index, new Triple(s, p, o)) ;
}

origin: org.openimaj.storm/core-storm

@Override
public Triple read(Kryo kryo, Input input, Class<Triple> type) {
  final Node s = (Node) kryo.readClassAndObject(input);
  final Node p = (Node) kryo.readClassAndObject(input);
  final Node o = (Node) kryo.readClassAndObject(input);
  return new Triple(s, p, o);
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-core

/**
 * Return the final instantiated goal given the current binding state.
 */
public Triple getResult() {
  return new Triple(
        LPInterpreter.deref(argVars[0]),
        LPInterpreter.deref(argVars[1]), 
        LPInterpreter.derefPossFunctor(argVars[2]));
}

origin: com.hp.hpl.jena/arq

@Override public Triple next()
{ 
  Binding b = iter.nextBinding();
  Node S = b.get(varS) ;
  Node P = b.get(varP) ;
  Node O = b.get(varO) ;
  return new Triple(S,P,O) ;
}
@Override public void close() { iter.close() ; } 
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

private static Triple _buildNode3(ItemList list)
{
  Node s = BuilderNode.buildNode(list.get(0)) ;
  Node p = BuilderNode.buildNode(list.get(1)) ;
  Node o = BuilderNode.buildNode(list.get(2)) ;
  return new Triple(s, p, o) ; 
}
origin: com.hp.hpl.jena/tdb

private static void contains(TripleTable table, Node s, Node p, Node o)
{
  Iterator<Triple> iter = table.find(s, p, o) ;
  assertNotNull(iter) ;
  assertTrue(iter.hasNext()) ;
  assertEquals(new Triple(s, p, o), iter.next()) ;
  assertFalse(iter.hasNext()) ;
}
 
origin: com.hp.hpl.jena/tdb

@Test public void add1()
{ 
  TripleTable table = createTripleTableMem() ;
  table.add(new Triple(n1,n2,n3)) ;
}
 
origin: com.hp.hpl.jena/arq

public void visit(OpPropFunc opPropFunc)
{
  Node s = processPropFuncArg(opPropFunc.getSubjectArgs()) ;
  Node o = processPropFuncArg(opPropFunc.getObjectArgs()) ;
  Triple t = new Triple(s, opPropFunc.getProperty(), o) ;
  currentGroup().addElement(process(t)) ;
}
 
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public void visit(OpPropFunc opPropFunc)
{
  Node s = processPropFuncArg(opPropFunc.getSubjectArgs()) ;
  Node o = processPropFuncArg(opPropFunc.getObjectArgs()) ;
  Triple t = new Triple(s, opPropFunc.getProperty(), o) ;
  currentGroup().addElement(process(t)) ;
}

com.hp.hpl.jena.graphTriple<init>

Popular methods of Triple

  • getObject
  • getSubject
  • getPredicate
  • create
  • equals
    Answer true if o is a Triple with the same subject, predicate, and object as this triple.
  • hashCode
    Return the munged hashCodes of the specified nodes, an exclusive-or of the slightly-shifted componen
  • isConcrete
  • createMatch
  • toString
  • matches
  • predicateMatches
  • anyToNull
  • predicateMatches,
  • anyToNull,
  • getMatchObject,
  • getMatchPredicate,
  • getMatchSubject,
  • matchedBy,
  • nullToAny,
  • sameAs,
  • subjectMatches

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • getSystemService (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Table (org.hibernate.mapping)
    A relational table
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