de.fuberlin.wiwiss.ng4j.triql
Class GraphPattern

java.lang.Object
  extended by de.fuberlin.wiwiss.ng4j.triql.GraphPattern

public class GraphPattern
extends Object

A graph pattern in a TriQL query, consisting of a graph name pattern and a collection of triple patterns.

The graph pattern can be viewed as a list of quad patterns which all have the same graph name. (See getQuads().) If the graph name is Node.ANY, then, in the quad view, an anonymous variable (_graphXXXX) will be used as the graph name. This helps distinguishing between quad patterns that are part of different graph pattern.

TODO: Test getAllVariables(), getQuad(...)

Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
GraphPattern(Node name)
           
 
Method Summary
 void addTriplePattern(Triple pattern)
           
 Set getAllVariables()
           
 Node getName()
           
 Quad getQuad(int index)
           
 List getQuads()
           
 Triple getTriple(int index)
           
 int getTripleCount()
           
 List getTriples()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphPattern

public GraphPattern(Node name)
Method Detail

addTriplePattern

public void addTriplePattern(Triple pattern)

getName

public Node getName()

getTripleCount

public int getTripleCount()

getTriples

public List getTriples()

getTriple

public Triple getTriple(int index)

getQuads

public List getQuads()

getQuad

public Quad getQuad(int index)

getAllVariables

public Set getAllVariables()