http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/extras/tinkerpop.rya/src/test/groovy/mvm/rya/blueprints/sail/RyaSailVertexSequenceTest.groovy ---------------------------------------------------------------------- diff --git a/extras/tinkerpop.rya/src/test/groovy/mvm/rya/blueprints/sail/RyaSailVertexSequenceTest.groovy b/extras/tinkerpop.rya/src/test/groovy/mvm/rya/blueprints/sail/RyaSailVertexSequenceTest.groovy deleted file mode 100644 index c661350..0000000 --- a/extras/tinkerpop.rya/src/test/groovy/mvm/rya/blueprints/sail/RyaSailVertexSequenceTest.groovy +++ /dev/null @@ -1,100 +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. - */ - -package mvm.rya.blueprints.sail - -import mvm.rya.api.utils.IteratorWrapper -import junit.framework.TestCase -import mvm.rya.blueprints.config.RyaGraphConfiguration -import org.openrdf.model.Statement -import static mvm.rya.accumulo.mr.utils.MRUtils.* -import static mvm.rya.api.RdfCloudTripleStoreConstants.VALUE_FACTORY - -/** - * Date: 5/10/12 - * Time: 8:55 AM - */ -class RyaSailVertexSequenceTest extends TestCase { - - public void testDistinctSubjects() { - def namespace = "urn:test#" - def vf = VALUE_FACTORY - def graph = RyaGraphConfiguration.createGraph( - [(AC_INSTANCE_PROP): "inst", - (AC_MOCK_PROP): "true", - (AC_USERNAME_PROP): "user", - (AC_PWD_PROP): "pwd", - ] - ); - - def a = vf.createURI(namespace, "a") - def b = vf.createURI(namespace, "b") - def c = vf.createURI(namespace, "c") - def statements = [ - vf.createStatement(a, vf.createURI(namespace, "p"), vf.createURI(namespace, "l1")), - vf.createStatement(a, vf.createURI(namespace, "p"), vf.createURI(namespace, "l2")), - vf.createStatement(a, vf.createURI(namespace, "p"), vf.createURI(namespace, "l3")), - vf.createStatement(b, vf.createURI(namespace, "p"), vf.createURI(namespace, "l1")), - vf.createStatement(c, vf.createURI(namespace, "p"), vf.createURI(namespace, "l1")), - vf.createStatement(c, vf.createURI(namespace, "p"), vf.createURI(namespace, "l2")), - vf.createStatement(c, vf.createURI(namespace, "p"), vf.createURI(namespace, "l3")), - ] - def edgeSeq = new RyaSailEdgeSequence(new IteratorWrapper<Statement>(statements.iterator()), graph) - def vertexSeq = new RyaSailVertexSequence(edgeSeq) - def expectedList = [a, b, c] - def list = vertexSeq.toList().collect { v -> - v.getRawVertex() - } - assertEquals(expectedList, list) - } - - public void testDistinctObjects() { - def namespace = "urn:test#" - def vf = VALUE_FACTORY - def graph = RyaGraphConfiguration.createGraph( - [(AC_INSTANCE_PROP): "inst", - (AC_MOCK_PROP): "true", - (AC_USERNAME_PROP): "user", - (AC_PWD_PROP): "pwd", - ] - ); - def a = vf.createURI(namespace, "a") - def b = vf.createURI(namespace, "b") - def c = vf.createURI(namespace, "c") - def l1 = vf.createURI(namespace, "l1") - def l2 = vf.createURI(namespace, "l2") - def l3 = vf.createURI(namespace, "l3") - def statements = [ - vf.createStatement(a, vf.createURI(namespace, "p"), l1), - vf.createStatement(b, vf.createURI(namespace, "p"), l1), - vf.createStatement(c, vf.createURI(namespace, "p"), l1), - vf.createStatement(a, vf.createURI(namespace, "p"), l2), - vf.createStatement(c, vf.createURI(namespace, "p"), l2), - vf.createStatement(a, vf.createURI(namespace, "p"), l3), - vf.createStatement(c, vf.createURI(namespace, "p"), l3), - ] - def edgeSeq = new RyaSailEdgeSequence(new IteratorWrapper<Statement>(statements.iterator()), graph) - def vertexSeq = new RyaSailVertexSequence(edgeSeq, RyaSailVertexSequence.VERTEXSIDE.OBJECT) - def expectedList = [l1, l2, l3] - def list = vertexSeq.toList().collect { v -> - v.getRawVertex() - } - assertEquals(expectedList, list) - } -}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/extras/tinkerpop.rya/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/extras/tinkerpop.rya/src/test/resources/log4j.properties b/extras/tinkerpop.rya/src/test/resources/log4j.properties deleted file mode 100644 index 598d7b5..0000000 --- a/extras/tinkerpop.rya/src/test/resources/log4j.properties +++ /dev/null @@ -1,19 +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. - - - http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya.console/pom.xml ---------------------------------------------------------------------- diff --git a/osgi/alx.rya.console/pom.xml b/osgi/alx.rya.console/pom.xml deleted file mode 100644 index 9f5020c..0000000 --- a/osgi/alx.rya.console/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?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"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya.osgi</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>alx.rya.console</artifactId> - <name>Apache Rya ALX Console</name> - - <packaging>bundle</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.rya</groupId> - <artifactId>rya.api</artifactId> - </dependency> - - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-repository-api</artifactId> - </dependency> - <dependency> - <groupId>org.apache.karaf.shell</groupId> - <artifactId>org.apache.karaf.shell.console</artifactId> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/AbstractRyaCommand.java ---------------------------------------------------------------------- diff --git a/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/AbstractRyaCommand.java b/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/AbstractRyaCommand.java deleted file mode 100644 index 7fada66..0000000 --- a/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/AbstractRyaCommand.java +++ /dev/null @@ -1,58 +0,0 @@ -package mvm.rya.alx.command; - -/* - * 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 mvm.rya.api.persist.RyaDAO; -import org.apache.karaf.shell.console.OsgiCommandSupport; -import org.openrdf.repository.Repository; -import org.osgi.util.tracker.ServiceTracker; - -public abstract class AbstractRyaCommand extends OsgiCommandSupport { - - protected Repository repository; - protected RyaDAO rdfDAO; - - @Override - protected Object doExecute() throws Exception { - ServiceTracker serviceTracker = new ServiceTracker(getBundleContext(), Repository.class.getName(), null); - serviceTracker.open(); - repository = (Repository) serviceTracker.getService(); - serviceTracker.close(); - if (repository == null) { - System.out.println("Sail Repository not available"); - return null; - } - - serviceTracker = new ServiceTracker(getBundleContext(), RyaDAO.class.getName(), null); - serviceTracker.open(); - rdfDAO = (RyaDAO) serviceTracker.getService(); - serviceTracker.close(); - if (rdfDAO == null) { - System.out.println("Rdf DAO not available"); - return null; - } - - return doRyaExecute(); - } - - protected abstract Object doRyaExecute() throws Exception; -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/GetStatementsRyaCommand.java ---------------------------------------------------------------------- diff --git a/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/GetStatementsRyaCommand.java b/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/GetStatementsRyaCommand.java deleted file mode 100644 index 658f3fc..0000000 --- a/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/GetStatementsRyaCommand.java +++ /dev/null @@ -1,80 +0,0 @@ -package mvm.rya.alx.command; - -/* - * 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.felix.gogo.commands.Command; -import org.apache.felix.gogo.commands.Option; -import org.openrdf.model.Resource; -import org.openrdf.model.Statement; -import org.openrdf.model.URI; -import org.openrdf.repository.RepositoryConnection; -import org.openrdf.repository.RepositoryResult; - -import static mvm.rya.api.RdfCloudTripleStoreUtils.*; - -/** - * Date: 5/16/12 - * Time: 1:23 PM - */ -@Command(scope = "rya", name = "getstatements", description = "Print statements to screen based on triple pattern") -public class GetStatementsRyaCommand extends AbstractRyaCommand { - @Option(name = "-s", aliases = {"--subject"}, description = "Subject of triple pattern", required = false, multiValued = false) - private String subject; - @Option(name = "-p", aliases = {"--predicate"}, description = "Predicate of triple pattern", required = false, multiValued = false) - private String predicate; - @Option(name = "-o", aliases = {"--object"}, description = "Object of triple pattern", required = false, multiValued = false) - private String object; - @Option(name = "-c", aliases = {"--context"}, description = "Context of triple pattern", required = false, multiValued = false) - private String context; - - @Override - protected Object doRyaExecute() throws Exception { - if (subject == null && predicate == null && object == null && context == null) { - System.out.println("Please specify subject|predicate|object|context"); - return null; - } - - System.out.println(subject); - System.out.println(predicate); - System.out.println(object); - System.out.println(context); - RepositoryConnection connection = null; - try { - connection = repository.getConnection(); - RepositoryResult<Statement> statements = connection.getStatements( - (subject != null) ? (Resource) createValue(subject) : null, - (predicate != null) ? (URI) createValue(predicate) : null, - (object != null) ? createValue(object) : null, - false, - (context != null) ? new Resource[]{(Resource) createValue(context)} : new Resource[0]); - while(statements.hasNext()) { - System.out.println(statements.next()); - } - statements.close(); - } finally { - if (connection != null) { - connection.close(); - } - } - return null; - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/InfoRyaCommand.java ---------------------------------------------------------------------- diff --git a/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/InfoRyaCommand.java b/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/InfoRyaCommand.java deleted file mode 100644 index 19b002f..0000000 --- a/osgi/alx.rya.console/src/main/java/mvm/rya/alx/command/InfoRyaCommand.java +++ /dev/null @@ -1,46 +0,0 @@ -package mvm.rya.alx.command; - -/* - * 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 mvm.rya.api.RdfCloudTripleStoreConfiguration; -import org.apache.felix.gogo.commands.Command; - -import java.util.Map; - -/** - * Date: 5/16/12 - * Time: 11:04 AM - */ -@Command(scope = "rya", name = "info", description = "Displays information about the running Rya instance") -public class InfoRyaCommand extends AbstractRyaCommand { - - @Override - protected Object doRyaExecute() throws Exception { - System.out.println("******************RYA Configuration******************"); - RdfCloudTripleStoreConfiguration conf = rdfDAO.getConf(); - for (Map.Entry<String, String> next : conf) { - System.out.println(next.getKey() + ":\t\t" + next.getValue()); - } - System.out.println("*****************************************************"); - return null; - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya.console/src/main/resources/OSGI-INF/blueprint/alx.rya.console-blueprint.xml ---------------------------------------------------------------------- diff --git a/osgi/alx.rya.console/src/main/resources/OSGI-INF/blueprint/alx.rya.console-blueprint.xml b/osgi/alx.rya.console/src/main/resources/OSGI-INF/blueprint/alx.rya.console-blueprint.xml deleted file mode 100644 index 129e9c7..0000000 --- a/osgi/alx.rya.console/src/main/resources/OSGI-INF/blueprint/alx.rya.console-blueprint.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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. ---> - -<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" - xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"> - - <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.0.0"> - <command name="rya/info"> - <action class="mvm.rya.alx.command.InfoRyaCommand"/> - </command> - <command name="rya/getstatements"> - <action class="mvm.rya.alx.command.GetStatementsRyaCommand"/> - </command> - </command-bundle> - -</blueprint> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya/pom.xml ---------------------------------------------------------------------- diff --git a/osgi/alx.rya/pom.xml b/osgi/alx.rya/pom.xml deleted file mode 100644 index e2ca105..0000000 --- a/osgi/alx.rya/pom.xml +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version='1.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. ---> - -<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/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya.osgi</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>alx.rya</artifactId> - <name>Apache Rya ALX</name> - - <packaging>bundle</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.rya</groupId> - <artifactId>accumulo.rya</artifactId> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>${maven-bundle-plugin.version}</version> - <extensions>true</extensions> - <configuration> - <instructions> - <Import-Package>*,net.sf.cglib.proxy</Import-Package> - <DynamicImport-Package>*</DynamicImport-Package> - </instructions> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.7</version> - <executions> - <execution> - <id>attach-artifacts</id> - <phase>package</phase> - <goals> - <goal>attach-artifact</goal> - </goals> - <configuration> - <artifacts> - <artifact> - <file> - src/main/features/alx.rya-features.xml - </file> - <type>xml</type> - <classifier>features</classifier> - </artifact> - </artifacts> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya/src/main/features/alx.rya-features.xml ---------------------------------------------------------------------- diff --git a/osgi/alx.rya/src/main/features/alx.rya-features.xml b/osgi/alx.rya/src/main/features/alx.rya-features.xml deleted file mode 100644 index 9e36c33..0000000 --- a/osgi/alx.rya/src/main/features/alx.rya-features.xml +++ /dev/null @@ -1,104 +0,0 @@ -<?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. ---> - -<features name="alx.rya"> - <feature name='org.openrdf.sesame.runtime' version="2.6.4"> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-model/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-runtime/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-query/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryalgebra-model/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryparser-api/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryparser-serql/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryparser-sparql/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryresultio-api/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryresultio-binary/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryresultio-sparqljson/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryresultio-text/2.6.4</bundle> - <bundle>wrap:mvn:net.sf.opencsv/opencsv/2.0</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-api/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-manager/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-event/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-sail/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-memory/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-inferencer/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryalgebra-evaluation/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-sparql/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-http/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-http-client/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-dataset/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-contextaware/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-http-protocol/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-ntriples/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-api/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-binary/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-n3/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-trix/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-turtle/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-trig/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-api/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-nativerdf/2.6.4</bundle> - <!--bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-rdbms/2.6.4</bundle> - <bundle>wrap:mvn:commons-dbcp/commons-dbcp/1.3</bundle> - <bundle>wrap:mvn:commons-pool/commons-pool/1.3</bundle--> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-queryresultio-sparqlxml/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-util/2.6.4</bundle> - <bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-rdfxml/2.6.4</bundle> - </feature> - <feature name='tinkerpop.blueprints' version='1.2'> - <bundle>wrap:mvn:com.tinkerpop.blueprints/blueprints-core/1.2</bundle> - <bundle>mvn:org.codehaus.jettison/jettison/1.3</bundle> - <bundle>wrap:mvn:stax/stax-api/1.0.1</bundle> - <!--bundle>wrap:mvn:org.codehaus.jackson/jackson-jaxrs/1.8.5</bundle--> - <bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.8.5</bundle> - <bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.8.5</bundle> - </feature> - <feature name='rya.sail' version='3.0.4'> - <!--<feature version="[2.6,3.0)">org.openrdf.sesame.runtime</feature>--> - <feature version="1.2">tinkerpop.blueprints</feature> - <feature version="[10,12)">google.guava</feature> - <bundle>mvn:mvm.rya/sesame-runtime-osgi/2.6.4</bundle> - <bundle>wrap:mvn:mvm.rya/rya.api/3.0.4-SNAPSHOT</bundle> - <bundle>wrap:mvn:mvm.rya/rya.sail.impl/3.0.4-SNAPSHOT</bundle> - </feature> - <feature name="cloudbase.rya" version="3.0.4"> - <feature version="1.0.5">mvm.alx.connect.cloudbase.connect</feature> - <feature version="[10,12)">google.guava</feature> - <bundle>wrap:mvn:mvm.rya/cloudbase.rya/3.0.4-SNAPSHOT</bundle> - <bundle>wrap:mvn:mvm.rya/cloudbase.utils/1.0.1-SNAPSHOT</bundle> - </feature> - <feature name="accumulo.rya" version="3.0.4"> - <feature version="1.0.5">mvm.alx.accumulo.connect</feature> - <feature version="[10,12)">google.guava</feature> - <bundle>wrap:mvn:mvm.rya/accumulo.rya/3.0.4-SNAPSHOT</bundle> - </feature> - <feature name='alx.rya' version='3.0.4'> - <feature version="0.7.1">pax-web</feature> - <feature version="[10,12)">google.guava</feature> - <feature version="3.0.4">rya.sail</feature> - <feature version="3.0.4">accumulo.rya</feature> - <!--Ehcache should already be part of alx: net.sf.ehcache:ehcache-core:jar:1.7.1:compile--> - <bundle>mvn:mvm.rya/alx.rya/3.0.4-SNAPSHOT</bundle> - </feature> - <feature name='alx.rya.console' version='3.0.4'> - <feature version="3.0.4">alx.rya</feature> - <bundle>mvn:mvm.rya/alx.rya.console/3.0.4-SNAPSHOT</bundle> - </feature> -</features> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya/src/main/java/mvm/rya/alx/util/ConfigurationFactory.java ---------------------------------------------------------------------- diff --git a/osgi/alx.rya/src/main/java/mvm/rya/alx/util/ConfigurationFactory.java b/osgi/alx.rya/src/main/java/mvm/rya/alx/util/ConfigurationFactory.java deleted file mode 100644 index 849cf60..0000000 --- a/osgi/alx.rya/src/main/java/mvm/rya/alx/util/ConfigurationFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -package mvm.rya.alx.util; - -/* - * 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 mvm.rya.accumulo.AccumuloRdfConfiguration; -import mvm.rya.api.RdfCloudTripleStoreConfiguration; -import org.apache.hadoop.conf.Configuration; - -import java.util.Map; - -/** - */ -public class ConfigurationFactory { - private Map<String, String> properties; - - public RdfCloudTripleStoreConfiguration getConfiguration() { - RdfCloudTripleStoreConfiguration conf = new AccumuloRdfConfiguration(); - if (properties != null) { - for (Map.Entry<String, String> prop : properties.entrySet()) { - conf.set(prop.getKey(), prop.getValue()); - } - conf.setTablePrefix(conf.getTablePrefix()); - } - return conf; - } - - public Map<String, String> getProperties() { - return properties; - } - - public void setProperties(Map<String, String> properties) { - this.properties = properties; - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring-osgi.xml ---------------------------------------------------------------------- diff --git a/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring-osgi.xml b/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring-osgi.xml deleted file mode 100644 index 76f1bd3..0000000 --- a/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring-osgi.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version='1.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. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" - xmlns:osgix="http://www.springframework.org/schema/osgi-compendium" - xmlns:util="http://www.springframework.org/schema/util" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd - http://www.springframework.org/schema/util - http://www.springframework.org/schema/util/spring-util-2.0.xsd - http://www.springframework.org/schema/osgi-compendium - http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd"> - - <!-- Configuration Admin entry --> - <osgix:cm-properties id="alxProps" - persistent-id="mvm.rya.alx"> - <prop key="query.tblprefix">l_</prop> - <prop key="query.printqueryplan">true</prop> - </osgix:cm-properties> - - <osgi:reference id="logServiceOsgi" interface="org.osgi.service.log.LogService" - cardinality="1..1"/> - - <osgi:reference id="connectorServiceOsgi" - interface="org.apache.accumulo.core.client.Connector" cardinality="1..1"/> - - <!--<osgi:service ref="rootResourceMapping" auto-export="interfaces"/>--> - - <osgi:service ref="sailRepo" auto-export="interfaces"/> - <osgi:service ref="ryaDAO" auto-export="interfaces"/> - -</beans> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring.xml ---------------------------------------------------------------------- diff --git a/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring.xml b/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring.xml deleted file mode 100644 index 4ef9ac0..0000000 --- a/osgi/alx.rya/src/main/resources/META-INF/spring/alx.rya-spring.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version='1.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. ---> - -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:ctx="http://www.springframework.org/schema/context" - xmlns:osgix="http://www.springframework.org/schema/osgi-compendium" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/context - http://www.springframework.org/schema/context/spring-context.xsd - http://www.springframework.org/schema/osgi-compendium - http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd"> - - <!-- placeholder configurer --> - <ctx:property-placeholder properties-ref="alxProps" /> - - <bean id="configurationFactory" class="mvm.rya.alx.util.ConfigurationFactory"> - <osgix:managed-properties persistent-id="mvm.rya.alx" - update-strategy="bean-managed" update-method="setProperties" /> - </bean> - - <bean id="configuration" factory-bean="configurationFactory" - factory-method="getConfiguration"/> - - <bean id="rdfEval" class="mvm.rya.accumulo.AccumuloRdfEvalStatsDAO" init-method="init" destroy-method="destroy"> - <property name="connector" ref="connectorServiceOsgi"/> - <property name="conf" ref="configuration"/> - </bean> - - <bean id="ryaDAO" class="mvm.rya.accumulo.AccumuloRyaDAO"> - <property name="connector" ref="connectorServiceOsgi"/> - <property name="conf" ref="configuration"/> - </bean> - - <bean id="inferenceEngine" class="mvm.rya.rdftriplestore.inference.InferenceEngine"> - <property name="ryaDAO" ref="ryaDAO"/> - <property name="conf" ref="configuration"/> - </bean> - - <bean id="rts" class="mvm.rya.rdftriplestore.RdfCloudTripleStore"> - <property name="ryaDAO" ref="ryaDAO"/> - <property name="rdfEvalStatsDAO" ref="rdfEval"/> - <property name="inferenceEngine" ref="inferenceEngine"/> - <property name="conf" ref="configuration"/> - </bean> - - <bean id="sailRepo" class="mvm.rya.rdftriplestore.RyaSailRepository" init-method="initialize" destroy-method="shutDown"> - <constructor-arg ref="rts"/> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/alx.rya/src/main/resources/ROOT/crossdomain.xml ---------------------------------------------------------------------- diff --git a/osgi/alx.rya/src/main/resources/ROOT/crossdomain.xml b/osgi/alx.rya/src/main/resources/ROOT/crossdomain.xml deleted file mode 100644 index cec91f6..0000000 --- a/osgi/alx.rya/src/main/resources/ROOT/crossdomain.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.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. ---> - -<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> -<cross-domain-policy> - <allow-access-from domain="*" secure="false"/> -</cross-domain-policy> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/pom.xml ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/pom.xml b/osgi/camel.rya/pom.xml deleted file mode 100644 index ade8e03..0000000 --- a/osgi/camel.rya/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?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"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya.osgi</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>camel.rya</artifactId> - <name>Apache Rya Camel</name> - - <packaging>bundle</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.rya</groupId> - <artifactId>rya.sail</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-test</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.rya</groupId> - <artifactId>accumulo.rya</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailComponent.java ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailComponent.java b/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailComponent.java deleted file mode 100644 index 0bbc07c..0000000 --- a/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailComponent.java +++ /dev/null @@ -1,59 +0,0 @@ -package mvm.rya.camel.cbsail; - -/* - * 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.camel.Endpoint; -import org.apache.camel.impl.DefaultComponent; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.ValueFactoryImpl; -import org.openrdf.repository.Repository; -import org.openrdf.repository.sail.SailRepository; - -import java.util.Map; - -import static com.google.common.base.Preconditions.*; -/** - * Save and retrieve triples - */ -public class CbSailComponent extends DefaultComponent { - public static final String SAILREPONAME = "sailRepoName"; - - public static final String ENDPOINT_URI = "cbsail"; - public static final String SPARQL_QUERY_PROP = "cbsail.sparql"; - public static final String START_TIME_QUERY_PROP = "cbsail.startTime"; - public static final String TTL_QUERY_PROP = "cbsail.ttl"; - public static final ValueFactory valueFactory = new ValueFactoryImpl(); - - @Override - protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { - String sailRepoNameParam = Repository.class.getName(); - if (parameters.containsKey(sailRepoNameParam)) { - sailRepoNameParam = getAndRemoveParameter(parameters, SAILREPONAME, String.class); - } - Repository sailRepository = getCamelContext().getRegistry().lookup(sailRepoNameParam, Repository.class); - checkNotNull(sailRepository, "Sail Repository must exist within the camel registry. Using lookup name[" + sailRepoNameParam + "]"); - - CbSailEndpoint sailEndpoint = new CbSailEndpoint(uri, this, sailRepository, remaining); - setProperties(sailEndpoint, parameters); - return sailEndpoint; - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailEndpoint.java ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailEndpoint.java b/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailEndpoint.java deleted file mode 100644 index 4a89291..0000000 --- a/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailEndpoint.java +++ /dev/null @@ -1,119 +0,0 @@ -package mvm.rya.camel.cbsail; - -/* - * 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.camel.*; -import org.apache.camel.impl.DefaultEndpoint; -import org.openrdf.repository.Repository; - -import static com.google.common.base.Preconditions.*; - -/** - * setHeader(SPARQL, sqarlQuery).setHeader(TTL, ttl).to("cbsail:server?port=2181&user=user&pwd=pwd&instanceName=name").getBody(<Triple Map>) - */ -public class CbSailEndpoint extends DefaultEndpoint { - - - public enum CbSailOutput { - XML, BINARY - } - - private Long ttl; - private Repository sailRepository; - private String sparql; - private String tablePrefix; - private boolean infer = true; - private String queryOutput = CbSailOutput.BINARY.toString(); - - public CbSailEndpoint(String endpointUri, Component component, Repository sailRepository, String remaining) { - super(endpointUri, component); - this.sailRepository = sailRepository; - } - - protected void validate() { - checkNotNull(sailRepository); - } - - @Override - public Producer createProducer() throws Exception { - validate(); - return new CbSailProducer(this); - } - - @Override - public Consumer createConsumer(Processor processor) throws Exception { - throw new RuntimeCamelException((new StringBuilder()).append("Cannot consume from a CbSailEndpoint: ").append(getEndpointUri()).toString()); - } - - @Override - public boolean isSingleton() { - return true; - } - - public Long getTtl() { - return ttl; - } - - public void setTtl(Long ttl) { - this.ttl = ttl; - } - - public String getSparql() { - return sparql; - } - - public void setSparql(String sparql) { - this.sparql = sparql; - } - - public String getTablePrefix() { - return tablePrefix; - } - - public void setTablePrefix(String tablePrefix) { - this.tablePrefix = tablePrefix; - } - - public boolean isInfer() { - return infer; - } - - public void setInfer(boolean infer) { - this.infer = infer; - } - - public String getQueryOutput() { - return queryOutput; - } - - public void setQueryOutput(String queryOutput) { - this.queryOutput = queryOutput; - } - - public Repository getSailRepository() { - return sailRepository; - } - - public void setSailRepository(Repository sailRepository) { - this.sailRepository = sailRepository; - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailProducer.java ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailProducer.java b/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailProducer.java deleted file mode 100644 index ce3ff55..0000000 --- a/osgi/camel.rya/src/main/java/mvm/rya/camel/cbsail/CbSailProducer.java +++ /dev/null @@ -1,175 +0,0 @@ -package mvm.rya.camel.cbsail; - -/* - * 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.camel.Exchange; -import org.apache.camel.impl.DefaultProducer; -import org.openrdf.model.Statement; -import org.openrdf.query.*; -import org.openrdf.query.resultio.sparqlxml.SPARQLResultsXMLWriter; -import org.openrdf.repository.RepositoryConnection; -import org.openrdf.repository.RepositoryException; -import org.openrdf.rio.RDFHandlerException; - -import java.io.ByteArrayOutputStream; -import java.util.*; - -import static mvm.rya.api.RdfCloudTripleStoreConfiguration.*; -import static mvm.rya.camel.cbsail.CbSailComponent.SPARQL_QUERY_PROP; -import static mvm.rya.camel.cbsail.CbSailComponent.valueFactory; - -/** - */ -public class CbSailProducer extends DefaultProducer { - - private RepositoryConnection connection; - - private CbSailEndpoint.CbSailOutput queryOutput = CbSailEndpoint.CbSailOutput.BINARY; - - public CbSailProducer(CbSailEndpoint endpoint) { - super(endpoint); - } - - @Override - public void process(final Exchange exchange) throws Exception { - //If a query is set in the header or uri, use it - Collection<String> queries = new ArrayList<String>(); - Collection tmp = exchange.getIn().getHeader(SPARQL_QUERY_PROP, Collection.class); - if (tmp != null) { - queries = tmp; - } else { - String query = exchange.getIn().getHeader(SPARQL_QUERY_PROP, String.class); - if (query != null) { - queries.add(query); - } - } - - if (queries.size() > 0) - sparqlQuery(exchange, queries); - else - inputTriples(exchange); - } - - protected void inputTriples(Exchange exchange) throws RepositoryException { - Object body = exchange.getIn().getBody(); - if (body instanceof Statement) { - //save statement - inputStatement((Statement) body); - } else if (body instanceof List) { - //save list of statements - List lst = (List) body; - for (Object obj : lst) { - if (obj instanceof Statement) - inputStatement((Statement) obj); - } - } - connection.commit(); - exchange.getOut().setBody(Boolean.TRUE); - } - - protected void inputStatement(Statement stmt) throws RepositoryException { - connection.add(stmt.getSubject(), stmt.getPredicate(), stmt.getObject()); - } - - protected void sparqlQuery(Exchange exchange, Collection<String> queries) throws RepositoryException, MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, RDFHandlerException { - - List list = new ArrayList(); - for (String query : queries) { - -// Long startTime = exchange.getIn().getHeader(START_TIME_QUERY_PROP, Long.class); -// Long ttl = exchange.getIn().getHeader(TTL_QUERY_PROP, Long.class); - String auth = exchange.getIn().getHeader(CONF_QUERY_AUTH, String.class); - Boolean infer = exchange.getIn().getHeader(CONF_INFER, Boolean.class); - - Object output = performSelect(query, auth, infer); - if (queries.size() == 1) { - exchange.getOut().setBody(output); - return; - } else - list.add(output); - - } - exchange.getOut().setBody(list); - } - - protected Object performSelect(String query, String auth, Boolean infer) throws RepositoryException, MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException { - TupleQuery tupleQuery = connection.prepareTupleQuery( - QueryLanguage.SPARQL, query); - if (auth != null && auth.length() > 0) - tupleQuery.setBinding(CONF_QUERY_AUTH, valueFactory.createLiteral(auth)); - if (infer != null) - tupleQuery.setBinding(CONF_INFER, valueFactory.createLiteral(infer)); - if (CbSailEndpoint.CbSailOutput.BINARY.equals(queryOutput)) { - final List listOutput = new ArrayList(); - TupleQueryResultHandlerBase handler = new TupleQueryResultHandlerBase() { - @Override - public void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException { - Map<String, String> map = new HashMap<String, String>(); - for (String s : bindingSet.getBindingNames()) { - map.put(s, bindingSet.getBinding(s).getValue().stringValue()); - } - listOutput.add(map); - } - }; - tupleQuery.evaluate(handler); - return listOutput; - } else if (CbSailEndpoint.CbSailOutput.XML.equals(queryOutput)) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - SPARQLResultsXMLWriter sparqlWriter = new SPARQLResultsXMLWriter(baos); - tupleQuery.evaluate(sparqlWriter); - return new String(baos.toByteArray()); - } else { - throw new IllegalArgumentException("Query Output[" + queryOutput + "] is not recognized"); - } - } - -// protected Object performConstruct(String query, Long ttl, Long startTime) throws RepositoryException, MalformedQueryException, QueryEvaluationException, TupleQueryResultHandlerException, RDFHandlerException { -// GraphQuery tupleQuery = connection.prepareGraphQuery( -// QueryLanguage.SPARQL, query); -// if (ttl != null && ttl > 0) -// tupleQuery.setBinding("ttl", valueFactory.createLiteral(ttl)); -// if (startTime != null && startTime > 0) -// tupleQuery.setBinding("startTime", valueFactory.createLiteral(startTime)); -// if (CbSailEndpoint.CbSailOutput.BINARY.equals(queryOutput)) { -// throw new IllegalArgumentException("In Graph Construct mode, cannot return Java object"); -// } else if (CbSailEndpoint.CbSailOutput.XML.equals(queryOutput)) { -// ByteArrayOutputStream baos = new ByteArrayOutputStream(); -// RDFXMLWriter rdfWriter = new RDFXMLWriter(baos); -// tupleQuery.evaluate(rdfWriter); -// return new String(baos.toByteArray()); -// } else { -// throw new IllegalArgumentException("Query Output[" + queryOutput + "] is not recognized"); -// } -// } - - - @Override - protected void doStart() throws Exception { - CbSailEndpoint cbSailEndpoint = (CbSailEndpoint) getEndpoint(); - connection = cbSailEndpoint.getSailRepository().getConnection(); - } - - @Override - protected void doStop() throws Exception { - connection.close(); - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/src/main/resources/META-INF/services/org/apache/camel/component/cbsail ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/src/main/resources/META-INF/services/org/apache/camel/component/cbsail b/osgi/camel.rya/src/main/resources/META-INF/services/org/apache/camel/component/cbsail deleted file mode 100644 index 69cfb2d..0000000 --- a/osgi/camel.rya/src/main/resources/META-INF/services/org/apache/camel/component/cbsail +++ /dev/null @@ -1 +0,0 @@ -class=mvm.rya.camel.cbsail.CbSailComponent \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailIntegrationTest.java ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailIntegrationTest.java b/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailIntegrationTest.java deleted file mode 100644 index d4f53da..0000000 --- a/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailIntegrationTest.java +++ /dev/null @@ -1,117 +0,0 @@ -package mvm.rya.camel.cbsail; - -/* - * 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 mvm.rya.camel.cbsail.CbSailComponent; -import org.apache.camel.EndpointInject; -import org.apache.camel.Exchange; -import org.apache.camel.Processor; -import org.apache.camel.ProducerTemplate; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.test.CamelTestSupport; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.ValueFactoryImpl; - -import java.util.HashMap; - -public class CbSailIntegrationTest extends CamelTestSupport { - - @EndpointInject(uri = "cbsail:tquery?server=stratus13&port=2181&user=root&pwd=password&instanceName=stratus") - ProducerTemplate producer; - - public void testCbSail() throws Exception { - String underGradInfo = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" + - " PREFIX ub: <urn:test:onto:univ#>" + - " SELECT * WHERE" + - " {" + - " <http://www.Department0.University0.edu/UndergraduateStudent600> ?pred ?obj ." + - " }"; - HashMap map = new HashMap(); - map.put(CbSailComponent.SPARQL_QUERY_PROP, underGradInfo); - map.put(CbSailComponent.START_TIME_QUERY_PROP, 0l); - map.put(CbSailComponent.TTL_QUERY_PROP, 86400000l); - Object o = producer.requestBodyAndHeaders(null, map); - System.out.println(o); - Thread.sleep(100000); - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - - @Override - public void configure() throws Exception { - ValueFactory vf = new ValueFactoryImpl(); - String underGradInfo = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" + - " PREFIX ub: <urn:test:onto:univ#>" + - " SELECT * WHERE" + - " {" + - " <http://www.Department0.University0.edu/UndergraduateStudent60> ?pred ?obj ." + - " }"; - String rawEvents = "PREFIX nh: <http://mvm.com/2011/02/nh#>\n" + - " SELECT * WHERE\n" + - " {\n" + - " ?uuid nh:timestamp ?timestamp.\n" + - " ?uuid nh:site ?site;\n" + - " nh:system ?system;\n" + - " nh:dataSupplier ?dataSupplier;\n" + - " nh:dataType ?dataType;\n" + - " <http://mvm.com/2011/02/nh#count> ?data.\n" + - " } LIMIT 100"; - String latestModels = "PREFIX nh: <http://mvm.com/rdf/2011/02/model#>" + - " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>" + - " SELECT * WHERE" + - " {" + - " ?modelUuid nh:dayOfWeek \"5\";" + - " nh:hourOfDay \"3\";" + - " nh:timestamp ?timestamp;" + -// " FILTER (xsd:integer(?timestamp) > 1297652964633)." + - " nh:dataProperty \"count\";" + - " nh:modelType \"mvm.learning.tpami.SimpleGaussianMMModel\";" + - " nh:site ?site;" + - " nh:dataSupplier ?dataSupplier;" + - " nh:system ?system;" + - " nh:dataType ?dataType;" + - " nh:model ?model;" + - " nh:key ?key." + - " }"; - - from("timer://foo?fixedRate=true&period=60000"). - setHeader(CbSailComponent.SPARQL_QUERY_PROP, constant(underGradInfo)). -// setBody(constant(new StatementImpl(vf.createURI("http://www.Department0.University0.edu/UndergraduateStudent610"), vf.createURI("urn:test:onto:univ#testPred"), vf.createLiteral("test")))). - to("cbsail:tquery?server=stratus13&port=2181&user=root&pwd=password&instanceName=stratus&queryOutput=XML" + -// "&ttl=259200000" -// + "&sparql=" + latestModels" + - "").process(new Processor() { - - @Override - public void process(Exchange exchange) throws Exception { - System.out.println(exchange.getIn().getBody()); -// if (body != null) -// System.out.println(body.size()); - } - }).end(); - } - }; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailPojoMain.java ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailPojoMain.java b/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailPojoMain.java deleted file mode 100644 index ddb056e..0000000 --- a/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailPojoMain.java +++ /dev/null @@ -1,45 +0,0 @@ -package mvm.rya.camel.cbsail; - -/* - * 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 mvm.rya.camel.cbsail.CbSailComponent; -import org.apache.camel.EndpointInject; -import org.apache.camel.ProducerTemplate; - -/** - * Class CbSailPojoMain - * Date: May 3, 2011 - * Time: 11:20:23 PM - */ -public class CbSailPojoMain { - - @EndpointInject(uri = "cbsail:tquery?server=stratus13&port=2181&user=root&pwd=password&instanceName=stratus") - ProducerTemplate producer; - - public void executeQuery(String sparql) { - Object o = producer.requestBodyAndHeader(null, CbSailComponent.SPARQL_QUERY_PROP, sparql); - System.out.println(o); - } - - public static void main(String[] args) { - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailTest.java ---------------------------------------------------------------------- diff --git a/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailTest.java b/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailTest.java deleted file mode 100644 index c52d094..0000000 --- a/osgi/camel.rya/src/test/java/mvm/rya/camel/cbsail/CbSailTest.java +++ /dev/null @@ -1,205 +0,0 @@ -package mvm.rya.camel.cbsail; - -/* - * 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 mvm.rya.accumulo.AccumuloRdfConfiguration; -import mvm.rya.accumulo.AccumuloRyaDAO; -import mvm.rya.api.RdfCloudTripleStoreConfiguration; -import mvm.rya.api.RdfCloudTripleStoreConstants; -import mvm.rya.rdftriplestore.RdfCloudTripleStore; -import mvm.rya.rdftriplestore.RyaSailRepository; -import mvm.rya.rdftriplestore.inference.InferenceEngine; -import mvm.rya.rdftriplestore.namespace.NamespaceManager; -import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.Instance; -import org.apache.accumulo.core.client.mock.MockInstance; -import org.apache.camel.EndpointInject; -import org.apache.camel.Produce; -import org.apache.camel.ProducerTemplate; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.impl.JndiRegistry; -import org.apache.camel.test.CamelTestSupport; -import org.openrdf.model.Statement; -import org.openrdf.model.URI; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.StatementImpl; -import org.openrdf.repository.Repository; -import org.openrdf.repository.RepositoryConnection; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - */ -public class CbSailTest extends CamelTestSupport { - - static String litdupsNS = "urn:test:litdups#"; - - private RdfCloudTripleStore store; - private Repository repository; - private ValueFactory vf = RdfCloudTripleStoreConstants.VALUE_FACTORY; - - @EndpointInject(uri = "mock:results") - protected MockEndpoint resultEndpoint; - - @Produce(uri = "direct:query") - protected ProducerTemplate template; - - @Override - public void setUp() throws Exception { - super.setUp(); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - repository.shutDown(); - } - - @Override - protected JndiRegistry createRegistry() throws Exception { - store = new MockRdfCloudStore(); -// store.setDisplayQueryPlan(true); -// store.setInferencing(false); - NamespaceManager nm = new NamespaceManager(store.getRyaDAO(), store.getConf()); - store.setNamespaceManager(nm); - repository = new RyaSailRepository(store); - repository.initialize(); - - JndiRegistry registry = super.createRegistry(); - registry.bind(Repository.class.getName(), repository); - return registry; - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - - @Override - public void configure() throws Exception { - from("direct:query"). - to("cbsail:queryEndpoint"). - to("mock:results"); - } - }; - } - - public void testSimpleQuery() throws Exception { - RepositoryConnection conn = repository.getConnection(); - URI cpu = vf.createURI(litdupsNS, "cpu"); - URI loadPerc = vf.createURI(litdupsNS, "loadPerc"); - URI uri1 = vf.createURI(litdupsNS, "uri1"); - conn.add(cpu, loadPerc, uri1); - conn.commit(); - conn.close(); - - resultEndpoint.expectedMessageCount(1); - - //query through camel - String query = "select * where {" + - "<" + cpu.toString() + "> ?p ?o1." + - "}"; - template.sendBodyAndHeader(null, CbSailComponent.SPARQL_QUERY_PROP, query); - - assertMockEndpointsSatisfied(); - } - - public void testSimpleQueryAuth() throws Exception { - RepositoryConnection conn = repository.getConnection(); - URI cpu = vf.createURI(litdupsNS, "cpu"); - URI loadPerc = vf.createURI(litdupsNS, "loadPerc"); - URI uri1 = vf.createURI(litdupsNS, "uri1"); - URI uri2 = vf.createURI(litdupsNS, "uri2"); - URI auth1 = vf.createURI(RdfCloudTripleStoreConstants.AUTH_NAMESPACE, "auth1"); - conn.add(cpu, loadPerc, uri1, auth1); - conn.add(cpu, loadPerc, uri2); - conn.commit(); - conn.close(); - - resultEndpoint.expectedMessageCount(1); - - //query through camel - String query = "select * where {" + - "<" + cpu.toString() + "> ?p ?o1." + - "}"; - template.sendBodyAndHeader(null, CbSailComponent.SPARQL_QUERY_PROP, query); - - assertMockEndpointsSatisfied(); - - resultEndpoint.expectedMessageCount(2); - - query = "select * where {" + - "<" + cpu.toString() + "> ?p ?o1." + - "}"; - Map<String, Object> headers = new HashMap<String, Object>(); - headers.put(CbSailComponent.SPARQL_QUERY_PROP, query); - headers.put(RdfCloudTripleStoreConfiguration.BINDING_AUTH, "auth1"); - template.sendBodyAndHeaders(null, headers); - - assertMockEndpointsSatisfied(); - } - - public void testInsertData() throws Exception { - URI cpu = vf.createURI(litdupsNS, "cpu"); - URI loadPerc = vf.createURI(litdupsNS, "loadPerc"); - URI uri1 = vf.createURI(litdupsNS, "uri1"); - URI uri2 = vf.createURI(litdupsNS, "uri2"); - List<Statement> insert = new ArrayList<Statement>(); - insert.add(new StatementImpl(cpu, loadPerc, uri1)); - insert.add(new StatementImpl(cpu, loadPerc, uri2)); - - resultEndpoint.expectedBodiesReceived(true); - template.sendBody(insert); - assertMockEndpointsSatisfied(); - - resultEndpoint.expectedMessageCount(2); - String query = "select * where {" + - "<" + cpu.toString() + "> ?p ?o1." + - "}"; - template.sendBodyAndHeader(null, CbSailComponent.SPARQL_QUERY_PROP, query); - assertMockEndpointsSatisfied(); - } - - public class MockRdfCloudStore extends RdfCloudTripleStore { - - public MockRdfCloudStore() { - super(); - Instance instance = new MockInstance(); - try { - Connector connector = instance.getConnector("", ""); - setConf(new AccumuloRdfConfiguration()); - AccumuloRyaDAO cdao = new AccumuloRyaDAO(); - cdao.setConnector(connector); - setRyaDAO(cdao); - inferenceEngine = new InferenceEngine(); - inferenceEngine.setRyaDAO(cdao); - inferenceEngine.setRefreshGraphSchedule(1000); //every sec - setInferenceEngine(inferenceEngine); - } catch (Exception e) { - e.printStackTrace(); - } - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/pom.xml ---------------------------------------------------------------------- diff --git a/osgi/pom.xml b/osgi/pom.xml deleted file mode 100644 index e0a8992..0000000 --- a/osgi/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?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"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya-project</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>rya.osgi</artifactId> - <name>Apache Rya OSGI Bundle</name> - - <packaging>pom</packaging> - - <properties> - <maven-bundle-plugin.version>2.1.0</maven-bundle-plugin.version> - </properties> - - <modules> - <module>alx.rya</module> - <module>alx.rya.console</module> - <module>camel.rya</module> - <!-- Disabling and documented in RYA-8 --> - <!-- <module>sesame-runtime-osgi</module> --> - </modules> - <build> - <plugins> - <!-- Move to subproject when resolving RYA-8 --> - <plugin> - <groupId>org.apache.rat</groupId> - <artifactId>apache-rat-plugin</artifactId> - <configuration> - <excludes combine.children="append"> - <exclude>sesame-runtime-osgi/openrdf-sesame-osgi.bnd</exclude> - </excludes> - </configuration> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>${maven-bundle-plugin.version}</version> - <extensions>true</extensions> - <configuration> - <manifestLocation>META-INF</manifestLocation> - <instructions> - <Bundle-SymbolicName>${project.groupId}.${project.artifactId} - </Bundle-SymbolicName> - <Bundle-Version>${project.version}</Bundle-Version> - <Import-Package>*</Import-Package> - <_exportcontents>*</_exportcontents> - <Bundle-ClassPath>.</Bundle-ClassPath> - <!--<DynamicImport-Package>*</DynamicImport-Package>--> - </instructions> - </configuration> - <executions> - <execution> - <id>genManifest</id> - <phase>process-classes</phase> - <goals> - <goal>manifest</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </pluginManagement> - </build> -</project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/sesame-runtime-osgi/openrdf-sesame-osgi.bnd ---------------------------------------------------------------------- diff --git a/osgi/sesame-runtime-osgi/openrdf-sesame-osgi.bnd b/osgi/sesame-runtime-osgi/openrdf-sesame-osgi.bnd deleted file mode 100644 index c0aea07..0000000 --- a/osgi/sesame-runtime-osgi/openrdf-sesame-osgi.bnd +++ /dev/null @@ -1,7 +0,0 @@ --classpath= target/sesame-runtime-osgi.jar --output= target/sesame-runtime-osgi-2.6.4.jar -Import-Package= *;resolution:=optional -Export-Package= * -Bundle-Version= 2.6.4 -Bundle-SymbolicName= sesame-runtime-osgi -DynamicImport-Package= * http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/osgi/sesame-runtime-osgi/pom.xml ---------------------------------------------------------------------- diff --git a/osgi/sesame-runtime-osgi/pom.xml b/osgi/sesame-runtime-osgi/pom.xml deleted file mode 100644 index c454a66..0000000 --- a/osgi/sesame-runtime-osgi/pom.xml +++ /dev/null @@ -1,139 +0,0 @@ -<?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/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya.osgi</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>sesame-runtime-osgi</artifactId> - <name>Sesame Runtime for OSGI</name> - - <packaging>pom</packaging> - - <dependencies> - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-runtime-osgi</artifactId> - </dependency> - <dependency> - <groupId>biz.aQute</groupId> - <artifactId>bnd</artifactId> - <version>0.0.397</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy</id> - <phase>generate-resources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-runtime-osgi</artifactId> - <version>${project.version}</version> - <outputDirectory>${project.build.directory}</outputDirectory> - <destFileName>sesame-runtime-osgi.jar</destFileName> - </artifactItem> - <artifactItem> - <groupId>biz.aQute</groupId> - <artifactId>bnd</artifactId> - <version>0.0.397</version> - <outputDirectory>${project.build.directory}</outputDirectory> - <destFileName>bnd.jar</destFileName> - </artifactItem> - </artifactItems> - <!-- other configurations here --> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.1</version> - <executions> - <execution> - <phase>process-resources</phase> - <goals> - <goal>exec</goal> - </goals> - </execution> - </executions> - <configuration> - <executable>java</executable> - <arguments> - <argument>-jar</argument> - <argument>target/bnd.jar</argument> - <argument>build</argument> - <argument>openrdf-sesame-osgi.bnd</argument> - </arguments> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin - </artifactId> - <version>1.7</version> - <executions> - <execution> - <id>attach-artifacts</id> - <phase>package</phase> - <goals> - <goal>attach-artifact</goal> - </goals> - <configuration> - <artifacts> - <artifact> - <file>${project.build.directory}/sesame-runtime-osgi-${project.version}.jar</file> - </artifact> - </artifacts> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - <repositories> - <repository> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - <id>bndrepo</id> - <name>aQute BND Repo</name> - <url>http://www.aqute.biz/repo</url> - </repository> - </repositories> -</project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/5a03ef61/pig/accumulo.pig/pom.xml ---------------------------------------------------------------------- diff --git a/pig/accumulo.pig/pom.xml b/pig/accumulo.pig/pom.xml deleted file mode 100644 index 1a1e5f9..0000000 --- a/pig/accumulo.pig/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?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"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.rya</groupId> - <artifactId>rya.pig</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>accumulo.pig</artifactId> - <name>Apache Rya Accumulo Pig</name> - - <dependencies> - <dependency> - <groupId>org.apache.rya</groupId> - <artifactId>rya.sail</artifactId> - </dependency> - <dependency> - <groupId>org.apache.rya</groupId> - <artifactId>accumulo.rya</artifactId> - </dependency> - - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-queryparser-sparql</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.pig</groupId> - <artifactId>pig</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.antlr</groupId> - <artifactId>antlr-runtime</artifactId> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.rat</groupId> - <artifactId>apache-rat-plugin</artifactId> - <configuration> - <excludes combine.children="append"> - <exclude>src/test/resources/ResultsFile1.txt</exclude> - <exclude>src/test/resources/testQuery.txt</exclude> - <exclude>src/test/resources/testQuery2.txt</exclude> - </excludes> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - </plugin> - </plugins> - </build> -</project>
