Permalink
Browse files

* Merged from HEAD

  • Loading branch information...
VOS Maintainer
VOS Maintainer committed Sep 18, 2009
1 parent 76d199b commit 793083cdb46472631b49e0637cff2609b4164e15
View
@@ -1,6 +1,8 @@
How to build Virtuoso Jena Provider
===================================
+The Jena Provider can be compiled with JDK 1.4.2 or newer.
+
* cd binsrc/jena
* Create a lib directory
@@ -17,5 +19,11 @@ How to build Virtuoso Jena Provider
junit.jar
xercesImpl.jar
+* Download the following .jar files from Apache XML Project at:
+ http://xml.apache.org/mirrors.cgi and copy thim into this lib
+ directory:
+
+ xml-apis.jar
+
* Run the make command
View
@@ -1,5 +1,7 @@
How to build the Virtuoso Sesame 2 provider
-==================================--=======
+===========================================
+
+The Sesame 2 Provider requires JDK 1.6 or newer.
* cd binsrc/sesame2
View
@@ -1,6 +1,8 @@
How to build the Virtuoso Sesame 3 provider
=================================--========
+The Sesame 2 Provider requires JDK 1.6 or newer.
+
* cd binsrc/sesame3
* Create a lib directory
View
@@ -23,7 +23,7 @@
if WITH_JDK3
TARGETS = virt_jena.jar
JDK = @ac_jdk3_path@
-JDK_FLAGS = -Xlint -O -g:none
+JDK_FLAGS = -O -g:none
JAVA = $(JDK)/java
JAVAC = $(JDK)/javac
@@ -49,7 +49,7 @@ JENA_SRC= \
TESTSUITE_SRC= \
testsuite/VirtuosoTestGraph.java
-JENA_CLASSPATH=lib/arq.jar:lib/iri.jar:lib/jena.jar:lib/jenatest.jar:lib/junit.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
+JENA_CLASSPATH=lib/arq.jar:lib/iri.jar:lib/jena.jar:lib/jenatest.jar:lib/junit.jar:lib/xml-apis.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
all-am: lib virt_jena.jar
Binary file not shown.
@@ -20,28 +20,28 @@ public VirtuosoTestGraph(String name) {
// return MetaTestGraph.suite(AbstractTestGraph.class, VirtGraph.class);
// }
- @Override
+ //--java5 or newer @Override
public Graph getGraph() {
graph.clear();
return graph;
}
- @Override
+ //--java5 or newer @Override
public void testContainsConcrete() {
//skip
}
- @Override
+ //--java5 or newer @Override
public void testContainsByValue() {
//skip
}
- @Override
+ //--java5 or newer @Override
public void testContainsNode() {
//skip
}
- @Override
+ //--java5 or newer @Override
public void testIsomorphismFile() {
//skip
}
@@ -1,4 +1,4 @@
-set CLASSPATH=../lib/junit.jar;../lib/arq.jar;../lib/iri.jar;../lib/jena.jar;../lib/jenatest.jar;../lib/virtjdbc3.jar;./virt_jena.jar;.;../lib/commons-logging.jar;../lib/icu4j_3_4.jar;../lib/iri.jar;../lib/xercesImpl.jar;.
+set CLASSPATH=../lib/junit.jar;../lib/arq.jar;../lib/iri.jar;../lib/jena.jar;../lib/jenatest.jar;../lib/virtjdbc3.jar;./virt_jena.jar;.;../lib/commons-logging.jar;../lib/icu4j_3_4.jar;../lib/iri.jar;../lib/xercesImpl.jar;../lib/xml-apis.jar;.
c:\jdk1.5.0\bin\javac VirtuosoTestGraph.java
rem Console mode test runner
@@ -23,7 +23,7 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
-export TSUITE_CLASSPATH=".:../lib/arq.jar:../lib/commons-logging-1.1.1.jar:../lib/icu4j_3_4.jar:../lib/iri.jar:../lib/jena.jar:../lib/jenatest.jar:../lib/junit.jar:../lib/xercesImpl.jar:../virt_jena.jar:../../../libsrc/JDBCDriverType4/virtjdbc3.jar"
+export TSUITE_CLASSPATH=".:../lib/arq.jar:../lib/commons-logging-1.1.1.jar:../lib/icu4j_3_4.jar:../lib/iri.jar:../lib/jena.jar:../lib/jenatest.jar:../lib/junit.jar:../lib/xercesImpl.jar:../lib/xml-apis.jar:../virt_jena.jar:../../../libsrc/JDBCDriverType4/virtjdbc3.jar"
#
View
Binary file not shown.
@@ -42,20 +42,20 @@ public VirtBulkUpdateHandler(VirtGraph parent) {
super(parent);
}
- @Override
+//--java5 or newer @Override
public void add( Triple [] triples ) {
addIterator(Arrays.asList(triples).iterator(), false);
manager.notifyAddArray( graph, triples );
}
- @Override
+//--java5 or newer @Override
protected void add(List triples, boolean notify) {
addIterator(triples.iterator(), false);
if (notify)
manager.notifyAddList( graph, triples );
}
- @Override
+//--java5 or newer @Override
public void addIterator(Iterator it, boolean notify) {
VirtGraph _graph=(VirtGraph)this.graph;
List list = notify ? new ArrayList() : null;
@@ -56,7 +56,6 @@ public VirtDataSource(String url_hostlist, String user, String password)
super(url_hostlist, user, password);
}
-
/** Set the background graph. Can be set to null for none. */
public void setDefaultModel(Model model) {
defaultModel = model;
@@ -196,7 +195,7 @@ public Iterator listNames() {
checkOpen();
try {
- Vector<String> names=new Vector<String>();
+ Vector names=new Vector();
java.sql.Statement stmt = getConnection().createStatement();
rs = stmt.executeQuery(exec_text);
@@ -184,7 +184,8 @@ String Node2Str(Node n)
return "<_:"+n+">";
} else if (n.isLiteral()) {
String s;
- StringBuilder sb = new StringBuilder();
+//?? StringBuilder sb = new StringBuilder();
+ StringBuffer sb = new StringBuffer();
sb.append("\"");
sb.append(n.getLiteralValue());
sb.append("\"");
@@ -263,7 +264,7 @@ void bindObject(PreparedStatement ps, int col, Node n) throws SQLException
- @Override
+//--java5 or newer @Override
public void performAdd(Triple t)
{
java.sql.PreparedStatement ps;
@@ -309,7 +310,7 @@ public void performDelete (Triple t)
/**
* more efficient
*/
- @Override
+//--java5 or newer @Override
protected int graphBaseSize() {
String query = "select count(*) from (sparql define input:storage \"\" select * where { graph `iri(??)` { ?s ?p ?o }})f";
ResultSet rs = null;
@@ -334,7 +335,7 @@ protected int graphBaseSize() {
/** maybe more efficient than default impl
*
*/
- @Override
+//--java5 or newer @Override
protected boolean graphBaseContains(Triple t) {
ResultSet rs = null;
String S, P, O;
@@ -368,7 +369,7 @@ protected boolean graphBaseContains(Triple t) {
}
- @Override
+//--java5 or newer @Override
public ExtendedIterator graphBaseFind(TripleMatch tm) {
String S, P, O;
String exec_text;
@@ -402,7 +403,7 @@ public ExtendedIterator graphBaseFind(TripleMatch tm) {
}
- @Override
+//--java5 or newer @Override
public void close() {
try {
super.close(); // will set closed = true
@@ -442,7 +443,7 @@ public void read (String url, String type)
}
- @SuppressWarnings("unchecked")
+//--java5 or newer @SuppressWarnings("unchecked")
void add(Iterator it, List list)
{
try
@@ -590,13 +591,13 @@ public int reifierSize()
- @Override
+//--java5 or newer @Override
public TransactionHandler getTransactionHandler()
{
return new VirtTransactionHandler(this);
}
- @Override
+//--java5 or newer @Override
public BulkUpdateHandler getBulkUpdateHandler()
{
if (bulkHandler == null)
@@ -52,7 +52,7 @@ public static Model createDatabaseModel(String graphName, String url,
return new VirtModel(new VirtGraph(graphName, url, user, password));
}
- @Override
+//--java5 or newer @Override
public Model removeAll()
{
try {
@@ -55,7 +55,7 @@ public static void main(String[] args)
Node bar3 = Node.createURI("http://example.org/#bar3");
Node baz3 = Node.createURI("http://example.org/#baz3");
- List <Triple> triples = new ArrayList <Triple> ();
+ List triples = new ArrayList();
VirtGraph graph = new VirtGraph ("Example3", url, "dba", "dba");
@@ -20,9 +20,9 @@
#
-if WITH_JDK3
+if WITH_JDK4
TARGETS = virt_sesame2.jar
-JDK = @ac_jdk3_path@
+JDK = @ac_jdk4_path@
JDK_FLAGS = -Xlint -O -g:none
JAVA = $(JDK)/java
JAVAC = $(JDK)/javac
@@ -44,7 +44,7 @@ SESAME_SRC= \
SAMPLES_SOURCE= \
virtuoso_driver/VirtuosoTest.java
-SESAME_CLASSPATH=lib/slf4j-api-1.5.0.jar:lib/openrdf-sesame-2.1.2-onejar.jar:lib/slf4j-jdk14-1.5.0.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
+SESAME_CLASSPATH=lib/slf4j-api-1.5.0.jar:lib/openrdf-sesame-2.1.2-onejar.jar:lib/slf4j-jdk14-1.5.0.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc4.jar
all-am: lib virt_sesame2.jar
@@ -72,7 +72,7 @@ doc:
$(SESAME_SRC)
-if WITH_JDK3
+if WITH_JDK4
run-tests: virt_sesame2.jar
-rm -rf out.examples
-mkdir out.examples
Binary file not shown.
@@ -32,7 +32,7 @@
import org.openrdf.repository.RepositoryConnection;
import org.openrdf.repository.RepositoryException;
-import virtuoso.jdbc3.VirtuosoConnectionPoolDataSource;
+import virtuoso.jdbc4.VirtuosoConnectionPoolDataSource;
/**
* A Sesame repository that contains RDF data that can be queried and updated.
@@ -203,7 +203,7 @@ public VirtuosoRepository(String url_hostlist, String user, String password) {
public RepositoryConnection getConnection() throws RepositoryException {
if (url_hostlist.startsWith("jdbc:virtuoso://")) {
try {
- Class.forName("virtuoso.jdbc3.Driver");
+ Class.forName("virtuoso.jdbc4.Driver");
String url = url_hostlist;
if (url.indexOf(utf8) == -1) {
if (url.charAt(url.length()-1) != '/')
@@ -61,8 +61,8 @@
import org.openrdf.rio.RDFHandler;
import org.openrdf.rio.ntriples.NTriplesWriter;
-import virtuoso.jdbc3.VirtuosoExtendedString;
-import virtuoso.jdbc3.VirtuosoRdfBox;
+import virtuoso.jdbc4.VirtuosoExtendedString;
+import virtuoso.jdbc4.VirtuosoRdfBox;
import virtuoso.sesame2.driver.*;
public class VirtuosoTest {
@@ -598,7 +598,7 @@ public static void test(String args[]) {
try {
String url;
url = "jdbc:virtuoso://localhost:1111";
- Class.forName("virtuoso.jdbc3.Driver");
+ Class.forName("virtuoso.jdbc4.Driver");
Connection connection = DriverManager.getConnection(url, "dba", "123456");
java.sql.Statement stmt = connection.createStatement();
@@ -20,9 +20,9 @@
#
-if WITH_JDK3
+if WITH_JDK4
TARGETS = virt_sesame3.jar
-JDK = @ac_jdk3_path@
+JDK = @ac_jdk4_path@
JDK_FLAGS = -Xlint -O -g:none
JAVA = $(JDK)/java
JAVAC = $(JDK)/javac
@@ -44,7 +44,7 @@ SESAME_SRC= \
SAMPLES_SOURCE= \
virtuoso_driver/VirtuosoTest.java
-SESAME_CLASSPATH=lib/slf4j-api-1.5.6.jar:lib/openrdf-sesame-3.0-alpha1-onejar.jar:lib/slf4j-jdk14-1.5.6.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc3.jar
+SESAME_CLASSPATH=lib/slf4j-api-1.5.6.jar:lib/openrdf-sesame-3.0-alpha1-onejar.jar:lib/slf4j-jdk14-1.5.6.jar:$(top_srcdir)/libsrc/JDBCDriverType4/virtjdbc4.jar
all-am: lib virt_sesame3.jar
@@ -72,7 +72,7 @@ doc:
$(SESAME_SRC)
-if WITH_JDK3
+if WITH_JDK4
run-tests: virt_sesame3.jar
-rm -rf out.examples
-mkdir out.examples
Binary file not shown.
@@ -37,7 +37,7 @@
import org.openrdf.repository.RepositoryMetaData;
import org.openrdf.store.StoreException;
-import virtuoso.jdbc3.VirtuosoConnectionPoolDataSource;
+import virtuoso.jdbc4.VirtuosoConnectionPoolDataSource;
/**
* A Sesame repository that contains RDF data that can be queried and updated.
@@ -62,8 +62,8 @@
import org.openrdf.rio.RDFHandler;
import org.openrdf.rio.ntriples.NTriplesWriter;
-import virtuoso.jdbc3.VirtuosoExtendedString;
-import virtuoso.jdbc3.VirtuosoRdfBox;
+import virtuoso.jdbc4.VirtuosoExtendedString;
+import virtuoso.jdbc4.VirtuosoRdfBox;
import virtuoso.sesame3.driver.*;
public class VirtuosoTest {
@@ -582,7 +582,7 @@ public static void test(String args[]) {
try {
String url;
url = "jdbc:virtuoso://localhost:1111";
- Class.forName("virtuoso.jdbc3.Driver");
+ Class.forName("virtuoso.jdbc4.Driver");
Connection connection = DriverManager.getConnection(url, "dba", "123456");
java.sql.Statement stmt = connection.createStatement();
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -846,13 +846,19 @@ protected void exceptionOccurred(SQLException ex) {
private void close_objs() {
+#if JDK_VER >= 16
+ HashMap<Object,Object> copy = (HashMap<Object,Object>) objsToClose.clone();
+#else
+ HashMap copy = (HashMap) objsToClose.clone();
+#endif
synchronized(objsToClose) {
- for (Iterator i = objsToClose.keySet().iterator(); i.hasNext(); )
+ for (Iterator i = copy.keySet().iterator(); i.hasNext(); )
try {
((Closeable)(i.next())).close();
} catch(Exception e) { }
objsToClose.clear();
}
+ copy.clear();
}
Oops, something went wrong.

0 comments on commit 793083c

Please sign in to comment.