You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rya.apache.org by pu...@apache.org on 2015/12/04 17:46:30 UTC
[18/49] incubator-rya git commit: RYA-7 POM and License Clean-up for
Apache Move
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/pom.xml
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/pom.xml b/partition/web.partition.rdf/pom.xml
deleted file mode 100644
index 1c81587..0000000
--- a/partition/web.partition.rdf/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<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>mvm.rya</groupId>
- <artifactId>parent</artifactId>
- <version>3.2.10-SNAPSHOT</version>
- </parent>
- <groupId>mvm.mmrts.rdf</groupId>
- <artifactId>web.partition.rdf</artifactId>
- <packaging>war</packaging>
- <version>1.0.0-SNAPSHOT</version>
- <name>web.partition.rdf Maven Webapp</name>
- <url>http://maven.apache.org</url>
- <dependencies>
- <dependency>
- <groupId>mvm.mmrts.rdf</groupId>
- <artifactId>partition.rdf</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>commons-pool</groupId>
- <artifactId>commons-pool</artifactId>
- <version>1.5.1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <finalName>partitionRdf</finalName>
- <plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <version>6.1.10</version>
- <configuration>
- <contextPath>/partitionRdf</contextPath>
- <scanIntervalSeconds>10</scanIntervalSeconds>
- <stopKey>stopKey</stopKey>
- <stopPort>9081</stopPort>
- <connectors>
- <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
- <port>9080</port>
- <maxIdleTime>60000</maxIdleTime>
- </connector>
- </connectors>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/AbstractRDFWebServlet.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/AbstractRDFWebServlet.java b/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/AbstractRDFWebServlet.java
deleted file mode 100644
index b6732fd..0000000
--- a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/AbstractRDFWebServlet.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package mvm.cloud.rdf.web.partition;
-
-import cloudbase.core.client.Connector;
-import cloudbase.core.client.ZooKeeperInstance;
-import mvm.mmrts.rdf.partition.PartitionSail;
-import org.openrdf.repository.Repository;
-import org.openrdf.repository.RepositoryException;
-import org.openrdf.repository.sail.SailRepository;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-
-/**
- * Class AbstractRDFWebServlet
- * Date: Dec 13, 2010
- * Time: 9:44:08 AM
- */
-public class AbstractRDFWebServlet extends HttpServlet implements RDFWebConstants {
-
- protected Repository repository;
-
- @Override
- public void init(ServletConfig config) throws ServletException {
- super.init(config);
-
- try {
- String instance = config.getInitParameter(INSTANCE_PARAM);
- String zk = config.getInitParameter(ZK_PARAM);
- String user = config.getInitParameter(USER_PARAM);
- String password = config.getInitParameter(PASSWORD_PARAM);
- String table = config.getInitParameter(TABLE_PARAM);
- String shardtable = config.getInitParameter(SHARDTABLE_PARAM);
- if (shardtable == null)
- shardtable = table;
-
- if (zk == null || instance == null || user == null || password == null || table == null)
- throw new ServletException("Configuration not correct");
-
- PartitionSail psail = new PartitionSail(instance, zk, user, password, table, shardtable);
-
- repository = new SailRepository(psail);
- repository.initialize();
- } catch (Exception e) {
- throw new ServletException(e);
- }
- }
-
- @Override
- public void destroy() {
- try {
- repository.shutDown();
- } catch (RepositoryException e) {
- e.printStackTrace();
- }
- }
-
-
- public Repository getRepository() {
- return repository;
- }
-
- public void setRepository(Repository repository) {
- this.repository = repository;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/DeleteDataServlet.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/DeleteDataServlet.java b/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/DeleteDataServlet.java
deleted file mode 100644
index 7e1296a..0000000
--- a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/DeleteDataServlet.java
+++ /dev/null
@@ -1,46 +0,0 @@
-//package mvm.cloud.rdf.web.partition;
-//
-//import org.openrdf.query.QueryLanguage;
-//import org.openrdf.query.TupleQuery;
-//import org.openrdf.query.resultio.TupleQueryResultWriter;
-//import org.openrdf.repository.RepositoryConnection;
-//import org.openrdf.repository.RepositoryException;
-//
-//import javax.servlet.ServletException;
-//import javax.servlet.http.HttpServletRequest;
-//import javax.servlet.http.HttpServletResponse;
-//import java.io.IOException;
-//
-//public class DeleteDataServlet extends AbstractRDFWebServlet {
-//
-// @Override
-// protected void doGet(HttpServletRequest req, HttpServletResponse resp)
-// throws ServletException, IOException {
-// if (req == null || req.getInputStream() == null)
-// return;
-//
-// String query_s = req.getParameter("query");
-//
-// RepositoryConnection conn = null;
-// try {
-// conn = repository.getConnection();
-// // query data
-// TupleQuery tupleQuery = conn.prepareTupleQuery(
-// QueryLanguage.SPARQL, query_s);
-// TupleQueryResultWriter deleter = new mvm.mmrts.rdftriplestore.cloudbase.QueryResultsDeleter(conn);
-// tupleQuery.evaluate(deleter);
-//
-// } catch (Exception e) {
-// throw new ServletException(e);
-// } finally {
-// if (conn != null) {
-// try {
-// conn.close();
-// } catch (RepositoryException e) {
-//
-// }
-// }
-// }
-// }
-//
-//}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/LoadDataServlet.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/LoadDataServlet.java b/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/LoadDataServlet.java
deleted file mode 100644
index 46fe0e7..0000000
--- a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/LoadDataServlet.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package mvm.cloud.rdf.web.partition;
-
-import org.openrdf.model.Resource;
-import org.openrdf.repository.RepositoryConnection;
-import org.openrdf.repository.RepositoryException;
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFParseException;
-
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-public class LoadDataServlet extends AbstractRDFWebServlet {
-
- @Override
- protected void doPost(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException {
- if (req == null || req.getInputStream() == null)
- return;
-
- String format_s = req.getParameter("format");
- RDFFormat format = RDFFormat.RDFXML;
- if (format_s != null) {
- format = RDFFormat.valueOf(format_s);
- if (format == null)
- throw new ServletException("RDFFormat[" + format_s + "] not found");
- }
- ServletInputStream stream = req.getInputStream();
-
- RepositoryConnection conn = null;
- try {
- conn = repository.getConnection();
-
- // generate data
- conn.add(stream, "", format, new Resource[]{});
- conn.commit();
-
- conn.close();
- } catch (RepositoryException e) {
- throw new ServletException(e);
- } catch (RDFParseException e) {
- throw new ServletException(e);
- } finally {
- if (conn != null) {
- try {
- conn.close();
- } catch (RepositoryException e) {
-
- }
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QueryDataServlet.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QueryDataServlet.java b/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QueryDataServlet.java
deleted file mode 100644
index d456d02..0000000
--- a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QueryDataServlet.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package mvm.cloud.rdf.web.partition;
-
-import org.openrdf.model.ValueFactory;
-import org.openrdf.model.impl.ValueFactoryImpl;
-import org.openrdf.query.GraphQuery;
-import org.openrdf.query.QueryLanguage;
-import org.openrdf.query.TupleQuery;
-import org.openrdf.query.resultio.sparqlxml.SPARQLResultsXMLWriter;
-import org.openrdf.repository.Repository;
-import org.openrdf.repository.RepositoryConnection;
-import org.openrdf.repository.RepositoryException;
-import org.openrdf.rio.rdfxml.RDFXMLWriter;
-
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import static mvm.mmrts.rdf.partition.PartitionConstants.*;
-
-public class QueryDataServlet extends AbstractRDFWebServlet {
-
- private ValueFactory vf = new ValueFactoryImpl();
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException {
- if (req == null || req.getInputStream() == null)
- return;
-
- String query = req.getParameter("query");
- String start = req.getParameter(START_BINDING);
- String end = req.getParameter(END_BINDING);
- String infer = req.getParameter("infer");
- String performant = req.getParameter("performant");
- String useStats = req.getParameter("useStats");
- String timeUris = req.getParameter("timeUris");
-
- System.out.println("Start[" + start + "] and End[" + end + "]");
-
- //validate infer, performant
- if (infer != null) {
- Boolean.parseBoolean(infer);
- } else if (performant != null) {
- Boolean.parseBoolean(performant);
- }
-
- if (query == null) {
- throw new ServletException("Please set a query");
- }
- if (query.toLowerCase().contains("select")) {
- try {
- performSelect(query, start, end, infer, performant, useStats, timeUris, resp);
- } catch (Exception e) {
- throw new ServletException(e);
- }
- } else if (query.toLowerCase().contains("construct")) {
- try {
- performConstruct(query, start, end, infer, performant, useStats, timeUris, resp);
- } catch (Exception e) {
- throw new ServletException(e);
- }
- } else {
- throw new ServletException("Invalid SPARQL query: " + query);
- }
-
- }
-
- private void performConstruct(String query, String start, String end, String infer, String performant, String useStats, String timeUris, HttpServletResponse resp)
- throws Exception {
- RepositoryConnection conn = null;
- try {
- ServletOutputStream os = resp.getOutputStream();
- conn = repository.getConnection();
-
- // query data
- GraphQuery graphQuery = conn.prepareGraphQuery(
- QueryLanguage.SPARQL, query);
- if (start != null && start.length() > 0)
- graphQuery.setBinding(START_BINDING, vf.createLiteral(Long.parseLong(start)));
- if (end != null && end.length() > 0)
- graphQuery.setBinding(END_BINDING, vf.createLiteral(Long.parseLong(end)));
- if (performant != null && performant.length() > 0)
- graphQuery.setBinding("performant", vf.createLiteral(Boolean.parseBoolean(performant)));
- if (infer != null && infer.length() > 0)
- graphQuery.setBinding("infer", vf.createLiteral(Boolean.parseBoolean(infer)));
- if (useStats != null && useStats.length() > 0)
- graphQuery.setBinding("useStats", vf.createLiteral(Boolean.parseBoolean(useStats)));
- if (timeUris != null && timeUris.length() > 0)
- graphQuery.setBinding("timeUris", vf.createURI(timeUris));
- RDFXMLWriter rdfWriter = new RDFXMLWriter(os);
- graphQuery.evaluate(rdfWriter);
-
- } catch (Exception e) {
- resp.setStatus(500);
- e.printStackTrace(new PrintStream(resp.getOutputStream()));
- throw new ServletException(e);
- } finally {
- if (conn != null) {
- try {
- conn.close();
- } catch (RepositoryException e) {
-
- }
- }
- }
- }
-
- private void performSelect(String query, String start, String end, String infer, String performant, String useStats, String timeUris, HttpServletResponse resp)
- throws Exception {
- RepositoryConnection conn = null;
- try {
- ServletOutputStream os = resp.getOutputStream();
- conn = repository.getConnection();
-
- // query data
- TupleQuery tupleQuery = conn.prepareTupleQuery(
- QueryLanguage.SPARQL, query);
- if (start != null && start.length() > 0)
- tupleQuery.setBinding(START_BINDING, vf.createLiteral(Long.parseLong(start)));
- if (end != null && end.length() > 0)
- tupleQuery.setBinding(END_BINDING, vf.createLiteral(Long.parseLong(end)));
- if (performant != null && performant.length() > 0)
- tupleQuery.setBinding("performant", vf.createLiteral(Boolean.parseBoolean(performant)));
- if (infer != null && infer.length() > 0)
- tupleQuery.setBinding("infer", vf.createLiteral(Boolean.parseBoolean(infer)));
- if (useStats != null && useStats.length() > 0)
- tupleQuery.setBinding("useStats", vf.createLiteral(Boolean.parseBoolean(useStats)));
- if (timeUris != null && timeUris.length() > 0)
- tupleQuery.setBinding("timeUris", vf.createURI(timeUris));
- SPARQLResultsXMLWriter sparqlWriter = new SPARQLResultsXMLWriter(os);
- tupleQuery.evaluate(sparqlWriter);
-
- } catch (Exception e) {
- resp.setStatus(500);
- e.printStackTrace(new PrintStream(resp.getOutputStream()));
- throw new ServletException(e);
- } finally {
- if (conn != null) {
- try {
- conn.close();
- } catch (RepositoryException e) {
-
- }
- }
- }
- }
-
- public Repository getRepository() {
- return repository;
- }
-
- public void setRepository(Repository repository) {
- this.repository = repository;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QuerySerqlDataServlet.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QuerySerqlDataServlet.java b/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QuerySerqlDataServlet.java
deleted file mode 100644
index d2bdc29..0000000
--- a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/QuerySerqlDataServlet.java
+++ /dev/null
@@ -1,116 +0,0 @@
-//package mvm.cloud.rdf.web.partition;
-//
-//import org.openrdf.query.GraphQuery;
-//import org.openrdf.query.QueryLanguage;
-//import org.openrdf.query.TupleQuery;
-//import org.openrdf.query.resultio.sparqlxml.SPARQLResultsXMLWriter;
-//import org.openrdf.repository.Repository;
-//import org.openrdf.repository.RepositoryConnection;
-//import org.openrdf.repository.RepositoryException;
-//import org.openrdf.rio.rdfxml.RDFXMLWriter;
-//
-//import javax.servlet.ServletException;
-//import javax.servlet.ServletOutputStream;
-//import javax.servlet.http.HttpServletRequest;
-//import javax.servlet.http.HttpServletResponse;
-//import java.io.IOException;
-//import java.io.PrintStream;
-//
-//public class QuerySerqlDataServlet extends AbstractRDFWebServlet {
-//
-// @Override
-// protected void doGet(HttpServletRequest req, HttpServletResponse resp)
-// throws ServletException, IOException {
-// if (req == null || req.getInputStream() == null)
-// return;
-//
-// String query = req.getParameter("query");
-//
-// if (query == null) {
-// throw new ServletException("Please set a query");
-// }
-//
-// if (query.toLowerCase().contains("select")) {
-// try {
-// performSelect(query, resp);
-// } catch (Exception e) {
-// throw new ServletException(e);
-// }
-// } else if (query.toLowerCase().contains("construct")) {
-// try {
-// performConstruct(query, resp);
-// } catch (Exception e) {
-// throw new ServletException(e);
-// }
-// } else {
-// throw new ServletException("Invalid SERQL query: " + query);
-// }
-//
-// }
-//
-// private void performConstruct(String query, HttpServletResponse resp)
-// throws Exception {
-// RepositoryConnection conn = null;
-// try {
-// ServletOutputStream os = resp.getOutputStream();
-// conn = repository.getConnection();
-//
-// // query data
-// GraphQuery graphQuery = conn.prepareGraphQuery(
-// QueryLanguage.SERQL, query);
-// RDFXMLWriter rdfWriter = new RDFXMLWriter(os);
-// graphQuery.evaluate(rdfWriter);
-//
-// conn.close();
-// } catch (Exception e) {
-// resp.setStatus(500);
-// e.printStackTrace(new PrintStream(resp.getOutputStream()));
-// throw new ServletException(e);
-// } finally {
-// if (conn != null) {
-// try {
-// conn.close();
-// } catch (RepositoryException e) {
-//
-// }
-// }
-// }
-// }
-//
-// private void performSelect(String query, HttpServletResponse resp)
-// throws Exception {
-// RepositoryConnection conn = null;
-// try {
-// ServletOutputStream os = resp.getOutputStream();
-// conn = repository.getConnection();
-//
-// // query data
-// TupleQuery tupleQuery = conn.prepareTupleQuery(
-// QueryLanguage.SERQL, query);
-// SPARQLResultsXMLWriter sparqlWriter = new SPARQLResultsXMLWriter(os);
-// tupleQuery.evaluate(sparqlWriter);
-//
-// conn.close();
-// } catch (Exception e) {
-// resp.setStatus(500);
-// e.printStackTrace(new PrintStream(resp.getOutputStream()));
-// throw new ServletException(e);
-// } finally {
-// if (conn != null) {
-// try {
-// conn.close();
-// } catch (RepositoryException e) {
-//
-// }
-// }
-// }
-// }
-//
-// public Repository getRepository() {
-// return repository;
-// }
-//
-// public void setRepository(Repository repository) {
-// this.repository = repository;
-// }
-//}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/RDFWebConstants.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/RDFWebConstants.java b/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/RDFWebConstants.java
deleted file mode 100644
index 154db3a..0000000
--- a/partition/web.partition.rdf/src/main/java/mvm/cloud/rdf/web/partition/RDFWebConstants.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package mvm.cloud.rdf.web.partition;
-
-/**
- * Interface RDFWebConstants
- * Date: Dec 13, 2010
- * Time: 9:39:45 AM
- */
-public interface RDFWebConstants {
- public static final String INSTANCE_PARAM = "rts.instance";
- public static final String ZK_PARAM = "rts.zk";
- public static final String USER_PARAM = "rts.user";
- public static final String PASSWORD_PARAM = "rts.password";
- public static final String TABLE_PARAM = "rts.table";
- public static final String SHARDTABLE_PARAM = "rts.shardtable";
-}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/webapp/WEB-INF/web.xml b/partition/web.partition.rdf/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 853401c..0000000
--- a/partition/web.partition.rdf/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
- <display-name>RDF Cloud Triple Store Web Access</display-name>
- <servlet>
- <servlet-name>LoadDataServlet</servlet-name>
- <servlet-class>mvm.cloud.rdf.web.partition.LoadDataServlet</servlet-class>
-
- <init-param>
- <param-name>rts.instance</param-name>
- <param-value>stratus</param-value>
- </init-param>
- <init-param>
- <param-name>rts.zk</param-name>
- <param-value>10.40.190.113:2181</param-value>
- </init-param>
- <init-param>
- <param-name>rts.table</param-name>
- <param-value>partitionRdf</param-value>
- </init-param>
- <init-param>
- <param-name>rts.shardtable</param-name>
- <param-value>partitionRdf</param-value>
- </init-param>
- <init-param>
- <param-name>rts.user</param-name>
- <param-value>root</param-value>
- </init-param>
- <init-param>
- <param-name>rts.password</param-name>
- <param-value>password</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>LoadDataServlet</servlet-name>
- <url-pattern>/loadrdf</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>QueryDataServlet</servlet-name>
- <servlet-class>mvm.cloud.rdf.web.partition.QueryDataServlet</servlet-class>
-
- <init-param>
- <param-name>rts.instance</param-name>
- <param-value>stratus</param-value>
- </init-param>
- <init-param>
- <param-name>rts.zk</param-name>
- <param-value>10.40.190.113:2181</param-value>
- </init-param>
- <init-param>
- <param-name>rts.table</param-name>
- <param-value>partitionRdf</param-value>
- </init-param>
- <init-param>
- <param-name>rts.shardtable</param-name>
- <param-value>partitionRdf</param-value>
- </init-param>
- <init-param>
- <param-name>rts.user</param-name>
- <param-value>root</param-value>
- </init-param>
- <init-param>
- <param-name>rts.password</param-name>
- <param-value>password</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>QueryDataServlet</servlet-name>
- <url-pattern>/queryrdf</url-pattern>
- </servlet-mapping>
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/webapp/crossdomain.xml
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/webapp/crossdomain.xml b/partition/web.partition.rdf/src/main/webapp/crossdomain.xml
deleted file mode 100644
index c3b5339..0000000
--- a/partition/web.partition.rdf/src/main/webapp/crossdomain.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<!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>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/webapp/serqlQuery.jsp
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/webapp/serqlQuery.jsp b/partition/web.partition.rdf/src/main/webapp/serqlQuery.jsp
deleted file mode 100644
index 0e49d7a..0000000
--- a/partition/web.partition.rdf/src/main/webapp/serqlQuery.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
-<%@ page import="java.net.*" %>
-<%
- String serql=request.getParameter("serql");
- if(serql != null){
- String serqlEnc = URLEncoder.encode(serql,"UTF-8");
- String urlTo = "queryserql?query=" + serqlEnc;
- response.sendRedirect(urlTo);
- }
-%>
-<html>
-<body>
-<form name="serqlQuery" method="post" action="serqlQuery.jsp">
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="22%"> </td>
- <td width="78%"> </td>
- </tr>
- <tr>
- <td>SERQL Query: </td>
- <td><textarea cols="150" rows="40" name="serql">
-Enter Serql query here
- </textarea></td>
- </tr>
- <tr>
- <td> </td>
- <td><input type="submit" name="submit" value="Submit"></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
-</table>
-</form>
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/main/webapp/sparqlQuery.jsp
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/main/webapp/sparqlQuery.jsp b/partition/web.partition.rdf/src/main/webapp/sparqlQuery.jsp
deleted file mode 100644
index 090d5e2..0000000
--- a/partition/web.partition.rdf/src/main/webapp/sparqlQuery.jsp
+++ /dev/null
@@ -1,47 +0,0 @@
-<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
-<%@ page import="java.net.*" %>
-<%
- String sparql=request.getParameter("sparql");
- String endTime=request.getParameter("endTime");
- String startTime=request.getParameter("startTime");
-
- if(sparql != null){
- String sparqlEnc = URLEncoder.encode(sparql,"UTF-8");
- String urlTo = "queryrdf?binding.start="+startTime+"&binding.end="+endTime+"&query=" + sparqlEnc;
- response.sendRedirect(urlTo);
- }
-%>
-<html>
-<body>
-<form name="sparqlQuery" method="post" action="sparqlQuery.jsp">
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="22%"> </td>
- <td width="78%"> </td>
- </tr>
- <tr>
- <td>SPARQL Query: </td>
- <td><textarea cols="200" rows="60" name="sparql">
-Enter Sparql query here
- </textarea></td>
- </tr>
- <tr>
- <td>Start Time</td>
- <td><INPUT TYPE=TEXT NAME="startTime" SIZE="20"></td>
- </tr>
- <tr>
- <td>End Time</td>
- <td><INPUT TYPE=TEXT NAME="endTime" SIZE="20"></td>
- </tr>
- <tr>
- <td> </td>
- <td><input type="submit" name="submit" value="Submit"></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
-</table>
-</form>
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/DeleteDataServletRun.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/DeleteDataServletRun.java b/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/DeleteDataServletRun.java
deleted file mode 100644
index 5e84d34..0000000
--- a/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/DeleteDataServletRun.java
+++ /dev/null
@@ -1,455 +0,0 @@
-package mvm.cloud.rdf.web.cloudbase.sail;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-
-public class DeleteDataServletRun {
-
- public static void main(String[] args) {
- try {
-// String query = "SELECT ?artist WHERE { ?abt <http://www.recshop.fake/cd#year> \"1988\"." +
-// " }";
- String artistQuery = "SELECT ?artist WHERE { "
- + " ?abt <http://www.recshop.fake/cd#artist> ?artist . "
- + " ?abt <http://www.recshop.fake/cd#year> \"1993\" . "
- + "}";
-// String query = "SELECT ?pred ?obj WHERE { <http://www.recshop.fake/cd/Empire_Burlesque> ?pred ?obj }";
-// String query = "SELECT ?pred ?label ?obj WHERE { <http://purl.org/swag/sbp/tab#A5> ?pred ?obj ." +
-// " ?obj <http://www.w3.org/2000/01/rdf-schema#label> ?label }";
- long dayBefore = System.currentTimeMillis() - 86400000;
- System.out.println(dayBefore);
-// String query = "SELECT DISTINCT ?obj WHERE { ?serv <http://mvm.com/rdf/mm/relatesTo> <http://mvm.com/rdf/mm/LTS::stratus30> . " +
-// " ?serv <http://mvm.com/rdf/mm/relatesTo> ?obj ." +
-// " ?serv <http://mvm.com/rdf/mm/timestamp> ?ts ." +
-//// " FILTER (?ts >= '"+dayBefore+"') " +
-// " }" +
-// " ORDER BY ?obj ";
-
- String giveAllClusters = "SELECT DISTINCT ?uu WHERE { ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj . " +
- " }" +
- " ORDER BY ?uu ";
-
-// String query = "SELECT DISTINCT ?obj WHERE { <http://mvm.com/rdf/mm/1a4eaa7c-842c-456a-94c0-6547de6be841> <http://mvm.com/rdf/mm/relatesTo> ?obj . " +
-// " }" +
-// " ORDER BY ?obj ";
-
- //hasfunction query
- String hasFunctionQuery = "SELECT DISTINCT ?obj WHERE { ?uu <http://mvm.com/rdf/mm/hasFunction> <http://mvm.com/rdf/mm/america> . " +
- " ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj" +
- " }" +
- " ORDER BY ?obj ";
-
- String allFunctions = "SELECT DISTINCT ?func ?obj WHERE { ?uu <http://mvm.com/rdf/mm/hasFunction> ?func . " +
- " ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj" +
- " }" +
- " ORDER BY ?func ";
-
- String allFunctionsThresh = "SELECT DISTINCT ?func ?obj ?thresh WHERE { ?uu <http://mvm.com/rdf/mm/hasFunction> ?func . " +
- " ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj ." +
- " ?uu <http://mvm.com/rdf/mm/threshold> ?thresh" +
- " }" +
- " ORDER BY ?func ";
-
-
- String cwdQuery = "SELECT DISTINCT ?obj ?packname WHERE { ?subj <urn:mvm.cwd/2.0/man/uuid> ?obj . " +
- " ?subj <urn:mvm.cwd/2.0/man/installedPackages> ?instPacks ." +
- " ?instPacks <urn:mvm.cwd/2.0/man/package> ?packid ." +
- " ?packid <urn:mvm.cwd/2.0/man/name> ?packname } ";
-
- String cwdAllServersQuery = "SELECT DISTINCT ?obj WHERE { ?subj <urn:mvm.cwd/2.0/man/uuid> ?obj } ";
-
- // rearrange for better filter
- // 0.124s
- String lubm1 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:test:onto:univ#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x ub:takesCourse <http://www.Department0.University0.edu/GraduateCourse0> .\n" +
-// " ?x rdf:type ub:GraduateStudent .\n" +
- " }";
-
- // 142s
- // not sure why it is so long will have to do some more tests
- String lubm2 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?z ub:subOrganizationOf ?y .\n" +
- " ?y rdf:type ub:University .\n" +
- " ?z rdf:type ub:Department .\n" +
- " ?x ub:memberOf ?z .\n" +
- " ?x rdf:type ub:GraduateStudent .\n" +
- " ?x ub:undergraduateDegreeFrom ?y .\n" +
- " }";
-
- String lubm2_a = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <http://test.univ.onto.org#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type ub:GraduateStudent .\n" +
- " ?x ub:memberOf ?z .\n" +
- " ?z ub:subOrganizationOf ?y .\n" +
- " ?z rdf:type ub:Department .\n" +
- " ?y rdf:type ub:University .\n" +
-// " ?x ub:undergraduateDegreeFrom ?y .\n" +
- " }";
-
- // 0.127s
- // Rearranged to put the assistant professor first, better filtering
- String lubm3 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x ub:publicationAuthor <http://www.Department0.University0.edu/AssistantProfessor0> .\n" +
- " ?x rdf:type ub:Publication .\n" +
- " }";
-
-// had to infer relationships myself
-// 0.671s
- String lubm4 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?y ub:worksFor <http://www.Department0.University5.edu> .\n" +
- " ?x rdfs:subClassOf ub:Professor .\n" +
- " ?y rdf:type ?x .\n" +
- " ?y ub:name ?y1 .\n" +
- " ?y ub:emailAddress ?y2 .\n" +
- " ?y ub:telephone ?y3 .\n" +
- " }";
-
- //lubm5, we cannot do inferring for more than one level now. Person is too difficult
-
- //lubm6, we cannot do the implicit inference between Student and GraduateStudent
-
- //lubm14
- //0.1s
- String lubm14 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type ub:UndergraduateStudent .\n" +
- " }";
-
- String bongoAllCollections = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type bg:Collection .\n" +
- " ?x bg:uniqueid ?uid .\n" +
- " ?x bg:title ?title .\n" +
- " ?x bg:hasAuthor ?author .\n" +
- " ?x bg:marking ?marking .\n" +
- " }";
-
- String bongoEntriesForCategory = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:hasCategory ?category .\n" +
- " FILTER (?category = \"cat1\") \n" +
- " }";
-
- String bongoEntriesForAuthor = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:hasAuthor ?author .\n" +
- " FILTER (?author = \"andrew2\") \n" +
- " }";
-
- String bongoEntriesForModifiedTime = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT DISTINCT ?entryid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:modifiedTime ?modifiedTime .\n" +
- " FILTER (xsd:dateTime(?modifiedTime) >= \"2011-10-21T13:18:30\"^^xsd:dateTime) \n" +
- " }";
- String bongoEntriesSortTitle = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT DISTINCT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:title ?title .\n" +
- " } ORDER BY ?title";
-
- String bongoEntriesForTitle = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT DISTINCT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:title ?title .\n" +
- " FILTER (regex(?title,\"Entry1Title\")) }";
-
- String bongoQuery = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?col rdf:type bg:Collection .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2\\/S\\/P\\/Stock\\/Google_simple\\/6 bg:uniqueid ?uniqueid} .\n" +
-// " OPTIONAL{ bg:'latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6' bg:title ?title} .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6 bg:name ?name} .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6 bg:marking ?marking} .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6 bg:hasAuthor ?author} .\n" +
- " }";
-
- String bongoAllEntriesInCollection = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?y bg:inCollection bg:CollA .\n" +
- " ?y rdf:type bg:Entry .\n" +
- " ?y bg:uniqueid ?uid .\n" +
- " ?y bg:title ?title .\n" +
- " ?y bg:etag ?etag .\n" +
- " }";
-
- String bongoAllForEntry1 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " bg:EntryM rdf:type bg:Entry .\n" +
-// " bg:EntryN bg:inCollection bg:CollectionN .\n" +
- " bg:EntryM bg:mimeType ?mimeType .\n" +
- " bg:EntryM bg:etag ?etag .\n" +
- " OPTIONAL { bg:EntryM bg:slug ?slug}.\n" +
- " bg:EntryM bg:uniqueid ?uniqueid .\n" +
-// " bg:EntryN bg:title ?title .\n" +
-// " bg:EntryN bg:marking ?marking .\n" +
-// " bg:EntryN bg:mediaMarking ?mediaMarking .\n" +
-// " bg:EntryN bg:editedTime ?editedTime .\n" +
-// " bg:EntryN bg:modifiedTime ?modifiedTime .\n" +
-// " bg:EntryN bg:publishedTime ?publishedTime .\n" +
-// " bg:EntryN bg:mediaStorageId ?mediaStorageId .\n" +
-// " bg:EntryN bg:mediaModifiedTime ?mediaModifiedTime .\n" +
-// " bg:EntryN bg:entryStorageId ?entryStorageId .\n" +
- " }";
-
- String bongoEntryAllAuthors = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " bg:Entry1 bg:hasAuthor ?y .\n" +
- " }";
-
- String bongoEntriesModAfter = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x bg:editedTime ?edTime .\n" +
- " FILTER (xsd:dateTime(?edTime) >= \"2010-01-01T00:00:00\"^^xsd:dateTime)\n" +
- " }";
-
- String cimData = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX mm: <http://mvm.com/owl/mm.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type mm:ComputerSystem .\n" +
- " ?x mm:hasRunningOS ?y .\n" +
- " ?y mm:name ?z .\n" +
- " }";
-
- String cimData2 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX mm: <http://mvm.com/owl/mm.owl#>\n" +
- " PREFIX mmcs: <http://mvm.com/owl/mm.owl#urn:uuid:some:>\n" +
- " SELECT ?pred ?obj WHERE {\n" +
- " mmcs:computersystem ?pred ?obj\n" +
- " }";
-
- String cimData3 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "SELECT ?pred ?obj WHERE {\n" +
- "<http://mvm.com/owl/mm.owl#urn:mm:mvm:lts:root/cimv2:PG_OperatingSystem.CreationClassName=CIM_OperatingSystem,CSCreationClassName=CIM_UnitaryComputerSystem,CSName=nimbus02.bullpen.net,Name=Red_Hat_Enterprise_Linux_Server> ?pred ?obj\n" +
- "}";
-
- String cimHasInstalledSoftware = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT DISTINCT ?obj ?name ?caption WHERE {\n" +
-// " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus06.bullpen.net:Red_Hat_Enterprise_Linux_Server> mm:hasInstalledSoftware ?obj .\n" +
- " ?serv mm:hasInstalledSoftware ?obj .\n" +
- " ?obj mm:name ?name ;\n" +
- " mm:caption ?caption .\n" +
- "}";
-
- String cimHasRunningSoftware = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * WHERE {\n" +
- " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> mm:hasRunningProcess ?obj .\n" +
- " ?obj mm:name ?name ; \n" +
- " mm:handle ?handle ; \n" +
- " mm:description ?description ; \n" +
- " mm:caption ?caption ; \n" +
- " mm:parameters ?params . \n" +
- "}";
-
- String cimCpu = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * \n" +
- "WHERE {\n" +
- " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:CIM_ComputerSystem:stratus10> mm:hasProcessor ?obj .\n" +
- " ?obj mm:maxClockSpeed ?speed .\n" +
- " ?obj mm:loadPercentage ?load .\n" +
- " ?obj mm:elementName ?type ." +
- "}";
-
- String cimCpuLoad = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * \n" +
- "WHERE {\n" +
- " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:CIM_ComputerSystem:stratus10> mm:hasProcessor ?obj .\n" +
- " ?obj mm:loadPercentage ?load ." +
- "}";
-
-
- String cimHasFileSystem = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * WHERE {\n" +
-// " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> mm:hasFileSystem ?obj ." +
- " ?serv mm:hasFileSystem ?obj ." +
- " ?obj mm:availableSpace ?available .\n" +
- " ?obj mm:fileSystemSize ?size .\n" +
- " ?obj mm:percentageSpaceUse ?use ." +
- "}";
-
- String clusterKolm = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT ?name ?cluster ?srv ?ncd ?thresh ?ts WHERE {\n" +
- " ?cluster kolm:relatesTo ?pt ;\n" +
- " kolm:threshold ?thresh .\n" +
- " ?pt kolm:serverRef ?srv ;\n" +
- " kolm:ncd ?ncd ;\n" +
- " kolm:timestamp ?ts .\n" +
- " ?srv mm:CSName ?name .\n" +
- "} \n" +
- " ORDER BY ?cluster ?srv ?ncd";
-
- String clusterKolm2 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT ?cserv ?srv ?ncd ?thresh ?ts WHERE {\n" +
- " ?cpt kolm:ncd \"0.0\" .\n" +
- " ?cpt kolm:serverRef ?cserv .\n" +
- " ?cluster kolm:relatesTo ?cpt ;\n" +
- " kolm:relatesTo ?pt ;\n" +
- " kolm:timestamp ?cts ;\n" +
- " kolm:threshold ?thresh .\n" +
- " ?pt kolm:serverRef ?srv ;\n" +
- " kolm:ncd ?ncd ;\n" +
- " kolm:timestamp ?ts .\n" +
-// " ?srv mm:CSName ?name .\n" +
- " FILTER (?cts >= \"1290616617624\")" +
- "} \n" +
- " ORDER BY ?cserv ?ncd ?srv";
-
- String clusterKolmOtherClusters = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT ?cserv ?srv ?ncd WHERE {\n" +
- " ?cpt kolm:ncd \"0.0\" .\n" +
- " ?cpt kolm:serverRef ?cserv .\n" +
- " ?cluster kolm:relatesTo ?cpt .\n" +
- " ?cluster kolm:distanceTo ?pt .\n" +
- " ?cluster kolm:timestamp ?cts .\n" +
-// " kolm:threshold ?thresh .\n" +
- " ?pt kolm:serverRef ?srv ;\n" +
- " kolm:ncd ?ncd ;\n" +
- " kolm:timestamp ?ts .\n" +
-// " ?srv mm:CSName ?name .\n" +
- " FILTER (?cts >= \"1290616617624\")" +
- "} \n" +
- " ORDER BY ?cserv ?srv ?ncd";
-
- String clusterKolmStratus13 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT DISTINCT ?srv ?ncd WHERE {\n" +
- " ?pt kolm:serverRef <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus13:Red_Hat_Enterprise_Linux_Server> .\n" +
- " ?cluster kolm:relatesTo ?pt .\n" +
- " ?cluster kolm:relatesTo ?pt2 .\n" +
- " ?pt2 kolm:serverRef ?srv .\n" +
-// " ?cluster kolm:relatesTo ?pt ;\n" +
-// " kolm:threshold ?thresh .\n" +
-// " ?pt kolm:serverRef <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> ;\n" +
- " ?pt2 kolm:ncd ?ncd .\n" +
- " ?cluster kolm:timestamp ?ts .\n" +
-// " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> mm:CSName ?name .\n" +
- "} \n" +
- " ORDER BY ?ncd";
-
- String cimLatestMeasure = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT ?proc ?val ?time WHERE {\n" +
- " ?proc mm:loadPercentage ?val .\n" +
- " ?subj rdf:subject ?proc .\n" +
- " ?subj rdf:object ?val2 .\n" +
- " ?subj rdf:type rdf:Statement ;\n" +
- " \t mm:reportedAt ?time .\n" +
- " FILTER (?val2 = ?val) }\n" +
- "ORDER BY DESC(?time)\n" +
- "LIMIT 250";
-
- String deleteBlankNodesCim = "prefix Base: <http://mvm.com/base/2011/05/base.owl#>\n" +
- "prefix Core: <http://mvm.com/2011/05/core#>\n" +
- "\n" +
- "select *\n" +
- "{ \n" +
- "\n" +
- "?subj a Core:UnitaryComputerSystem .\n" +
- "?subj ?pred ?obj .\n" +
- "FILTER isBlank(?server).\n" +
- "}";
-
-// String query = "DELETE {?subj <http://mvm.com/rdf/mm/relatesTo> <http://mvm.com/rdf/mm/LTS::stratus30>} WHERE { ?subj <http://mvm.com/rdf/mm/relatesTo> <http://mvm.com/rdf/mm/LTS::stratus30>}";
-//
- String query = deleteBlankNodesCim;
- System.out.println(query);
- System.out.println(System.currentTimeMillis());
-
- /**
- * Create url object to POST to the running container
- */
-
- String queryenc = URLEncoder.encode(query, "UTF-8");
-
- URL url = new URL("http://10.40.190.113:8080/rdfTripleStore/deletequery?query=" + queryenc);
- URLConnection urlConnection = url.openConnection();
- urlConnection.setDoOutput(true);
-
- /**
- * Get the corresponding response from server, if any
- */
- BufferedReader rd = new BufferedReader(new InputStreamReader(
- urlConnection.getInputStream()));
- String line;
- while ((line = rd.readLine()) != null) {
- System.out.println(line);
- }
- rd.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/LoadDataServletRun.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/LoadDataServletRun.java b/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/LoadDataServletRun.java
deleted file mode 100644
index 4ffd517..0000000
--- a/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/LoadDataServletRun.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package mvm.cloud.rdf.web.cloudbase.sail;
-
-import com.google.common.io.ByteStreams;
-import junit.framework.TestCase;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.net.URL;
-import java.net.URLConnection;
-
-public class LoadDataServletRun extends TestCase {
-
- public static void main(String[] args) {
- try {
- /**
- * Create url object to POST to the running container
- */
-
- final InputStream resourceAsStream = Thread.currentThread().getContextClassLoader()
- .getResourceAsStream("n3trips.txt");
- URL url = new URL("http://10.41.1.95:8080/rdfTripleStoreInfer/loadrdf" +
- "?format=N-Triples" +
- "");
- URLConnection urlConnection = url.openConnection();
- urlConnection.setDoOutput(true);
-
- final OutputStream os = urlConnection.getOutputStream();
-
- System.out.println(resourceAsStream);
- ByteStreams.copy(resourceAsStream, os);
- os.flush();
-
- /**
- * Get the corresponding response from server, if any
- */
- BufferedReader rd = new BufferedReader(new InputStreamReader(
- urlConnection.getInputStream()));
- String line;
- while ((line = rd.readLine()) != null) {
- System.out.println(line);
- }
- rd.close();
- os.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/QueryDataServletRun.java
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/QueryDataServletRun.java b/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/QueryDataServletRun.java
deleted file mode 100644
index 42513c3..0000000
--- a/partition/web.partition.rdf/src/test/java/mvm/cloud/rdf/web/cloudbase/sail/QueryDataServletRun.java
+++ /dev/null
@@ -1,444 +0,0 @@
-package mvm.cloud.rdf.web.cloudbase.sail;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-
-public class QueryDataServletRun {
-
- public static void main(String[] args) {
- try {
-// String query = "SELECT ?artist WHERE { ?abt <http://www.recshop.fake/cd#year> \"1988\"." +
-// " }";
- String artistQuery = "SELECT ?artist WHERE { "
- + " ?abt <http://www.recshop.fake/cd#artist> ?artist . "
- + " ?abt <http://www.recshop.fake/cd#year> \"1993\" . "
- + "}";
-// String query = "SELECT ?pred ?obj WHERE { <http://www.recshop.fake/cd/Empire_Burlesque> ?pred ?obj }";
-// String query = "SELECT ?pred ?label ?obj WHERE { <http://purl.org/swag/sbp/tab#A5> ?pred ?obj ." +
-// " ?obj <http://www.w3.org/2000/01/rdf-schema#label> ?label }";
- long dayBefore = System.currentTimeMillis() - 86400000;
- System.out.println(dayBefore);
-// String query = "SELECT DISTINCT ?obj WHERE { ?serv <http://mvm.com/rdf/mm/relatesTo> <http://mvm.com/rdf/mm/LTS::stratus30> . " +
-// " ?serv <http://mvm.com/rdf/mm/relatesTo> ?obj ." +
-// " ?serv <http://mvm.com/rdf/mm/timestamp> ?ts ." +
-//// " FILTER (?ts >= '"+dayBefore+"') " +
-// " }" +
-// " ORDER BY ?obj ";
-
- String giveAllClusters = "SELECT DISTINCT ?uu WHERE { ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj . " +
- " }" +
- " ORDER BY ?uu ";
-
-// String query = "SELECT DISTINCT ?obj WHERE { <http://mvm.com/rdf/mm/1a4eaa7c-842c-456a-94c0-6547de6be841> <http://mvm.com/rdf/mm/relatesTo> ?obj . " +
-// " }" +
-// " ORDER BY ?obj ";
-
- //hasfunction query
- String hasFunctionQuery = "SELECT DISTINCT ?obj WHERE { ?uu <http://mvm.com/rdf/mm/hasFunction> <http://mvm.com/rdf/mm/america> . " +
- " ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj" +
- " }" +
- " ORDER BY ?obj ";
-
- String allFunctions = "SELECT DISTINCT ?func ?obj WHERE { ?uu <http://mvm.com/rdf/mm/hasFunction> ?func . " +
- " ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj" +
- " }" +
- " ORDER BY ?func ";
-
- String allFunctionsThresh = "SELECT DISTINCT ?func ?obj ?thresh WHERE { ?uu <http://mvm.com/rdf/mm/hasFunction> ?func . " +
- " ?uu <http://mvm.com/rdf/mm/relatesTo> ?obj ." +
- " ?uu <http://mvm.com/rdf/mm/threshold> ?thresh" +
- " }" +
- " ORDER BY ?func ";
-
-
- String cwdQuery = "SELECT DISTINCT ?obj ?packname WHERE { ?subj <urn:mvm.cwd/2.0/man/uuid> ?obj . " +
- " ?subj <urn:mvm.cwd/2.0/man/installedPackages> ?instPacks ." +
- " ?instPacks <urn:mvm.cwd/2.0/man/package> ?packid ." +
- " ?packid <urn:mvm.cwd/2.0/man/name> ?packname } ";
-
- String cwdAllServersQuery = "SELECT DISTINCT ?obj WHERE { ?subj <urn:mvm.cwd/2.0/man/uuid> ?obj } ";
-
- // rearrange for better filter
- // 0.124s
- String lubm1 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:test:onto:univ#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x ub:takesCourse <http://www.Department0.University0.edu/GraduateCourse0> .\n" +
-// " ?x rdf:type ub:GraduateStudent .\n" +
- " }";
-
- // 142s
- // not sure why it is so long will have to do some more tests
- String lubm2 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?z ub:subOrganizationOf ?y .\n" +
- " ?y rdf:type ub:University .\n" +
- " ?z rdf:type ub:Department .\n" +
- " ?x ub:memberOf ?z .\n" +
- " ?x rdf:type ub:GraduateStudent .\n" +
- " ?x ub:undergraduateDegreeFrom ?y .\n" +
- " }";
-
- String lubm2_a = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <http://test.univ.onto.org#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type ub:GraduateStudent .\n" +
- " ?x ub:memberOf ?z .\n" +
- " ?z ub:subOrganizationOf ?y .\n" +
- " ?z rdf:type ub:Department .\n" +
- " ?y rdf:type ub:University .\n" +
-// " ?x ub:undergraduateDegreeFrom ?y .\n" +
- " }";
-
- // 0.127s
- // Rearranged to put the assistant professor first, better filtering
- String lubm3 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x ub:publicationAuthor <http://www.Department0.University0.edu/AssistantProfessor0> .\n" +
- " ?x rdf:type ub:Publication .\n" +
- " }";
-
-// had to infer relationships myself
-// 0.671s
- String lubm4 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?y ub:worksFor <http://www.Department0.University5.edu> .\n" +
- " ?x rdfs:subClassOf ub:Professor .\n" +
- " ?y rdf:type ?x .\n" +
- " ?y ub:name ?y1 .\n" +
- " ?y ub:emailAddress ?y2 .\n" +
- " ?y ub:telephone ?y3 .\n" +
- " }";
-
- //lubm5, we cannot do inferring for more than one level now. Person is too difficult
-
- //lubm6, we cannot do the implicit inference between Student and GraduateStudent
-
- //lubm14
- //0.1s
- String lubm14 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX ub: <urn:edu.lubm#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type ub:UndergraduateStudent .\n" +
- " }";
-
- String bongoAllCollections = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type bg:Collection .\n" +
- " ?x bg:uniqueid ?uid .\n" +
- " ?x bg:title ?title .\n" +
- " ?x bg:hasAuthor ?author .\n" +
- " ?x bg:marking ?marking .\n" +
- " }";
-
- String bongoEntriesForCategory = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:hasCategory ?category .\n" +
- " FILTER (?category = \"cat1\") \n" +
- " }";
-
- String bongoEntriesForAuthor = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:hasAuthor ?author .\n" +
- " FILTER (?author = \"andrew2\") \n" +
- " }";
-
- String bongoEntriesForModifiedTime = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT DISTINCT ?entryid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:modifiedTime ?modifiedTime .\n" +
- " FILTER (xsd:dateTime(?modifiedTime) >= \"2011-10-21T13:18:30\"^^xsd:dateTime) \n" +
- " }";
- String bongoEntriesSortTitle = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT DISTINCT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:title ?title .\n" +
- " } ORDER BY ?title";
-
- String bongoEntriesForTitle = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT DISTINCT ?uniqueid WHERE\n" +
- " {\n" +
- " ?entryid bg:inCollection bg:CollA .\n" +
- " ?entryid rdf:type bg:Entry .\n" +
- " ?entryid bg:uniqueid ?uniqueid .\n" +
- " ?entryid bg:title ?title .\n" +
- " FILTER (regex(?title,\"Entry1Title\")) }";
-
- String bongoQuery = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?col rdf:type bg:Collection .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2\\/S\\/P\\/Stock\\/Google_simple\\/6 bg:uniqueid ?uniqueid} .\n" +
-// " OPTIONAL{ bg:'latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6' bg:title ?title} .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6 bg:name ?name} .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6 bg:marking ?marking} .\n" +
-// " OPTIONAL{ bg:latency_mixture2_perSupplier_norm2/S/P/Stock/Google_simple/6 bg:hasAuthor ?author} .\n" +
- " }";
-
- String bongoAllEntriesInCollection = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?y bg:inCollection bg:CollA .\n" +
- " ?y rdf:type bg:Entry .\n" +
- " ?y bg:uniqueid ?uid .\n" +
- " ?y bg:title ?title .\n" +
- " ?y bg:etag ?etag .\n" +
- " }";
-
- String bongoAllForEntry1 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " bg:EntryM rdf:type bg:Entry .\n" +
-// " bg:EntryN bg:inCollection bg:CollectionN .\n" +
- " bg:EntryM bg:mimeType ?mimeType .\n" +
- " bg:EntryM bg:etag ?etag .\n" +
- " OPTIONAL { bg:EntryM bg:slug ?slug}.\n" +
- " bg:EntryM bg:uniqueid ?uniqueid .\n" +
-// " bg:EntryN bg:title ?title .\n" +
-// " bg:EntryN bg:marking ?marking .\n" +
-// " bg:EntryN bg:mediaMarking ?mediaMarking .\n" +
-// " bg:EntryN bg:editedTime ?editedTime .\n" +
-// " bg:EntryN bg:modifiedTime ?modifiedTime .\n" +
-// " bg:EntryN bg:publishedTime ?publishedTime .\n" +
-// " bg:EntryN bg:mediaStorageId ?mediaStorageId .\n" +
-// " bg:EntryN bg:mediaModifiedTime ?mediaModifiedTime .\n" +
-// " bg:EntryN bg:entryStorageId ?entryStorageId .\n" +
- " }";
-
- String bongoEntryAllAuthors = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " bg:Entry1 bg:hasAuthor ?y .\n" +
- " }";
-
- String bongoEntriesModAfter = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX bg: <http://mvm.com/rdf/bongo/bongo.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x bg:editedTime ?edTime .\n" +
- " FILTER (xsd:dateTime(?edTime) >= \"2010-01-01T00:00:00\"^^xsd:dateTime)\n" +
- " }";
-
- String cimData = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX mm: <http://mvm.com/owl/mm.owl#>\n" +
- " PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
- " SELECT * WHERE\n" +
- " {\n" +
- " ?x rdf:type mm:ComputerSystem .\n" +
- " ?x mm:hasRunningOS ?y .\n" +
- " ?y mm:name ?z .\n" +
- " }";
-
- String cimData2 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- " PREFIX mm: <http://mvm.com/owl/mm.owl#>\n" +
- " PREFIX mmcs: <http://mvm.com/owl/mm.owl#urn:uuid:some:>\n" +
- " SELECT ?pred ?obj WHERE {\n" +
- " mmcs:computersystem ?pred ?obj\n" +
- " }";
-
- String cimData3 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "SELECT ?pred ?obj WHERE {\n" +
- "<http://mvm.com/owl/mm.owl#urn:mm:mvm:lts:root/cimv2:PG_OperatingSystem.CreationClassName=CIM_OperatingSystem,CSCreationClassName=CIM_UnitaryComputerSystem,CSName=nimbus02.bullpen.net,Name=Red_Hat_Enterprise_Linux_Server> ?pred ?obj\n" +
- "}";
-
- String cimHasInstalledSoftware = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT DISTINCT ?obj ?name ?caption WHERE {\n" +
-// " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus06.bullpen.net:Red_Hat_Enterprise_Linux_Server> mm:hasInstalledSoftware ?obj .\n" +
- " ?serv mm:hasInstalledSoftware ?obj .\n" +
- " ?obj mm:name ?name ;\n" +
- " mm:caption ?caption .\n" +
- "}";
-
- String cimHasRunningSoftware = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * WHERE {\n" +
- " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> mm:hasRunningProcess ?obj .\n" +
- " ?obj mm:name ?name ; \n" +
- " mm:handle ?handle ; \n" +
- " mm:description ?description ; \n" +
- " mm:caption ?caption ; \n" +
- " mm:parameters ?params . \n" +
- "}";
-
- String cimCpu = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * \n" +
- "WHERE {\n" +
- " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:CIM_ComputerSystem:stratus10> mm:hasProcessor ?obj .\n" +
- " ?obj mm:maxClockSpeed ?speed .\n" +
- " ?obj mm:loadPercentage ?load .\n" +
- " ?obj mm:elementName ?type ." +
- "}";
-
- String cimCpuLoad = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * \n" +
- "WHERE {\n" +
- " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:CIM_ComputerSystem:stratus10> mm:hasProcessor ?obj .\n" +
- " ?obj mm:loadPercentage ?load ." +
- "}";
-
-
- String cimHasFileSystem = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT * WHERE {\n" +
-// " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> mm:hasFileSystem ?obj ." +
- " ?serv mm:hasFileSystem ?obj ." +
- " ?obj mm:availableSpace ?available .\n" +
- " ?obj mm:fileSystemSize ?size .\n" +
- " ?obj mm:percentageSpaceUse ?use ." +
- "}";
-
- String clusterKolm = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT ?name ?cluster ?srv ?ncd ?thresh ?ts WHERE {\n" +
- " ?cluster kolm:relatesTo ?pt ;\n" +
- " kolm:threshold ?thresh .\n" +
- " ?pt kolm:serverRef ?srv ;\n" +
- " kolm:ncd ?ncd ;\n" +
- " kolm:timestamp ?ts .\n" +
- " ?srv mm:CSName ?name .\n" +
- "} \n" +
- " ORDER BY ?cluster ?srv ?ncd";
-
- String clusterKolm2 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT ?cserv ?srv ?ncd ?thresh ?ts WHERE {\n" +
- " ?cpt kolm:ncd \"0.0\" .\n" +
- " ?cpt kolm:serverRef ?cserv .\n" +
- " ?cluster kolm:relatesTo ?cpt ;\n" +
- " kolm:relatesTo ?pt ;\n" +
- " kolm:timestamp ?cts ;\n" +
- " kolm:threshold ?thresh .\n" +
- " ?pt kolm:serverRef ?srv ;\n" +
- " kolm:ncd ?ncd ;\n" +
- " kolm:timestamp ?ts .\n" +
-// " ?srv mm:CSName ?name .\n" +
- " FILTER (?cts >= \"1290616617624\")" +
- "} \n" +
- " ORDER BY ?cserv ?ncd ?srv";
-
- String clusterKolmOtherClusters = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT ?cserv ?srv ?ncd WHERE {\n" +
- " ?cpt kolm:ncd \"0.0\" .\n" +
- " ?cpt kolm:serverRef ?cserv .\n" +
- " ?cluster kolm:relatesTo ?cpt .\n" +
- " ?cluster kolm:distanceTo ?pt .\n" +
- " ?cluster kolm:timestamp ?cts .\n" +
-// " kolm:threshold ?thresh .\n" +
- " ?pt kolm:serverRef ?srv ;\n" +
- " kolm:ncd ?ncd ;\n" +
- " kolm:timestamp ?ts .\n" +
-// " ?srv mm:CSName ?name .\n" +
- " FILTER (?cts >= \"1290616617624\")" +
- "} \n" +
- " ORDER BY ?cserv ?srv ?ncd";
-
- String clusterKolmStratus13 = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "PREFIX kolm: <http://mvm.com/lrn/2010/11/kolm#>\n" +
- "SELECT DISTINCT ?srv ?ncd WHERE {\n" +
- " ?pt kolm:serverRef <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus13:Red_Hat_Enterprise_Linux_Server> .\n" +
- " ?cluster kolm:relatesTo ?pt .\n" +
- " ?cluster kolm:relatesTo ?pt2 .\n" +
- " ?pt2 kolm:serverRef ?srv .\n" +
-// " ?cluster kolm:relatesTo ?pt ;\n" +
-// " kolm:threshold ?thresh .\n" +
-// " ?pt kolm:serverRef <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> ;\n" +
- " ?pt2 kolm:ncd ?ncd .\n" +
- " ?cluster kolm:timestamp ?ts .\n" +
-// " <http://mvm.com/owl/2010/10/mm.owl#urn:mm:mvm:LTS:root/cimv2:PG_OperatingSystem:CIM_ComputerSystem:stratus10:Red_Hat_Enterprise_Linux_Server> mm:CSName ?name .\n" +
- "} \n" +
- " ORDER BY ?ncd";
-
- String cimLatestMeasure = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
- "PREFIX mm: <http://mvm.com/owl/2010/10/mm.owl#>\n" +
- "SELECT ?proc ?val ?time WHERE {\n" +
- " ?proc mm:loadPercentage ?val .\n" +
- " ?subj rdf:subject ?proc .\n" +
- " ?subj rdf:object ?val2 .\n" +
- " ?subj rdf:type rdf:Statement ;\n" +
- " \t mm:reportedAt ?time .\n" +
- " FILTER (?val2 = ?val) }\n" +
- "ORDER BY DESC(?time)\n" +
- "LIMIT 250";
-
-// String query = "DELETE {?subj <http://mvm.com/rdf/mm/relatesTo> <http://mvm.com/rdf/mm/LTS::stratus30>} WHERE { ?subj <http://mvm.com/rdf/mm/relatesTo> <http://mvm.com/rdf/mm/LTS::stratus30>}";
-//
- String query = artistQuery;
- System.out.println(query);
- System.out.println(System.currentTimeMillis());
-
- /**
- * Create url object to POST to the running container
- */
-
- String queryenc = URLEncoder.encode(query, "UTF-8");
-
- URL url = new URL("http://10.41.1.109:8080/rdfTripleStore/queryrdf?query=" + queryenc);
- URLConnection urlConnection = url.openConnection();
- urlConnection.setDoOutput(true);
-
- /**
- * Get the corresponding response from server, if any
- */
- BufferedReader rd = new BufferedReader(new InputStreamReader(
- urlConnection.getInputStream()));
- String line;
- while ((line = rd.readLine()) != null) {
- System.out.println(line);
- }
- rd.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/test/resources/cdrdf.xml
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/test/resources/cdrdf.xml b/partition/web.partition.rdf/src/test/resources/cdrdf.xml
deleted file mode 100644
index 888b60a..0000000
--- a/partition/web.partition.rdf/src/test/resources/cdrdf.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:cd="http://www.recshop.fake/cd#">
-
- <rdf:Description rdf:about="http://www.recshop.fake/cd/Empire_Burlesque">
- <cd:artist>Bob Dylan</cd:artist>
- <cd:country>USA</cd:country>
- <cd:company>Columbia</cd:company>
- <cd:price>10.90</cd:price>
- <cd:year>1985</cd:year>
- </rdf:Description>
-
- <rdf:Description rdf:about="http://www.recshop.fake/cd/Hide_your_heart3">
- <cd:artist>Bonnie Tyler3</cd:artist>
- <cd:country>UK</cd:country>
- <cd:company>CBS Records</cd:company>
- <cd:price>9.90</cd:price>
- <cd:year>1993</cd:year>
- </rdf:Description>
-</rdf:RDF>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/partition/web.partition.rdf/src/test/resources/n3trips.txt
----------------------------------------------------------------------
diff --git a/partition/web.partition.rdf/src/test/resources/n3trips.txt b/partition/web.partition.rdf/src/test/resources/n3trips.txt
deleted file mode 100644
index dfb2ded..0000000
--- a/partition/web.partition.rdf/src/test/resources/n3trips.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/ProductType> .
-<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType1> <http://www.w3.org/2000/01/rdf-schema#label> "Thing" .
-<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType1> <http://www.w3.org/2000/01/rdf-schema#comment> "The Product Type of all Products" .
-<http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType1> <http://purl.org/dc/elements/1.1/publisher> <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/StandardizationInstitution1> .