| com.hp.hpl.jena.graph.test.GraphTestBase com.hp.hpl.jena.graph.query.test.QueryTestBase
All known Subclasses: com.hp.hpl.jena.graph.query.test.TestStageElements, com.hp.hpl.jena.graph.query.test.TestQueryNodeFactory, com.hp.hpl.jena.graph.query.test.TestQueryTriple, com.hp.hpl.jena.graph.query.test.TestExpressions, com.hp.hpl.jena.graph.query.test.AbstractTestQuery, com.hp.hpl.jena.graph.query.test.TestQueryNode, com.hp.hpl.jena.graph.query.test.TestMatchers, com.hp.hpl.jena.graph.query.test.TestExpressionConstraints, com.hp.hpl.jena.graph.query.test.TestQueryReification, com.hp.hpl.jena.graph.query.test.TestEarlyConstraints, com.hp.hpl.jena.graph.query.test.TestQuery, com.hp.hpl.jena.graph.query.test.TestDomain,
QueryTestBase | abstract public class QueryTestBase extends GraphTestBase (Code) | | Various things that are common to some of the query/expression
tests, so pulled up here into a shared superclass.
author: hedgehog |
Field Summary | |
final protected static Node | ANY | final protected static Node | X A Node with spelling "X". | final protected static Node | Y A Node with spelling "Y". | final protected static Node | Z A Node with spelling "Z". | final protected static Mapping | emptyMapping | protected static Map1 | getFirst A Map1 (suitable for a .mapWith iterator conversion) which
assumes the elements are lists and extracts their first elements. | final protected Node[] | justX An array containing just the node X. | final protected static IndexValues | noIVs | protected VariableIndexes | noVariables A mapping from variables to their indexes where no variables
are defined (all names map to the non-existant slot -1). |
Method Summary | |
protected Expression | areEqual(Node x, Node y) An expression that is true if x and y are equal. | public static Expression | asExpression(Node x) Answer an expression that evaluates the node x ,
treating variable nodes as variables (quelle surprise) and other
nodes as constants. | protected Expression | matches(Node x, Node y) An expression that is true if x and y "match", in the sense
that x contains y. | protected Expression | notEqual(Node x, Node y) An expression that is true if x and y differ. | protected Map1 | select(int index) Answer a filter that selects the index th element of the
list it's given. |
ANY | final protected static Node ANY(Code) | | A convenient way to refer to Node.ANY
|
X | final protected static Node X(Code) | | A Node with spelling "X".
|
Y | final protected static Node Y(Code) | | A Node with spelling "Y".
|
Z | final protected static Node Z(Code) | | A Node with spelling "Z".
|
emptyMapping | final protected static Mapping emptyMapping(Code) | | A mapping with no elements pre-defined
|
getFirst | protected static Map1 getFirst(Code) | | A Map1 (suitable for a .mapWith iterator conversion) which
assumes the elements are lists and extracts their first elements.
|
justX | final protected Node[] justX(Code) | | An array containing just the node X.
|
noIVs | final protected static IndexValues noIVs(Code) | | An IndexValues with no elements - ever slot maps to null
|
noVariables | protected VariableIndexes noVariables(Code) | | A mapping from variables to their indexes where no variables
are defined (all names map to the non-existant slot -1).
|
areEqual | protected Expression areEqual(Node x, Node y)(Code) | | An expression that is true if x and y are equal. Variable nodes
are treated as variables, non-variable nodes as constants.
|
asExpression | public static Expression asExpression(Node x)(Code) | | Answer an expression that evaluates the node x ,
treating variable nodes as variables (quelle surprise) and other
nodes as constants.
|
matches | protected Expression matches(Node x, Node y)(Code) | | An expression that is true if x and y "match", in the sense
that x contains y. Variable nodes are treated as variables,
non-variable nodes as constants.
|
notEqual | protected Expression notEqual(Node x, Node y)(Code) | | An expression that is true if x and y differ. Variable nodes
are treated as variables, non-variable nodes as constants.
|
select | protected Map1 select(int index)(Code) | | Answer a filter that selects the index th element of the
list it's given.
|
Fields inherited from com.hp.hpl.jena.graph.test.GraphTestBase | protected static int bnc(Code)(Java Doc)
|
Methods inherited from com.hp.hpl.jena.graph.test.GraphTestBase | protected static void appendNode(StringBuffer b, Map bnodes, Node n)(Code)(Java Doc) public Set arrayToSet(Object[] A)(Code)(Java Doc) public static void assertContains(String name, String s, Graph g)(Code)(Java Doc) public static void assertContainsAll(String name, Graph g, String s)(Code)(Java Doc) public static void assertEqualsTemplate(String title, Graph g, String template)(Code)(Java Doc) public static void assertIsomorphic(String title, Graph expected, Graph got)(Code)(Java Doc) public static void assertIsomorphic(Graph expected, Graph got)(Code)(Java Doc) public static void assertOmits(String name, Graph g, String s)(Code)(Java Doc) public static void assertOmitsAll(String name, Graph g, String s)(Code)(Java Doc) public static boolean contains(Graph g, String fact)(Code)(Java Doc) public static Graph getGraph(Object wrap, Class graphClass, ReificationStyle style)(Code)(Java Doc) protected static Graph getReificationTriples(Reifier r)(Code)(Java Doc) public static Graph graphAdd(Graph g, String s)(Code)(Java Doc) public static Graph graphWith(String s)(Code)(Java Doc) public static List iteratorToList(Iterator it)(Code)(Java Doc) public static Set iteratorToSet(Iterator it)(Code)(Java Doc) public static Graph newGraph()(Code)(Java Doc) public static String nice(Graph g, Map bnodes)(Code)(Java Doc) protected static String nice(Node n)(Code)(Java Doc) protected static void niceTriple(StringBuffer b, Map bnodes, Triple t)(Code)(Java Doc) public static Node node(String x)(Code)(Java Doc) public static Node[] nodeArray(String items)(Code)(Java Doc) public static List nodeList(String items)(Code)(Java Doc) public Set nodeSet(String nodes)(Code)(Java Doc) public void testContains(Graph g, Triple[] triples)(Code)(Java Doc) public void testContains(Graph g, List triples)(Code)(Java Doc) public void testContains(Graph g, Iterator it)(Code)(Java Doc) public void testContains(Graph g, Graph other)(Code)(Java Doc) public void testOmits(Graph g, Triple[] triples)(Code)(Java Doc) public void testOmits(Graph g, List triples)(Code)(Java Doc) public void testOmits(Graph g, Iterator it)(Code)(Java Doc) public void testOmits(Graph g, Graph other)(Code)(Java Doc) public static Triple triple(String fact)(Code)(Java Doc) public static Triple triple(PrefixMapping pm, String fact)(Code)(Java Doc) public static Triple[] tripleArray(String facts)(Code)(Java Doc) public static Set tripleSet(String facts)(Code)(Java Doc)
|
|
|