Java Doc for GraphTestBase.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » graph » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.graph.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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,
GraphTestBase
public class GraphTestBase extends JenaTestBase (Code)


Field Summary
protected static  intbnc
     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).

Constructor Summary
public  GraphTestBase(String name)
    

Method Summary
protected static  voidappendNode(StringBuffer b, Map bnodes, Node n)
     Append to the string buffer b a space followed by the "nice" representation of the node n.
public  SetarrayToSet(Object[] A)
     Answer a set of the elements of A.
public static  voidassertContains(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  voidassertContainsAll(String name, Graph g, String s)
     Assert that the graph g contains all the triples described by the string sname.
public static  voidassertEqualsTemplate(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  voidassertIsomorphic(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  voidassertIsomorphic(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  voidassertOmits(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  voidassertOmitsAll(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  booleancontains(Graph g, String fact)
     Assert that g contains the triple described by fact in the usual way.
public static  GraphgetGraph(Object wrap, Class graphClass, ReificationStyle style)
     Answer an instance of graphClass.
protected static  GraphgetReificationTriples(Reifier r)
    
public static  GraphgraphAdd(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  GraphgraphWith(String s)
     Answer a new memory-based graph with initial contents as described by s in the fashion of graphAdd().
public static  ListiteratorToList(Iterator it)
     Answer a list containing the elements from the iterator it, in order; a shorthand for IteratorCollection.iteratorToList(it), which see.
public static  SetiteratorToSet(Iterator it)
     Answer a set containing the elements from the iterator it; a shorthand for IteratorCollection.iteratorToSet(it), which see.
public static  GraphnewGraph()
     Answer a new memory-based graph with Extended prefixes.
public static  Stringnice(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  Stringnice(Node n)
     Answer the "nice" representation of this node, the string returned by n.toString(PrefixMapping.Extended,true).
protected static  voidniceTriple(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  Nodenode(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  ListnodeList(String items)
     Answer a list of nodes, where the nodes are described by the space-separated substrings of items as per node().
public  SetnodeSet(String nodes)
     Answer a set of the nodes described (as per node()) by the space-separated substrings of nodes.
public  voidtestContains(Graph g, Triple[] triples)
     Assert that g contains every triple in triples.
public  voidtestContains(Graph g, List triples)
     Assert that g contains every triple in triples.
public  voidtestContains(Graph g, Iterator it)
     Assert that g contains every triple in it.
public  voidtestContains(Graph g, Graph other)
     Assert that g contains every triple in other.
public  voidtestOmits(Graph g, Triple[] triples)
     Assert that g contains none of the triples in triples.
public  voidtestOmits(Graph g, List triples)
     Assert that g contains none of the triples in triples.
public  voidtestOmits(Graph g, Iterator it)
     Assert that g contains none of the triples in it.
public  voidtestOmits(Graph g, Graph other)
     Assert that g contains none of the triples in other.
public static  Tripletriple(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  Tripletriple(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  SettripleSet(String facts)
     Answer a set of triples where the elements are described by the semi-separated substrings of facts, as per triple.

Field Detail
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).




Constructor Detail
GraphTestBase
public GraphTestBase(String name)(Code)




Method Detail
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 sname.



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



getReificationTriples
protected static Graph getReificationTriples(Reifier r)(Code)



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.



Methods inherited from com.hp.hpl.jena.test.JenaTestBase
public static List append(List L, List R)(Code)(Java Doc)
public static void assertDiffer(String title, Object x, Object y)(Code)(Java Doc)
public static void assertDiffer(Object x, Object y)(Code)(Java Doc)
public static void assertHasParent(Class subClass, Class superClass)(Code)(Java Doc)
public static void assertInstanceOf(Class expected, Object x)(Code)(Java Doc)
public static Constructor getConstructor(Class c, Class[] args)(Code)(Java Doc)
public static boolean hasAsParent(Class subClass, Class superClass)(Code)(Java Doc)
public static boolean isPublicTestMethod(Method m)(Code)(Java Doc)
public static boolean isTestMethod(Method m)(Code)(Java Doc)
protected static ExtendedIterator iteratorOfStrings(String s)(Code)(Java Doc)
protected static List listOfOne(Object x)(Code)(Java Doc)
protected static List listOfStrings(String s)(Code)(Java Doc)
public static Set listToSet(List L)(Code)(Java Doc)
public static void pass()(Code)(Java Doc)
protected static Set setOfOne(Object x)(Code)(Java Doc)
protected static Set setOfStrings(String s)(Code)(Java Doc)
public void testToSilenceJunitComplaintsAboutNoTestMethods()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.