From fda4e47db129bdff0ab94f52cda43a4cd23de646 Mon Sep 17 00:00:00 2001 From: Miel Vander Sande Date: Tue, 15 Dec 2015 11:27:10 +0100 Subject: [PATCH] Upgrade to jena3 --- pom.xml | 16 +++++----- .../datasource/HdtDataSource.java | 12 +++---- .../datasource/IDataSource.java | 6 ++-- .../datasource/IndexDataSource.java | 16 +++++----- .../datasource/JenaTDBDataSource.java | 32 +++++++++---------- .../datasource/TriplePatternFragment.java | 2 +- .../datasource/TriplePatternFragmentBase.java | 4 +-- .../servlet/TriplePatternFragmentServlet.java | 20 ++++++------ .../util/CommonResources.java | 4 +-- .../datasource/DataSourceTest.java | 8 ++--- .../datasource/JenaTDBDataSourceTest.java | 6 ++-- 11 files changed, 62 insertions(+), 64 deletions(-) diff --git a/pom.xml b/pom.xml index bad49c4..bf6edb0 100644 --- a/pom.xml +++ b/pom.xml @@ -10,20 +10,15 @@ 9.3.6.v20151106 - - org.rdfhdt - hdt-jena - 1.1 - org.apache.jena jena-core - 2.13.0 + 3.0.0 org.apache.jena jena-arq - 2.13.0 + 3.0.0 org.apache.httpcomponents @@ -71,7 +66,12 @@ org.apache.jena jena-tdb - 1.1.2 + 3.0.0 + + + org.rdfhdt + hdt-jena + 1.1.1-SNAPSHOT diff --git a/src/org/linkeddatafragments/datasource/HdtDataSource.java b/src/org/linkeddatafragments/datasource/HdtDataSource.java index 15b22c8..a4fe2d2 100644 --- a/src/org/linkeddatafragments/datasource/HdtDataSource.java +++ b/src/org/linkeddatafragments/datasource/HdtDataSource.java @@ -9,12 +9,12 @@ import org.rdfhdt.hdt.triples.TripleID; import org.rdfhdt.hdtjena.NodeDictionary; -import com.hp.hpl.jena.graph.Triple; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.RDFNode; -import com.hp.hpl.jena.rdf.model.Resource; +import org.apache.jena.graph.Triple; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.RDFNode; +import org.apache.jena.rdf.model.Resource; /** * An HDT data source of Basic Linked Data Fragments. diff --git a/src/org/linkeddatafragments/datasource/IDataSource.java b/src/org/linkeddatafragments/datasource/IDataSource.java index 2b5a24d..8b67ad6 100644 --- a/src/org/linkeddatafragments/datasource/IDataSource.java +++ b/src/org/linkeddatafragments/datasource/IDataSource.java @@ -1,8 +1,8 @@ package org.linkeddatafragments.datasource; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.RDFNode; -import com.hp.hpl.jena.rdf.model.Resource; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.RDFNode; +import org.apache.jena.rdf.model.Resource; /** * A data source of Basic Linked Data Fragments. diff --git a/src/org/linkeddatafragments/datasource/IndexDataSource.java b/src/org/linkeddatafragments/datasource/IndexDataSource.java index fae2ac6..e9f6a4e 100644 --- a/src/org/linkeddatafragments/datasource/IndexDataSource.java +++ b/src/org/linkeddatafragments/datasource/IndexDataSource.java @@ -1,13 +1,13 @@ package org.linkeddatafragments.datasource; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.RDFNode; -import com.hp.hpl.jena.rdf.model.Resource; -import com.hp.hpl.jena.rdf.model.StmtIterator; -import com.hp.hpl.jena.rdf.model.impl.PropertyImpl; -import com.hp.hpl.jena.rdf.model.impl.ResourceImpl; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.RDFNode; +import org.apache.jena.rdf.model.Resource; +import org.apache.jena.rdf.model.StmtIterator; +import org.apache.jena.rdf.model.impl.PropertyImpl; +import org.apache.jena.rdf.model.impl.ResourceImpl; import java.util.HashMap; import java.util.Map; diff --git a/src/org/linkeddatafragments/datasource/JenaTDBDataSource.java b/src/org/linkeddatafragments/datasource/JenaTDBDataSource.java index e14b497..0271b2b 100644 --- a/src/org/linkeddatafragments/datasource/JenaTDBDataSource.java +++ b/src/org/linkeddatafragments/datasource/JenaTDBDataSource.java @@ -1,21 +1,21 @@ package org.linkeddatafragments.datasource; -import com.hp.hpl.jena.query.Dataset; -import com.hp.hpl.jena.query.Query; -import com.hp.hpl.jena.query.QueryExecution; -import com.hp.hpl.jena.query.QueryExecutionFactory; -import com.hp.hpl.jena.query.QueryFactory; -import com.hp.hpl.jena.query.QuerySolution; -import com.hp.hpl.jena.query.QuerySolutionMap; -import com.hp.hpl.jena.query.ResultSet; -import com.hp.hpl.jena.query.Syntax; -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.RDFNode; -import com.hp.hpl.jena.rdf.model.Resource; -import com.hp.hpl.jena.tdb.TDBFactory; +import org.apache.jena.query.Dataset; +import org.apache.jena.query.Query; +import org.apache.jena.query.QueryExecution; +import org.apache.jena.query.QueryExecutionFactory; +import org.apache.jena.query.QueryFactory; +import org.apache.jena.query.QuerySolution; +import org.apache.jena.query.QuerySolutionMap; +import org.apache.jena.query.ResultSet; +import org.apache.jena.query.Syntax; +import org.apache.jena.rdf.model.Literal; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.RDFNode; +import org.apache.jena.rdf.model.Resource; +import org.apache.jena.tdb.TDBFactory; import java.io.File; /** diff --git a/src/org/linkeddatafragments/datasource/TriplePatternFragment.java b/src/org/linkeddatafragments/datasource/TriplePatternFragment.java index fa21d36..8c07399 100644 --- a/src/org/linkeddatafragments/datasource/TriplePatternFragment.java +++ b/src/org/linkeddatafragments/datasource/TriplePatternFragment.java @@ -1,6 +1,6 @@ package org.linkeddatafragments.datasource; -import com.hp.hpl.jena.rdf.model.Model; +import org.apache.jena.rdf.model.Model; /** * A Triple Pattern Fragment. diff --git a/src/org/linkeddatafragments/datasource/TriplePatternFragmentBase.java b/src/org/linkeddatafragments/datasource/TriplePatternFragmentBase.java index 3645b08..11f5605 100644 --- a/src/org/linkeddatafragments/datasource/TriplePatternFragmentBase.java +++ b/src/org/linkeddatafragments/datasource/TriplePatternFragmentBase.java @@ -1,7 +1,7 @@ package org.linkeddatafragments.datasource; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; /** * Base implementation of a Basic Linked Data Fragment. diff --git a/src/org/linkeddatafragments/servlet/TriplePatternFragmentServlet.java b/src/org/linkeddatafragments/servlet/TriplePatternFragmentServlet.java index 9faf05c..1daf32a 100644 --- a/src/org/linkeddatafragments/servlet/TriplePatternFragmentServlet.java +++ b/src/org/linkeddatafragments/servlet/TriplePatternFragmentServlet.java @@ -1,15 +1,15 @@ package org.linkeddatafragments.servlet; import com.google.gson.JsonObject; -import com.hp.hpl.jena.datatypes.TypeMapper; -import com.hp.hpl.jena.datatypes.xsd.XSDDatatype; -import com.hp.hpl.jena.rdf.model.Literal; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.RDFNode; -import com.hp.hpl.jena.rdf.model.Resource; -import com.hp.hpl.jena.rdf.model.ResourceFactory; -import com.hp.hpl.jena.shared.InvalidPropertyURIException; +import org.apache.jena.datatypes.TypeMapper; +import org.apache.jena.datatypes.xsd.XSDDatatype; +import org.apache.jena.rdf.model.Literal; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.RDFNode; +import org.apache.jena.rdf.model.Resource; +import org.apache.jena.rdf.model.ResourceFactory; +import org.apache.jena.shared.InvalidPropertyURIException; import java.io.File; import java.io.FileReader; import java.io.IOException; @@ -18,8 +18,6 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map.Entry; -import java.util.logging.Level; -import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.ServletConfig; diff --git a/src/org/linkeddatafragments/util/CommonResources.java b/src/org/linkeddatafragments/util/CommonResources.java index 150ca17..7128af0 100644 --- a/src/org/linkeddatafragments/util/CommonResources.java +++ b/src/org/linkeddatafragments/util/CommonResources.java @@ -1,7 +1,7 @@ package org.linkeddatafragments.util; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.ResourceFactory; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.ResourceFactory; @SuppressWarnings("javadoc") public class CommonResources { diff --git a/src/test/java/org/linkeddatafragments/datasource/DataSourceTest.java b/src/test/java/org/linkeddatafragments/datasource/DataSourceTest.java index 4487261..5ddf54a 100644 --- a/src/test/java/org/linkeddatafragments/datasource/DataSourceTest.java +++ b/src/test/java/org/linkeddatafragments/datasource/DataSourceTest.java @@ -1,10 +1,10 @@ package test.java.org.linkeddatafragments.datasource; import com.google.gson.JsonObject; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.rdf.model.ModelFactory; -import com.hp.hpl.jena.rdf.model.Property; -import com.hp.hpl.jena.rdf.model.Resource; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.Property; +import org.apache.jena.rdf.model.Resource; import java.io.File; import java.io.IOException; diff --git a/src/test/java/org/linkeddatafragments/datasource/JenaTDBDataSourceTest.java b/src/test/java/org/linkeddatafragments/datasource/JenaTDBDataSourceTest.java index fe57938..ed52670 100644 --- a/src/test/java/org/linkeddatafragments/datasource/JenaTDBDataSourceTest.java +++ b/src/test/java/org/linkeddatafragments/datasource/JenaTDBDataSourceTest.java @@ -2,9 +2,9 @@ import com.google.gson.JsonObject; -import com.hp.hpl.jena.query.Dataset; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.tdb.TDBFactory; +import org.apache.jena.query.Dataset; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.tdb.TDBFactory; import java.io.File; import java.io.InputStream;