RYA-242_geo_fluo; Closes #141; Added 30 geospatial functions wrapping RDF2J functions.
Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/3917471b Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/3917471b Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/3917471b Branch: refs/heads/master Commit: 3917471b541498521a6a838d99d995304dce4e56 Parents: a602086 Author: David W. Lotts <[email protected]> Authored: Thu Mar 2 10:49:36 2017 -0500 Committer: pujav65 <[email protected]> Committed: Mon Mar 13 11:17:36 2017 -0400 ---------------------------------------------------------------------- .../apache/rya/indexing/pcj/fluo/ITBase.java | 66 ++-- .../indexing/pcj/fluo/integration/QueryIT.java | 161 +++++++- extras/rya.pcj.fluo/pom.xml | 61 +-- .../rya.pcj.fluo/rya.pcj.functions.geo/pom.xml | 129 +++++++ .../pcj/functions/geo/BoundaryRdf4J.java | 26 ++ .../pcj/functions/geo/ConvexHullRdf4J.java | 26 ++ .../pcj/functions/geo/DifferenceRdf4J.java | 26 ++ .../pcj/functions/geo/DistanceRdf4J.java | 26 ++ .../pcj/functions/geo/EhContainsRdf4J.java | 26 ++ .../pcj/functions/geo/EhCoveredByRdf4J.java | 26 ++ .../pcj/functions/geo/EhCoversRdf4J.java | 26 ++ .../pcj/functions/geo/EhDisjointRdf4J.java | 26 ++ .../pcj/functions/geo/EhInsideRdf4J.java | 26 ++ .../indexing/pcj/functions/geo/EhMeetRdf4J.java | 26 ++ .../pcj/functions/geo/EhOverlapRdf4J.java | 26 ++ .../pcj/functions/geo/EnvelopeRdf4J.java | 26 ++ .../pcj/functions/geo/FunctionAdapter.java | 100 +++++ .../pcj/functions/geo/IntersectionRdf4J.java | 26 ++ .../indexing/pcj/functions/geo/RCC8DCRdf4J.java | 26 ++ .../indexing/pcj/functions/geo/RCC8ECRdf4J.java | 26 ++ .../pcj/functions/geo/RCC8NTPPIRdf4J.java | 26 ++ .../pcj/functions/geo/RCC8NTPPRdf4J.java | 26 ++ .../indexing/pcj/functions/geo/RCC8PORdf4J.java | 26 ++ .../pcj/functions/geo/RCC8TPPIRdf4J.java | 26 ++ .../pcj/functions/geo/RCC8TPPRdf4J.java | 26 ++ .../indexing/pcj/functions/geo/RelateRdf4J.java | 26 ++ .../pcj/functions/geo/SfContainsRdf4J.java | 26 ++ .../pcj/functions/geo/SfCrossesRdf4J.java | 26 ++ .../pcj/functions/geo/SfDisjointRdf4J.java | 26 ++ .../pcj/functions/geo/SfIntersectsRdf4J.java | 26 ++ .../pcj/functions/geo/SfOverlapsRdf4J.java | 26 ++ .../pcj/functions/geo/SfTouchesRdf4J.java | 26 ++ .../pcj/functions/geo/SfWithinRdf4J.java | 26 ++ .../functions/geo/SymmetricDifferenceRdf4J.java | 26 ++ .../indexing/pcj/functions/geo/UnionRdf4J.java | 26 ++ .../geosparql/SpatialSupportInitializer.java | 240 ++++++++++++ ...f.query.algebra.evaluation.function.Function | 30 ++ .../pcj/functions/geo/GeoFunctionsIT.java | 369 +++++++++++++++++++ .../pcj/functions/geo/GeoFunctionsTest.java | 68 ++++ pom.xml | 5 + 40 files changed, 1963 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ITBase.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ITBase.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ITBase.java index 041c7ba..293426f 100644 --- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ITBase.java +++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ITBase.java @@ -44,8 +44,6 @@ import org.apache.fluo.api.client.FluoClient; import org.apache.fluo.api.client.FluoFactory; import org.apache.fluo.api.client.Snapshot; import org.apache.fluo.api.client.scanner.CellScanner; -import org.apache.fluo.api.client.scanner.ColumnScanner; -import org.apache.fluo.api.client.scanner.RowScanner; import org.apache.fluo.api.config.FluoConfiguration; import org.apache.fluo.api.config.ObserverSpecification; import org.apache.fluo.api.data.Bytes; @@ -53,6 +51,18 @@ import org.apache.fluo.api.data.RowColumnValue; import org.apache.fluo.api.mini.MiniFluo; import org.apache.log4j.Level; import org.apache.log4j.Logger; +import org.apache.rya.accumulo.AccumuloRdfConfiguration; +import org.apache.rya.api.client.Install.InstallConfiguration; +import org.apache.rya.api.client.RyaClient; +import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails; +import org.apache.rya.api.client.accumulo.AccumuloRyaClientFactory; +import org.apache.rya.api.domain.RyaStatement; +import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder; +import org.apache.rya.api.domain.RyaType; +import org.apache.rya.api.domain.RyaURI; +import org.apache.rya.api.resolver.RyaToRdfConversions; +import org.apache.rya.indexing.accumulo.ConfigUtils; +import org.apache.rya.indexing.external.PrecomputedJoinIndexerConfig; import org.apache.rya.indexing.pcj.fluo.app.export.rya.RyaExportParameters; import org.apache.rya.indexing.pcj.fluo.app.observers.FilterObserver; import org.apache.rya.indexing.pcj.fluo.app.observers.JoinObserver; @@ -64,6 +74,8 @@ import org.apache.rya.indexing.pcj.fluo.app.query.FluoQueryMetadataDAO; import org.apache.rya.indexing.pcj.fluo.app.query.QueryMetadata; import org.apache.rya.indexing.pcj.storage.accumulo.BindingSetStringConverter; import org.apache.rya.indexing.pcj.storage.accumulo.VariableOrder; +import org.apache.rya.rdftriplestore.RyaSailRepository; +import org.apache.rya.sail.config.RyaSailFactory; import org.apache.zookeeper.ClientCnxn; import org.junit.After; import org.junit.Before; @@ -78,21 +90,6 @@ import org.openrdf.sail.Sail; import com.google.common.io.Files; -import org.apache.rya.accumulo.AccumuloRdfConfiguration; -import org.apache.rya.api.client.Install.InstallConfiguration; -import org.apache.rya.api.client.RyaClient; -import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails; -import org.apache.rya.api.client.accumulo.AccumuloRyaClientFactory; -import org.apache.rya.api.domain.RyaStatement; -import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder; -import org.apache.rya.api.domain.RyaType; -import org.apache.rya.api.domain.RyaURI; -import org.apache.rya.api.resolver.RyaToRdfConversions; -import org.apache.rya.indexing.accumulo.ConfigUtils; -import org.apache.rya.indexing.external.PrecomputedJoinIndexerConfig; -import org.apache.rya.rdftriplestore.RyaSailRepository; -import org.apache.rya.sail.config.RyaSailFactory; - /** * Integration tests that ensure the Fluo application processes PCJs results * correctly. @@ -122,11 +119,14 @@ public abstract class ITBase { @BeforeClass public static void killLoudLogs() { - Logger.getLogger(ClientCnxn.class).setLevel(Level.ERROR); + Logger.getRootLogger().setLevel(Level.ERROR); + Logger.getLogger(ClientCnxn.class).setLevel(Level.OFF); } @Before public void setupMiniResources() throws Exception { + // Will set defaults for log4J + org.apache.log4j.BasicConfigurator.configure(); // Initialize the Mini Accumulo that will be used to host Rya and Fluo. setupMiniAccumulo(); @@ -224,7 +224,7 @@ public abstract class ITBase { final RyaStatementBuilder builder = RyaStatement.builder().setSubject(new RyaURI(subject)) .setPredicate(new RyaURI(predicate)); - if (object.startsWith("http://")) { + if (object.startsWith("http://") || object.startsWith("tag:")) { builder.setObject(new RyaURI(object)); } else { builder.setObject(new RyaType(object)); @@ -234,14 +234,35 @@ public abstract class ITBase { } /** - * A helper function for creating a {@link RyaStatement} that represents a - * Triple. + * A helper function for creating a {@link RyaStatement} that represents a Triple. + * This overload takes a typed literal for the object. Prepare it like this for example specify the type (wktLiteral) and the value (Point...): + * makeRyaStatement(s, p, new RyaType(new URIImpl("http://www.opengis.net/ont/geosparql#wktLiteral"), "Point(-77.03524 38.889468)")) // * * @param subject - The Subject of the Triple. (not null) * @param predicate - The Predicate of the Triple. (not null) * @param object - The Object of the Triple. (not null) * @return A Triple as a {@link RyaStatement}. */ + protected static RyaStatement makeRyaStatement(final String subject, final String predicate, final RyaType object) { + checkNotNull(subject); + checkNotNull(predicate); + checkNotNull(object); + + final RyaStatementBuilder builder = RyaStatement.builder()// + .setSubject(new RyaURI(subject))// + .setPredicate(new RyaURI(predicate))// + .setObject(object); + return builder.build(); + } + + /** + * A helper function for creating a {@link RyaStatement} that represents a Triple with an integer. + * + * @param subject - The Subject of the Triple. (not null) + * @param predicate - The Predicate of the Triple. (not null) + * @param object - The Object of the Triple, an integer value (int). + * @return A Triple as a {@link RyaStatement}. + */ protected static RyaStatement makeRyaStatement(final String subject, final String predicate, final int object) { checkNotNull(subject); checkNotNull(predicate); @@ -409,8 +430,7 @@ public abstract class ITBase { config.addObservers(observers); - FluoFactory.newAdmin(config).initialize( - new FluoAdmin.InitializationOptions().setClearTable(true).setClearZookeeper(true) ); + FluoFactory.newAdmin(config).initialize(new FluoAdmin.InitializationOptions().setClearTable(true).setClearZookeeper(true) ); return FluoFactory.newMiniFluo(config); } } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/QueryIT.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/QueryIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/QueryIT.java index 4e9f265..648c5b9 100644 --- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/QueryIT.java +++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/QueryIT.java @@ -20,25 +20,36 @@ package org.apache.rya.indexing.pcj.fluo.integration; import static org.junit.Assert.assertEquals; +import java.math.BigDecimal; import java.util.HashSet; import java.util.Set; import org.apache.rya.api.domain.RyaStatement; +import org.apache.rya.api.domain.RyaType; import org.apache.rya.indexing.pcj.fluo.ITBase; import org.apache.rya.indexing.pcj.fluo.api.CreatePcj; import org.apache.rya.indexing.pcj.fluo.api.InsertTriples; import org.apache.rya.indexing.pcj.storage.PrecomputedJoinStorage; import org.apache.rya.indexing.pcj.storage.accumulo.AccumuloPcjStorage; import org.junit.Test; +import org.openrdf.model.Literal; +import org.openrdf.model.URI; +import org.openrdf.model.Value; +import org.openrdf.model.ValueFactory; +import org.openrdf.model.datatypes.XMLDatatypeUtil; +import org.openrdf.model.impl.BooleanLiteralImpl; +import org.openrdf.model.impl.LiteralImpl; import org.openrdf.model.impl.NumericLiteralImpl; import org.openrdf.model.impl.URIImpl; import org.openrdf.model.vocabulary.XMLSchema; import org.openrdf.query.BindingSet; +import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException; +import org.openrdf.query.algebra.evaluation.function.Function; +import org.openrdf.query.algebra.evaluation.function.FunctionRegistry; import org.openrdf.query.impl.BindingImpl; import com.google.common.base.Optional; import com.google.common.collect.Sets; - /** * Performs integration tests over the Fluo application geared towards various query structures. * <p> @@ -292,4 +303,150 @@ public class QueryIT extends ITBase { final Set<BindingSet> results = getQueryBindingSetValues(fluoClient, sparql); assertEquals(expected, results); } -} \ No newline at end of file + + @Test + public void withCustomFilters() throws Exception { + final String sparql = "prefix ryafunc: <tag:rya.apache.org,2017:function#> \n" // + + "SELECT ?name ?age \n" // + + "{ \n" // + + "FILTER( ryafunc:isTeen(?age) ) . \n" // + + "?name <http://hasAge> ?age . \n" // + + "?name <http://playsSport> \"Soccer\" \n" // + + "}"; // + + final Set<RyaStatement> streamedTriples = Sets.newHashSet( + makeRyaStatement("http://Alice", "http://hasAge", 18), + makeRyaStatement("http://Bob", "http://hasAge", 30), + makeRyaStatement("http://Charlie", "http://hasAge", 14), + makeRyaStatement("http://David", "http://hasAge", 16), + makeRyaStatement("http://Eve", "http://hasAge", 35), + + makeRyaStatement("http://Alice", "http://playsSport", "Soccer"), + makeRyaStatement("http://Bob", "http://playsSport", "Soccer"), + makeRyaStatement("http://Charlie", "http://playsSport", "Basketball"), + makeRyaStatement("http://Charlie", "http://playsSport", "Soccer"), + makeRyaStatement("http://David", "http://playsSport", "Basketball")); + + Function fooFunction = new Function() { + + @Override + public String getURI() { + return "tag:rya.apache.org,2017:function#isTeen"; + } + + final static int TEEN_THRESHOLD = 20; + + @Override + public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException { + + if (args.length != 1) { + throw new ValueExprEvaluationException("isTeen() requires exactly 1 argument, got " + args.length); + } + + if (args[0] instanceof Literal) { + Literal literal = (Literal) args[0]; + + URI datatype = literal.getDatatype(); + + // ABS function accepts only numeric literals + if (datatype != null && XMLDatatypeUtil.isNumericDatatype(datatype)) { + if (XMLDatatypeUtil.isDecimalDatatype(datatype)) { + BigDecimal bigValue = literal.decimalValue(); + return BooleanLiteralImpl.valueOf(bigValue.compareTo(new BigDecimal(TEEN_THRESHOLD)) < 0); + } else if (XMLDatatypeUtil.isFloatingPointDatatype(datatype)) { + double doubleValue = literal.doubleValue(); + return BooleanLiteralImpl.valueOf(doubleValue < TEEN_THRESHOLD); + } else { + throw new ValueExprEvaluationException("unexpected datatype (expect decimal/int or floating) for function operand: " + args[0]); + } + } else { + throw new ValueExprEvaluationException("unexpected input value (expect non-null and numeric) for function: " + args[0]); + } + } else { + throw new ValueExprEvaluationException("unexpected input value (expect literal) for function: " + args[0]); + } + } + }; + + // Add our new function to the registry + FunctionRegistry.getInstance().add(fooFunction); + + // The expected results of the SPARQL query once the PCJ has been computed. + final Set<BindingSet> expected = new HashSet<>(); + expected.add( makeBindingSet( + new BindingImpl("name", new URIImpl("http://Alice")), + new BindingImpl("age", new NumericLiteralImpl(18, XMLSchema.INTEGER)))); + expected.add( makeBindingSet( + new BindingImpl("name", new URIImpl("http://Charlie")), + new BindingImpl("age", new NumericLiteralImpl(14, XMLSchema.INTEGER)))); + + // Create the PCJ table. + final PrecomputedJoinStorage pcjStorage = new AccumuloPcjStorage(accumuloConn, RYA_INSTANCE_NAME); + final String pcjId = pcjStorage.createPcj(sparql); + + // Tell the Fluo app to maintain the PCJ. + new CreatePcj().withRyaIntegration(pcjId, pcjStorage, fluoClient, accumuloConn, RYA_INSTANCE_NAME); + + // Stream the data into Fluo. + new InsertTriples().insert(fluoClient, streamedTriples, Optional.<String>absent()); + + // Verify the end results of the query match the expected results. + fluo.waitForObservers(); + final Set<BindingSet> results = getQueryBindingSetValues(fluoClient, sparql); + assertEquals(expected, results); + } + + @Test + public void withTemporal() throws Exception { + final String dtPredUri = "http://www.w3.org/2006/time#inXSDDateTime"; + final String dtPred = "<" + dtPredUri + ">"; + final String xmlDateTime = "http://www.w3.org/2001/XMLSchema#dateTime"; + // Find all stored dates. + String selectQuery = "PREFIX time: <http://www.w3.org/2006/time#> \n"// + + "PREFIX xml: <http://www.w3.org/2001/XMLSchema#> \n" // + + "PREFIX tempo: <tag:rya-rdf.org,2015:temporal#> \n"// + + "SELECT ?event ?time \n" // + + "WHERE { \n" // + + " ?event " + dtPred + " ?time . \n"// + // + " FILTER(?time > '2000-01-01T01:00:00Z'^^xml:dateTime) \n"// all + // + " FILTER(?time < '2007-01-01T01:01:03-08:00'^^xml:dateTime) \n"// after 2007 + + " FILTER(?time > '2001-01-01T01:01:03-08:00'^^xml:dateTime) \n"// after 3 seconds + + "}";// + + // create some resources and literals to make statements out of + String eventz = "<http://eventz>"; + final Set<RyaStatement> streamedTriples = Sets.newHashSet(// + makeRyaStatement(eventz, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "<http://www.w3.org/2006/time#Instant>"), // + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2001-01-01T01:01:01-08:00")), // one second + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2001-01-01T04:01:02.000-05:00")), // 2 seconds + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2001-01-01T01:01:03-08:00")), // 3 seconds + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2001-01-01T01:01:04-08:00")), // 4seconds + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2001-01-01T09:01:05Z")), // 5 seconds + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2006-01-01")), // + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2007-01-01")), // + makeRyaStatement(eventz, dtPredUri, new RyaType(new URIImpl(xmlDateTime), "2008-01-01"))); + + // The expected results of the SPARQL query once the PCJ has been computed. + final Set<BindingSet> expected = new HashSet<>(); + expected.add(makeBindingSet(new BindingImpl("event", new URIImpl(eventz)), new BindingImpl("time", new LiteralImpl("2001-01-01T09:01:04.000Z", new URIImpl(xmlDateTime))))); // + expected.add(makeBindingSet(new BindingImpl("event", new URIImpl(eventz)), new BindingImpl("time", new LiteralImpl("2001-01-01T09:01:05.000Z", new URIImpl(xmlDateTime))))); // + expected.add(makeBindingSet(new BindingImpl("event", new URIImpl(eventz)), new BindingImpl("time", new LiteralImpl("2006-01-01T05:00:00.000Z", new URIImpl(xmlDateTime))))); // + expected.add(makeBindingSet(new BindingImpl("event", new URIImpl(eventz)), new BindingImpl("time", new LiteralImpl("2007-01-01T05:00:00.000Z", new URIImpl(xmlDateTime))))); // + expected.add(makeBindingSet(new BindingImpl("event", new URIImpl(eventz)), new BindingImpl("time", new LiteralImpl("2008-01-01T05:00:00.000Z", new URIImpl(xmlDateTime))))); + + // Create the PCJ table. + final PrecomputedJoinStorage pcjStorage = new AccumuloPcjStorage(accumuloConn, RYA_INSTANCE_NAME); + final String pcjId = pcjStorage.createPcj(selectQuery); + + // Tell the Fluo app to maintain the PCJ. + new CreatePcj().withRyaIntegration(pcjId, pcjStorage, fluoClient, accumuloConn, RYA_INSTANCE_NAME); + + // Stream the data into Fluo. + new InsertTriples().insert(fluoClient, streamedTriples, Optional.<String> absent()); + + // Verify the end results of the query match the expected results. + fluo.waitForObservers(); + final Set<BindingSet> results = getQueryBindingSetValues(fluoClient, selectQuery); + assertEquals(expected, results); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/pom.xml ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/pom.xml b/extras/rya.pcj.fluo/pom.xml index 8233b0b..719c553 100644 --- a/extras/rya.pcj.fluo/pom.xml +++ b/extras/rya.pcj.fluo/pom.xml @@ -1,38 +1,38 @@ <?xml version="1.0" encoding="utf-8"?> <!-- -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 + 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 + 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. + 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - + <parent> <groupId>org.apache.rya</groupId> <artifactId>rya.extras</artifactId> <version>3.2.11-incubating-SNAPSHOT</version> </parent> - + <modelVersion>4.0.0</modelVersion> <artifactId>rya.pcj.fluo.parent</artifactId> - + <name>Apache Rya PCJ Fluo Parent</name> <description>The parent pom file for any pcj.fluo project.</description> - + <packaging>pom</packaging> - + <modules> <module>pcj.fluo.api</module> <module>pcj.fluo.app</module> @@ -40,10 +40,30 @@ under the License. <module>pcj.fluo.integration</module> <module>pcj.fluo.demo</module> </modules> - + <profiles> + <profile> + <!-- Activate geofunctions: "mvn ... -P geoindexing" --> + <!-- Optional because JTS libs use licenses that Apache projects can't depend upon. --> + <id>geoindexing</id> + <modules> + <module>rya.pcj.functions.geo</module> + </modules> + </profile> + </profiles> <build> <plugins> <plugin> + <!-- generate the test jar as well so it can be reused by dependent tools. --> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <artifactId>maven-failsafe-plugin</artifactId> <executions> <execution> @@ -56,5 +76,4 @@ under the License. </plugin> </plugins> </build> - </project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/pom.xml ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/pom.xml b/extras/rya.pcj.fluo/rya.pcj.functions.geo/pom.xml new file mode 100644 index 0000000..8aa257b --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/pom.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <parent> + <groupId>org.apache.rya</groupId> + <artifactId>rya.pcj.fluo.parent</artifactId> + <version>3.2.11-incubating-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>rya.pcj.functions.geo</artifactId> + + <name>Apache Rya PCJ Geo sparql functions</name> + <description> + Optional geospatial geosparql Functions for the Fluo Query framework + for use with continuous complex event queries. + </description> + <dependencies> + <!-- Rya Runtime Dependencies. --> + <dependency> + <groupId>org.apache.rya</groupId> + <artifactId>rya.api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.rya</groupId> + <artifactId>rya.pcj.fluo.api</artifactId> + </dependency> + <dependency> + <groupId>com.vividsolutions</groupId> + <artifactId>jts</artifactId> + <version>1.13</version> + </dependency> + <dependency> + <groupId>org.apache.rya</groupId> + <artifactId>rya.pcj.fluo.client</artifactId> + </dependency> + <dependency> + <groupId>org.apache.rya</groupId> + <artifactId>rya.indexing</artifactId> + </dependency> + <dependency> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-queryalgebra-geosparql</artifactId> + <version>2.2</version> + </dependency> + <dependency> + <groupId>org.apache.fluo</groupId> + <artifactId>fluo-api</artifactId> + </dependency> + <dependency> + <groupId>org.eclipse.rdf4j</groupId> + <artifactId>rdf4j-queryalgebra-evaluation</artifactId> + <version>2.1.6</version> + </dependency> + <!-- Testing dependencies. --> + <dependency> + <groupId>org.apache.fluo</groupId> + <artifactId>fluo-mini</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <!-- BaseIT exists here, needs test jar to be generated. --> + <groupId>org.apache.rya</groupId> + <artifactId>rya.pcj.fluo.integration</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>properties-maven-plugin</artifactId> + <version>1.0.0</version> + <executions> + <execution> + <goals> + <goal>set-system-properties</goal> + </goals> + <configuration> + <properties> + <property> + <!-- This causes spatial4J to use the full featured JTS libs --> + <!-- avoiding the error: "Unknown Shape definition [POLYGON" --> + <name>SpatialContextFactory</name> + <value>com.spatial4j.core.context.jts.JtsSpatialContextFactory</value> + </property> + </properties> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <configuration> + <excludes> + <!-- Trivial listing of classes to be loaded via SPI --> + <exclude>src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/BoundaryRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/BoundaryRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/BoundaryRdf4J.java new file mode 100644 index 0000000..50aeaa3 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/BoundaryRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class BoundaryRdf4J extends FunctionAdapter { + public BoundaryRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.Boundary()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/ConvexHullRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/ConvexHullRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/ConvexHullRdf4J.java new file mode 100644 index 0000000..1e7cab1 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/ConvexHullRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class ConvexHullRdf4J extends FunctionAdapter { + public ConvexHullRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.ConvexHull()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DifferenceRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DifferenceRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DifferenceRdf4J.java new file mode 100644 index 0000000..7cea562 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DifferenceRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class DifferenceRdf4J extends FunctionAdapter { + public DifferenceRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.Difference()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DistanceRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DistanceRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DistanceRdf4J.java new file mode 100644 index 0000000..22d7af5 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/DistanceRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class DistanceRdf4J extends FunctionAdapter { + public DistanceRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.Distance()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhContainsRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhContainsRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhContainsRdf4J.java new file mode 100644 index 0000000..78f102d --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhContainsRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EhContainsRdf4J extends FunctionAdapter { + public EhContainsRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhContains()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoveredByRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoveredByRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoveredByRdf4J.java new file mode 100644 index 0000000..2164f17 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoveredByRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EhCoveredByRdf4J extends FunctionAdapter { + public EhCoveredByRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhCoveredBy()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoversRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoversRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoversRdf4J.java new file mode 100644 index 0000000..87c8ade --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhCoversRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EhCoversRdf4J extends FunctionAdapter { + public EhCoversRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhCovers()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhDisjointRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhDisjointRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhDisjointRdf4J.java new file mode 100644 index 0000000..5663af2 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhDisjointRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EhDisjointRdf4J extends FunctionAdapter { + public EhDisjointRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhDisjoint()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhInsideRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhInsideRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhInsideRdf4J.java new file mode 100644 index 0000000..de949c2 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhInsideRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EhInsideRdf4J extends FunctionAdapter { + public EhInsideRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhInside()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhMeetRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhMeetRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhMeetRdf4J.java new file mode 100644 index 0000000..9166374 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhMeetRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EhMeetRdf4J extends FunctionAdapter { + public EhMeetRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhMeet()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhOverlapRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhOverlapRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhOverlapRdf4J.java new file mode 100644 index 0000000..285cb39 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EhOverlapRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EhOverlapRdf4J extends FunctionAdapter { + public EhOverlapRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.EhOverlap()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EnvelopeRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EnvelopeRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EnvelopeRdf4J.java new file mode 100644 index 0000000..96481ca --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/EnvelopeRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class EnvelopeRdf4J extends FunctionAdapter { + public EnvelopeRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.Envelope()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/FunctionAdapter.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/FunctionAdapter.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/FunctionAdapter.java new file mode 100644 index 0000000..cf9dfef --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/FunctionAdapter.java @@ -0,0 +1,100 @@ +/* + * 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. + */ +package org.apache.rya.indexing.pcj.functions.geo; + +import org.eclipse.rdf4j.model.IRI; +import org.openrdf.model.Literal; +import org.openrdf.model.Value; +import org.openrdf.model.ValueFactory; +import org.openrdf.model.impl.BooleanLiteralImpl; +import org.openrdf.model.impl.URIImpl; +import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException; +import org.openrdf.query.algebra.evaluation.function.Function; + +/** + * Make a RDF4J Function look like an openRDF Function. + */ +class FunctionAdapter implements Function { + private org.eclipse.rdf4j.query.algebra.evaluation.function.Function theRdf4JFunction; + + FunctionAdapter(org.eclipse.rdf4j.query.algebra.evaluation.function.Function theRdf4JFunction) { + this.theRdf4JFunction = theRdf4JFunction; + } + + @Override + public String getURI() { + return theRdf4JFunction.getURI(); + } + + @Override + public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException { + System.out.println("Evaluate: Valuefactory=" + valueFactory); + // need a Adapter for org.eclipse.rdf4j.model.ValueFactory + org.eclipse.rdf4j.model.ValueFactory rdf4jValueFactory = org.eclipse.rdf4j.model.impl.SimpleValueFactory.getInstance(); + // org.eclipse.rdf4j.model.ValueFactory rdf4jValueFactory = new ValueFactoryAdapter(valueFactory); + org.eclipse.rdf4j.model.Value rdf4jArgs[] = new org.eclipse.rdf4j.model.Value[args.length]; + for (int i = 0; i < args.length; i++) { + Value v = args[i]; + rdf4jArgs[i] = adaptValue(v, rdf4jValueFactory); + // System.out.println("Evaluate: Value[" + i + "]=" + v); + } + org.eclipse.rdf4j.model.Value v = theRdf4JFunction.evaluate(rdf4jValueFactory, rdf4jArgs); + if (v instanceof org.eclipse.rdf4j.model.impl.BooleanLiteral) + return valueFactory.createLiteral(((org.eclipse.rdf4j.model.impl.BooleanLiteral) v).booleanValue()); + else if (v instanceof org.eclipse.rdf4j.model.Literal) { + org.eclipse.rdf4j.model.Literal vLiteral = (org.eclipse.rdf4j.model.Literal) v; + org.openrdf.model.URI vType = valueFactory.createURI(vLiteral.getDatatype().stringValue()); + org.openrdf.model.Literal theReturnValue = valueFactory.createLiteral(vLiteral.getLabel(), vType); + System.out.println("Function RETURNS:" + theReturnValue + " class:" + theReturnValue.getClass() + " rdf4j=" + v + " class:" + v.getClass()); + return theReturnValue; + } + // + else + throw new Error("Evaluate returned unsupported value, must be a Literal or boolean literal. value=" + v); + } + + /** + * Convert from OpenRDF to rdf4j value used by Geo Functions. + * + * @param value + * Must be a URIImpl, Literal or a BooleanLiteralImpl, or throws error. Ignores language. + * @param rdf4jValueFactory + * @return an rdf4j Literal copied from the input + */ + public org.eclipse.rdf4j.model.Value adaptValue(Value value, org.eclipse.rdf4j.model.ValueFactory rdf4jValueFactory) { + if (value instanceof URIImpl) { + URIImpl uri = (URIImpl) value; + return rdf4jValueFactory.createIRI(uri.stringValue()); + } else if (!(value instanceof Literal)) { + throw new UnsupportedOperationException("Not supported, value must be literal type, it was: " + value.getClass() + " value=" + value); + } + if (value instanceof BooleanLiteralImpl) { + BooleanLiteralImpl bl = (BooleanLiteralImpl) value; + if (bl.booleanValue()) + return org.eclipse.rdf4j.model.impl.BooleanLiteral.TRUE; + else + return org.eclipse.rdf4j.model.impl.BooleanLiteral.FALSE; + } + final Literal literalValue = (Literal) value; + org.eclipse.rdf4j.model.ValueFactory vf = org.eclipse.rdf4j.model.impl.SimpleValueFactory.getInstance(); + final String label = literalValue.getLabel(); + final IRI datatype = vf.createIRI(literalValue.getDatatype().stringValue()); + return vf.createLiteral(label, datatype); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/IntersectionRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/IntersectionRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/IntersectionRdf4J.java new file mode 100644 index 0000000..a27e211 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/IntersectionRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class IntersectionRdf4J extends FunctionAdapter { + public IntersectionRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.Intersection()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8DCRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8DCRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8DCRdf4J.java new file mode 100644 index 0000000..aa68493 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8DCRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RCC8DCRdf4J extends FunctionAdapter { + public RCC8DCRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8DC()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8ECRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8ECRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8ECRdf4J.java new file mode 100644 index 0000000..edda67c --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8ECRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RCC8ECRdf4J extends FunctionAdapter { + public RCC8ECRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8EC()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPIRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPIRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPIRdf4J.java new file mode 100644 index 0000000..d715656 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPIRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RCC8NTPPIRdf4J extends FunctionAdapter { + public RCC8NTPPIRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8NTPPI()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPRdf4J.java new file mode 100644 index 0000000..baddacb --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8NTPPRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RCC8NTPPRdf4J extends FunctionAdapter { + public RCC8NTPPRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8NTPP()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8PORdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8PORdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8PORdf4J.java new file mode 100644 index 0000000..f93cb78 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8PORdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RCC8PORdf4J extends FunctionAdapter { + public RCC8PORdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8PO()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPIRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPIRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPIRdf4J.java new file mode 100644 index 0000000..090b827 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPIRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RCC8TPPIRdf4J extends FunctionAdapter { + public RCC8TPPIRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8TPPI()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPRdf4J.java new file mode 100644 index 0000000..124e0fa --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RCC8TPPRdf4J extends FunctionAdapter { + public RCC8TPPRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8TPP()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RelateRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RelateRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RelateRdf4J.java new file mode 100644 index 0000000..00046fd --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RelateRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class RelateRdf4J extends FunctionAdapter { + public RelateRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.Relate()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfContainsRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfContainsRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfContainsRdf4J.java new file mode 100644 index 0000000..cb9dedb --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfContainsRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SfContainsRdf4J extends FunctionAdapter { + public SfContainsRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfContains()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfCrossesRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfCrossesRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfCrossesRdf4J.java new file mode 100644 index 0000000..9038f8d --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfCrossesRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SfCrossesRdf4J extends FunctionAdapter { + public SfCrossesRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfCrosses()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfDisjointRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfDisjointRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfDisjointRdf4J.java new file mode 100644 index 0000000..fa3118f --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfDisjointRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SfDisjointRdf4J extends FunctionAdapter { + public SfDisjointRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfDisjoint()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfIntersectsRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfIntersectsRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfIntersectsRdf4J.java new file mode 100644 index 0000000..7e0b901 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfIntersectsRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SfIntersectsRdf4J extends FunctionAdapter { + public SfIntersectsRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfIntersects()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfOverlapsRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfOverlapsRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfOverlapsRdf4J.java new file mode 100644 index 0000000..0392de3 --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfOverlapsRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SfOverlapsRdf4J extends FunctionAdapter { + public SfOverlapsRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfOverlaps()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfTouchesRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfTouchesRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfTouchesRdf4J.java new file mode 100644 index 0000000..60754ce --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfTouchesRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SfTouchesRdf4J extends FunctionAdapter { + public SfTouchesRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfTouches()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfWithinRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfWithinRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfWithinRdf4J.java new file mode 100644 index 0000000..0a3283b --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SfWithinRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SfWithinRdf4J extends FunctionAdapter { + public SfWithinRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SfWithin()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3917471b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SymmetricDifferenceRdf4J.java ---------------------------------------------------------------------- diff --git a/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SymmetricDifferenceRdf4J.java b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SymmetricDifferenceRdf4J.java new file mode 100644 index 0000000..ede5dad --- /dev/null +++ b/extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/SymmetricDifferenceRdf4J.java @@ -0,0 +1,26 @@ +/* + * 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. + */ + +package org.apache.rya.indexing.pcj.functions.geo; + +public class SymmetricDifferenceRdf4J extends FunctionAdapter { + public SymmetricDifferenceRdf4J() { + super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.SymmetricDifference()); + } +}
