http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaTypeResolverImpl.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaTypeResolverImpl.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaTypeResolverImpl.java index 943a1d3..fba7a29 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaTypeResolverImpl.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaTypeResolverImpl.java @@ -29,8 +29,8 @@ import org.apache.rya.api.resolver.RyaTypeResolver; import org.apache.rya.api.resolver.RyaTypeResolverException; import org.calrissian.mango.types.LexiTypeEncoders; import org.calrissian.mango.types.TypeEncoder; -import org.openrdf.model.URI; -import org.openrdf.model.vocabulary.XMLSchema; +import org.eclipse.rdf4j.model.IRI; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; import com.google.common.primitives.Bytes; @@ -44,14 +44,14 @@ public class RyaTypeResolverImpl implements RyaTypeResolver { .stringEncoder(); protected byte markerByte; - protected URI dataType; + protected IRI dataType; protected byte[] markerBytes; public RyaTypeResolverImpl() { this((byte) PLAIN_LITERAL_MARKER, XMLSchema.STRING); } - public RyaTypeResolverImpl(final byte markerByte, final URI dataType) { + public RyaTypeResolverImpl(final byte markerByte, final IRI dataType) { setMarkerByte(markerByte); setRyaDataType(dataType); } @@ -84,11 +84,11 @@ public class RyaTypeResolverImpl implements RyaTypeResolver { } @Override - public URI getRyaDataType() { + public IRI getRyaDataType() { return dataType; } - public void setRyaDataType(final URI dataType) { + public void setRyaDataType(final IRI dataType) { this.dataType = dataType; }
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java index 08eeb52..c7ac82c 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java @@ -19,11 +19,9 @@ package org.apache.rya.api.resolver.impl; * under the License. */ - - import org.apache.rya.api.domain.RyaType; import org.apache.rya.api.domain.RyaURI; -import org.openrdf.model.vocabulary.XMLSchema; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; /** * Date: 7/16/12 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/ShortRyaTypeResolver.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/ShortRyaTypeResolver.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/ShortRyaTypeResolver.java index 023fb30..baefacc 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/ShortRyaTypeResolver.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/ShortRyaTypeResolver.java @@ -19,14 +19,12 @@ package org.apache.rya.api.resolver.impl; * under the License. */ - - import org.apache.rya.api.resolver.RyaTypeResolverException; import org.calrissian.mango.types.LexiTypeEncoders; import org.calrissian.mango.types.TypeEncoder; import org.calrissian.mango.types.exception.TypeDecodingException; import org.calrissian.mango.types.exception.TypeEncodingException; -import org.openrdf.model.vocabulary.XMLSchema; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; /** */ http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/CloseableIterableIteration.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/CloseableIterableIteration.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/CloseableIterableIteration.java index 87c5ee2..f192d73 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/CloseableIterableIteration.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/CloseableIterableIteration.java @@ -19,15 +19,12 @@ package org.apache.rya.api.utils; * under the License. */ - - -import info.aduna.iteration.CloseableIteration; - import java.io.IOException; import java.util.Iterator; import java.util.NoSuchElementException; import org.calrissian.mango.collect.CloseableIterable; +import org.eclipse.rdf4j.common.iteration.CloseableIteration; /** * Date: 1/30/13 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/EnumerationWrapper.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/EnumerationWrapper.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/EnumerationWrapper.java index 250ff1f..73dac7b 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/EnumerationWrapper.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/EnumerationWrapper.java @@ -19,12 +19,10 @@ package org.apache.rya.api.utils; * under the License. */ - - -import info.aduna.iteration.CloseableIteration; - import java.util.Enumeration; +import org.eclipse.rdf4j.common.iteration.CloseableIteration; + /** * Date: 7/26/12 * Time: 9:12 AM http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/IteratorWrapper.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/IteratorWrapper.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/IteratorWrapper.java index 0a841f2..50f7e9c 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/IteratorWrapper.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/IteratorWrapper.java @@ -19,12 +19,10 @@ package org.apache.rya.api.utils; * under the License. */ - - -import info.aduna.iteration.CloseableIteration; - import java.util.Iterator; +import org.eclipse.rdf4j.common.iteration.CloseableIteration; + /** * Date: 7/26/12 * Time: 9:12 AM http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/NullableStatementImpl.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/NullableStatementImpl.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/NullableStatementImpl.java index e5e75f2..9ac9705 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/NullableStatementImpl.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/NullableStatementImpl.java @@ -19,12 +19,10 @@ package org.apache.rya.api.utils; * under the License. */ - - -import org.openrdf.model.Resource; -import org.openrdf.model.Statement; -import org.openrdf.model.URI; -import org.openrdf.model.Value; +import org.eclipse.rdf4j.model.IRI; +import org.eclipse.rdf4j.model.Resource; +import org.eclipse.rdf4j.model.Statement; +import org.eclipse.rdf4j.model.Value; /** * Class NullableStatementImpl @@ -34,11 +32,11 @@ import org.openrdf.model.Value; public class NullableStatementImpl implements Statement { private Resource subject; - private URI predicate; + private IRI predicate; private Value object; private Resource[] contexts; - public NullableStatementImpl(Resource subject, URI predicate, Value object, Resource... contexts) { + public NullableStatementImpl(Resource subject, IRI predicate, Value object, Resource... contexts) { this.subject = subject; this.predicate = predicate; this.object = object; @@ -81,7 +79,7 @@ public class NullableStatementImpl implements Statement { return object; } - public URI getPredicate() { + public IRI getPredicate() { return predicate; } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/PeekingCloseableIteration.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/PeekingCloseableIteration.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/PeekingCloseableIteration.java index 18cef9b..8086277 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/PeekingCloseableIteration.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/PeekingCloseableIteration.java @@ -19,10 +19,9 @@ package org.apache.rya.api.utils; * under the License. */ - +import org.eclipse.rdf4j.common.iteration.CloseableIteration; import com.google.common.base.Preconditions; -import info.aduna.iteration.CloseableIteration; /** * Date: 7/24/12 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/QueryInvestigator.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/QueryInvestigator.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/QueryInvestigator.java index 54f0010..deaa659 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/QueryInvestigator.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/QueryInvestigator.java @@ -22,8 +22,8 @@ import static java.util.Objects.requireNonNull; import java.util.regex.Pattern; -import org.openrdf.query.MalformedQueryException; -import org.openrdf.query.parser.sparql.SPARQLParser; +import org.eclipse.rdf4j.query.MalformedQueryException; +import org.eclipse.rdf4j.query.parser.sparql.SPARQLParser; import edu.umd.cs.findbugs.annotations.DefaultAnnotation; import edu.umd.cs.findbugs.annotations.NonNull; http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementAddBindingSetFunction.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementAddBindingSetFunction.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementAddBindingSetFunction.java index a2b97ff..01c6f7b 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementAddBindingSetFunction.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementAddBindingSetFunction.java @@ -19,14 +19,13 @@ package org.apache.rya.api.utils; * under the License. */ +import java.util.Map; - -import com.google.common.base.Function; import org.apache.rya.api.RdfCloudTripleStoreUtils; import org.apache.rya.api.domain.RyaStatement; -import org.openrdf.query.BindingSet; +import org.eclipse.rdf4j.query.BindingSet; -import java.util.Map; +import com.google.common.base.Function; /** * Date: 1/18/13 @@ -35,6 +34,6 @@ import java.util.Map; public class RyaStatementAddBindingSetFunction implements Function<RyaStatement, Map.Entry<RyaStatement, BindingSet>> { @Override public Map.Entry<RyaStatement, BindingSet> apply(RyaStatement ryaStatement) { - return new RdfCloudTripleStoreUtils.CustomEntry<org.apache.rya.api.domain.RyaStatement, org.openrdf.query.BindingSet>(ryaStatement, null); + return new RdfCloudTripleStoreUtils.CustomEntry<RyaStatement, BindingSet>(ryaStatement, null); } } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementRemoveBindingSetCloseableIteration.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementRemoveBindingSetCloseableIteration.java b/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementRemoveBindingSetCloseableIteration.java index d803715..3ca210f 100644 --- a/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementRemoveBindingSetCloseableIteration.java +++ b/common/rya.api/src/main/java/org/apache/rya/api/utils/RyaStatementRemoveBindingSetCloseableIteration.java @@ -19,14 +19,12 @@ package org.apache.rya.api.utils; * under the License. */ +import java.util.Map; - -import info.aduna.iteration.CloseableIteration; import org.apache.rya.api.domain.RyaStatement; import org.apache.rya.api.persist.RyaDAOException; -import org.openrdf.query.BindingSet; - -import java.util.Map; +import org.eclipse.rdf4j.common.iteration.CloseableIteration; +import org.eclipse.rdf4j.query.BindingSet; /** * Date: 1/18/13 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/resources/META-INF/services/org.eclipse.rdf4j.query.algebra.evaluation.function.Function ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/resources/META-INF/services/org.eclipse.rdf4j.query.algebra.evaluation.function.Function b/common/rya.api/src/main/resources/META-INF/services/org.eclipse.rdf4j.query.algebra.evaluation.function.Function new file mode 100644 index 0000000..104a13c --- /dev/null +++ b/common/rya.api/src/main/resources/META-INF/services/org.eclipse.rdf4j.query.algebra.evaluation.function.Function @@ -0,0 +1,17 @@ + # Licensed to the Apache Software Foundation (ASF) under one + # or more contributor license agreements. See the NOTICE file + # distributed with this work for additional information + # regarding copyright ownership. The ASF licenses this file + # to you under the Apache License, Version 2.0 (the + # "License"); you may not use this file except in compliance + # with the License. You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, + # software distributed under the License is distributed on an + # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + # KIND, either express or implied. See the License for the + # specific language governing permissions and limitations + # under the License. +org.apache.rya.api.functions.DateTimeWithinPeriod \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function ---------------------------------------------------------------------- diff --git a/common/rya.api/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function b/common/rya.api/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function deleted file mode 100644 index 104a13c..0000000 --- a/common/rya.api/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function +++ /dev/null @@ -1,17 +0,0 @@ - # Licensed to the Apache Software Foundation (ASF) under one - # or more contributor license agreements. See the NOTICE file - # distributed with this work for additional information - # regarding copyright ownership. The ASF licenses this file - # to you under the Apache License, Version 2.0 (the - # "License"); you may not use this file except in compliance - # with the License. You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, - # software distributed under the License is distributed on an - # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - # KIND, either express or implied. See the License for the - # specific language governing permissions and limitations - # under the License. -org.apache.rya.api.functions.DateTimeWithinPeriod \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java b/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java index bb349bb..fe1216a 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java @@ -19,9 +19,9 @@ package org.apache.rya.api.domain; * under the License. */ +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; import org.junit.Assert; import org.junit.Test; -import org.openrdf.model.vocabulary.XMLSchema; public class RyaTypeTest { static RyaType a = new RyaType(XMLSchema.STRING, "http://www.example.com/Alice"); http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java b/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java index d61a802..c316b50 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java @@ -20,7 +20,6 @@ package org.apache.rya.api.domain; import org.junit.Assert; import org.junit.Test; -import org.openrdf.model.impl.URIImpl; public class StatementMetadataTest { http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java b/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java index ac27d1b..31afba0 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java @@ -27,17 +27,17 @@ import java.time.format.DateTimeFormatter; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; +import org.eclipse.rdf4j.model.Literal; +import org.eclipse.rdf4j.model.ValueFactory; +import org.eclipse.rdf4j.model.impl.SimpleValueFactory; +import org.eclipse.rdf4j.query.algebra.evaluation.ValueExprEvaluationException; import org.junit.Test; -import org.openrdf.model.Literal; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.ValueFactoryImpl; -import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException; public class DateTimeWithinPeriodTest { - private static final ValueFactory vf = new ValueFactoryImpl(); - private static final Literal TRUE = vf.createLiteral(true); - private static final Literal FALSE = vf.createLiteral(false); + private static final ValueFactory VF = SimpleValueFactory.getInstance(); + private static final Literal TRUE = VF.createLiteral(true); + private static final Literal FALSE = VF.createLiteral(false); private static final ZonedDateTime testThisTimeDate = ZonedDateTime.parse("2018-02-03T14:15:16+07:00"); @Test @@ -50,14 +50,14 @@ public class DateTimeWithinPeriodTest { ZonedDateTime zTime1 = zTime.minusSeconds(1); String time1 = zTime1.format(DateTimeFormatter.ISO_INSTANT); - Literal now = vf.createLiteral(dtf.newXMLGregorianCalendar(time)); - Literal nowMinusOne = vf.createLiteral(dtf.newXMLGregorianCalendar(time1)); + Literal now = VF.createLiteral(dtf.newXMLGregorianCalendar(time)); + Literal nowMinusOne = VF.createLiteral(dtf.newXMLGregorianCalendar(time1)); DateTimeWithinPeriod func = new DateTimeWithinPeriod(); - assertEquals(TRUE, func.evaluate(vf, now, now, vf.createLiteral(1), OWLTime.SECONDS_URI)); - assertEquals(FALSE, func.evaluate(vf, now, nowMinusOne,vf.createLiteral(1), OWLTime.SECONDS_URI)); - assertEquals(TRUE, func.evaluate(vf, now, nowMinusOne,vf.createLiteral(2), OWLTime.SECONDS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, now, VF.createLiteral(1), OWLTime.SECONDS_URI)); + assertEquals(FALSE, func.evaluate(VF, now, nowMinusOne,VF.createLiteral(1), OWLTime.SECONDS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, nowMinusOne,VF.createLiteral(2), OWLTime.SECONDS_URI)); } @Test @@ -71,14 +71,14 @@ public class DateTimeWithinPeriodTest { ZonedDateTime zTime1 = zTime.minusMinutes(1); String time1 = zTime1.format(DateTimeFormatter.ISO_INSTANT); - Literal now = vf.createLiteral(dtf.newXMLGregorianCalendar(time)); - Literal nowMinusOne = vf.createLiteral(dtf.newXMLGregorianCalendar(time1)); + Literal now = VF.createLiteral(dtf.newXMLGregorianCalendar(time)); + Literal nowMinusOne = VF.createLiteral(dtf.newXMLGregorianCalendar(time1)); DateTimeWithinPeriod func = new DateTimeWithinPeriod(); - assertEquals(TRUE, func.evaluate(vf, now, now,vf.createLiteral(1),OWLTime.MINUTES_URI)); - assertEquals(FALSE, func.evaluate(vf, now, nowMinusOne,vf.createLiteral(1),OWLTime.MINUTES_URI)); - assertEquals(TRUE, func.evaluate(vf, now, nowMinusOne,vf.createLiteral(2),OWLTime.MINUTES_URI)); + assertEquals(TRUE, func.evaluate(VF, now, now,VF.createLiteral(1),OWLTime.MINUTES_URI)); + assertEquals(FALSE, func.evaluate(VF, now, nowMinusOne,VF.createLiteral(1),OWLTime.MINUTES_URI)); + assertEquals(TRUE, func.evaluate(VF, now, nowMinusOne,VF.createLiteral(2),OWLTime.MINUTES_URI)); } @@ -92,14 +92,14 @@ public class DateTimeWithinPeriodTest { ZonedDateTime zTime1 = zTime.minusHours(1); String time1 = zTime1.format(DateTimeFormatter.ISO_INSTANT); - Literal now = vf.createLiteral(dtf.newXMLGregorianCalendar(time)); - Literal nowMinusOne = vf.createLiteral(dtf.newXMLGregorianCalendar(time1)); + Literal now = VF.createLiteral(dtf.newXMLGregorianCalendar(time)); + Literal nowMinusOne = VF.createLiteral(dtf.newXMLGregorianCalendar(time1)); DateTimeWithinPeriod func = new DateTimeWithinPeriod(); - assertEquals(TRUE, func.evaluate(vf, now, now,vf.createLiteral(1),OWLTime.HOURS_URI)); - assertEquals(FALSE, func.evaluate(vf, now, nowMinusOne,vf.createLiteral(1),OWLTime.HOURS_URI)); - assertEquals(TRUE, func.evaluate(vf, now, nowMinusOne,vf.createLiteral(2),OWLTime.HOURS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, now,VF.createLiteral(1),OWLTime.HOURS_URI)); + assertEquals(FALSE, func.evaluate(VF, now, nowMinusOne,VF.createLiteral(1),OWLTime.HOURS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, nowMinusOne,VF.createLiteral(2),OWLTime.HOURS_URI)); } @@ -113,14 +113,14 @@ public class DateTimeWithinPeriodTest { ZonedDateTime zTime1 = zTime.minusDays(1); String time1 = zTime1.format(DateTimeFormatter.ISO_INSTANT); - Literal now = vf.createLiteral(dtf.newXMLGregorianCalendar(time)); - Literal nowMinusOne = vf.createLiteral(dtf.newXMLGregorianCalendar(time1)); + Literal now = VF.createLiteral(dtf.newXMLGregorianCalendar(time)); + Literal nowMinusOne = VF.createLiteral(dtf.newXMLGregorianCalendar(time1)); DateTimeWithinPeriod func = new DateTimeWithinPeriod(); - assertEquals(TRUE, func.evaluate(vf, now, now, vf.createLiteral(1), OWLTime.DAYS_URI)); - assertEquals(FALSE, func.evaluate(vf, now, nowMinusOne, vf.createLiteral(1), OWLTime.DAYS_URI)); - assertEquals(TRUE, func.evaluate(vf, now, nowMinusOne, vf.createLiteral(2), OWLTime.DAYS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, now, VF.createLiteral(1), OWLTime.DAYS_URI)); + assertEquals(FALSE, func.evaluate(VF, now, nowMinusOne, VF.createLiteral(1), OWLTime.DAYS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, nowMinusOne, VF.createLiteral(2), OWLTime.DAYS_URI)); } // Note that this test fails if the week under test spans a DST when the USA springs forward. @@ -137,16 +137,16 @@ public class DateTimeWithinPeriodTest { ZonedDateTime zTime2 = zTime.minusWeeks(7); String time2 = zTime2.format(DateTimeFormatter.ISO_INSTANT); - Literal now = vf.createLiteral(dtf.newXMLGregorianCalendar(time)); - Literal nowMinusOne = vf.createLiteral(dtf.newXMLGregorianCalendar(time1)); - Literal nowMinusSeven = vf.createLiteral(dtf.newXMLGregorianCalendar(time2)); + Literal now = VF.createLiteral(dtf.newXMLGregorianCalendar(time)); + Literal nowMinusOne = VF.createLiteral(dtf.newXMLGregorianCalendar(time1)); + Literal nowMinusSeven = VF.createLiteral(dtf.newXMLGregorianCalendar(time2)); DateTimeWithinPeriod func = new DateTimeWithinPeriod(); - assertEquals(TRUE, func.evaluate(vf, now, now, vf.createLiteral(1), OWLTime.WEEKS_URI)); - assertEquals(FALSE, func.evaluate(vf, now, nowMinusOne, vf.createLiteral(1), OWLTime.WEEKS_URI)); - assertEquals(TRUE, func.evaluate(vf, now, nowMinusOne, vf.createLiteral(2), OWLTime.WEEKS_URI)); - assertEquals(FALSE, func.evaluate(vf, now, nowMinusSeven, vf.createLiteral(7), OWLTime.WEEKS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, now, VF.createLiteral(1), OWLTime.WEEKS_URI)); + assertEquals(FALSE, func.evaluate(VF, now, nowMinusOne, VF.createLiteral(1), OWLTime.WEEKS_URI)); + assertEquals(TRUE, func.evaluate(VF, now, nowMinusOne, VF.createLiteral(2), OWLTime.WEEKS_URI)); + assertEquals(FALSE, func.evaluate(VF, now, nowMinusSeven, VF.createLiteral(7), OWLTime.WEEKS_URI)); } @Test @@ -165,17 +165,17 @@ public class DateTimeWithinPeriodTest { ZonedDateTime zTime3 = now.minusDays(1).withZoneSameInstant(ZoneId.of("Asia/Seoul")); String time3 = zTime3.format(DateTimeFormatter.ISO_INSTANT); - Literal nowLocal = vf.createLiteral(dtf.newXMLGregorianCalendar(time)); - Literal nowEuropeTZ = vf.createLiteral(dtf.newXMLGregorianCalendar(time1)); - Literal nowAustraliaTZ = vf.createLiteral(dtf.newXMLGregorianCalendar(time2)); - Literal nowAsiaTZMinusOne = vf.createLiteral(dtf.newXMLGregorianCalendar(time3)); + Literal nowLocal = VF.createLiteral(dtf.newXMLGregorianCalendar(time)); + Literal nowEuropeTZ = VF.createLiteral(dtf.newXMLGregorianCalendar(time1)); + Literal nowAustraliaTZ = VF.createLiteral(dtf.newXMLGregorianCalendar(time2)); + Literal nowAsiaTZMinusOne = VF.createLiteral(dtf.newXMLGregorianCalendar(time3)); DateTimeWithinPeriod func = new DateTimeWithinPeriod(); - assertEquals(TRUE, func.evaluate(vf, nowLocal, nowEuropeTZ, vf.createLiteral(1), OWLTime.SECONDS_URI)); - assertEquals(TRUE, func.evaluate(vf, nowLocal, nowAustraliaTZ, vf.createLiteral(1), OWLTime.SECONDS_URI)); - assertEquals(FALSE, func.evaluate(vf, nowLocal, nowAsiaTZMinusOne, vf.createLiteral(1), OWLTime.DAYS_URI)); - assertEquals(TRUE, func.evaluate(vf, nowLocal, nowAsiaTZMinusOne, vf.createLiteral(2), OWLTime.DAYS_URI)); + assertEquals(TRUE, func.evaluate(VF, nowLocal, nowEuropeTZ, VF.createLiteral(1), OWLTime.SECONDS_URI)); + assertEquals(TRUE, func.evaluate(VF, nowLocal, nowAustraliaTZ, VF.createLiteral(1), OWLTime.SECONDS_URI)); + assertEquals(FALSE, func.evaluate(VF, nowLocal, nowAsiaTZMinusOne, VF.createLiteral(1), OWLTime.DAYS_URI)); + assertEquals(TRUE, func.evaluate(VF, nowLocal, nowAsiaTZMinusOne, VF.createLiteral(2), OWLTime.DAYS_URI)); } } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java index aac8297..bd96436 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java @@ -19,8 +19,6 @@ package org.apache.rya.api.query.strategy; * under the License. */ - - import static org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP; import static org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO; import static org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO; @@ -29,7 +27,6 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import junit.framework.TestCase; import org.apache.rya.api.RdfCloudTripleStoreConfiguration; import org.apache.rya.api.RdfCloudTripleStoreConstants; import org.apache.rya.api.domain.RyaStatement; @@ -43,8 +40,9 @@ import org.apache.rya.api.resolver.RyaTripleContext; import org.apache.rya.api.resolver.triple.TripleRow; import org.apache.rya.api.resolver.triple.TripleRowRegex; import org.apache.rya.api.resolver.triple.impl.WholeRowTripleResolver; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; -import org.openrdf.model.vocabulary.XMLSchema; +import junit.framework.TestCase; /** * Date: 7/25/12 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java index 76216b6..0775dfa 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java @@ -1,13 +1,3 @@ -package org.apache.rya.api.query.strategy.wholerow; - -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.apache.hadoop.io.Text; -import org.junit.Before; -import org.openrdf.model.impl.URIImpl; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -16,9 +6,9 @@ import org.openrdf.model.impl.URIImpl; * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -26,10 +16,13 @@ import org.openrdf.model.impl.URIImpl; * specific language governing permissions and limitations * under the License. */ +package org.apache.rya.api.query.strategy.wholerow; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; - -import junit.framework.TestCase; +import org.apache.hadoop.io.Text; import org.apache.rya.api.RdfCloudTripleStoreConstants; import org.apache.rya.api.domain.RyaStatement; import org.apache.rya.api.domain.RyaType; @@ -43,12 +36,18 @@ import org.apache.rya.api.resolver.RyaTripleContext; import org.apache.rya.api.resolver.triple.TripleRow; import org.apache.rya.api.resolver.triple.TripleRowRegex; import org.apache.rya.api.resolver.triple.impl.WholeRowHashedTripleResolver; +import org.eclipse.rdf4j.model.ValueFactory; +import org.eclipse.rdf4j.model.impl.SimpleValueFactory; +import org.junit.Before; + +import junit.framework.TestCase; /** * Date: 7/14/12 * Time: 11:46 AM */ public class HashedPoWholeRowTriplePatternStrategyTest extends TestCase { + private static final ValueFactory VF = SimpleValueFactory.getInstance(); RyaURI uri = new RyaURI("urn:test#1234"); RyaURI uri2 = new RyaURI("urn:test#1235"); @@ -58,16 +57,16 @@ public class HashedPoWholeRowTriplePatternStrategyTest extends TestCase { RyaContext ryaContext = RyaContext.getInstance(); RyaTripleContext ryaTripleContext; - RyaType customType1 = new RyaType(new URIImpl("urn:custom#type"), "1234"); - RyaType customType2 = new RyaType(new URIImpl("urn:custom#type"), "1235"); - RyaType customType3 = new RyaType(new URIImpl("urn:custom#type"), "1236"); + RyaType customType1 = new RyaType(VF.createIRI("urn:custom#type"), "1234"); + RyaType customType2 = new RyaType(VF.createIRI("urn:custom#type"), "1235"); + RyaType customType3 = new RyaType(VF.createIRI("urn:custom#type"), "1236"); RyaTypeRange customTypeRange1 = new RyaTypeRange(customType1, customType2); RyaTypeRange customTypeRange2 = new RyaTypeRange(customType2, customType3); @Before public void setUp() { - MockRdfCloudConfiguration config = new MockRdfCloudConfiguration(); - config.set(MockRdfCloudConfiguration.CONF_PREFIX_ROW_WITH_HASH, Boolean.TRUE.toString()); + MockRdfConfiguration config = new MockRdfConfiguration(); + config.set(MockRdfConfiguration.CONF_PREFIX_ROW_WITH_HASH, Boolean.TRUE.toString()); ryaTripleContext = RyaTripleContext.getInstance(config); } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java index 88a1923..d71e4e8 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java @@ -19,11 +19,9 @@ package org.apache.rya.api.query.strategy.wholerow; * under the License. */ - -// import java.util.Map; -import junit.framework.TestCase; +import org.apache.hadoop.io.Text; import org.apache.rya.api.RdfCloudTripleStoreConstants; import org.apache.rya.api.domain.RyaStatement; import org.apache.rya.api.domain.RyaType; @@ -34,16 +32,18 @@ import org.apache.rya.api.query.strategy.ByteRange; import org.apache.rya.api.resolver.RyaContext; import org.apache.rya.api.resolver.RyaTripleContext; import org.apache.rya.api.resolver.triple.TripleRow; - -import org.apache.hadoop.io.Text; +import org.eclipse.rdf4j.model.ValueFactory; +import org.eclipse.rdf4j.model.impl.SimpleValueFactory; import org.junit.Before; -import org.openrdf.model.impl.URIImpl; + +import junit.framework.TestCase; /** * Date: 7/14/12 * Time: 7:47 AM */ public class HashedSpoWholeRowTriplePatternStrategyTest extends TestCase { + private static final ValueFactory VF = SimpleValueFactory.getInstance(); RyaURI uri = new RyaURI("urn:test#1234"); RyaURI uri2 = new RyaURI("urn:test#1235"); @@ -53,16 +53,16 @@ public class HashedSpoWholeRowTriplePatternStrategyTest extends TestCase { RyaContext ryaContext = RyaContext.getInstance(); RyaTripleContext ryaTripleContext; - RyaType customType1 = new RyaType(new URIImpl("urn:custom#type"), "1234"); - RyaType customType2 = new RyaType(new URIImpl("urn:custom#type"), "1235"); - RyaType customType3 = new RyaType(new URIImpl("urn:custom#type"), "1236"); + RyaType customType1 = new RyaType(VF.createIRI("urn:custom#type"), "1234"); + RyaType customType2 = new RyaType(VF.createIRI("urn:custom#type"), "1235"); + RyaType customType3 = new RyaType(VF.createIRI("urn:custom#type"), "1236"); RyaTypeRange customTypeRange1 = new RyaTypeRange(customType1, customType2); RyaTypeRange customTypeRange2 = new RyaTypeRange(customType2, customType3); @Before public void setUp() { - MockRdfCloudConfiguration config = new MockRdfCloudConfiguration(); - config.set(MockRdfCloudConfiguration.CONF_PREFIX_ROW_WITH_HASH, Boolean.TRUE.toString()); + MockRdfConfiguration config = new MockRdfConfiguration(); + config.set(MockRdfConfiguration.CONF_PREFIX_ROW_WITH_HASH, Boolean.TRUE.toString()); ryaTripleContext = RyaTripleContext.getInstance(config); } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfCloudConfiguration.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfCloudConfiguration.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfCloudConfiguration.java deleted file mode 100644 index dcc707b..0000000 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfCloudConfiguration.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.apache.rya.api.query.strategy.wholerow; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - -import org.apache.rya.api.RdfCloudTripleStoreConfiguration; - -public class MockRdfCloudConfiguration extends RdfCloudTripleStoreConfiguration { - - @Override - public RdfCloudTripleStoreConfiguration clone() { - return this; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfConfiguration.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfConfiguration.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfConfiguration.java new file mode 100644 index 0000000..882c3df --- /dev/null +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/MockRdfConfiguration.java @@ -0,0 +1,32 @@ +package org.apache.rya.api.query.strategy.wholerow; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +import org.apache.rya.api.RdfCloudTripleStoreConfiguration; + +public class MockRdfConfiguration extends RdfCloudTripleStoreConfiguration { + + @Override + public RdfCloudTripleStoreConfiguration clone() { + return this; + } + +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java index 5b54fee..9bac95a 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java @@ -18,18 +18,22 @@ */ package org.apache.rya.api.query.strategy.wholerow; +import static org.apache.rya.api.RdfCloudTripleStoreConstants.LAST_BYTES; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import java.util.Arrays; import java.util.Map; + import org.apache.rya.api.RdfCloudTripleStoreConfiguration; import org.apache.rya.api.RdfCloudTripleStoreConstants; -import static org.apache.rya.api.RdfCloudTripleStoreConstants.LAST_BYTES; import org.apache.rya.api.RdfCloudTripleStoreUtils; import org.apache.rya.api.domain.RyaType; import org.apache.rya.api.domain.RyaURI; import org.apache.rya.api.query.strategy.ByteRange; import org.junit.After; import org.junit.AfterClass; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java index 29125e8..b9ef519 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java @@ -28,7 +28,7 @@ //import org.apache.accumulo.core.data.Key; //import org.apache.accumulo.core.data.Range; //import org.apache.hadoop.io.Text; -//import org.openrdf.model.impl.URIImpl; +//import org.eclipse.rdf4j.model.impl.URIImpl; // //import java.util.Map; // http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java index ea3b46a..12bfc1f 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java @@ -28,7 +28,7 @@ //import org.apache.accumulo.core.data.Key; //import org.apache.accumulo.core.data.Range; //import org.apache.hadoop.io.Text; -//import org.openrdf.model.impl.URIImpl; +//import org.eclipse.rdf4j.model.impl.URIImpl; // //import java.util.Map; // http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java index 28759b5..5e2ca7e 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java @@ -28,7 +28,7 @@ //import org.apache.accumulo.core.data.Key; //import org.apache.accumulo.core.data.Range; //import org.apache.hadoop.io.Text; -//import org.openrdf.model.impl.URIImpl; +//import org.eclipse.rdf4j.model.impl.URIImpl; // //import java.util.Map; // http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java index a0d2ecc..ade343f 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java @@ -19,20 +19,17 @@ package org.apache.rya.api.resolver; * under the License. */ - - import java.util.Map; -import junit.framework.TestCase; import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT; import org.apache.rya.api.domain.RyaStatement; import org.apache.rya.api.domain.RyaType; import org.apache.rya.api.domain.RyaURI; -import org.apache.rya.api.query.strategy.AbstractTriplePatternStrategyTest.MockRdfConfiguration; -import org.apache.rya.api.query.strategy.wholerow.MockRdfCloudConfiguration; +import org.apache.rya.api.query.strategy.wholerow.MockRdfConfiguration; import org.apache.rya.api.resolver.triple.TripleRow; +import org.eclipse.rdf4j.model.impl.SimpleValueFactory; -import org.openrdf.model.impl.URIImpl; +import junit.framework.TestCase; /** */ @@ -52,7 +49,7 @@ public class RyaContextTest extends TestCase { assertEquals(ryaURI, deserialize); //custom type - ryaType = new RyaType(new URIImpl("urn:test#customDataType"), "mydata"); + ryaType = new RyaType(SimpleValueFactory.getInstance().createIRI("urn:test#customDataType"), "mydata"); serialize = instance.serialize(ryaType); assertEquals(ryaType, instance.deserialize(serialize)); } @@ -62,7 +59,7 @@ public class RyaContextTest extends TestCase { RyaURI pred = new RyaURI("urn:test#pred"); RyaType obj = new RyaType("mydata"); RyaStatement statement = new RyaStatement(subj, pred, obj); - RyaTripleContext instance = RyaTripleContext.getInstance(new MockRdfCloudConfiguration()); + RyaTripleContext instance = RyaTripleContext.getInstance(new MockRdfConfiguration()); Map<TABLE_LAYOUT, TripleRow> map = instance.serializeTriple(statement); TripleRow tripleRow = map.get(TABLE_LAYOUT.SPO); @@ -74,8 +71,8 @@ public class RyaContextTest extends TestCase { RyaURI pred = new RyaURI("urn:test#pred"); RyaType obj = new RyaType("mydata"); RyaStatement statement = new RyaStatement(subj, pred, obj); - MockRdfCloudConfiguration config = new MockRdfCloudConfiguration(); - config.set(MockRdfCloudConfiguration.CONF_PREFIX_ROW_WITH_HASH, Boolean.TRUE.toString()); + MockRdfConfiguration config = new MockRdfConfiguration(); + config.set(MockRdfConfiguration.CONF_PREFIX_ROW_WITH_HASH, Boolean.TRUE.toString()); RyaTripleContext instance = RyaTripleContext.getInstance(config); Map<TABLE_LAYOUT, TripleRow> map = instance.serializeTriple(statement); http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/CustomDatatypeResolverTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/CustomDatatypeResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/CustomDatatypeResolverTest.java index 9fd086b..80bfe84 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/CustomDatatypeResolverTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/CustomDatatypeResolverTest.java @@ -19,11 +19,10 @@ package org.apache.rya.api.resolver.impl; * under the License. */ - +import org.apache.rya.api.domain.RyaType; +import org.eclipse.rdf4j.model.impl.SimpleValueFactory; import junit.framework.TestCase; -import org.apache.rya.api.domain.RyaType; -import org.openrdf.model.impl.URIImpl; /** * Date: 7/16/12 @@ -32,7 +31,7 @@ import org.openrdf.model.impl.URIImpl; public class CustomDatatypeResolverTest extends TestCase { public void testCustomDataTypeSerialization() throws Exception { - RyaType ryaType = new RyaType(new URIImpl("urn:test#datatype"), "testdata"); + RyaType ryaType = new RyaType(SimpleValueFactory.getInstance().createIRI("urn:test#datatype"), "testdata"); byte[] serialize = new CustomDatatypeResolver().serialize(ryaType); RyaType deserialize = new CustomDatatypeResolver().deserialize(serialize); assertEquals(ryaType, deserialize); http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DateTimeRyaTypeResolverTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DateTimeRyaTypeResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DateTimeRyaTypeResolverTest.java index 5f60f5a..aae2da0 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DateTimeRyaTypeResolverTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DateTimeRyaTypeResolverTest.java @@ -19,9 +19,9 @@ package org.apache.rya.api.resolver.impl; * under the License. */ - - -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import java.util.Date; import java.util.GregorianCalendar; @@ -32,11 +32,12 @@ import javax.xml.datatype.XMLGregorianCalendar; import org.apache.rya.api.domain.RyaType; import org.apache.rya.api.resolver.RdfToRyaConversions; import org.apache.rya.api.resolver.RyaTypeResolverException; - -import org.junit.Ignore; +import org.eclipse.rdf4j.model.IRI; +import org.eclipse.rdf4j.model.Literal; +import org.eclipse.rdf4j.model.ValueFactory; +import org.eclipse.rdf4j.model.impl.SimpleValueFactory; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; import org.junit.Test; -import org.openrdf.model.impl.CalendarLiteralImpl; -import org.openrdf.model.vocabulary.XMLSchema; /** * Test serializing and deserializing. @@ -54,14 +55,16 @@ import org.openrdf.model.vocabulary.XMLSchema; * deserialized= 2000-02-02T05:00:00.000Z type = XMLSchema.DATETIME */ public class DateTimeRyaTypeResolverTest { - @Test + private static final ValueFactory VF = SimpleValueFactory.getInstance(); + + @Test public void testDateTime() throws Exception { long currentTime = 1342182689285l; Date date = new Date(currentTime); GregorianCalendar gc = new GregorianCalendar(); gc.setTimeInMillis(date.getTime()); XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc); - CalendarLiteralImpl literal = new CalendarLiteralImpl(xmlGregorianCalendar); + Literal literal = VF.createLiteral(xmlGregorianCalendar); byte[] serialize = new DateTimeRyaTypeResolver().serialize(RdfToRyaConversions.convertLiteral(literal)); RyaType deserialize = new DateTimeRyaTypeResolver().deserialize(serialize); assertEquals("2012-07-13T12:31:29.285Z", deserialize.getData()); @@ -167,7 +170,7 @@ public class DateTimeRyaTypeResolverTest { * @return * @throws RyaTypeResolverException */ - private RyaType serializeAndDeserialize(String dateTimeString, org.openrdf.model.URI type ) throws RyaTypeResolverException { + private RyaType serializeAndDeserialize(String dateTimeString, IRI type ) throws RyaTypeResolverException { if (type == null) type = XMLSchema.DATETIME; RyaType ryaType = new RyaType(type, dateTimeString ); http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DoubleRyaTypeResolverTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DoubleRyaTypeResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DoubleRyaTypeResolverTest.java index 5e42369..f8a5a73 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DoubleRyaTypeResolverTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/DoubleRyaTypeResolverTest.java @@ -19,13 +19,11 @@ package org.apache.rya.api.resolver.impl; * under the License. */ - +import java.util.Random; import junit.framework.TestCase; import org.apache.rya.api.domain.RyaType; -import org.openrdf.model.vocabulary.XMLSchema; - -import java.util.Random; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; /** * Date: 7/20/12 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/IntegerRyaTypeResolverTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/IntegerRyaTypeResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/IntegerRyaTypeResolverTest.java index 199240d..5979d9d 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/IntegerRyaTypeResolverTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/IntegerRyaTypeResolverTest.java @@ -19,13 +19,12 @@ package org.apache.rya.api.resolver.impl; * under the License. */ +import java.util.Random; - -import junit.framework.TestCase; import org.apache.rya.api.domain.RyaType; -import org.openrdf.model.vocabulary.XMLSchema; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; -import java.util.Random; +import junit.framework.TestCase; /** * Date: 7/20/12 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/LongRyaTypeResolverTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/LongRyaTypeResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/LongRyaTypeResolverTest.java index c971d39..1017ebe 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/LongRyaTypeResolverTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/LongRyaTypeResolverTest.java @@ -19,15 +19,13 @@ package org.apache.rya.api.resolver.impl; * under the License. */ +import static org.junit.Assert.assertEquals; +import java.util.Random; import org.apache.rya.api.domain.RyaType; +import org.eclipse.rdf4j.model.vocabulary.XMLSchema; import org.junit.Test; -import org.openrdf.model.vocabulary.XMLSchema; - -import java.util.Random; - -import static junit.framework.Assert.assertEquals; /** * Date: 9/7/12 http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/utils/QueryInvestigatorTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/utils/QueryInvestigatorTest.java b/common/rya.api/src/test/java/org/apache/rya/api/utils/QueryInvestigatorTest.java index bedc59a..809bcdd 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/utils/QueryInvestigatorTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/utils/QueryInvestigatorTest.java @@ -21,8 +21,8 @@ package org.apache.rya.api.utils; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import org.eclipse.rdf4j.query.MalformedQueryException; import org.junit.Test; -import org.openrdf.query.MalformedQueryException; /** * Unit tests the methods of {@link QueryInvestigator}. http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.api/src/test/java/org/apache/rya/api/utils/RdfIOTest.java ---------------------------------------------------------------------- diff --git a/common/rya.api/src/test/java/org/apache/rya/api/utils/RdfIOTest.java b/common/rya.api/src/test/java/org/apache/rya/api/utils/RdfIOTest.java index 92bcfff..1a07184 100644 --- a/common/rya.api/src/test/java/org/apache/rya/api/utils/RdfIOTest.java +++ b/common/rya.api/src/test/java/org/apache/rya/api/utils/RdfIOTest.java @@ -22,8 +22,8 @@ // //import junit.framework.TestCase; //import org.apache.rya.api.RdfCloudTripleStoreUtils; -//import org.openrdf.model.Statement; -//import org.openrdf.model.impl.StatementImpl; +//import org.eclipse.rdf4j.model.Statement; +//import org.eclipse.rdf4j.model.impl.StatementImpl; // //import static org.apache.rya.api.RdfCloudTripleStoreConstants.*; // http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.provenance/pom.xml ---------------------------------------------------------------------- diff --git a/common/rya.provenance/pom.xml b/common/rya.provenance/pom.xml index 509b302..d7dc6f5 100644 --- a/common/rya.provenance/pom.xml +++ b/common/rya.provenance/pom.xml @@ -31,8 +31,8 @@ under the License. <dependencies> <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-runtime</artifactId> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-runtime</artifactId> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/ProvenanceCollectionException.java ---------------------------------------------------------------------- diff --git a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/ProvenanceCollectionException.java b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/ProvenanceCollectionException.java index c550ee4..acf7bd3 100644 --- a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/ProvenanceCollectionException.java +++ b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/ProvenanceCollectionException.java @@ -19,8 +19,7 @@ package org.apache.rya.rdftriplestore.provenance; * under the License. */ - -import org.openrdf.repository.RepositoryException; +import org.eclipse.rdf4j.repository.RepositoryException; /** * Exception for errors in collecting provenance data http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollector.java ---------------------------------------------------------------------- diff --git a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollector.java b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollector.java index 73a2d70..8827717 100644 --- a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollector.java +++ b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollector.java @@ -19,15 +19,13 @@ package org.apache.rya.rdftriplestore.provenance; * under the License. */ - import java.util.List; import org.apache.rya.rdftriplestore.provenance.rdf.BaseProvenanceModel; import org.apache.rya.rdftriplestore.provenance.rdf.RDFProvenanceModel; - -import org.openrdf.model.Statement; -import org.openrdf.repository.RepositoryException; -import org.openrdf.repository.sail.SailRepository; +import org.eclipse.rdf4j.model.Statement; +import org.eclipse.rdf4j.repository.RepositoryException; +import org.eclipse.rdf4j.repository.sail.SailRepository; /** * Records provenance data to an external rdf triplestore http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModel.java ---------------------------------------------------------------------- diff --git a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModel.java b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModel.java index 70e0f5a..17406a0 100644 --- a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModel.java +++ b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModel.java @@ -19,31 +19,30 @@ package org.apache.rya.rdftriplestore.provenance.rdf; * under the License. */ - import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.UUID; -import org.openrdf.model.Resource; -import org.openrdf.model.Statement; -import org.openrdf.model.URI; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.ValueFactoryImpl; -import org.openrdf.model.vocabulary.RDF; +import org.eclipse.rdf4j.model.IRI; +import org.eclipse.rdf4j.model.Resource; +import org.eclipse.rdf4j.model.Statement; +import org.eclipse.rdf4j.model.ValueFactory; +import org.eclipse.rdf4j.model.impl.SimpleValueFactory; +import org.eclipse.rdf4j.model.vocabulary.RDF; /** * Basic representation of Provenance data capture in RDF. */ public class BaseProvenanceModel implements RDFProvenanceModel { - private static final ValueFactory vf = ValueFactoryImpl.getInstance(); - private static final Resource queryEventType = vf.createURI("http://rya.com/provenance#QueryEvent"); - private static final URI atTimeProperty = vf.createURI("http://www.w3.org/ns/prov#atTime"); - private static final URI associatedWithUser = vf.createURI("http://rya.com/provenance#associatedWithUser"); - private static final URI queryTypeProp = vf.createURI("http://rya.com/provenance#queryType"); - private static final URI executedQueryProperty = vf.createURI("http://rya.com/provenance#executedQuery"); - private static final String queryNameSpace = "http://rya.com/provenance#queryEvent"; + private static final ValueFactory VF = SimpleValueFactory.getInstance(); + private static final Resource QUERY_EVENT_TYPE = VF.createIRI("http://rya.com/provenance#QueryEvent"); + private static final IRI AT_TIME_PROPERTY = VF.createIRI("http://www.w3.org/ns/prov#atTime"); + private static final IRI ASSOCIATED_WITH_USER = VF.createIRI("http://rya.com/provenance#associatedWithUser"); + private static final IRI QUERY_TYPE_PROP = VF.createIRI("http://rya.com/provenance#queryType"); + private static final IRI EXECUTED_QUERY_PROPERTY = VF.createIRI("http://rya.com/provenance#executedQuery"); + private static final String QUERY_NAMESPACE = "http://rya.com/provenance#queryEvent"; /* (non-Javadoc) * @see org.apache.rya.rdftriplestore.provenance.rdf.RDFProvenanceModel#getStatementsForQuery(java.lang.String, java.lang.String, java.lang.String) @@ -51,16 +50,16 @@ public class BaseProvenanceModel implements RDFProvenanceModel { public List<Statement> getStatementsForQuery(String query, String user, String queryType) { List<Statement> statements = new ArrayList<Statement>(); // create some statements for the query - Resource queryEventResource = vf.createURI(queryNameSpace + UUID.randomUUID().toString()); - Statement queryEventDecl = vf.createStatement(queryEventResource, RDF.TYPE, queryEventType); + Resource queryEventResource = VF.createIRI(QUERY_NAMESPACE + UUID.randomUUID().toString()); + Statement queryEventDecl = VF.createStatement(queryEventResource, RDF.TYPE, QUERY_EVENT_TYPE); statements.add(queryEventDecl); - Statement queryEventTime = vf.createStatement(queryEventResource, atTimeProperty, vf.createLiteral(new Date())); + Statement queryEventTime = VF.createStatement(queryEventResource, AT_TIME_PROPERTY, VF.createLiteral(new Date())); statements.add(queryEventTime); - Statement queryUser = vf.createStatement(queryEventResource, associatedWithUser, vf.createLiteral(user)); + Statement queryUser = VF.createStatement(queryEventResource, ASSOCIATED_WITH_USER, VF.createLiteral(user)); statements.add(queryUser); - Statement executedQuery = vf.createStatement(queryEventResource, executedQueryProperty, vf.createLiteral(query)); + Statement executedQuery = VF.createStatement(queryEventResource, EXECUTED_QUERY_PROPERTY, VF.createLiteral(query)); statements.add(executedQuery); - Statement queryTypeStatement = vf.createStatement(queryEventResource, queryTypeProp, vf.createLiteral(queryType)); + Statement queryTypeStatement = VF.createStatement(queryEventResource, QUERY_TYPE_PROP, VF.createLiteral(queryType)); statements.add(queryTypeStatement); return statements; } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/RDFProvenanceModel.java ---------------------------------------------------------------------- diff --git a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/RDFProvenanceModel.java b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/RDFProvenanceModel.java index 619f80d..8a4d4cb 100644 --- a/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/RDFProvenanceModel.java +++ b/common/rya.provenance/src/main/java/org/apache/rya/rdftriplestore/provenance/rdf/RDFProvenanceModel.java @@ -19,15 +19,14 @@ package org.apache.rya.rdftriplestore.provenance.rdf; * under the License. */ - import java.util.List; -import org.openrdf.model.Statement; +import org.eclipse.rdf4j.model.Statement; public interface RDFProvenanceModel { - List<Statement> getStatementsForQuery(String query, String user, String queryType); + public List<Statement> getStatementsForQuery(String query, String user, String queryType); } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollectorTest.java ---------------------------------------------------------------------- diff --git a/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollectorTest.java b/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollectorTest.java index be49c8e..a9d4298 100644 --- a/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollectorTest.java +++ b/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/TriplestoreProvenanceCollectorTest.java @@ -19,19 +19,18 @@ package org.apache.rya.rdftriplestore.provenance; * under the License. */ - import static org.junit.Assert.assertTrue; +import org.eclipse.rdf4j.query.MalformedQueryException; +import org.eclipse.rdf4j.query.QueryEvaluationException; +import org.eclipse.rdf4j.query.QueryLanguage; +import org.eclipse.rdf4j.query.TupleQuery; +import org.eclipse.rdf4j.query.TupleQueryResult; +import org.eclipse.rdf4j.repository.RepositoryException; +import org.eclipse.rdf4j.repository.sail.SailRepository; +import org.eclipse.rdf4j.sail.Sail; +import org.eclipse.rdf4j.sail.memory.MemoryStore; import org.junit.Test; -import org.openrdf.query.MalformedQueryException; -import org.openrdf.query.QueryEvaluationException; -import org.openrdf.query.QueryLanguage; -import org.openrdf.query.TupleQuery; -import org.openrdf.query.TupleQueryResult; -import org.openrdf.repository.RepositoryException; -import org.openrdf.repository.sail.SailRepository; -import org.openrdf.sail.Sail; -import org.openrdf.sail.memory.MemoryStore; public class TriplestoreProvenanceCollectorTest { http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModelTest.java ---------------------------------------------------------------------- diff --git a/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModelTest.java b/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModelTest.java index 0da5a4d..5532f12 100644 --- a/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModelTest.java +++ b/common/rya.provenance/src/test/java/org/apache/rya/rdftriplestore/provenance/rdf/BaseProvenanceModelTest.java @@ -19,13 +19,12 @@ package org.apache.rya.rdftriplestore.provenance.rdf; * under the License. */ - import static org.junit.Assert.assertTrue; import java.util.List; +import org.eclipse.rdf4j.model.Statement; import org.junit.Test; -import org.openrdf.model.Statement; public class BaseProvenanceModelTest { http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/pom.xml ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/pom.xml b/dao/accumulo.rya/pom.xml index beed3a4..a90c30a 100644 --- a/dao/accumulo.rya/pom.xml +++ b/dao/accumulo.rya/pom.xml @@ -43,16 +43,21 @@ under the License. </dependency> <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-rio-ntriples</artifactId> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-rio-ntriples</artifactId> </dependency> <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-rio-nquads</artifactId> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-rio-nquads</artifactId> </dependency> <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-queryalgebra-evaluation</artifactId> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-queryalgebra-evaluation</artifactId> + </dependency> + <dependency> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-sail-api</artifactId> + <version>${org.eclipse.rdf4j.version}</version> </dependency> <dependency> <groupId>commons-io</groupId> @@ -60,8 +65,8 @@ under the License. </dependency> <!-- testing dependencies --> <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-rio-trig</artifactId> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-rio-trig</artifactId> <scope>test</scope> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloNamespaceTableIterator.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloNamespaceTableIterator.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloNamespaceTableIterator.java index 9f6c1dd..2de5b1c 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloNamespaceTableIterator.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloNamespaceTableIterator.java @@ -23,15 +23,13 @@ import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.Map.Entry; +import com.google.common.base.Preconditions; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Value; import org.apache.rya.api.persist.RdfDAOException; -import org.openrdf.model.Namespace; -import org.openrdf.model.impl.NamespaceImpl; - -import com.google.common.base.Preconditions; - -import info.aduna.iteration.CloseableIteration; +import org.eclipse.rdf4j.common.iteration.CloseableIteration; +import org.eclipse.rdf4j.model.Namespace; +import org.eclipse.rdf4j.model.impl.NamespaceImpl; public class AccumuloNamespaceTableIterator<T extends Namespace> implements CloseableIteration<Namespace, RdfDAOException> { http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfEvalStatsDAO.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfEvalStatsDAO.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfEvalStatsDAO.java index a8ed76c..6675ae3 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfEvalStatsDAO.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfEvalStatsDAO.java @@ -43,8 +43,8 @@ import org.apache.hadoop.io.Text; import org.apache.rya.api.layout.TableLayoutStrategy; import org.apache.rya.api.persist.RdfDAOException; import org.apache.rya.api.persist.RdfEvalStatsDAO; -import org.openrdf.model.Resource; -import org.openrdf.model.Value; +import org.eclipse.rdf4j.model.Resource; +import org.eclipse.rdf4j.model.Value; /** * Class AccumuloRdfEvalStatsDAO http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfQueryIterator.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfQueryIterator.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfQueryIterator.java index 29fe0f3..e99cfe1 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfQueryIterator.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRdfQueryIterator.java @@ -23,7 +23,7 @@ //import com.google.common.collect.Iterators; //import com.google.common.io.ByteArrayDataInput; //import com.google.common.io.ByteStreams; -//import info.aduna.iteration.CloseableIteration; +//import org.eclipse.rdf4j.common.iteration.CloseableIteration; //import org.apache.rya.api.RdfCloudTripleStoreConstants; //import org.apache.rya.api.RdfCloudTripleStoreUtils; //import org.apache.rya.api.persist.RdfDAOException; @@ -35,11 +35,11 @@ //import org.apache.accumulo.core.iterators.user.TimestampFilter; //import org.apache.accumulo.core.security.Authorizations; //import org.apache.hadoop.io.Text; -//import org.openrdf.model.Resource; -//import org.openrdf.model.Statement; -//import org.openrdf.model.URI; -//import org.openrdf.model.Value; -//import org.openrdf.query.BindingSet; +//import org.eclipse.rdf4j.model.Resource; +//import org.eclipse.rdf4j.model.Statement; +//import org.eclipse.rdf4j.model.IRI; +//import org.eclipse.rdf4j.model.Value; +//import org.eclipse.rdf4j.query.BindingSet; //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; // http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java index 22d6dc9..f3e97a3 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java @@ -69,13 +69,12 @@ import org.apache.rya.api.persist.RyaDAO; import org.apache.rya.api.persist.RyaDAOException; import org.apache.rya.api.persist.RyaNamespaceManager; import org.apache.rya.api.resolver.RyaTripleContext; -import org.openrdf.model.Namespace; +import org.eclipse.rdf4j.common.iteration.CloseableIteration; +import org.eclipse.rdf4j.model.Namespace; import com.google.common.collect.Iterators; import com.google.common.collect.Lists; -import info.aduna.iteration.CloseableIteration; - public class AccumuloRyaDAO implements RyaDAO<AccumuloRdfConfiguration>, RyaNamespaceManager<AccumuloRdfConfiguration> { private static final Log logger = LogFactory.getLog(AccumuloRyaDAO.class); http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/DefineTripleQueryRangeFactory.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/DefineTripleQueryRangeFactory.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/DefineTripleQueryRangeFactory.java index a6104f4..1609f2f 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/DefineTripleQueryRangeFactory.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/DefineTripleQueryRangeFactory.java @@ -26,9 +26,9 @@ //import org.apache.rya.api.domain.RangeValue; //import org.apache.accumulo.core.data.Range; //import org.apache.hadoop.io.Text; -//import org.openrdf.model.Value; -//import org.openrdf.model.ValueFactory; -//import org.openrdf.model.impl.ValueFactoryImpl; +//import org.eclipse.rdf4j.model.Value; +//import org.eclipse.rdf4j.model.ValueFactory; +//import org.eclipse.rdf4j.model.impl.ValueFactoryImpl; // //import java.io.IOException; //import java.util.Map; http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableKeyValues.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableKeyValues.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableKeyValues.java index 78e00f2..7361c69 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableKeyValues.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableKeyValues.java @@ -19,8 +19,6 @@ package org.apache.rya.accumulo; * under the License. */ - - import static org.apache.rya.accumulo.AccumuloRdfConstants.EMPTY_VALUE; import java.io.IOException; @@ -29,6 +27,10 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Map; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.security.ColumnVisibility; +import org.apache.hadoop.io.Text; import org.apache.rya.api.RdfCloudTripleStoreConfiguration; import org.apache.rya.api.RdfCloudTripleStoreConstants; import org.apache.rya.api.domain.RyaStatement; @@ -36,11 +38,6 @@ import org.apache.rya.api.resolver.RyaTripleContext; import org.apache.rya.api.resolver.triple.TripleRow; import org.apache.rya.api.resolver.triple.TripleRowResolverException; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.security.ColumnVisibility; -import org.apache.hadoop.io.Text; - public class RyaTableKeyValues { public static final ColumnVisibility EMPTY_CV = new ColumnVisibility(); public static final Text EMPTY_CV_TEXT = new Text(EMPTY_CV.getExpression()); http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableMutationsFactory.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableMutationsFactory.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableMutationsFactory.java index b06be7b..05c3c86 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableMutationsFactory.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/RyaTableMutationsFactory.java @@ -19,8 +19,6 @@ package org.apache.rya.accumulo; * under the License. */ - - import static org.apache.rya.accumulo.AccumuloRdfConstants.EMPTY_CV; import static org.apache.rya.accumulo.AccumuloRdfConstants.EMPTY_VALUE; import static org.apache.rya.api.RdfCloudTripleStoreConstants.EMPTY_TEXT; @@ -31,7 +29,10 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import org.apache.rya.api.RdfCloudTripleStoreConfiguration; +import org.apache.accumulo.core.data.Mutation; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.security.ColumnVisibility; +import org.apache.hadoop.io.Text; import org.apache.rya.api.RdfCloudTripleStoreConstants; import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT; import org.apache.rya.api.domain.RyaStatement; @@ -39,11 +40,6 @@ import org.apache.rya.api.resolver.RyaTripleContext; import org.apache.rya.api.resolver.triple.TripleRow; import org.apache.rya.api.resolver.triple.TripleRowResolverException; -import org.apache.accumulo.core.data.Mutation; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.security.ColumnVisibility; -import org.apache.hadoop.io.Text; - public class RyaTableMutationsFactory { RyaTripleContext ryaContext; http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AccumuloIndexer.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AccumuloIndexer.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AccumuloIndexer.java index 4a164a9..2646718 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AccumuloIndexer.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AccumuloIndexer.java @@ -19,12 +19,10 @@ package org.apache.rya.accumulo.experimental; * under the License. */ - import java.io.IOException; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.MultiTableBatchWriter; - import org.apache.rya.api.RdfCloudTripleStoreConfiguration; import org.apache.rya.api.persist.index.RyaSecondaryIndexer; http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java index d89928c..8887739 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java @@ -63,15 +63,14 @@ import org.apache.rya.api.utils.CloseableIterableIteration; import org.calrissian.mango.collect.CloseableIterable; import org.calrissian.mango.collect.CloseableIterables; import org.calrissian.mango.collect.FluentCloseableIterable; -import org.openrdf.query.BindingSet; +import org.eclipse.rdf4j.common.iteration.CloseableIteration; +import org.eclipse.rdf4j.query.BindingSet; import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.google.common.collect.FluentIterable; import com.google.common.collect.Iterators; -import info.aduna.iteration.CloseableIteration; - /** * Date: 7/17/12 Time: 9:28 AM */ http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/KeyValueToRyaStatementFunction.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/KeyValueToRyaStatementFunction.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/KeyValueToRyaStatementFunction.java index 9dd84c6..e1e74d5 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/KeyValueToRyaStatementFunction.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/KeyValueToRyaStatementFunction.java @@ -19,22 +19,17 @@ package org.apache.rya.accumulo.query; * under the License. */ - - import java.util.Map; -import org.apache.rya.api.RdfCloudTripleStoreConfiguration; +import com.google.common.base.Function; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.Value; import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT; import org.apache.rya.api.domain.RyaStatement; import org.apache.rya.api.resolver.RyaTripleContext; import org.apache.rya.api.resolver.triple.TripleRow; import org.apache.rya.api.resolver.triple.TripleRowResolverException; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.Value; - -import com.google.common.base.Function; - /** * Date: 1/30/13 * Time: 2:09 PM http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/81b99327/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/RangeBindingSetEntries.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/RangeBindingSetEntries.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/RangeBindingSetEntries.java index 4887ba0..7d15223 100644 --- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/RangeBindingSetEntries.java +++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/RangeBindingSetEntries.java @@ -1,9 +1,3 @@ -package org.apache.rya.accumulo.query; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -12,9 +6,9 @@ import java.util.Set; * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -22,12 +16,17 @@ import java.util.Set; * specific language governing permissions and limitations * under the License. */ +package org.apache.rya.accumulo.query; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Range; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.WritableComparator; -import org.openrdf.query.BindingSet; +import org.eclipse.rdf4j.query.BindingSet; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap;
