| com.hp.hpl.jena.test.JenaTestBase com.hp.hpl.jena.graph.test.GraphTestBase
All known Subclasses: com.hp.hpl.jena.graph.compose.test.TestDifference, com.hp.hpl.jena.graph.test.TestGraphEvents, com.hp.hpl.jena.graph.query.regexptrees.test.TestPerlyParser, com.hp.hpl.jena.graph.compose.test.TestUnionStatistics, com.hp.hpl.jena.rdf.model.test.TestIterators, com.hp.hpl.jena.graph.test.TestTripleField, com.hp.hpl.jena.graph.test.TestGraphMatchWithInference, com.hp.hpl.jena.graph.test.TestTriple, com.hp.hpl.jena.graph.test.TestNodeToTriplesMap, com.hp.hpl.jena.graph.test.AbstractTestReifierTripleMap, com.hp.hpl.jena.graph.test.TestCapabilities, com.hp.hpl.jena.rdf.model.test.ModelTestBase, com.hp.hpl.jena.graph.test.TestFileGraph, com.hp.hpl.jena.graph.query.test.TestSimpleTripleSorter, com.hp.hpl.jena.graph.test.TestFactory, com.hp.hpl.jena.graph.test.TestGraphExtract, com.hp.hpl.jena.graph.compose.test.TestDyadic, com.hp.hpl.jena.graph.test.TestReificationPredicates, com.hp.hpl.jena.mem.test.TestStoreSpeed, com.hp.hpl.jena.graph.compose.test.TestUnion, com.hp.hpl.jena.db.test.AbstractTestQuery1, com.hp.hpl.jena.graph.test.AbstractTestGraphMaker, com.hp.hpl.jena.mem.test.TestTripleBunch, com.hp.hpl.jena.graph.compose.test.TestIntersection, com.hp.hpl.jena.shared.test.AbstractTestPrefixMapping, com.hp.hpl.jena.util.iterator.test.TestWrappedIterator, com.hp.hpl.jena.graph.test.AbstractTestReifierFragmentsMap, com.hp.hpl.jena.graph.query.regexptrees.test.TestRegexpTrees, com.hp.hpl.jena.graph.test.TestLiteralLabels, com.hp.hpl.jena.graph.test.TestGraphPrefixMapping, com.hp.hpl.jena.enhanced.test.TestPackage, com.hp.hpl.jena.graph.test.AbstractTestReifier, com.hp.hpl.jena.rdf.model.test.TestModelPolymorphism, com.hp.hpl.jena.graph.test.TestNodeCache, com.hp.hpl.jena.graph.compose.test.TestDisjointUnion, com.hp.hpl.jena.graph.test.AbstractTestGraph, com.hp.hpl.jena.graph.test.AbstractTestTripleStore, com.hp.hpl.jena.util.test.TestIteratorCollection, com.hp.hpl.jena.graph.test.TestGraph, com.hp.hpl.jena.graph.test.TestNode, com.hp.hpl.jena.graph.query.test.TestBufferPipe, com.hp.hpl.jena.graph.test.TestFindLiterals, com.hp.hpl.jena.graph.test.TestGraphUtils, com.hp.hpl.jena.graph.query.test.QueryTestBase, com.hp.hpl.jena.graph.compose.test.TestDelta, com.hp.hpl.jena.graph.test.TestTripleCache,
Field Summary | |
protected static int | bnc A counter for new bnode strings; it starts at 1000 so as to make
the bnode strings more uniform (at least for the first 9000 bnodes). |
Method Summary | |
protected static void | appendNode(StringBuffer b, Map bnodes, Node n) Append to the string buffer b a space followed by the
"nice" representation of the node n . | public Set | arrayToSet(Object[] A) Answer a set of the elements of A . | public static void | assertContains(String name, String s, Graph g) Assert that the graph g must contain the triple described
by s ; if not, fail with pretty output of both graphs
and a message containing name . | public static void | assertContainsAll(String name, Graph g, String s) Assert that the graph g contains all the triples described
by the string s name. | public static void | assertEqualsTemplate(String title, Graph g, String template) Assert that the graph g is isomorphic to the graph
described by template in the fashion of
graphWith . | public static void | assertIsomorphic(String title, Graph expected, Graph got) Assert that the supplied graph got is isomorphic with the
the desired graph expected ; if not, display a readable
description of both graphs. | public static void | assertIsomorphic(Graph expected, Graph got) Assert that the computed graph got is isomorphic with the
desired graph expected ; if not, fail with a default
message (and pretty output of the graphs). | public static void | assertOmits(String name, Graph g, String s) Assert that the graph g does not contain the triple
described by s; if it does, fail with a message containing
name . | public static void | assertOmitsAll(String name, Graph g, String s) Assert that the graph g contains none of the triples
described by s in the usual way; otherwise, fail with
a message containing name . | public static boolean | contains(Graph g, String fact) Assert that g contains the triple described by
fact in the usual way. | public static Graph | getGraph(Object wrap, Class graphClass, ReificationStyle style) Answer an instance of graphClass . | protected static Graph | getReificationTriples(Reifier r) | public static Graph | graphAdd(Graph g, String s) Answer the graph g after adding to it every triple
encoded in s in the fashion of tripleArray ,
a semi-separated sequence of space-separated node descriptions. | public static Graph | graphWith(String s) Answer a new memory-based graph with initial contents as described
by s in the fashion of graphAdd() . | public static List | iteratorToList(Iterator it) Answer a list containing the elements from the iterator it ,
in order; a shorthand for IteratorCollection.iteratorToList(it) ,
which see. | public static Set | iteratorToSet(Iterator it) Answer a set containing the elements from the iterator it ;
a shorthand for IteratorCollection.iteratorToSet(it) ,
which see. | public static Graph | newGraph() Answer a new memory-based graph with Extended prefixes. | public static String | nice(Graph g, Map bnodes) Answer a string which is a newline-separated list of triples (as
produced by niceTriple) in the graph g . | protected static String | nice(Node n) Answer the "nice" representation of this node, the string returned by
n.toString(PrefixMapping.Extended,true) . | protected static void | niceTriple(StringBuffer b, Map bnodes, Triple t) Append to the string buffer b a "nice" representation
of the triple t on a new line, using (and updating)
bnodes to supply "nice" strings for any blank nodes. | public static Node | node(String x) Answer a Node as described by x ; a shorthand for
Node.create(x) , which see. | public static Node[] | nodeArray(String items) | public static List | nodeList(String items) Answer a list of nodes, where the nodes are described by the
space-separated substrings of items as per
node() . | public Set | nodeSet(String nodes) Answer a set of the nodes described (as per node() ) by
the space-separated substrings of nodes . | public void | testContains(Graph g, Triple[] triples) Assert that g contains every triple in triples . | public void | testContains(Graph g, List triples) Assert that g contains every triple in triples . | public void | testContains(Graph g, Iterator it) Assert that g contains every triple in it . | public void | testContains(Graph g, Graph other) Assert that g contains every triple in other . | public void | testOmits(Graph g, Triple[] triples) Assert that g contains none of the triples in
triples . | public void | testOmits(Graph g, List triples) Assert that g contains none of the triples in
triples . | public void | testOmits(Graph g, Iterator it) Assert that g contains none of the triples in
it . | public void | testOmits(Graph g, Graph other) Assert that g contains none of the triples in
other . | public static Triple | triple(String fact) Answer a triple described by the three space-separated node descriptions
in fact ; a shorthand for Triple.create(fact) ,
which see. | public static Triple | triple(PrefixMapping pm, String fact) Answer a triple described by the three space-separated node descriptions
in fact , using prefix-mappings from pm ; a
shorthand for Triple.create(pm, fact) , which see. | public static Triple[] | tripleArray(String facts) Answer an array of triples; each triple is described by one of the
semi-separated substrings of facts , as per
triple with prefix-mapping Extended . | public static Set | tripleSet(String facts) Answer a set of triples where the elements are described by the
semi-separated substrings of facts , as per
triple . |
bnc | protected static int bnc(Code) | | A counter for new bnode strings; it starts at 1000 so as to make
the bnode strings more uniform (at least for the first 9000 bnodes).
|
appendNode | protected static void appendNode(StringBuffer b, Map bnodes, Node n)(Code) | | Append to the string buffer b a space followed by the
"nice" representation of the node n . If n
is a bnode, re-use any existing string for it from bnodes
or make a new one of the form _bNNNN with NNNN a new integer.
|
arrayToSet | public Set arrayToSet(Object[] A)(Code) | | Answer a set of the elements of A .
|
assertContains | public static void assertContains(String name, String s, Graph g)(Code) | | Assert that the graph g must contain the triple described
by s ; if not, fail with pretty output of both graphs
and a message containing name .
|
assertContainsAll | public static void assertContainsAll(String name, Graph g, String s)(Code) | | Assert that the graph g contains all the triples described
by the string s name.
|
assertEqualsTemplate | public static void assertEqualsTemplate(String title, Graph g, String template)(Code) | | Assert that the graph g is isomorphic to the graph
described by template in the fashion of
graphWith .
|
assertIsomorphic | public static void assertIsomorphic(String title, Graph expected, Graph got)(Code) | | Assert that the supplied graph got is isomorphic with the
the desired graph expected ; if not, display a readable
description of both graphs.
|
assertIsomorphic | public static void assertIsomorphic(Graph expected, Graph got)(Code) | | Assert that the computed graph got is isomorphic with the
desired graph expected ; if not, fail with a default
message (and pretty output of the graphs).
|
assertOmits | public static void assertOmits(String name, Graph g, String s)(Code) | | Assert that the graph g does not contain the triple
described by s; if it does, fail with a message containing
name .
|
assertOmitsAll | public static void assertOmitsAll(String name, Graph g, String s)(Code) | | Assert that the graph g contains none of the triples
described by s in the usual way; otherwise, fail with
a message containing name .
|
contains | public static boolean contains(Graph g, String fact)(Code) | | Assert that g contains the triple described by
fact in the usual way.
|
getGraph | public static Graph getGraph(Object wrap, Class graphClass, ReificationStyle style)(Code) | | Answer an instance of graphClass . If graphClass has
a constructor that takes a ReificationStyle argument, then that
constructor is run on style to get the instance. Otherwise, if it has a #
constructor that takes an argument of wrap 's class before the
ReificationStyle , that constructor is used; this allows non-static inner
classes to be used for graphClass , with wrap being
the outer class instance. If no suitable constructor exists, a JenaException is thrown.
Parameters: wrap - the outer class instance if graphClass is an inner class Parameters: graphClass - a class implementing Graph Parameters: style - the reification style to use an instance of graphClass with the given style throws: RuntimeException - or JenaException if construction fails |
graphAdd | public static Graph graphAdd(Graph g, String s)(Code) | | Answer the graph g after adding to it every triple
encoded in s in the fashion of tripleArray ,
a semi-separated sequence of space-separated node descriptions.
|
graphWith | public static Graph graphWith(String s)(Code) | | Answer a new memory-based graph with initial contents as described
by s in the fashion of graphAdd() .
Not over-ridable; do not use for abstraction.
|
iteratorToList | public static List iteratorToList(Iterator it)(Code) | | Answer a list containing the elements from the iterator it ,
in order; a shorthand for IteratorCollection.iteratorToList(it) ,
which see.
|
iteratorToSet | public static Set iteratorToSet(Iterator it)(Code) | | Answer a set containing the elements from the iterator it ;
a shorthand for IteratorCollection.iteratorToSet(it) ,
which see.
|
newGraph | public static Graph newGraph()(Code) | | Answer a new memory-based graph with Extended prefixes.
|
nice | public static String nice(Graph g, Map bnodes)(Code) | | Answer a string which is a newline-separated list of triples (as
produced by niceTriple) in the graph g . The map
bnodes maps already-seen bnodes to their "nice" strings.
|
nice | protected static String nice(Node n)(Code) | | Answer the "nice" representation of this node, the string returned by
n.toString(PrefixMapping.Extended,true) .
|
niceTriple | protected static void niceTriple(StringBuffer b, Map bnodes, Triple t)(Code) | | Append to the string buffer b a "nice" representation
of the triple t on a new line, using (and updating)
bnodes to supply "nice" strings for any blank nodes.
|
node | public static Node node(String x)(Code) | | Answer a Node as described by x ; a shorthand for
Node.create(x) , which see.
|
nodeArray | public static Node[] nodeArray(String items)(Code) | | Answer an array of nodes, where the nodes are described by the
space-separated substrings of items as per
|
nodeList | public static List nodeList(String items)(Code) | | Answer a list of nodes, where the nodes are described by the
space-separated substrings of items as per
node() .
|
nodeSet | public Set nodeSet(String nodes)(Code) | | Answer a set of the nodes described (as per node() ) by
the space-separated substrings of nodes .
|
testContains | public void testContains(Graph g, Triple[] triples)(Code) | | Assert that g contains every triple in triples .
|
testContains | public void testContains(Graph g, List triples)(Code) | | Assert that g contains every triple in triples .
|
testContains | public void testContains(Graph g, Iterator it)(Code) | | Assert that g contains every triple in it .
|
testContains | public void testContains(Graph g, Graph other)(Code) | | Assert that g contains every triple in other .
|
testOmits | public void testOmits(Graph g, Triple[] triples)(Code) | | Assert that g contains none of the triples in
triples .
|
testOmits | public void testOmits(Graph g, List triples)(Code) | | Assert that g contains none of the triples in
triples .
|
testOmits | public void testOmits(Graph g, Iterator it)(Code) | | Assert that g contains none of the triples in
it .
|
testOmits | public void testOmits(Graph g, Graph other)(Code) | | Assert that g contains none of the triples in
other .
|
triple | public static Triple triple(String fact)(Code) | | Answer a triple described by the three space-separated node descriptions
in fact ; a shorthand for Triple.create(fact) ,
which see.
|
triple | public static Triple triple(PrefixMapping pm, String fact)(Code) | | Answer a triple described by the three space-separated node descriptions
in fact , using prefix-mappings from pm ; a
shorthand for Triple.create(pm, fact) , which see.
|
tripleArray | public static Triple[] tripleArray(String facts)(Code) | | Answer an array of triples; each triple is described by one of the
semi-separated substrings of facts , as per
triple with prefix-mapping Extended .
|
tripleSet | public static Set tripleSet(String facts)(Code) | | Answer a set of triples where the elements are described by the
semi-separated substrings of facts , as per
triple .
|
|
|