http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/indexingSailExample/src/main/java/RyaDirectExample.java ---------------------------------------------------------------------- diff --git a/extras/indexingSailExample/src/main/java/RyaDirectExample.java b/extras/indexingSailExample/src/main/java/RyaDirectExample.java deleted file mode 100644 index 947164c..0000000 --- a/extras/indexingSailExample/src/main/java/RyaDirectExample.java +++ /dev/null @@ -1,681 +0,0 @@ - -import java.util.List; - -import mvm.rya.accumulo.AccumuloRdfConfiguration; -import mvm.rya.api.RdfCloudTripleStoreConfiguration; -import mvm.rya.indexing.RyaSailFactory; -import mvm.rya.indexing.accumulo.ConfigUtils; -import mvm.rya.indexing.accumulo.geo.GeoConstants; -import mvm.rya.indexing.external.tupleSet.AccumuloIndexSet; - -import org.apache.accumulo.core.client.AccumuloException; -import org.apache.accumulo.core.client.AccumuloSecurityException; -import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.MutationsRejectedException; -import org.apache.accumulo.core.client.TableExistsException; -import org.apache.accumulo.core.client.TableNotFoundException; -import org.apache.accumulo.core.client.mock.MockInstance; -import org.apache.accumulo.core.client.security.tokens.PasswordToken; -import org.apache.commons.lang.Validate; -import org.apache.hadoop.conf.Configuration; -import org.apache.log4j.Logger; -import org.openrdf.model.URI; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.LiteralImpl; -import org.openrdf.model.impl.URIImpl; -import org.openrdf.model.vocabulary.RDF; -import org.openrdf.model.vocabulary.RDFS; -import org.openrdf.query.BindingSet; -import org.openrdf.query.MalformedQueryException; -import org.openrdf.query.QueryEvaluationException; -import org.openrdf.query.QueryLanguage; -import org.openrdf.query.QueryResultHandlerException; -import org.openrdf.query.TupleQuery; -import org.openrdf.query.TupleQueryResultHandler; -import org.openrdf.query.TupleQueryResultHandlerException; -import org.openrdf.query.Update; -import org.openrdf.query.UpdateExecutionException; -import org.openrdf.repository.RepositoryException; -import org.openrdf.repository.sail.SailRepository; -import org.openrdf.repository.sail.SailRepositoryConnection; -import org.openrdf.sail.Sail; -import org.openrdf.sail.SailException; - -public class RyaDirectExample { - private static final Logger log = Logger.getLogger(RyaDirectExample.class); - - // - // Connection configuration parameters - // - - private static final boolean USE_MOCK_INSTANCE = true; - private static final boolean PRINT_QUERIES = true; - private static final String INSTANCE = "instance"; - private static final String RYA_TABLE_PREFIX = "x_test_triplestore_"; - private static final String AUTHS = ""; - - - - public static void main(String[] args) throws Exception { - Configuration conf = getConf(); - conf.setBoolean(ConfigUtils.DISPLAY_QUERY_PLAN, PRINT_QUERIES); - - log.info("Creating the tables as root."); -// createTables(addRootConf(conf), conf); - - SailRepository repository = null; - SailRepositoryConnection conn = null; - - try { - log.info("Connecting to Indexing Sail Repository."); - - Sail extSail = RyaSailFactory.getInstance(conf); - repository = new SailRepository(extSail); - repository.initialize(); - conn = repository.getConnection(); - - createPCJ(conn); - - long start = System.currentTimeMillis(); - log.info("Running SPARQL Example: Add and Delete"); - testAddAndDelete(conn); - log.info("Running SAIL/SPARQL Example: PCJ Search"); - testPCJSearch(conn); - log.info("Running SAIL/SPARQL Example: Add and Temporal Search"); - testAddAndTemporalSearchWithPCJ(conn); - log.info("Running SAIL/SPARQL Example: Add and Free Text Search with PCJ"); - testAddAndFreeTextSearchWithPCJ(conn); - log.info("Running SPARQL Example: Add Point and Geo Search with PCJ"); - testAddPointAndWithinSearchWithPCJ(conn); - log.info("Running SPARQL Example: Temporal, Freetext, and Geo Search"); - testTemporalFreeGeoSearch(conn); - log.info("Running SPARQL Example: Geo, Freetext, and PCJ Search"); - testGeoFreetextWithPCJSearch(conn); - - log.info("TIME: " + (System.currentTimeMillis() - start) / 1000.); - } finally { - log.info("Shutting down"); - closeQuietly(conn); - closeQuietly(repository); - } - } - - private static void closeQuietly(SailRepository repository) { - if (repository != null) { - try { - repository.shutDown(); - } catch (RepositoryException e) { - // quietly absorb this exception - } - } - } - - private static void closeQuietly(SailRepositoryConnection conn) { - if (conn != null) { - try { - conn.close(); - } catch (RepositoryException e) { - // quietly absorb this exception - } - } - } - - private static Configuration getConf() { - - AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration(); - - conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, USE_MOCK_INSTANCE); - conf.set(ConfigUtils.USE_PCJ, "true"); - conf.set(ConfigUtils.USE_GEO, "true"); - conf.set(ConfigUtils.USE_FREETEXT, "true"); - conf.set(ConfigUtils.USE_TEMPORAL, "true"); - conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, RYA_TABLE_PREFIX); - conf.set(ConfigUtils.CLOUDBASE_USER, "root"); - conf.set(ConfigUtils.CLOUDBASE_PASSWORD, ""); - conf.set(ConfigUtils.CLOUDBASE_INSTANCE, INSTANCE); - conf.setInt(ConfigUtils.NUM_PARTITIONS, 3); - conf.set(ConfigUtils.CLOUDBASE_AUTHS, AUTHS); - - // only geo index statements with geo:asWKT predicates - conf.set(ConfigUtils.GEO_PREDICATES_LIST, GeoConstants.GEO_AS_WKT.stringValue()); - return conf; - } - - public static void testAddAndDelete(SailRepositoryConnection conn) throws MalformedQueryException, - RepositoryException, UpdateExecutionException, QueryEvaluationException, TupleQueryResultHandlerException, - AccumuloException, AccumuloSecurityException, TableNotFoundException { - - // Add data - String query = "INSERT DATA\n"// - + "{ GRAPH <http://updated/test> {\n"// - + " <http://acme.com/people/Mike> " // - + " <http://acme.com/actions/likes> \"A new book\" ;\n"// - + " <http://acme.com/actions/likes> \"Avocados\" .\n" + "} }"; - - log.info("Performing Query"); - - Update update = conn.prepareUpdate(QueryLanguage.SPARQL, query); - update.execute(); - - query = "select ?p ?o { GRAPH <http://updated/test> {<http://acme.com/people/Mike> ?p ?o . }}"; - CountingResultHandler resultHandler = new CountingResultHandler(); - TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, query); - tupleQuery.evaluate(resultHandler); - log.info("Result count : " + resultHandler.getCount()); - - Validate.isTrue(resultHandler.getCount() == 2); - resultHandler.resetCount(); - - // Delete Data - query = "DELETE DATA\n" // - + "{ GRAPH <http://updated/test> {\n" - + " <http://acme.com/people/Mike> <http://acme.com/actions/likes> \"A new book\" ;\n" - + " <http://acme.com/actions/likes> \"Avocados\" .\n" + "}}"; - - update = conn.prepareUpdate(QueryLanguage.SPARQL, query); - update.execute(); - - query = "select ?p ?o { GRAPH <http://updated/test> {<http://acme.com/people/Mike> ?p ?o . }}"; - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, query); - tupleQuery.evaluate(resultHandler); - log.info("Result count : " + resultHandler.getCount()); - - Validate.isTrue(resultHandler.getCount() == 0); - } - - - private static void testPCJSearch(SailRepositoryConnection conn) throws Exception { - - String queryString; - TupleQuery tupleQuery; - CountingResultHandler tupleHandler; - - // ///////////// search for bob - queryString = "SELECT ?e ?c ?l ?o " // - + "{" // - + " ?e a ?c . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + "}";// - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 1); - - // ///////////// search for bob - queryString = "PREFIX fts: <http://rdf.useekm.com/fts#> "// - + "SELECT ?e ?c ?l ?o " // - + "{" // - + " ?c a ?e . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + "}";// - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 2); - - } - - - - - private static void testAddAndTemporalSearchWithPCJ(SailRepositoryConnection conn) throws Exception { - - // create some resources and literals to make statements out of - - String sparqlInsert = "PREFIX time: <http://www.w3.org/2006/time#>\n" - + "INSERT DATA {\n" // - + "_:eventz a time:Instant ;\n" - + " time:inXSDDateTime '2001-01-01T01:01:01-08:00' ;\n" // one second - + " time:inXSDDateTime '2001-01-01T04:01:02.000-05:00'^^<http://www.w3.org/2001/XMLSchema#dateTime> ;\n" // 2 seconds - + " time:inXSDDateTime \"2001-01-01T01:01:03-08:00\" ;\n" // 3 seconds - + " time:inXSDDateTime '2001-01-01T01:01:04-08:00' ;\n" // 4 seconds - + " time:inXSDDateTime '2001-01-01T09:01:05Z' ;\n" - + " time:inXSDDateTime '2006-01-01' ;\n" - + " time:inXSDDateTime '2007-01-01' ;\n" - + " time:inXSDDateTime '2008-01-01' ; .\n" - + "}"; - - Update update = conn.prepareUpdate(QueryLanguage.SPARQL, sparqlInsert); - update.execute(); - - // Find all stored dates. - String queryString = "PREFIX time: <http://www.w3.org/2006/time#> \n"// - + "PREFIX tempo: <tag:rya-rdf.org,2015:temporal#> \n"// - + "SELECT ?event ?time \n" // - + "WHERE { \n" - + " ?event time:inXSDDateTime ?time . \n"// - + " FILTER(tempo:after(?time, '2001-01-01T01:01:03-08:00') ) \n"// after 3 seconds - + "}";// - - - - TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - CountingResultHandler tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 5); - - // Find all stored dates. - queryString = "PREFIX time: <http://www.w3.org/2006/time#> \n"// - + "PREFIX tempo: <tag:rya-rdf.org,2015:temporal#> \n"// - + "SELECT ?event ?time \n" // - + "WHERE { \n" - + " ?event time:inXSDDateTime ?time . \n"// - + " ?event a time:Instant . \n"// - + " FILTER(tempo:after(?time, '2001-01-01T01:01:03-08:00') ) \n"// after 3 seconds - + "}";// - - - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 5); - - - // Find all stored dates. - queryString = "PREFIX time: <http://www.w3.org/2006/time#> \n"// - + "PREFIX tempo: <tag:rya-rdf.org,2015:temporal#> \n"// - + "SELECT ?event ?time ?e ?c ?l ?o \n" // - + "WHERE { \n" - + " ?e a ?c . \n"// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . \n"// - + " ?e <uri:talksTo> ?o . \n"// - + " ?event a time:Instant . \n"// - + " ?event time:inXSDDateTime ?time . \n"// - + " FILTER(tempo:after(?time, '2001-01-01T01:01:03-08:00') ) \n"// after 3 seconds - + "}";// - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 5); - } - - - - - - - private static void testAddAndFreeTextSearchWithPCJ(SailRepositoryConnection conn) throws Exception { - // add data to the repository using the SailRepository add methods - ValueFactory f = conn.getValueFactory(); - URI person = f.createURI("http://example.org/ontology/Person"); - - String uuid; - - uuid = "urn:people:alice"; - conn.add(f.createURI(uuid), RDF.TYPE, person); - conn.add(f.createURI(uuid), RDFS.LABEL, f.createLiteral("Alice Palace Hose", f.createURI("xsd:string"))); - - uuid = "urn:people:bobss"; - conn.add(f.createURI(uuid), RDF.TYPE, person); - conn.add(f.createURI(uuid), RDFS.LABEL, f.createLiteral("Bob Snob Hose", "en")); - - String queryString; - TupleQuery tupleQuery; - CountingResultHandler tupleHandler; - - // ///////////// search for alice - queryString = "PREFIX fts: <http://rdf.useekm.com/fts#> "// - + "SELECT ?person ?match ?e ?c ?l ?o " // - + "{" // - + " ?person <http://www.w3.org/2000/01/rdf-schema#label> ?match . "// - + " FILTER(fts:text(?match, \"pal*\")) " // - + "}";// - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 1); - - - // ///////////// search for alice and bob - queryString = "PREFIX fts: <http://rdf.useekm.com/fts#> "// - + "SELECT ?person ?match " // - + "{" // - + " ?person <http://www.w3.org/2000/01/rdf-schema#label> ?match . "// - + " ?person a <http://example.org/ontology/Person> . "// - + " FILTER(fts:text(?match, \"(alice | bob) *SE\")) " // - + "}";// - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 2); - - // ///////////// search for alice and bob - queryString = "PREFIX fts: <http://rdf.useekm.com/fts#> "// - + "SELECT ?person ?match " // - + "{" // - + " ?person a <http://example.org/ontology/Person> . "// - + " ?person <http://www.w3.org/2000/01/rdf-schema#label> ?match . "// - + " FILTER(fts:text(?match, \"(alice | bob) *SE\")) " // - + " FILTER(fts:text(?match, \"pal*\")) " // - + "}";// - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 1); - - - // ///////////// search for bob - queryString = "PREFIX fts: <http://rdf.useekm.com/fts#> "// - + "SELECT ?person ?match ?e ?c ?l ?o " // - + "{" // - + " ?e a ?c . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + " ?person a <http://example.org/ontology/Person> . "// - + " ?person <http://www.w3.org/2000/01/rdf-schema#label> ?match . "// - + " FILTER(fts:text(?match, \"!alice & hose\")) " // - + "}";// - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 1); - } - - - - private static void testAddPointAndWithinSearchWithPCJ(SailRepositoryConnection conn) throws Exception { - - String update = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "INSERT DATA { " // - + " <urn:feature> a geo:Feature ; " // - + " geo:hasGeometry [ " // - + " a geo:Point ; " // - + " geo:asWKT \"Point(-77.03524 38.889468)\"^^geo:wktLiteral "// - + " ] . " // - + "}"; - - Update u = conn.prepareUpdate(QueryLanguage.SPARQL, update); - u.execute(); - - String queryString; - TupleQuery tupleQuery; - CountingResultHandler tupleHandler; - - // point outside search ring - queryString = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "PREFIX geof: <http://www.opengis.net/def/function/geosparql/> "// - + "SELECT ?feature ?point ?wkt " // - + "{" // - + " ?feature a geo:Feature . "// - + " ?feature geo:hasGeometry ?point . "// - + " ?point a geo:Point . "// - + " ?point geo:asWKT ?wkt . "// - + " FILTER(geof:sfWithin(?wkt, \"POLYGON((-77 39, -76 39, -76 38, -77 38, -77 39))\"^^geo:wktLiteral)) " // - + "}";// - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 0); - - // point inside search ring - queryString = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "PREFIX geof: <http://www.opengis.net/def/function/geosparql/> "// - + "SELECT ?feature ?point ?wkt ?e ?l ?o" // - + "{" // - + " ?feature a ?e . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + " ?feature a geo:Feature . "// - + " ?feature geo:hasGeometry ?point . "// - + " ?point a geo:Point . "// - + " ?point geo:asWKT ?wkt . "// - + " FILTER(geof:sfWithin(?wkt, \"POLYGON((-78 39, -77 39, -77 38, -78 38, -78 39))\"^^geo:wktLiteral)) " // - + "}";// - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 1); - - - // point inside search ring with Pre-Computed Join - queryString = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "PREFIX geof: <http://www.opengis.net/def/function/geosparql/> "// - + "SELECT ?feature ?point ?wkt ?e ?l ?o" // - + "{" // - + " ?feature a ?e . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + " ?feature a geo:Feature . "// - + " ?feature geo:hasGeometry ?point . "// - + " ?point a geo:Point . "// - + " ?point geo:asWKT ?wkt . "// - + " FILTER(geof:sfWithin(?wkt, \"POLYGON((-78 39, -77 39, -77 38, -78 38, -78 39))\"^^geo:wktLiteral)) " // - + "}";// - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() >= 1); // may see points from during previous runs - - // point outside search ring with PCJ - queryString = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "PREFIX geof: <http://www.opengis.net/def/function/geosparql/> "// - + "SELECT ?feature ?point ?wkt ?e ?l ?o " // - + "{" // - + " ?feature a ?e . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + " ?feature a geo:Feature . "// - + " ?feature geo:hasGeometry ?point . "// - + " ?point a geo:Point . "// - + " ?point geo:asWKT ?wkt . "// - + " FILTER(geof:sfWithin(?wkt, \"POLYGON((-77 39, -76 39, -76 38, -77 38, -77 39))\"^^geo:wktLiteral)) " // - + "}";// - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 0); - - // point inside search ring with different Pre-Computed Join - queryString = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "PREFIX geof: <http://www.opengis.net/def/function/geosparql/> "// - + "SELECT ?feature ?point ?wkt ?e ?c ?l ?o " // - + "{" // - + " ?e a ?c . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + " ?feature a geo:Feature . "// - + " ?feature geo:hasGeometry ?point . "// - + " ?point a geo:Point . "// - + " ?point geo:asWKT ?wkt . "// - + " FILTER(geof:sfWithin(?wkt, \"POLYGON((-78 39, -77 39, -77 38, -78 38, -78 39))\"^^geo:wktLiteral)) " // - + "}";// - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 1); - } - - - private static void testTemporalFreeGeoSearch(SailRepositoryConnection conn) throws MalformedQueryException, - RepositoryException, UpdateExecutionException, TupleQueryResultHandlerException, QueryEvaluationException { - - - String queryString; - TupleQuery tupleQuery; - CountingResultHandler tupleHandler; - - // ring containing point - queryString = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "PREFIX geof: <http://www.opengis.net/def/function/geosparql/> "// - + "PREFIX time: <http://www.w3.org/2006/time#> "// - + "PREFIX tempo: <tag:rya-rdf.org,2015:temporal#> "// - + "PREFIX fts: <http://rdf.useekm.com/fts#> "// - + "SELECT ?feature ?point ?wkt ?event ?time ?person ?match" // - + "{" // - + " ?event a time:Instant . \n"// - + " ?event time:inXSDDateTime ?time . \n"// - + " FILTER(tempo:after(?time, '2001-01-01T01:01:03-08:00') ) \n"// after 3 seconds - + " ?feature a geo:Feature . "// - + " ?feature geo:hasGeometry ?point . "// - + " ?point a geo:Point . "// - + " ?point geo:asWKT ?wkt . "// - + " FILTER(geof:sfWithin(?wkt, \"POLYGON((-78 39, -77 39, -77 38, -78 38, -78 39))\"^^geo:wktLiteral)). " // - + " ?person a <http://example.org/ontology/Person> . "// - + " ?person <http://www.w3.org/2000/01/rdf-schema#label> ?match . "// - + " FILTER(fts:text(?match, \"pal*\")) " // - + "}";// - - - - tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - - tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 5); - - } - - - - private static void testGeoFreetextWithPCJSearch(SailRepositoryConnection conn) throws MalformedQueryException, - RepositoryException, TupleQueryResultHandlerException, QueryEvaluationException { - // ring outside point - String queryString = "PREFIX geo: <http://www.opengis.net/ont/geosparql#> "// - + "PREFIX fts: <http://rdf.useekm.com/fts#> "// - + "PREFIX geof: <http://www.opengis.net/def/function/geosparql/> "// - + "SELECT ?feature ?point ?wkt ?e ?c ?l ?o ?person ?match " // - + "{" // - + " ?person a <http://example.org/ontology/Person> . "// - + " ?person <http://www.w3.org/2000/01/rdf-schema#label> ?match . "// - + " FILTER(fts:text(?match, \"!alice & hose\")) " // - + " ?e a ?c . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + " ?feature a geo:Feature . "// - + " ?feature geo:hasGeometry ?point . "// - + " ?point a geo:Point . "// - + " ?point geo:asWKT ?wkt . "// - + " FILTER(geof:sfWithin(?wkt, \"POLYGON((-78 39, -77 39, -77 38, -78 38, -78 39))\"^^geo:wktLiteral)) " // - + "}";// - TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); - CountingResultHandler tupleHandler = new CountingResultHandler(); - tupleQuery.evaluate(tupleHandler); - log.info("Result count : " + tupleHandler.getCount()); - Validate.isTrue(tupleHandler.getCount() == 1); - } - - - - private static void createPCJ(SailRepositoryConnection conn) - throws RepositoryException, AccumuloException, AccumuloSecurityException, TableExistsException { - - String queryString1 = ""// - + "SELECT ?e ?c ?l ?o " // - + "{" // - + " ?c a ?e . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + "}";// - - String queryString2 = ""// - + "SELECT ?e ?c ?l ?o " // - + "{" // - + " ?e a ?c . "// - + " ?e <http://www.w3.org/2000/01/rdf-schema#label> ?l . "// - + " ?e <uri:talksTo> ?o . "// - + "}";// - - - URI obj,subclass,talksTo; - URI person = new URIImpl("urn:people:alice"); - URI feature = new URIImpl("urn:feature"); - URI sub = new URIImpl("uri:entity"); - subclass = new URIImpl("uri:class"); - obj = new URIImpl("uri:obj"); - talksTo = new URIImpl("uri:talksTo"); - - conn.add(person, RDF.TYPE, sub); - conn.add(feature, RDF.TYPE, sub); - conn.add(sub, RDF.TYPE, subclass); - conn.add(sub, RDFS.LABEL, new LiteralImpl("label")); - conn.add(sub, talksTo, obj); - - AccumuloIndexSet ais1 = null; - AccumuloIndexSet ais2 = null; - String tablename1 = RYA_TABLE_PREFIX + "INDEX_1"; - String tablename2 = RYA_TABLE_PREFIX + "INDEX_2"; - - Connector accCon = new MockInstance(INSTANCE).getConnector("root", new PasswordToken("".getBytes())); - accCon.tableOperations().create(tablename1); - accCon.tableOperations().create(tablename2); - - try { - ais1 = new AccumuloIndexSet(queryString1, conn, accCon, tablename1); - ais2 = new AccumuloIndexSet(queryString2, conn, accCon, tablename2); - } catch (MalformedQueryException e) { - e.printStackTrace(); - } catch (SailException e) { - e.printStackTrace(); - } catch (QueryEvaluationException e) { - e.printStackTrace(); - } catch (MutationsRejectedException e) { - e.printStackTrace(); - } catch (TableNotFoundException e) { - e.printStackTrace(); - } - - } - - - private static class CountingResultHandler implements TupleQueryResultHandler { - private int count = 0; - - public int getCount() { - return count; - } - - public void resetCount() { - this.count = 0; - } - - @Override - public void startQueryResult(List<String> arg0) throws TupleQueryResultHandlerException { - } - - @Override - public void handleSolution(BindingSet arg0) throws TupleQueryResultHandlerException { - count++; - System.out.println(arg0); - } - - @Override - public void endQueryResult() throws TupleQueryResultHandlerException { - } - - @Override - public void handleBoolean(boolean arg0) throws QueryResultHandlerException { - // TODO Auto-generated method stub - - } - - @Override - public void handleLinks(List<String> arg0) throws QueryResultHandlerException { - // TODO Auto-generated method stub - - } - } -}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/indexingSailExample/src/main/scripts/RunRyaDirectExample.bat ---------------------------------------------------------------------- diff --git a/extras/indexingSailExample/src/main/scripts/RunRyaDirectExample.bat b/extras/indexingSailExample/src/main/scripts/RunRyaDirectExample.bat deleted file mode 100644 index 3a75f71..0000000 --- a/extras/indexingSailExample/src/main/scripts/RunRyaDirectExample.bat +++ /dev/null @@ -1,25 +0,0 @@ -@echo off -SET CP= - -REM Check to see if javac is on the path -where /Q javac -IF %ERRORLEVEL% NEQ 0 goto :NO_JAVAC - - -for /f %%f in ('DIR /b .\lib\*.jar') do call :append .\lib\%%f - -javac -cp "%CP%" RyaDirectExample.java -java -cp "%CP%" RyaDirectExample - -goto :end - -:append -@echo off -SET CP=%CP%%1; -goto :end - -:NO_JAVAC -echo ERROR: Could not find javac -goto :end - -:end \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/pom.xml ---------------------------------------------------------------------- diff --git a/extras/pom.xml b/extras/pom.xml index b864a76..f3a88d3 100644 --- a/extras/pom.xml +++ b/extras/pom.xml @@ -1,27 +1,43 @@ <?xml version="1.0" encoding="utf-8"?> -<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"> +<!-- +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>mvm.rya</groupId> - <artifactId>parent</artifactId> + <groupId>org.apache.rya</groupId> + <artifactId>rya-project</artifactId> <version>3.2.10-SNAPSHOT</version> </parent> + <artifactId>rya.extras</artifactId> + <name>Apache Rya Extra Projects</name> + <packaging>pom</packaging> - <name>${project.groupId}.${project.artifactId}</name> + <modules> <module>rya.prospector</module> <module>rya.manual</module> <module>tinkerpop.rya</module> + <module>rya.console</module> + <module>indexing</module> + <module>indexingExample</module> </modules> - <profiles> - <profile> - <id>indexing</id> - <modules> - <module>indexing</module> - <module>indexingSailExample</module> - </modules> - </profile> - </profiles> </project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.console/pom.xml ---------------------------------------------------------------------- diff --git a/extras/rya.console/pom.xml b/extras/rya.console/pom.xml index adb4997..1bbb5a0 100644 --- a/extras/rya.console/pom.xml +++ b/extras/rya.console/pom.xml @@ -1,57 +1,65 @@ +<?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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>mvm.rya</groupId> + <groupId>org.apache.rya</groupId> <artifactId>rya.extras</artifactId> - <version>3.2.5-SNAPSHOT</version> + <version>3.2.10-SNAPSHOT</version> </parent> - <artifactId>rya.console</artifactId> - <packaging>jar</packaging> - <url>http://maven.apache.org</url> + <artifactId>rya.console</artifactId> + <name>Apache Rya Console</name> <properties> - <spring.shell.version>1.0.0.M1</spring.shell.version> <jar.mainclass>org.springframework.shell.Bootstrap</jar.mainclass> </properties> <dependencies> <dependency> - <groupId>mvm.rya</groupId> + <groupId>org.apache.rya</groupId> <artifactId>rya.api</artifactId> </dependency> - <dependency> - <groupId>mvm.rya</groupId> + <dependency> + <groupId>org.apache.rya</groupId> <artifactId>accumulo.rya</artifactId> - <exclusions> + <exclusions> <exclusion> <groupId>jline</groupId> <artifactId>jline</artifactId> </exclusion> </exclusions> </dependency> + <dependency> <groupId>org.springframework.shell</groupId> <artifactId>spring-shell</artifactId> - <version>${spring.shell.version}</version> </dependency> - </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> @@ -76,7 +84,7 @@ <archive> <manifest> <addClasspath>true</addClasspath> - <!--<useUniqueVersions>false</useUniqueVersions>--> + <!--<useUniqueVersions>false</useUniqueVersions> --> <classpathPrefix>lib/</classpathPrefix> <mainClass>${jar.mainclass}</mainClass> </manifest> @@ -89,58 +97,4 @@ </plugins> </build> - - <profiles> - <profile> - <id>accumulo</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <dependencies> - <dependency> - <groupId>org.apache.accumulo</groupId> - <artifactId>accumulo-core</artifactId> - </dependency> - <dependency> - <groupId>mvm.rya</groupId> - <artifactId>accumulo.iterators</artifactId> - </dependency> - </dependencies> - </profile> - <profile> - <id>cloudbase</id> - <activation> - <activeByDefault>false</activeByDefault> - </activation> - <dependencies> - <dependency> - <groupId>com.texeltek</groupId> - <artifactId>accumulo-cloudbase-shim</artifactId> - </dependency> - <dependency> - <groupId>mvm.rya</groupId> - <artifactId>cloudbase.iterators</artifactId> - </dependency> - </dependencies> - </profile> - - </profiles> - - <repositories> - <!-- jline 1.0.S2-B is here http://shrub.appspot.com/spring-roo-repository.springsource.org/release/net/sourceforge/jline/jline/1.0.S2-B/ --> - <repository> - <id>spring-roo-repository</id> - <name>Spring Roo Maven Repository</name> - <url>http://spring-roo-repository.springsource.org/release</url> - </repository> - - <repository> - <id>spring-maven-snapshot</id> - <snapshots> - <enabled>true</enabled> - </snapshots> - <name>Springframework Maven SNAPSHOT Repository</name> - <url>http://repo.springsource.org/libs-snapshot</url> - </repository> - </repositories> </project> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.console/src/main/java/mvm/rya/console/RyaBannerProvider.java ---------------------------------------------------------------------- diff --git a/extras/rya.console/src/main/java/mvm/rya/console/RyaBannerProvider.java b/extras/rya.console/src/main/java/mvm/rya/console/RyaBannerProvider.java index 23c028c..2d0fac8 100644 --- a/extras/rya.console/src/main/java/mvm/rya/console/RyaBannerProvider.java +++ b/extras/rya.console/src/main/java/mvm/rya/console/RyaBannerProvider.java @@ -1,26 +1,31 @@ +package mvm.rya.console; + /* - * Copyright 2011-2012 the original author or authors. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ -package mvm.rya.console; + import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; -import org.springframework.shell.support.util.StringUtils; import org.springframework.shell.core.CommandMarker; import org.springframework.shell.core.annotation.CliCommand; import org.springframework.shell.plugin.support.DefaultBannerProvider; +import org.springframework.shell.support.util.OsUtils; import org.springframework.stereotype.Component; /** @@ -32,6 +37,7 @@ public class RyaBannerProvider extends DefaultBannerProvider implements CommandMarker { @CliCommand(value = {"version"}, help = "Displays current CLI version") + @Override public String getBanner() { StringBuffer buf = new StringBuffer(); buf.append("" + @@ -40,22 +46,24 @@ public class RyaBannerProvider extends DefaultBannerProvider "__ /_/ /_ / / / __ `/ _ / _ __ \\_ __ \\_ ___/ __ \\_ /_ _ \\\n" + "_ _, _/_ /_/ // /_/ / / /___ / /_/ / / / /(__ )/ /_/ / / / __/\n" + "/_/ |_| _\\__, / \\__,_/ \\____/ \\____//_/ /_//____/ \\____//_/ \\___/ \n" + - " /____/ " + StringUtils.LINE_SEPARATOR); + " /____/ " + OsUtils.LINE_SEPARATOR); buf.append("Version:" + this.getVersion()); return buf.toString(); } + @Override public String getVersion() { return "3.0.0"; } + @Override public String getWelcomeMessage() { return "Welcome to the Rya Console"; } @Override - public String name() { + public String getProviderName() { return "rya"; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.console/src/main/java/mvm/rya/console/RyaConsoleCommands.java ---------------------------------------------------------------------- diff --git a/extras/rya.console/src/main/java/mvm/rya/console/RyaConsoleCommands.java b/extras/rya.console/src/main/java/mvm/rya/console/RyaConsoleCommands.java index 2882b21..3f63b20 100644 --- a/extras/rya.console/src/main/java/mvm/rya/console/RyaConsoleCommands.java +++ b/extras/rya.console/src/main/java/mvm/rya/console/RyaConsoleCommands.java @@ -1,5 +1,24 @@ package mvm.rya.console; +/* + * 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 info.aduna.iteration.CloseableIteration; @@ -208,4 +227,4 @@ public class RyaConsoleCommands implements CommandMarker { public void setRyaDAO(RyaDAO ryaDAO) { this.ryaDAO = ryaDAO; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.console/src/main/java/mvm/rya/console/RyaHistoryFileNameProvider.java ---------------------------------------------------------------------- diff --git a/extras/rya.console/src/main/java/mvm/rya/console/RyaHistoryFileNameProvider.java b/extras/rya.console/src/main/java/mvm/rya/console/RyaHistoryFileNameProvider.java index e09bda6..97182aa 100644 --- a/extras/rya.console/src/main/java/mvm/rya/console/RyaHistoryFileNameProvider.java +++ b/extras/rya.console/src/main/java/mvm/rya/console/RyaHistoryFileNameProvider.java @@ -1,20 +1,24 @@ +package mvm.rya.console; + /* - * Copyright 2011-2012 the original author or authors. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ -package mvm.rya.console; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; @@ -30,12 +34,13 @@ import org.springframework.stereotype.Component; @Order(Ordered.HIGHEST_PRECEDENCE) public class RyaHistoryFileNameProvider extends DefaultHistoryFileNameProvider{ + @Override public String getHistoryFileName() { return "ryaconsole.log"; } @Override - public String name() { + public String getProviderName() { return "Rya Console History Log"; } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.console/src/main/java/mvm/rya/console/RyaPromptProvider.java ---------------------------------------------------------------------- diff --git a/extras/rya.console/src/main/java/mvm/rya/console/RyaPromptProvider.java b/extras/rya.console/src/main/java/mvm/rya/console/RyaPromptProvider.java index 90c9199..b199819 100644 --- a/extras/rya.console/src/main/java/mvm/rya/console/RyaPromptProvider.java +++ b/extras/rya.console/src/main/java/mvm/rya/console/RyaPromptProvider.java @@ -1,19 +1,24 @@ +package mvm.rya.console; + /* - * Copyright 2011-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ -package mvm.rya.console; + import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; @@ -35,7 +40,7 @@ public class RyaPromptProvider extends DefaultPromptProvider { @Override - public String name() { + public String getProviderName() { return "Rya Console Prompt"; } http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml ---------------------------------------------------------------------- diff --git a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml b/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml index d21543d..e593a48 100644 --- a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml +++ b/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml @@ -1,4 +1,24 @@ <?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. +--> + <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" @@ -7,4 +27,4 @@ <context:component-scan base-package="mvm.rya.console" /> -</beans> \ No newline at end of file +</beans> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/pom.xml ---------------------------------------------------------------------- diff --git a/extras/rya.geo/pom.xml b/extras/rya.geo/pom.xml deleted file mode 100644 index c468158..0000000 --- a/extras/rya.geo/pom.xml +++ /dev/null @@ -1,25 +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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>mvm.rya</groupId> - <artifactId>rya.extras</artifactId> - <version>3.2.10-SNAPSHOT</version> - </parent> - - <artifactId>rya.geo</artifactId> - - <dependencies> - <dependency> - <groupId>mvm.rya</groupId> - <artifactId>rya.api</artifactId> - </dependency> - <dependency> - <groupId>org.openrdf.sesame</groupId> - <artifactId>sesame-queryalgebra-evaluation</artifactId> - <version>${openrdf.sesame.version}</version> - </dependency> - </dependencies> - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/main/java/mvm/rya/geo/GeoDistance.java ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/main/java/mvm/rya/geo/GeoDistance.java b/extras/rya.geo/src/main/java/mvm/rya/geo/GeoDistance.java deleted file mode 100644 index 277d7f6..0000000 --- a/extras/rya.geo/src/main/java/mvm/rya/geo/GeoDistance.java +++ /dev/null @@ -1,34 +0,0 @@ -package mvm.rya.geo; - -/** - * Distance functions for geographic points - */ -public class GeoDistance -{ - private static final double EARTH_RADIUS_KM = 6366.0; - private static final double DEG2RAD = Math.PI / 180; - - /** - * Calculates distance between two geographic points in km - * - * @param lat1 - * @param lon1 - * @param lat2 - * @param lon2 - * @return distance in kilometers - */ - public static double calculate(double lat1, double lon1, double lat2, double lon2) - { - double a1 = lat1 * DEG2RAD; - double a2 = lon1 * DEG2RAD; - double b1 = lat2 * DEG2RAD; - double b2 = lon2 * DEG2RAD; - - double t1 = Math.cos(a1) * Math.cos(a2) * Math.cos(b1) * Math.cos(b2); - double t2 = Math.cos(a1) * Math.sin(a2) * Math.cos(b1) * Math.sin(b2); - double t3 = Math.sin(a1) * Math.sin(b1); - double tt = Math.acos(t1 + t2 + t3); - - return EARTH_RADIUS_KM * tt; - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/main/java/mvm/rya/geo/GeoRyaTypeResolver.java ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/main/java/mvm/rya/geo/GeoRyaTypeResolver.java b/extras/rya.geo/src/main/java/mvm/rya/geo/GeoRyaTypeResolver.java deleted file mode 100644 index 1d31c0b..0000000 --- a/extras/rya.geo/src/main/java/mvm/rya/geo/GeoRyaTypeResolver.java +++ /dev/null @@ -1,16 +0,0 @@ -package mvm.rya.geo; - -import mvm.rya.api.resolver.impl.RyaTypeResolverImpl; - -/** - * Type resolver for rya geo location type - */ -public class GeoRyaTypeResolver extends RyaTypeResolverImpl -{ - public static final int GEO_LITERAL_MARKER = 11; - - public GeoRyaTypeResolver() - { - super((byte) GEO_LITERAL_MARKER, RyaGeoSchema.GEOPOINT); - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/main/java/mvm/rya/geo/RyaGeoSchema.java ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/main/java/mvm/rya/geo/RyaGeoSchema.java b/extras/rya.geo/src/main/java/mvm/rya/geo/RyaGeoSchema.java deleted file mode 100644 index 06befc2..0000000 --- a/extras/rya.geo/src/main/java/mvm/rya/geo/RyaGeoSchema.java +++ /dev/null @@ -1,16 +0,0 @@ -package mvm.rya.geo; - -import org.openrdf.model.URI; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.ValueFactoryImpl; - -/** - * Rya GEO RDF Constants - */ -public class RyaGeoSchema -{ - private static final ValueFactory VF = ValueFactoryImpl.getInstance(); - - public static final URI NAMESPACE = VF.createURI("urn:mvm.rya/geo#"); - public static final URI GEOPOINT = VF.createURI(NAMESPACE.toString(), "geopoint"); -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/main/java/mvm/rya/geo/Verify.java ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/main/java/mvm/rya/geo/Verify.java b/extras/rya.geo/src/main/java/mvm/rya/geo/Verify.java deleted file mode 100644 index 752793e..0000000 --- a/extras/rya.geo/src/main/java/mvm/rya/geo/Verify.java +++ /dev/null @@ -1,68 +0,0 @@ -package mvm.rya.geo; - -import org.openrdf.model.Literal; -import org.openrdf.model.URI; -import org.openrdf.model.Value; -import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException; - -/** - * Utility for verifying function arguments - */ -public class Verify -{ - private final Value[] args; - - /** - * Entry point for creating a Verify - * - * @param args - * @return verify - */ - public static Verify that(Value... args) - { - return new Verify(args); - } - - private Verify(Value... args) - { - this.args = args; - } - - /** - * verifies the number of arguments - * - * @param numArgs - * @throws ValueExprEvaluationException - */ - public void hasLength(int numArgs) throws ValueExprEvaluationException - { - if (args.length != numArgs) - { - throw new ValueExprEvaluationException("expected " + numArgs + " but received " + args.length); - } - } - - /** - * verifies the arguments are of the specified type - * - * @param type - * @throws ValueExprEvaluationException - */ - public void isLiteralOfType(URI type) throws ValueExprEvaluationException - { - for (Value arg : args) - { - if (!(arg instanceof Literal)) - { - throw new ValueExprEvaluationException(arg + " is not a literal"); - } - - Literal l = (Literal) arg; - - if (!type.equals(l.getDatatype())) - { - throw new ValueExprEvaluationException("expected type " + type + " but received " + l.getDatatype()); - } - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/main/java/mvm/rya/geo/WithinRange.java ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/main/java/mvm/rya/geo/WithinRange.java b/extras/rya.geo/src/main/java/mvm/rya/geo/WithinRange.java deleted file mode 100644 index 55bce4a..0000000 --- a/extras/rya.geo/src/main/java/mvm/rya/geo/WithinRange.java +++ /dev/null @@ -1,69 +0,0 @@ -package mvm.rya.geo; - -import java.util.Arrays; - -import org.openrdf.model.Value; -import org.openrdf.model.ValueFactory; -import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException; -import org.openrdf.query.algebra.evaluation.function.Function; - -/** - * Custom function for check a lat/lon is ithin a certain range of another - * - * Example SPARQL Usage: - * - * <pre> - * # Give me all cities that are within 50 km of lat/lon 20.00,-30.00 - * - * PREFIX geo: <urn:mvm.rya/geo#> - * SELECT ?city - * WHERE - * { - * ?city geo:locatedAt ?latLon . - * FILTER( geo:withinRange(?latLon, "20.00,-30.00"^^geo:geopoint, 50 ) - * } - * </pre> - */ -public class WithinRange implements Function -{ - private static final String FUN_NAME = "withinRange"; - - @Override - public Value evaluate(ValueFactory vf, Value... args) throws ValueExprEvaluationException - { - System.out.println("running with args: " + Arrays.toString(args)); - - Verify.that(args).hasLength(3); - Verify.that(args[0], args[1]).isLiteralOfType(RyaGeoSchema.GEOPOINT); - - GeoPoint testPt = new GeoPoint(args[0]); - GeoPoint targetPt = new GeoPoint(args[1]); - double radius = Double.parseDouble(args[2].stringValue()); - - double dist = GeoDistance.calculate(testPt.lat, testPt.lon, targetPt.lat, targetPt.lon); - - System.out.println("distance from (" + testPt.lat + "," + testPt.lon + ") to (" + targetPt.lat + "," + targetPt.lon - + ") is " + dist); - - return vf.createLiteral(dist <= radius); - } - - @Override - public String getURI() - { - return RyaGeoSchema.NAMESPACE.toString() + FUN_NAME; - } - - private class GeoPoint - { - public double lat; - public double lon; - - public GeoPoint(Value val) - { - String[] tokens = val.stringValue().split(","); - lat = Double.parseDouble(tokens[0]); - lon = Double.parseDouble(tokens[1]); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/main/resources/META-INF/services/mvm.rya.api.resolver.RyaTypeResolver ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/main/resources/META-INF/services/mvm.rya.api.resolver.RyaTypeResolver b/extras/rya.geo/src/main/resources/META-INF/services/mvm.rya.api.resolver.RyaTypeResolver deleted file mode 100644 index 028b525..0000000 --- a/extras/rya.geo/src/main/resources/META-INF/services/mvm.rya.api.resolver.RyaTypeResolver +++ /dev/null @@ -1 +0,0 @@ -mvm.rya.geo.GeoRyaTypeResolver \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function b/extras/rya.geo/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function deleted file mode 100644 index 5f853fe..0000000 --- a/extras/rya.geo/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function +++ /dev/null @@ -1 +0,0 @@ -mvm.rya.geo.WithinRange \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/test/java/mvm/rya/geo/GeoRyaTypeResolverTest.java ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/test/java/mvm/rya/geo/GeoRyaTypeResolverTest.java b/extras/rya.geo/src/test/java/mvm/rya/geo/GeoRyaTypeResolverTest.java deleted file mode 100644 index c3284c7..0000000 --- a/extras/rya.geo/src/test/java/mvm/rya/geo/GeoRyaTypeResolverTest.java +++ /dev/null @@ -1,25 +0,0 @@ -package mvm.rya.geo; - -import mvm.rya.api.domain.RyaType; - -import org.junit.Assert; -import org.junit.Test; - -public class GeoRyaTypeResolverTest -{ - private final GeoRyaTypeResolver resolver = new GeoRyaTypeResolver(); - - @Test - public void testSerialization_andBack() throws Exception - { - String latLon = "20.00,30.00"; - RyaType orig = new RyaType(RyaGeoSchema.GEOPOINT, latLon); - - byte[] bytes = resolver.serialize(orig); - RyaType copy = resolver.deserialize(bytes); - - Assert.assertEquals(latLon, copy.getData()); - Assert.assertEquals(orig, copy); - Assert.assertEquals(RyaGeoSchema.GEOPOINT, copy.getDataType()); - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.geo/src/test/java/mvm/rya/geo/WithinRangeTest.java ---------------------------------------------------------------------- diff --git a/extras/rya.geo/src/test/java/mvm/rya/geo/WithinRangeTest.java b/extras/rya.geo/src/test/java/mvm/rya/geo/WithinRangeTest.java deleted file mode 100644 index 2e1c2a7..0000000 --- a/extras/rya.geo/src/test/java/mvm/rya/geo/WithinRangeTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package mvm.rya.geo; - -import org.junit.Assert; -import org.junit.Test; -import org.openrdf.model.Value; -import org.openrdf.model.ValueFactory; -import org.openrdf.model.impl.ValueFactoryImpl; -import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException; - -public class WithinRangeTest -{ - private static final double MI2KM = 1.60934; - - private static final ValueFactory VF = ValueFactoryImpl.getInstance(); - private static final Value TRUE = VF.createLiteral(true); - private static final Value FALSE = VF.createLiteral(false); - - // Distance between Washington, DC and Atlanta is roughly 600 miles - private static final Value WASHINGTON_DC = VF.createLiteral("40.15999984741211,-80.25", RyaGeoSchema.GEOPOINT); - private static final Value ATLANTA = VF.createLiteral("33.75,-84.383", RyaGeoSchema.GEOPOINT); - - private WithinRange fun = new WithinRange(); - - @Test - public void testWithinRange() throws ValueExprEvaluationException - { - double miles = 900; - Value distance = VF.createLiteral(miles * MI2KM); - - Assert.assertEquals(TRUE, fun.evaluate(VF, ATLANTA, WASHINGTON_DC, distance)); - Assert.assertEquals(TRUE, fun.evaluate(VF, WASHINGTON_DC, WASHINGTON_DC, distance)); - } - - @Test - public void testWithinRange_notWithinRange() throws ValueExprEvaluationException - { - double miles = 200; - Value distance = VF.createLiteral(miles * MI2KM); - - Assert.assertEquals(FALSE, fun.evaluate(VF, ATLANTA, WASHINGTON_DC, distance)); - Assert.assertEquals(TRUE, fun.evaluate(VF, WASHINGTON_DC, WASHINGTON_DC, distance)); - } -} http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/pom.xml ---------------------------------------------------------------------- diff --git a/extras/rya.manual/pom.xml b/extras/rya.manual/pom.xml index f79359a..75c106a 100644 --- a/extras/rya.manual/pom.xml +++ b/extras/rya.manual/pom.xml @@ -1,17 +1,34 @@ <?xml version="1.0" encoding="UTF-8"?> -<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> +<!-- +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>mvm.rya</groupId> + <groupId>org.apache.rya</groupId> <artifactId>rya.extras</artifactId> <version>3.2.10-SNAPSHOT</version> </parent> <artifactId>rya.manual</artifactId> - <name>RYA Manual</name> - <packaging>jar</packaging> + <name>Apache Rya Manual</name> <build> <plugins> @@ -28,7 +45,7 @@ <configuration> <inputEncoding>UTF-8</inputEncoding> <outputEncoding>UTF-8</outputEncoding> - </configuration> + </configuration> </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/_index.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/_index.md b/extras/rya.manual/src/site/markdown/_index.md index 184b94f..bf030a3 100644 --- a/extras/rya.manual/src/site/markdown/_index.md +++ b/extras/rya.manual/src/site/markdown/_index.md @@ -1,4 +1,25 @@ +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> + # Rya - [Overview](overview.md) - [Quick Start](quickstart.md) http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/alx.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/alx.md b/extras/rya.manual/src/site/markdown/alx.md index 78a4c8e..2d0eae7 100644 --- a/extras/rya.manual/src/site/markdown/alx.md +++ b/extras/rya.manual/src/site/markdown/alx.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Alx Rya Integration Alx is a modular framework for developing applications. Rya has mechanisms to integrate directly into Alx to provide other modules access to queries. http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/build-source.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/build-source.md b/extras/rya.manual/src/site/markdown/build-source.md index e811622..07f0cb5 100644 --- a/extras/rya.manual/src/site/markdown/build-source.md +++ b/extras/rya.manual/src/site/markdown/build-source.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Building from Source ## Prerequisites http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/eval.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/eval.md b/extras/rya.manual/src/site/markdown/eval.md index 8a40389..fc4095b 100644 --- a/extras/rya.manual/src/site/markdown/eval.md +++ b/extras/rya.manual/src/site/markdown/eval.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Prospects Table The Prospects Table provides statistics on the number of subject/predicate/object data found in the triple store. It is currently a http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/index.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/index.md b/extras/rya.manual/src/site/markdown/index.md index aa49e3b..0748284 100644 --- a/extras/rya.manual/src/site/markdown/index.md +++ b/extras/rya.manual/src/site/markdown/index.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Rya This project contains documentation about the Rya, a scalable RDF triple store on top of Accumulo. http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/infer.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/infer.md b/extras/rya.manual/src/site/markdown/infer.md index ee769c5..35b6f14 100644 --- a/extras/rya.manual/src/site/markdown/infer.md +++ b/extras/rya.manual/src/site/markdown/infer.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Inferencing The current inferencing set supported includes: http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md b/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md index 472b409..220cf03 100644 --- a/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md +++ b/extras/rya.manual/src/site/markdown/loadPrecomputedJoin.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Load Pre-computed Join A tool has been created to load a pre-computed join. This tool will generate an index to support a pre-computed join on a user provided SPARQL query, and then register that query within Rya. http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/loaddata.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/loaddata.md b/extras/rya.manual/src/site/markdown/loaddata.md index 3a66d6a..2c6bc00 100644 --- a/extras/rya.manual/src/site/markdown/loaddata.md +++ b/extras/rya.manual/src/site/markdown/loaddata.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Load Data There are a few mechanisms to load data http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/overview.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/overview.md b/extras/rya.manual/src/site/markdown/overview.md index 546530f..068bd57 100644 --- a/extras/rya.manual/src/site/markdown/overview.md +++ b/extras/rya.manual/src/site/markdown/overview.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Overview RYA is a scalable RDF Store that is built on top of a Columnar Index Store (such as Accumulo). It is implemented as an extension to OpenRdf to provide easy query mechanisms (SPARQL, SERQL, etc) and Rdf data storage (RDF/XML, NTriples, etc). http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/querydata.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/querydata.md b/extras/rya.manual/src/site/markdown/querydata.md index 70f3045..a7e2a6d 100644 --- a/extras/rya.manual/src/site/markdown/querydata.md +++ b/extras/rya.manual/src/site/markdown/querydata.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Query Data There are a few mechanisms to query data http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/quickstart.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/quickstart.md b/extras/rya.manual/src/site/markdown/quickstart.md index 52bc111..4f0aa05 100644 --- a/extras/rya.manual/src/site/markdown/quickstart.md +++ b/extras/rya.manual/src/site/markdown/quickstart.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Quick Start This tutorial will outline the steps needed to get quickly started with the Rya store using the web based endpoint. http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/sm-addauth.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/sm-addauth.md b/extras/rya.manual/src/site/markdown/sm-addauth.md index aadef07..2f32422 100644 --- a/extras/rya.manual/src/site/markdown/sm-addauth.md +++ b/extras/rya.manual/src/site/markdown/sm-addauth.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Add Authentication This tutorial will give a few examples on how to load and query data with authentication. http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/80faf06d/extras/rya.manual/src/site/markdown/sm-firststeps.md ---------------------------------------------------------------------- diff --git a/extras/rya.manual/src/site/markdown/sm-firststeps.md b/extras/rya.manual/src/site/markdown/sm-firststeps.md index c08c035..34f995b 100644 --- a/extras/rya.manual/src/site/markdown/sm-firststeps.md +++ b/extras/rya.manual/src/site/markdown/sm-firststeps.md @@ -1,3 +1,24 @@ + +<!-- + +[comment]: # Licensed to the Apache Software Foundation (ASF) under one +[comment]: # or more contributor license agreements. See the NOTICE file +[comment]: # distributed with this work for additional information +[comment]: # regarding copyright ownership. The ASF licenses this file +[comment]: # to you under the Apache License, Version 2.0 (the +[comment]: # "License"); you may not use this file except in compliance +[comment]: # with the License. You may obtain a copy of the License at +[comment]: # +[comment]: # http://www.apache.org/licenses/LICENSE-2.0 +[comment]: # +[comment]: # Unless required by applicable law or agreed to in writing, +[comment]: # software distributed under the License is distributed on an +[comment]: # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +[comment]: # KIND, either express or implied. See the License for the +[comment]: # specific language governing permissions and limitations +[comment]: # under the License. + +--> # Typical First Steps In this tutorial, I will give you a quick overview of some of the first steps I perform to get data loaded and read for query.
