├── .travis.yml ├── LICENSE ├── README.md └── solrdf ├── .gitignore ├── pom.xml ├── solrdf-client ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── gazzax │ │ │ └── labs │ │ │ └── solrdf │ │ │ └── client │ │ │ ├── SolRDF.java │ │ │ ├── UnableToAddException.java │ │ │ ├── UnableToBuildSolRDFClientException.java │ │ │ ├── UnableToCommitException.java │ │ │ ├── UnableToDeleteException.java │ │ │ ├── UnableToExecuteQueryException.java │ │ │ └── package-info.java │ └── resources │ │ ├── log4j.xml │ │ └── rebel.xml │ └── test │ └── java │ └── org │ └── gazzax │ └── labs │ └── solrdf │ └── client │ ├── AddTestCase.java │ ├── SearchTestCase.java │ └── TestUtility.java ├── solrdf-core ├── pom.xml └── src │ ├── main │ └── java │ │ ├── org │ │ └── gazzax │ │ │ └── labs │ │ │ └── solrdf │ │ │ ├── F.java │ │ │ ├── Field.java │ │ │ ├── NTriples.java │ │ │ ├── Names.java │ │ │ ├── Strings.java │ │ │ ├── graph │ │ │ ├── DatasetGraphSupertypeLayer.java │ │ │ ├── GraphEventConsumer.java │ │ │ ├── SolRDFGraph.java │ │ │ ├── cloud │ │ │ │ ├── CloudDatasetGraph.java │ │ │ │ ├── CloudGraph.java │ │ │ │ ├── DeepPagingIterator.java │ │ │ │ ├── FieldInjectorRegistry.java │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── standalone │ │ │ │ ├── DeepPagingIterator.java │ │ │ │ ├── FieldInjectorRegistry.java │ │ │ │ ├── LocalDatasetGraph.java │ │ │ │ ├── LocalGraph.java │ │ │ │ └── package-info.java │ │ │ ├── handler │ │ │ ├── Sparql11GraphStoreProtocolHandler.java │ │ │ ├── package-info.java │ │ │ ├── search │ │ │ │ └── handler │ │ │ │ │ ├── Sparql11SearchHandler.java │ │ │ │ │ └── package-info.java │ │ │ └── update │ │ │ │ ├── RdfBulkUpdateRequestHandler.java │ │ │ │ ├── RdfUpdateRequestHandler.java │ │ │ │ ├── Sparql11UpdateRdfDataLoader.java │ │ │ │ └── package-info.java │ │ │ ├── log │ │ │ ├── Log.java │ │ │ ├── MessageCatalog.java │ │ │ ├── MessageFactory.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── response │ │ │ ├── HybridResponseWriter.java │ │ │ ├── HybridXMLWriter.java │ │ │ └── package-info.java │ │ │ └── search │ │ │ ├── component │ │ │ ├── PagedResultSet.java │ │ │ └── SparqlSearchComponent.java │ │ │ └── qparser │ │ │ ├── SparqlQParser.java │ │ │ ├── SparqlQParserPlugin.java │ │ │ ├── SparqlQuery.java │ │ │ └── package-info.java │ │ └── rebel.xml │ ├── solr-home │ ├── solr.xml │ └── store │ │ ├── conf │ │ ├── schema.xml │ │ └── solrconfig.xml │ │ └── core.properties │ └── test │ └── java │ └── org │ └── gazzax │ └── labs │ └── solrdf │ ├── FTestCase.java │ ├── MisteryGuest.java │ ├── StringsTestCase.java │ ├── TestUtility.java │ ├── graph │ └── standalone │ │ └── FieldInjectorRegistryTestCase.java │ ├── handler │ ├── Sparql11GraphStoreProtocolHandlerTestCase.java │ ├── search │ │ └── handler │ │ │ └── Sparql11SearchHandlerTestCase.java │ └── update │ │ └── Sparql11UpdateRdfDataLoaderTestCase.java │ ├── log │ └── LogTestCase.java │ ├── response │ └── ResponseContentTypeChoiceTestCase.java │ └── search │ ├── component │ ├── PagedResultSetTestCase.java │ └── SparqlSearchComponentTestCase.java │ └── qparser │ └── SparqlQParserTestCase.java ├── solrdf-integration-tests ├── pom.xml └── src │ ├── assembly │ └── development.xml │ └── test │ ├── java │ ├── org │ │ └── gazzax │ │ │ └── labs │ │ │ └── solrdf │ │ │ ├── MisteryGuest.java │ │ │ ├── TestUtility.java │ │ │ └── integration │ │ │ ├── IntegrationTestSupertypeLayer.java │ │ │ └── sparql │ │ │ ├── FromAndFromNamedClauses_ITCase.java │ │ │ ├── Issue112_ITCase.java │ │ │ ├── Issue53_ITCase.java │ │ │ ├── Issue64_ITCase.java │ │ │ ├── LearningSparqlSupertypeLayer.java │ │ │ ├── LearningSparql_ASK_ITCase.java │ │ │ ├── LearningSparql_CONSTRUCT_DESCRIBE_ITCase.java │ │ │ ├── LearningSparql_SELECT_ITCase.java │ │ │ └── LearningSparql_UPDATE_ITCase.java │ └── rebel.xml │ └── resources │ ├── LearningSPARQLExamples │ ├── README │ ├── ex001.rq │ ├── ex002.ttl │ ├── ex003.rq │ ├── ex006.rq │ ├── ex007.rq │ ├── ex008.rq │ ├── ex010.rq │ ├── ex012.ttl │ ├── ex013.rq │ ├── ex015.rq │ ├── ex017.rq │ ├── ex019.rq │ ├── ex021.rq │ ├── ex023.rq │ ├── ex033.ttl │ ├── ex034.ttl │ ├── ex035.rdf │ ├── ex036.ttl │ ├── ex037.ttl │ ├── ex038.ttl │ ├── ex039.ttl │ ├── ex040.ttl │ ├── ex041.ttl │ ├── ex042.ttl │ ├── ex043.ttl │ ├── ex044.ttl │ ├── ex045.ttl │ ├── ex046.ttl │ ├── ex047.rq │ ├── ex048.rq │ ├── ex049.rq │ ├── ex050.ttl │ ├── ex052.rq │ ├── ex054.ttl │ ├── ex055.rq │ ├── ex057.rq │ ├── ex059.rq │ ├── ex061.rq │ ├── ex063.rq │ ├── ex065.rq │ ├── ex067.rq │ ├── ex068.rq │ ├── ex069.ttl │ ├── ex070.rq │ ├── ex072.ttl │ ├── ex073.ttl │ ├── ex074.ttl │ ├── ex075.rq │ ├── ex077.rq │ ├── ex078.rq │ ├── ex080.rq │ ├── ex082.rq │ ├── ex083.rq │ ├── ex084.rq │ ├── ex086.rq │ ├── ex088.rq │ ├── ex090.rq │ ├── ex092.rq │ ├── ex094.rq │ ├── ex098.rq │ ├── ex100.ttl │ ├── ex101.rq │ ├── ex103.rq │ ├── ex104.ttl │ ├── ex105.rq │ ├── ex107.rq │ ├── ex109.rq │ ├── ex111.rq │ ├── ex112.rq │ ├── ex114.rq │ ├── ex115.ttl │ ├── ex116.rq │ ├── ex118.rq │ ├── ex120.rq │ ├── ex122.ttl │ ├── ex123.rq │ ├── ex125.ttl │ ├── ex126.rq │ ├── ex128.rq │ ├── ex130.rq │ ├── ex132.ttl │ ├── ex133.ttl │ ├── ex134.ttl │ ├── ex135.rq │ ├── ex136.rq │ ├── ex137.rq │ ├── ex138.ttl │ ├── ex139.rq │ ├── ex141.rq │ ├── ex143.rq │ ├── ex144.rq │ ├── ex145.ttl │ ├── ex146.rq │ ├── ex148.rq │ ├── ex149.rq │ ├── ex151.rq │ ├── ex153.rq │ ├── ex155.rq │ ├── ex156.rq │ ├── ex158.rq │ ├── ex160.rq │ ├── ex162.rq │ ├── ex164.rq │ ├── ex166.rq │ ├── ex167.rq │ ├── ex170.rq │ ├── ex172.rq │ ├── ex174.rq │ ├── ex176.rq │ ├── ex178.rq │ ├── ex180.rq │ ├── ex182.rq │ ├── ex184.rq │ ├── ex185.rq │ ├── ex187.ttl │ ├── ex188.rq │ ├── ex190.rq │ ├── ex192.rq │ ├── ex193.ttl │ ├── ex194.rq │ ├── ex196.rq │ ├── ex198.ttl │ ├── ex199.rq │ ├── ex201.rq │ ├── ex202.rq │ ├── ex203.rq │ ├── ex205.rq │ ├── ex207.rq │ ├── ex209.rq │ ├── ex211.rq │ ├── ex212.rq │ ├── ex213.rq │ ├── ex215.rq │ ├── ex216.rq │ ├── ex217.ttl │ ├── ex218.rq │ ├── ex220.rq │ ├── ex221.rq │ ├── ex222.rq │ ├── ex223.rq │ ├── ex224.ttl │ ├── ex225.rq │ ├── ex227.ttl │ ├── ex228.rq │ ├── ex230.rq │ ├── ex232.rq │ ├── ex233.rq │ ├── ex235.rq │ ├── ex237.rq │ ├── ex239.rq │ ├── ex241.ttl │ ├── ex242.rq │ ├── ex244.rq │ ├── ex246.rq │ ├── ex248.rq │ ├── ex249.ttl │ ├── ex251.rq │ ├── ex253.rq │ ├── ex255.rq │ ├── ex257.rq │ ├── ex259.ttl │ ├── ex260.rq │ ├── ex262.rq │ ├── ex264.rq │ ├── ex266.ttl │ ├── ex267.rq │ ├── ex269.rq │ ├── ex270.rq │ ├── ex271.rq │ ├── ex273.rq │ ├── ex276.rq │ ├── ex278.ttl │ ├── ex279.rq │ ├── ex281.ttl │ ├── ex282.rq │ ├── ex284.ttl │ ├── ex285.rq │ ├── ex287.rq │ ├── ex289.ttl │ ├── ex290.rq │ ├── ex292.ttl │ ├── ex293.rq │ ├── ex295.rq │ ├── ex298.ttl │ ├── ex299.rq │ ├── ex301.rq │ ├── ex303.rq │ ├── ex305.rq │ ├── ex307.py │ ├── ex308.rq │ ├── ex311.rq │ ├── ex312.ru │ ├── ex313.ru │ ├── ex314.rq │ ├── ex316.ru │ ├── ex317.ru │ ├── ex318.rq │ ├── ex319.ttl │ ├── ex320.ru │ ├── ex321.ru │ ├── ex322.ru │ ├── ex323.ru │ ├── ex324.ru │ ├── ex325.ru │ ├── ex326.rq │ ├── ex327.ttl │ ├── ex328.ttl │ ├── ex329.ru │ ├── ex330.ru │ ├── ex331.ru │ ├── ex332.rq │ ├── ex333.ru │ ├── ex334.ru │ ├── ex335.ru │ ├── ex336.ru │ ├── ex337.ru │ ├── ex338.ru │ ├── ex339.ru │ ├── ex340.ru │ ├── ex341.rq │ ├── ex342.ru │ ├── ex343.ru │ ├── ex344.ru │ ├── ex345.ru │ ├── ex346.ru │ ├── ex347.ru │ ├── ex348.ru │ ├── ex349.ru │ ├── ex350.ru │ ├── ex351.ru │ ├── ex352.ru │ ├── ex353.ru │ ├── ex354.rq │ ├── ex355.rq │ ├── ex358.py │ ├── ex359.xml │ ├── ex361.py │ ├── ex363.py │ ├── ex365.html │ ├── ex366.xml │ ├── ex367.js │ ├── ex368.ttl │ ├── ex401.xml │ ├── ex402.xsl │ ├── ex403.xml │ ├── ex404.js │ ├── ex405.js │ ├── ex406.rq │ ├── ex407.js │ ├── ex408.rq │ ├── ex409.ttl │ ├── ex410.xml │ ├── ex411.js │ ├── ex412.csv │ ├── ex413.tsv │ ├── ex415.rq │ ├── ex417.ttl │ ├── ex418.rq │ ├── ex420.ttl │ ├── ex421.ttl │ ├── ex422.rq │ ├── ex424.ttl │ ├── ex425.rq │ ├── ex427.rq │ ├── ex428.rq │ ├── ex430.rq │ ├── ex432.rq │ ├── ex434.rq │ ├── ex436.rq │ ├── ex437.rq │ ├── ex438.ttl │ ├── ex439.rq │ ├── ex440.rq │ ├── ex442.ttl │ ├── ex443.ttl │ ├── ex444.rq │ ├── ex445.rq │ ├── ex447.rq │ ├── ex449.rq │ ├── ex451.rq │ ├── ex453.rq │ ├── ex454.rq │ ├── ex456.rq │ ├── ex457.rq │ ├── ex459.rq │ ├── ex461.rq │ ├── ex463.rq │ ├── ex465.rq │ ├── ex467.rq │ ├── ex469.rq │ ├── ex471.rq │ ├── ex473.rq │ ├── ex474.rq │ ├── ex475.rq │ ├── ex476.rq │ ├── ex477.ttl │ ├── ex478.ru │ ├── ex479.rq │ ├── ex480.rq │ ├── ex481.ru │ ├── ex482.ru │ ├── ex483.ttl │ ├── ex484.ru │ ├── ex485.rq │ ├── ex487.rq │ ├── ex488.ru │ ├── ex489.rq │ ├── ex491.rq │ ├── ex492.rq │ ├── ex494.rq │ ├── ex496.rq │ ├── ex498.rq │ ├── ex500.rq │ ├── ex503.ru │ ├── ex505.ru │ ├── ex507.rq │ ├── ex508.rq │ ├── ex509.rq │ ├── ex510.rq │ ├── ex511.rq │ ├── ex512.rq │ ├── ex513.rq │ ├── ex514.rq │ ├── ex515.rq │ ├── ex516.rq │ ├── ex517.rq │ ├── ex520.rq │ ├── ex521.ttl │ ├── ex522.rq │ ├── ex523.rq │ ├── ex524.rq │ ├── ex526.rq │ ├── ex528.rq │ ├── ex530.ttl │ ├── ex531.rdf │ ├── ex532.rq │ ├── ex532.ttl │ ├── ex533.rq │ ├── ex536.ttl │ ├── ex537.rq │ ├── ex538.rq │ ├── ex539.rq │ ├── ex540.rq │ ├── ex541.rq │ ├── ex543.ru │ ├── ex544.rq │ ├── ex546.ru │ ├── ex547.rq │ ├── ex548.ru │ ├── ex549.ru │ ├── ex550.ru │ ├── ex551.ru │ ├── exxyz.ttl │ ├── foaf.rdf │ ├── goodrelations-v1.owl │ ├── owl.ttl │ └── void.ttl │ ├── log4j.xml │ └── sample_data │ ├── answers_sw_1.rq │ ├── answers_sw_2.rq │ ├── bsbm-generated-dataset.nt │ ├── faceting_test_dataset.nt │ ├── issue_112_delete_all.ru │ ├── issue_112_delete_resource.ru │ ├── issue_112_delete_resources_with_a_date_object.ru │ ├── issue_112_delete_with_a_date_selector.ru │ ├── issue_112_insert_with_datetime.ru │ ├── issue_53_diacriticts.rq │ ├── issue_53_diacriticts.ttl │ ├── issue_53_square_brackets.rq │ ├── issue_53_square_brackets.ttl │ ├── issue_64_wrong_results.rq │ ├── issue_64_wrong_results.ttl │ ├── one_triple_1.ttl │ ├── one_triple_2.ttl │ ├── one_triple_3.ttl │ ├── one_triple_4.ttl │ └── one_triple_per_shard.nt └── src ├── dev └── eclipse │ ├── build-test-and-install.launch │ ├── gazzax_coding_rules.xml │ └── install-without-tests.launch └── doc └── response-examples └── facets-examples.xml /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | before_script: cd solrdf 5 | ##script: "mvn verify" 6 | -------------------------------------------------------------------------------- /solrdf/.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Package Files # 4 | *.jar 5 | *.war 6 | *.ear 7 | 8 | # Eclipse files 9 | .project 10 | .classpath 11 | .settings 12 | target 13 | 14 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 15 | hs_err_pid* 16 | cachefile 17 | 18 | # PMD 19 | .pmd 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.gazzax.labs 5 | solrdf 6 | 1.1 7 | 8 | solrdf-client 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/java/org/gazzax/labs/solrdf/client/UnableToAddException.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.client; 2 | 3 | /** 4 | * Thrown in case of a failure during an add command. 5 | * 6 | * @author Andrea Gazzarini 7 | * @since 1.0 8 | */ 9 | public class UnableToAddException extends Exception { 10 | 11 | private static final long serialVersionUID = -5122995061561828016L; 12 | 13 | /** 14 | * Builds a new exception with the given cause. 15 | * 16 | * @param throwable the exception cause. 17 | */ 18 | public UnableToAddException(final Throwable throwable) { 19 | super(throwable); 20 | } 21 | } -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/java/org/gazzax/labs/solrdf/client/UnableToBuildSolRDFClientException.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.client; 2 | 3 | /** 4 | * Thrown in case a failure is met while building the SolRDF proxy. 5 | * 6 | * @author Andrea Gazzarini 7 | * @since 1.0 8 | */ 9 | public class UnableToBuildSolRDFClientException extends Exception { 10 | private static final long serialVersionUID = -663687925040115024L; 11 | 12 | /** 13 | * Builds a new exception with the given cause. 14 | * 15 | * @param throwable the underlying cause. 16 | */ 17 | public UnableToBuildSolRDFClientException(final Throwable throwable) { 18 | super(throwable); 19 | } 20 | } -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/java/org/gazzax/labs/solrdf/client/UnableToCommitException.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.client; 2 | 3 | /** 4 | * Thrown in case of a failure during a commit command. 5 | * 6 | * @author Andrea Gazzarini 7 | * @since 1.0 8 | */ 9 | public class UnableToCommitException extends Exception { 10 | 11 | private static final long serialVersionUID = -5122995061561828016L; 12 | 13 | /** 14 | * Builds a new exception with the given cause. 15 | * 16 | * @param throwable the exception cause. 17 | */ 18 | public UnableToCommitException(final Throwable throwable) { 19 | super(throwable); 20 | } 21 | } -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/java/org/gazzax/labs/solrdf/client/UnableToDeleteException.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.client; 2 | 3 | /** 4 | * Thrown in case a deletion cannot be executed (or it raises some exception). 5 | * 6 | * @author Andrea Gazzarini 7 | * @since 1.0 8 | */ 9 | public class UnableToDeleteException extends Exception { 10 | private static final long serialVersionUID = 1L; 11 | 12 | /** 13 | * Builds a new exception with the given cause. 14 | * 15 | * @param throwable the exception cause. 16 | */ 17 | public UnableToDeleteException(final Throwable throwable) { 18 | super(throwable); 19 | } 20 | } -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/java/org/gazzax/labs/solrdf/client/UnableToExecuteQueryException.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.client; 2 | 3 | /** 4 | * Thrown in case of query failure. 5 | * The failure could be before, during or after the actual query execution. 6 | * 7 | * @author Andrea Gazzarini 8 | * @since 1.0 9 | */ 10 | public class UnableToExecuteQueryException extends Exception { 11 | 12 | private static final long serialVersionUID = 289019560117959176L; 13 | 14 | /** 15 | * Builds a new exception with the given cause. 16 | * 17 | * @param throwable the exception cause. 18 | */ 19 | public UnableToExecuteQueryException(final Throwable cause) { 20 | super(cause); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/java/org/gazzax/labs/solrdf/client/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Top Level package of SolRDF client API. 3 | * 4 | * @author Andrea Gazzarini 5 | */ 6 | package org.gazzax.labs.solrdf.client; -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /solrdf/solrdf-client/src/main/resources/rebel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.gazzax.labs 5 | solrdf 6 | 1.1 7 | 8 | solrdf-core 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/Field.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf; 2 | 3 | /** 4 | * Enumerative interface for field names used in SOLR schema. 5 | * 6 | * @author Andrea Gazzarini 7 | * @since 1.0 8 | */ 9 | public interface Field { 10 | String ID = "id"; 11 | String S = "s"; 12 | String P = "p"; 13 | String C = "c"; 14 | 15 | String O = "o"; 16 | String LANG = "o_lang"; 17 | String NUMERIC_OBJECT = "o_n"; 18 | String BOOLEAN_OBJECT = "o_b"; 19 | String DATE_OBJECT = "o_d"; 20 | String TEXT_OBJECT = "o_s"; 21 | } -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/Names.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf; 2 | 3 | /** 4 | * Common names used across the project. 5 | * 6 | * @author Andrea Gazzarini 7 | * @since 1.0 8 | */ 9 | public interface Names { 10 | String QUERY_EXECUTION = "query.execution"; 11 | String QUERY_RESULT = "query.result"; 12 | String QUERY = "query"; 13 | 14 | String HTTP_REQUEST_KEY = "httpRequest"; 15 | String SOLR_REQUEST = "solr.request"; 16 | String SOLR_RESPONSE = "solr.response"; 17 | String HYBRID_MODE = "hybrid.mode"; 18 | String NUM_FOUND = "num.found"; 19 | String GRAPH_URI_PARAMETER_NAME = "graph"; 20 | String GRAPH_URI_ATTRIBUTE_NAME = "graph.uri"; 21 | String DEFAULT_GRAPH_PARAMETER_NAME = "default"; 22 | String DEFAULT_ = "default"; 23 | String DEFAULT_HYBRID_QUERY ="dfhq"; 24 | String UPDATE_PARAMETER_NAME = "update"; 25 | String USING_NAMED_GRAPH_URI_PARAMETER_NAME = "using-named-graph-uri"; 26 | String USING_GRAPH_URI_PARAMETER_NAME = "using-graph-uri"; 27 | } -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/graph/cloud/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Graph domain implementation for SolrCloud mode. 3 | */ 4 | package org.gazzax.labs.solrdf.graph.cloud; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/graph/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Graph common, shared and supertype layers. 3 | */ 4 | package org.gazzax.labs.solrdf.graph; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/graph/standalone/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Graph domain implementation for standalone mode. 3 | */ 4 | package org.gazzax.labs.solrdf.graph.standalone; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/handler/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Top level package for SolRDF request handlers. 3 | */ 4 | package org.gazzax.labs.solrdf.handler; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/handler/search/handler/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Top level package for SolRDF search request handlers. 3 | */ 4 | package org.gazzax.labs.solrdf.handler.search.handler; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/handler/update/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Top level package for SolRDF update request handlers. 3 | */ 4 | package org.gazzax.labs.solrdf.handler.update; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/log/MessageFactory.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.log; 2 | 3 | /** 4 | * A simple message builder. 5 | * 6 | * @author Andrea Gazzarini 7 | * @since 1.0 8 | */ 9 | public abstract class MessageFactory { 10 | /** 11 | * Creates a new message with the given data. 12 | * 13 | * @param prototype the message prototype. 14 | * @param args the runtime arguments. 15 | * @return a new message. 16 | */ 17 | public static final String createMessage(final String prototype, final Object... args) { 18 | return String.format(prototype, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/log/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Logging package. 3 | */ 4 | package org.gazzax.labs.solrdf.log; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Shared utilities and common behaviours. 3 | * 4 | * @see https://github.com/agazzarini/SolRDF/issues/13 5 | */ 6 | package org.gazzax.labs.solrdf; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/response/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * SolRDF output response writers. 3 | */ 4 | package org.gazzax.labs.solrdf.response; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/search/qparser/SparqlQParserPlugin.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.search.qparser; 2 | 3 | import org.apache.solr.common.params.SolrParams; 4 | import org.apache.solr.common.util.NamedList; 5 | import org.apache.solr.request.SolrQueryRequest; 6 | import org.apache.solr.search.QParser; 7 | import org.apache.solr.search.QParserPlugin; 8 | 9 | /** 10 | * SPARQL {@link QParserPlugin}. 11 | * Acts as a factory and configuration point for SPARQL {@link QParser}s. 12 | * 13 | * @author Andrea Gazzarini 14 | * @since 1.0 15 | */ 16 | public class SparqlQParserPlugin extends QParserPlugin { 17 | @Override 18 | public QParser createParser( 19 | final String qstr, 20 | final SolrParams localParams, 21 | final SolrParams params, 22 | final SolrQueryRequest req) { 23 | return new SparqlQParser(qstr, localParams, params, req); 24 | } 25 | 26 | @Override 27 | @SuppressWarnings("rawtypes") 28 | public void init(final NamedList args) { 29 | // Nothing to be done at the moment. 30 | } 31 | 32 | @Override 33 | public String getDescription() { 34 | return "sparql"; 35 | } 36 | 37 | @Override 38 | public String getSource() { 39 | return "$https://github.com/agazzarini/SolRDF/blob/master/solrdf/src/main/java/org/gazzax/labs/solrdf/search/qparser/SparqlQParserPlugin.java $"; 40 | } 41 | } -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/org/gazzax/labs/solrdf/search/qparser/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * SolRDF query parser. 3 | */ 4 | package org.gazzax.labs.solrdf.search.qparser; -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/main/java/rebel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/solr-home/solr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ${host:} 4 | ${jetty.port} 5 | ${hostContext:solr} 6 | ${zkClientTimeout:30000} 7 | ${genericCoreNodeNames:true} 8 | 9 | 10 | 12 | ${socketTimeout:0} 13 | ${connTimeout:0} 14 | 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/solr-home/store/core.properties: -------------------------------------------------------------------------------- 1 | name=store -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/test/java/org/gazzax/labs/solrdf/StringsTestCase.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * {@link Strings} test case. 9 | * 10 | * @author Andrea Gazzarini 11 | * @since 1.0 12 | */ 13 | public class StringsTestCase { 14 | 15 | /** 16 | * If a string is null or empty then this method must return true. 17 | */ 18 | @Test 19 | public void isNullOrEmptyString() { 20 | final String [] emptyValues = {"", " ", "\n\t", null}; 21 | for (final String emptyValue : emptyValues) { 22 | assertTrue(Strings.isNullOrEmpty(emptyValue)); 23 | assertFalse(Strings.isNotNullOrEmptyString(emptyValue)); 24 | } 25 | } 26 | 27 | /** 28 | * If a string is not null or empty then this method must return true. 29 | */ 30 | @Test 31 | public void isNotNullOrEmptyString() { 32 | final String [] emptyValues = {"a", " b ", "\n\tcde"}; 33 | for (final String emptyValue : emptyValues) { 34 | assertFalse(Strings.isNullOrEmpty(emptyValue)); 35 | assertTrue(Strings.isNotNullOrEmptyString(emptyValue)); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /solrdf/solrdf-core/src/test/java/org/gazzax/labs/solrdf/TestUtility.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * A bunch of test utilities. 7 | * 8 | * @author Andrea Gazzarini 9 | * @since 1.0 10 | */ 11 | public abstract class TestUtility { 12 | public static final Random RANDOMIZER = new Random(); 13 | public static final String DUMMY_BASE_URI = "http://example.org/"; 14 | 15 | /** 16 | * Returns a pseudorandom string. 17 | * 18 | * @return a pseudorandom string. 19 | */ 20 | public static String randomString() { 21 | return String.valueOf(System.currentTimeMillis() + RANDOMIZER.nextLong()); 22 | } 23 | 24 | /** 25 | * Returns a pseudorandom int. 26 | * 27 | * @return a pseudorandom int. 28 | */ 29 | public static int randomInt() { 30 | return RANDOMIZER.nextInt(); 31 | } 32 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/assembly/development.xml: -------------------------------------------------------------------------------- 1 | 5 | dev 6 | 7 | dir 8 | 9 | false 10 | 11 | 12 | ${project.basedir}/../solrdf-core/src/solr-home 13 | /solrdf 14 | 15 | **/* 16 | 17 | 18 | 19 | 20 | 21 | true 22 | /solrdf/store/lib 23 | 24 | *:lucene* 25 | *:jetty* 26 | *:hadoop* 27 | *:javax.servlet* 28 | *:solr-*:* 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/java/org/gazzax/labs/solrdf/TestUtility.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * A bunch of test utilities. 7 | * 8 | * @author Andrea Gazzarini 9 | * @since 1.0 10 | */ 11 | public abstract class TestUtility { 12 | public static final Random RANDOMIZER = new Random(); 13 | public static final String DUMMY_BASE_URI = "http://example.org/"; 14 | 15 | /** 16 | * Returns a pseudorandom string. 17 | * 18 | * @return a pseudorandom string. 19 | */ 20 | public static String randomString() { 21 | return String.valueOf(System.currentTimeMillis() + RANDOMIZER.nextLong()); 22 | } 23 | 24 | /** 25 | * Returns a pseudorandom int. 26 | * 27 | * @return a pseudorandom int. 28 | */ 29 | public static int randomInt() { 30 | return RANDOMIZER.nextInt(); 31 | } 32 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/java/org/gazzax/labs/solrdf/integration/sparql/Issue64_ITCase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This Test case makes use of some examples from 3 | * 4 | * "Learning SPARQL - Querying and Updating with SPARQL 1.1" by Bob DuCharme 5 | * 6 | * Publisher: O'Reilly 7 | * Author: Bob DuCharme 8 | * ISBN: 978-1-449-37143-2 9 | * http://www.learningsparql.com/ 10 | * http://shop.oreilly.com/product/0636920030829.do 11 | * 12 | * We warmly appreciate and thank the author and O'Reilly for such permission. 13 | * 14 | */ 15 | package org.gazzax.labs.solrdf.integration.sparql; 16 | 17 | import static org.gazzax.labs.solrdf.MisteryGuest.misteryGuest; 18 | 19 | import org.gazzax.labs.solrdf.integration.IntegrationTestSupertypeLayer; 20 | import org.junit.Test; 21 | 22 | /** 23 | * Querying string literals with diacritics or angle brackets yields no result. 24 | * 25 | * @author Andrea Gazzarini 26 | * @since 1.0 27 | * @see 28 | */ 29 | public class Issue64_ITCase extends IntegrationTestSupertypeLayer { 30 | protected final static String EXAMPLES_DIR = "src/test/resources/sample_data"; 31 | 32 | @Test 33 | public void shouldReturnOneBinding() throws Exception { 34 | selectTest(misteryGuest("issue_64_wrong_results.rq", "issue_64_wrong_results.ttl")); 35 | } 36 | 37 | @Override 38 | protected String examplesDirectory() { 39 | return EXAMPLES_DIR; 40 | } 41 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/java/org/gazzax/labs/solrdf/integration/sparql/LearningSparqlSupertypeLayer.java: -------------------------------------------------------------------------------- 1 | package org.gazzax.labs.solrdf.integration.sparql; 2 | 3 | import org.gazzax.labs.solrdf.integration.IntegrationTestSupertypeLayer; 4 | 5 | /** 6 | * Supertype layer for all "Learning SPARQL" integration tests. 7 | * 8 | * @author Andrea Gazzarini 9 | * @since 1.0 10 | */ 11 | public abstract class LearningSparqlSupertypeLayer extends IntegrationTestSupertypeLayer { 12 | protected final static String LEARNING_SPARQL_EXAMPLES_DIR = "src/test/resources/LearningSPARQLExamples"; 13 | 14 | @Override 15 | protected String examplesDirectory() { 16 | return LEARNING_SPARQL_EXAMPLES_DIR; 17 | } 18 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/java/org/gazzax/labs/solrdf/integration/sparql/LearningSparql_ASK_ITCase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This Test case makes use of some examples from 3 | * 4 | * "Learning SPARQL - Querying and Updating with SPARQL 1.1" by Bob DuCharme 5 | * 6 | * Publisher: O'Reilly 7 | * Author: Bob DuCharme 8 | * ISBN: 978-1-449-37143-2 9 | * http://www.learningsparql.com/ 10 | * http://shop.oreilly.com/product/0636920030829.do 11 | * 12 | * We warmly appreciate and thank the author and O'Reilly for such permission. 13 | * 14 | */ 15 | package org.gazzax.labs.solrdf.integration.sparql; 16 | 17 | import static org.gazzax.labs.solrdf.MisteryGuest.misteryGuest; 18 | 19 | import org.junit.Test; 20 | 21 | /** 22 | * ASK Integration tests using examples taken from LearningSPARQL book. 23 | * 24 | * @author Andrea Gazzarini 25 | * @since 1.0 26 | * @see http://learningsparql.com 27 | */ 28 | public class LearningSparql_ASK_ITCase extends LearningSparqlSupertypeLayer { 29 | @Test 30 | public void findingBadData() throws Exception { 31 | askTest(misteryGuest("ex199.rq", "ex198.ttl")); 32 | } 33 | 34 | @Test 35 | public void datatypeFunction() throws Exception { 36 | askTest(misteryGuest("ex201.rq", "ex198.ttl")); 37 | } 38 | 39 | @Test 40 | public void bindAndFilter() throws Exception { 41 | askTest(misteryGuest("ex202.rq", "ex198.ttl")); 42 | } 43 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/java/rebel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/README: -------------------------------------------------------------------------------- 1 | All files in this directory are examples from 2 | 3 | "Learning SPARQL - Querying and Updating with SPARQL 1.1" by Bob DuCharme 4 | 5 | Publisher: O'Reilly 6 | Author: Bob DuCharme 7 | ISBN: 978-1-449-37143-2 8 | http://www.learningsparql.com/ 9 | http://shop.oreilly.com/product/0636920030829.do 10 | 11 | We warmly appreciate and thank the author and O'Reilly for such permission. -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex001.rq: -------------------------------------------------------------------------------- 1 | # filename: ex001.rq 2 | 3 | PREFIX d: 4 | SELECT ?person 5 | WHERE 6 | { ?person d:homeTel "(229) 276-5135" . } 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex002.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex002.ttl 2 | 3 | @prefix ab: . 4 | 5 | ab:richard ab:homeTel "(229) 276-5135" . 6 | ab:richard ab:email "richard49@hotmail.com" . 7 | 8 | ab:cindy ab:homeTel "(245) 646-5488" . 9 | ab:cindy ab:email "cindym@gmail.com" . 10 | 11 | ab:craig ab:homeTel "(194) 966-1505" . 12 | ab:craig ab:email "craigellis@yahoo.com" . 13 | ab:craig ab:email "c.ellis@usairwaysgroup.com" . 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex003.rq: -------------------------------------------------------------------------------- 1 | # filename: ex003.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?craigEmail 6 | WHERE 7 | { ab:craig ab:email ?craigEmail . } 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex006.rq: -------------------------------------------------------------------------------- 1 | # filename: ex006.rq 2 | 3 | SELECT ?craigEmail 4 | WHERE 5 | { 6 | 7 | 8 | ?craigEmail . 9 | } 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex007.rq: -------------------------------------------------------------------------------- 1 | # filename: ex007.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?craigEmail FROM 6 | WHERE 7 | { ab:craig ab:email ?craigEmail . } 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex008.rq: -------------------------------------------------------------------------------- 1 | # filename: ex008.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?person 6 | WHERE 7 | { ?person ab:homeTel "(229) 276-5135" . } 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex010.rq: -------------------------------------------------------------------------------- 1 | # filename: ex010.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?propertyName ?propertyValue 6 | WHERE 7 | { ab:cindy ?propertyName ?propertyValue . } 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex012.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex012.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | d:i0432 ab:firstName "Richard" . 7 | d:i0432 ab:lastName "Mutt" . 8 | d:i0432 ab:homeTel "(229) 276-5135" . 9 | d:i0432 ab:email "richard49@hotmail.com" . 10 | 11 | d:i9771 ab:firstName "Cindy" . 12 | d:i9771 ab:lastName "Marshall" . 13 | d:i9771 ab:homeTel "(245) 646-5488" . 14 | d:i9771 ab:email "cindym@gmail.com" . 15 | 16 | d:i8301 ab:firstName "Craig" . 17 | d:i8301 ab:lastName "Ellis" . 18 | d:i8301 ab:email "craigellis@yahoo.com" . 19 | d:i8301 ab:email "c.ellis@usairwaysgroup.com" . 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex013.rq: -------------------------------------------------------------------------------- 1 | # filename: ex013.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?craigEmail 6 | WHERE 7 | { 8 | ?person ab:firstName "Craig" . 9 | ?person ab:email ?craigEmail . 10 | } 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex015.rq: -------------------------------------------------------------------------------- 1 | # filename: ex015.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?craigEmail 6 | WHERE 7 | { 8 | ?person ab:firstName "Craig" . 9 | ?person ab:lastName "Ellis" . 10 | ?person ab:email ?craigEmail . 11 | } 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex017.rq: -------------------------------------------------------------------------------- 1 | # filename: ex017.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last 6 | WHERE 7 | { 8 | ?person ab:homeTel "(229) 276-5135" . 9 | ?person ab:firstName ?first . 10 | ?person ab:lastName ?last . 11 | } 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex019.rq: -------------------------------------------------------------------------------- 1 | # filename: ex019.rq 2 | 3 | PREFIX a: 4 | 5 | SELECT ?propertyName ?propertyValue 6 | WHERE 7 | { 8 | ?person a:firstName "Cindy" . 9 | ?person a:lastName "Marshall" . 10 | ?person ?propertyName ?propertyValue . 11 | } 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex021.rq: -------------------------------------------------------------------------------- 1 | # filename: ex021.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT * 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | FILTER (regex(?o, "yahoo","i")) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex023.rq: -------------------------------------------------------------------------------- 1 | # filename: ex023.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?craigEmail ?homeTel 6 | WHERE 7 | { 8 | ?person ab:firstName "Craig" . 9 | ?person ab:lastName "Ellis" . 10 | ?person ab:email ?craigEmail . 11 | ?person ab:homeTel ?homeTel . 12 | } 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex033.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex033.ttl 2 | 3 | @prefix xsd: . 4 | @prefix d: . 5 | @prefix dm: . 6 | 7 | d:item342 dm:shipped "2011-02-14"^^ . 8 | d:item342 dm:quantity "4"^^xsd:integer . 9 | d:item342 dm:invoiced "false"^^xsd:boolean . 10 | d:item342 dm:costPerItem "3.50"^^xsd:decimal . 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex034.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex034.ttl 2 | 3 | @prefix d: . 4 | @prefix dm: . 5 | 6 | d:item342 dm:shipped "2011-02-14"^^ . 7 | d:item342 dm:quantity 4 . 8 | d:item342 dm:invoiced true . 9 | d:item342 dm:costPerItem 3.50 . 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex035.rdf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 2011-02-14 10 | 4 12 | false 14 | 3.50 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex036.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex036.ttl 2 | 3 | @prefix v: . 4 | 5 | v:title "Director"@en . 6 | v:title "Directeur"@fr . 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex037.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex037.ttl 2 | 3 | @prefix : . 4 | @prefix rdfs: . 5 | 6 | :sideDish42 rdfs:label "french fries"@en-US . 7 | :sideDish42 rdfs:label "chips"@en-GB . 8 | 9 | :sideDish43 rdfs:label "chips"@en-US . 10 | :sideDish43 rdfs:label "crisps"@en-GB . 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex038.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex038.ttl 2 | 3 | 4 | 5 | "Tim Berners-Lee" . 6 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex039.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex039.ttl 2 | 3 | @prefix rdfs: . 4 | 5 | rdfs:label "Switzerland"@en, 6 | "Suiza"@es, "Sveitsi"@fi, "Suisse"@fr . 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex040.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex040.ttl 2 | 3 | @prefix ab: . 4 | 5 | ab:i0432 ab:firstName "Richard" ; 6 | ab:lastName "Mutt" ; 7 | ab:postalCode "49345" ; 8 | ab:city "Springfield" ; 9 | ab:homeTel "(229) 276-5135" ; 10 | ab:streetAddress "32 Main St." ; 11 | ab:region "Connecticut" ; 12 | ab:email "richard49@hotmail.com" . 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex041.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex041.ttl 2 | 3 | @prefix ab: . 4 | 5 | ab:i0432 ab:firstName "Richard" ; 6 | ab:lastName "Mutt" ; 7 | ab:homeTel "(229) 276-5135" ; 8 | ab:email "richard49@hotmail.com" ; 9 | ab:address _:b1 . 10 | 11 | _:b1 ab:postalCode "49345" ; 12 | ab:city "Springfield" ; 13 | ab:streetAddress "32 Main St." ; 14 | ab:region "Connecticut" . 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex042.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex042.ttl 2 | 3 | @prefix dc: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | 7 | dc:creator 8 | rdf:type rdf:Property ; 9 | # a rdf:Property ; 10 | rdfs:comment "An entity primarily responsible for making the resource."@en-US ; 11 | rdfs:label "Creator"@en-US . 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex043.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex043.ttl 2 | 3 | @prefix ab: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | 7 | ab:Musician 8 | rdf:type rdfs:Class ; 9 | rdfs:label "Musician" ; 10 | rdfs:comment "Someone who plays a musical instrument" . 11 | 12 | ab:MusicalInstrument 13 | a rdfs:Class ; 14 | rdfs:label "musical instrument" . 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex044.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex044.ttl 2 | 3 | @prefix ab: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | 7 | ab:playsInstrument 8 | rdf:type rdf:Property ; 9 | rdfs:comment "Identifies the instrument that someone plays" ; 10 | rdfs:label "plays instrument" ; 11 | rdfs:domain ab:Musician ; 12 | rdfs:range ab:MusicalInstrument . 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex045.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex045.ttl 2 | 3 | @prefix ab: . 4 | 5 | ab:i0432 ab:firstName "Richard" ; 6 | ab:lastName "Mutt" ; 7 | ab:postalCode "49345" ; 8 | ab:city "Springfield" ; 9 | ab:homeTel "(229) 276-5135" ; 10 | ab:streetAddress "32 Main St." ; 11 | ab:region "Connecticut" ; 12 | ab:email "richard49@hotmail.com" ; 13 | ab:playsInstrument ab:vacuumCleaner . 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex046.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex046.ttl 2 | 3 | @prefix ab: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | @prefix owl: . 7 | 8 | ab:i0432 9 | ab:firstName "Richard" ; 10 | ab:lastName "Mutt" ; 11 | ab:spouse ab:i9771 . 12 | 13 | ab:i8301 14 | ab:firstName "Craig" ; 15 | ab:lastName "Ellis" ; 16 | ab:patient ab:i9771 . 17 | 18 | ab:i9771 19 | ab:firstName "Cindy" ; 20 | ab:lastName "Marshall" . 21 | 22 | ab:spouse 23 | rdf:type owl:SymmetricProperty ; 24 | rdfs:comment "Identifies someone's spouse" . 25 | 26 | ab:patient 27 | rdf:type rdf:Property ; 28 | rdfs:comment "Identifies a doctor's patient" . 29 | 30 | ab:doctor 31 | rdf:type rdf:Property ; 32 | rdfs:comment "Identifies a doctor treating the named resource" ; 33 | owl:inverseOf ab:patient . 34 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex047.rq: -------------------------------------------------------------------------------- 1 | # filename: ex047.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?doctorFirst ?doctorLast ?spouseFirst ?spouseLast 6 | WHERE 7 | { 8 | ?s ab:firstName "Cindy" ; 9 | ab:lastName "Marshall" ; 10 | ab:doctor ?doctor ; 11 | ab:spouse ?spouse . 12 | 13 | ?doctor ab:firstName ?doctorFirst ; 14 | ab:lastName ?doctorLast . 15 | 16 | ?spouse ab:firstName ?spouseFirst ; 17 | ab:lastName ?spouseLast . 18 | } 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex048.rq: -------------------------------------------------------------------------------- 1 | # filename: ex048.rq 2 | 3 | PREFIX d: 4 | 5 | SELECT ?artistName ?albumName 6 | WHERE 7 | { 8 | ?album d:producer :Timbaland . 9 | ?album d:musicalArtist ?artist . 10 | ?album rdfs:label ?albumName . 11 | ?artist rdfs:label ?artistName . 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex049.rq: -------------------------------------------------------------------------------- 1 | # filename: ex049.rq 2 | 3 | PREFIX d: 4 | 5 | SELECT ?artistName ?albumName 6 | WHERE 7 | { 8 | ?album d:producer :Timbaland . 9 | ?album d:musicalArtist ?artist . 10 | ?album rdfs:label ?albumName . 11 | ?artist rdfs:label ?artistName . 12 | FILTER ( lang(?artistName) = "en" ) 13 | FILTER ( lang(?albumName) = "en" ) 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex050.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex050.ttl 2 | 3 | @prefix foaf: . 4 | 5 | 6 | foaf:nick "Dick" ; 7 | foaf:givenname "Richard" ; 8 | foaf:mbox "richard49@hotmail.com" ; 9 | foaf:surname "Mutt" ; 10 | foaf:workplaceHomepage ; 11 | foaf:aimChatID "bridesbachelor" . 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex052.rq: -------------------------------------------------------------------------------- 1 | #filename: ex052.rq 2 | 3 | PREFIX foaf: 4 | PREFIX rdfs: 5 | 6 | SELECT ?propertyLabel ?value 7 | WHERE 8 | { 9 | ?s ?property ?value . 10 | ?property rdfs:label ?propertyLabel . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex054.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex054.ttl 2 | @prefix ab: . 3 | @prefix d: . 4 | 5 | d:i0432 ab:firstName "Richard" . 6 | d:i0432 ab:lastName "Mutt" . 7 | d:i0432 ab:homeTel "(229) 276-5135" . 8 | d:i0432 ab:nick "Dick" . 9 | d:i0432 ab:email "richard49@hotmail.com" . 10 | 11 | d:i9771 ab:firstName "Cindy" . 12 | d:i9771 ab:lastName "Marshall" . 13 | d:i9771 ab:homeTel "(245) 646-5488" . 14 | d:i9771 ab:email "cindym@gmail.com" . 15 | 16 | d:i8301 ab:firstName "Craig" . 17 | d:i8301 ab:lastName "Ellis" . 18 | d:i8301 ab:workTel "(245) 315-5486" . 19 | d:i8301 ab:email "craigellis@yahoo.com" . 20 | d:i8301 ab:email "c.ellis@usairwaysgroup.com" . 21 | 22 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex055.rq: -------------------------------------------------------------------------------- 1 | # filename: ex055.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last ?workTel 6 | WHERE 7 | { 8 | ?s ab:firstName ?first ; 9 | ab:lastName ?last ; 10 | ab:workTel ?workTel . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex057.rq: -------------------------------------------------------------------------------- 1 | # filename: ex057.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last ?workTel 6 | WHERE 7 | { 8 | ?s ab:firstName ?first ; 9 | ab:lastName ?last . 10 | OPTIONAL 11 | { ?s ab:workTel ?workTel . } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex059.rq: -------------------------------------------------------------------------------- 1 | # filename: ex059.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last ?workTel ?nick 6 | WHERE 7 | { 8 | ?s ab:firstName ?first ; 9 | ab:lastName ?last . 10 | OPTIONAL 11 | { 12 | ?s ab:workTel ?workTel ; 13 | ab:nick ?nick . 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex061.rq: -------------------------------------------------------------------------------- 1 | # filename: ex061.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last ?workTel ?nick 6 | WHERE 7 | { 8 | ?s ab:firstName ?first ; 9 | ab:lastName ?last . 10 | OPTIONAL { ?s ab:workTel ?workTel . } 11 | OPTIONAL { ?s ab:nick ?nick . } 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex063.rq: -------------------------------------------------------------------------------- 1 | # filename: ex063.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last 6 | WHERE 7 | { 8 | ?s ab:lastName ?last . 9 | OPTIONAL { ?s ab:nick ?first . } 10 | OPTIONAL { ?s ab:firstName ?first . } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex065.rq: -------------------------------------------------------------------------------- 1 | # filename: ex065.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last 6 | WHERE 7 | { 8 | ?s ab:firstName ?first ; 9 | ab:lastName ?last . 10 | 11 | OPTIONAL { ?s ab:workTel ?workNum . } 12 | FILTER (!bound(?workNum)) 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex067.rq: -------------------------------------------------------------------------------- 1 | # filename: ex067.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last 6 | 7 | WHERE 8 | { 9 | ?s ab:firstName ?first ; 10 | ab:lastName ?last . 11 | FILTER NOT EXISTS { ?s ab:workTel ?workNum } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex068.rq: -------------------------------------------------------------------------------- 1 | # filename: ex068.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last 6 | 7 | WHERE 8 | { 9 | ?s ab:firstName ?first ; 10 | ab:lastName ?last . 11 | MINUS { ?s ab:workTel ?workNum } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex069.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex069.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | # People 7 | 8 | d:i0432 ab:firstName "Richard" ; 9 | ab:lastName "Mutt" ; 10 | ab:email "richard49@hotmail.com" . 11 | 12 | d:i9771 ab:firstName "Cindy" ; 13 | ab:lastName "Marshall" ; 14 | ab:email "cindym@gmail.com" . 15 | 16 | d:i8301 ab:firstName "Craig" ; 17 | ab:lastName "Ellis" ; 18 | ab:email "c.ellis@usairwaysgroup.com" . 19 | 20 | # Courses 21 | 22 | d:course34 ab:courseTitle "Modeling Data with OWL" . 23 | d:course71 ab:courseTitle "Enhancing Websites with RDFa" . 24 | d:course59 ab:courseTitle "Using SPARQL with non-RDF Data" . 25 | d:course85 ab:courseTitle "Updating Data with SPARQL" . 26 | 27 | # Who's taking which courses 28 | 29 | d:i8301 ab:takingCourse d:course59 . 30 | d:i9771 ab:takingCourse d:course34 . 31 | d:i0432 ab:takingCourse d:course85 . 32 | d:i0432 ab:takingCourse d:course59 . 33 | d:i9771 ab:takingCourse d:course59 . 34 | 35 | 36 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex070.rq: -------------------------------------------------------------------------------- 1 | # filename: ex070.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?last ?first ?courseName 6 | WHERE 7 | { 8 | ?s ab:firstName ?first ; 9 | ab:lastName ?last ; 10 | ab:takingCourse ?course . 11 | 12 | ?course ab:courseTitle ?courseName . 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex072.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex072.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | # People 7 | 8 | d:i0432 ab:firstName "Richard" ; 9 | ab:lastName "Mutt" ; 10 | ab:email "richard49@hotmail.com" . 11 | 12 | d:i9771 ab:firstName "Cindy" ; 13 | ab:lastName "Marshall" ; 14 | ab:email "cindym@gmail.com" . 15 | 16 | d:i8301 ab:firstName "Craig" ; 17 | ab:lastName "Ellis" ; 18 | ab:email "c.ellis@usairwaysgroup.com" . 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex073.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex073.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | # Courses 7 | 8 | d:course34 ab:courseTitle "Modeling Data with OWL" . 9 | d:course71 ab:courseTitle "Enhancing Websites with RDFa" . 10 | d:course59 ab:courseTitle "Using SPARQL with non-RDF Data" . 11 | d:course85 ab:courseTitle "Updating Data with SPARQL" . 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex074.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex074.ttl 2 | 3 | @prefix dc: . 4 | @prefix rdfs: . 5 | @prefix c: . 6 | @prefix : . 7 | 8 | :paperA dc:title "Paper A" . 9 | 10 | :paperB rdfs:label "Paper B" ; 11 | c:cites :paperA . 12 | 13 | :paperC c:cites :paperA . 14 | 15 | :paperD c:cites :paperA , :paperB . 16 | 17 | :paperE c:cites :paperA . 18 | 19 | :paperF c:cites :paperC , :paperE . 20 | 21 | :paperG c:cites :paperC , :paperE . 22 | 23 | :paperH c:cites :paperD . 24 | 25 | :paperI c:cites :paperF , :paperG . 26 | 27 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex075.rq: -------------------------------------------------------------------------------- 1 | # filename: ex075.rq 2 | 3 | PREFIX dc: 4 | PREFIX rdfs: 5 | PREFIX : 6 | 7 | SELECT ?s ?title 8 | WHERE { ?s (dc:title | rdfs:label) ?title . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex077.rq: -------------------------------------------------------------------------------- 1 | # filename: ex077.rq 2 | 3 | PREFIX : 4 | PREFIX c: 5 | 6 | SELECT ?s 7 | WHERE { ?s c:cites :paperA . } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex078.rq: -------------------------------------------------------------------------------- 1 | # filename: ex078.rq 2 | 3 | PREFIX : 4 | PREFIX c: 5 | 6 | SELECT ?s 7 | WHERE { ?s c:cites+ :paperA . } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex080.rq: -------------------------------------------------------------------------------- 1 | # filename: ex080.rq 2 | 3 | PREFIX : 4 | PREFIX c: 5 | 6 | SELECT ?s 7 | WHERE { ?s c:cites{3} :paperA . } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex082.rq: -------------------------------------------------------------------------------- 1 | # filename: ex082.rq 2 | 3 | PREFIX : 4 | PREFIX c: 5 | 6 | SELECT ?s 7 | WHERE { ?s c:cites/c:cites/c:cites :paperA . } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex083.rq: -------------------------------------------------------------------------------- 1 | # filename: ex083.rq 2 | 3 | PREFIX : 4 | PREFIX c: 5 | 6 | SELECT ?s 7 | WHERE { :paperA ^c:cites ?s } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex084.rq: -------------------------------------------------------------------------------- 1 | # filename: ex084.rq 2 | 3 | PREFIX : 4 | PREFIX c: 5 | 6 | SELECT ?s 7 | WHERE 8 | { 9 | ?s c:cites/^c:cites :paperF . 10 | FILTER(?s != :paperF) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex086.rq: -------------------------------------------------------------------------------- 1 | # filename: ex086.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?addressVal 6 | WHERE { ?s ab:address ?addressVal } 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex088.rq: -------------------------------------------------------------------------------- 1 | # filename: ex088.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?firstName ?lastName ?streetAddress ?city ?region ?postalCode 6 | WHERE 7 | { 8 | ?s ab:firstName ?firstName ; 9 | ab:lastName ?lastName ; 10 | ab:address ?address . 11 | 12 | ?address ab:postalCode ?postalCode ; 13 | ab:city ?city ; 14 | ab:streetAddress ?streetAddress ; 15 | ab:region ?region . 16 | } 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex090.rq: -------------------------------------------------------------------------------- 1 | # filename: ex090.rq 2 | 3 | SELECT ?p 4 | WHERE 5 | { ?s ?p ?o . } 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex092.rq: -------------------------------------------------------------------------------- 1 | # filename: ex092.rq 2 | 3 | SELECT DISTINCT ?p 4 | WHERE 5 | { ?s ?p ?o . } 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex094.rq: -------------------------------------------------------------------------------- 1 | # filename: ex094.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT DISTINCT ?first ?last 6 | WHERE 7 | { 8 | ?s ab:takingCourse ?class ; 9 | ab:firstName ?first ; 10 | ab:lastName ?last . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex098.rq: -------------------------------------------------------------------------------- 1 | # filename: ex098.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | 6 | SELECT * 7 | WHERE 8 | { 9 | { ?person ab:firstName ?first ; ab:lastName ?last . } 10 | 11 | UNION 12 | 13 | { ?course ab:courseTitle ?courseName . } 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex100.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex100.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | d:i0432 ab:firstName "Richard" ; 7 | ab:lastName "Mutt" ; 8 | ab:instrument "sax" ; 9 | ab:instrument "clarinet" . 10 | 11 | d:i9771 ab:firstName "Cindy" ; 12 | ab:lastName "Marshall" ; 13 | ab:instrument "drums" . 14 | 15 | d:i8301 ab:firstName "Craig" ; 16 | ab:lastName "Ellis" ; 17 | ab:instrument "trumpet" . 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex101.rq: -------------------------------------------------------------------------------- 1 | # filename: ex101.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last ?instrument 6 | WHERE 7 | { 8 | { ?person ab:firstName ?first ; 9 | ab:lastName ?last ; 10 | ab:instrument "trumpet" ; 11 | ab:instrument ?instrument . 12 | } 13 | 14 | UNION 15 | 16 | { ?person ab:firstName ?first ; 17 | ab:lastName ?last ; 18 | ab:instrument "sax" ; 19 | ab:instrument ?instrument . 20 | } 21 | 22 | } 23 | 24 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex103.rq: -------------------------------------------------------------------------------- 1 | # filename: ex103.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last ?instrument 6 | WHERE 7 | { 8 | ?person ab:firstName ?first ; 9 | ab:lastName ?last ; 10 | ab:instrument ?instrument . 11 | 12 | { ?person ab:instrument "sax" . } 13 | 14 | UNION 15 | 16 | { ?person ab:instrument "trumpet" . } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex104.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex104.ttl 2 | 3 | @prefix dm: . 4 | @prefix d: . 5 | 6 | d:item432 dm:cost 8 ; 7 | dm:location . 8 | d:item857 dm:cost 12 ; 9 | dm:location . 10 | d:item693 dm:cost 10 ; 11 | dm:location "Heidelberg" . 12 | d:item126 dm:cost 5 ; 13 | dm:location . 14 | 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex105.rq: -------------------------------------------------------------------------------- 1 | # filename: ex105.rq 2 | 3 | PREFIX dm: 4 | 5 | SELECT ?s ?cost 6 | WHERE 7 | { 8 | ?s dm:cost ?cost . 9 | FILTER (?cost < 10) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex107.rq: -------------------------------------------------------------------------------- 1 | # filename: ex107.rq 2 | 3 | PREFIX dm: 4 | 5 | SELECT ?s ?city 6 | WHERE 7 | { 8 | ?s dm:location ?city . 9 | FILTER (!(isURI(?city))) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex109.rq: -------------------------------------------------------------------------------- 1 | # filename: ex109.rq 2 | 3 | PREFIX dm: 4 | PREFIX db: 5 | 6 | SELECT ?s ?cost ?location 7 | WHERE 8 | { 9 | ?s dm:location ?location ; 10 | dm:cost ?cost . 11 | FILTER (?location IN (db:Montreal, db:Lisbon)) . 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex111.rq: -------------------------------------------------------------------------------- 1 | # filename: ex111.rq 2 | 3 | PREFIX dm: 4 | PREFIX db: 5 | 6 | SELECT ?s ?cost ?location 7 | WHERE 8 | { 9 | ?s dm:location ?location ; 10 | dm:cost ?cost . 11 | FILTER (?cost IN (8, 12, 10)) . 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex112.rq: -------------------------------------------------------------------------------- 1 | # filename: ex112.rq 2 | 3 | PREFIX dm: 4 | PREFIX db: 5 | 6 | SELECT ?s ?cost ?location 7 | WHERE 8 | { 9 | ?s dm:location ?location ; 10 | dm:cost ?cost . 11 | FILTER (?location NOT IN (db:Montreal, db:Lisbon)) . 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex114.rq: -------------------------------------------------------------------------------- 1 | # filename: ex114.rq 2 | 3 | SELECT ?label 4 | WHERE 5 | { ?s rdfs:label ?label . } 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex115.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex115.ttl 2 | 3 | @prefix d: . 4 | @prefix rdfs: . 5 | 6 | d:one rdfs:label "one" . 7 | d:two rdfs:label "two" . 8 | d:three rdfs:label "three" . 9 | d:four rdfs:label "four" . 10 | d:five rdfs:label "five" . 11 | d:six rdfs:label "six" . 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex116.rq: -------------------------------------------------------------------------------- 1 | # filename: ex116.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label 6 | WHERE 7 | { ?s rdfs:label ?label . } 8 | ORDER BY ?label 9 | LIMIT 2 -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex118.rq: -------------------------------------------------------------------------------- 1 | # filename: ex118.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label 6 | WHERE 7 | { ?s rdfs:label ?label . } 8 | ORDER BY ?label 9 | OFFSET 3 -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex120.rq: -------------------------------------------------------------------------------- 1 | # filename: ex120.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label 6 | WHERE 7 | { ?s rdfs:label ?label . } 8 | ORDER BY ?label 9 | OFFSET 3 10 | LIMIT 1 -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex122.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex122.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | d:i5433 ab:firstName "Katherine" ; 7 | ab:lastName "Duncan" ; 8 | ab:email "katherine.duncan@elpaso.com" . 9 | 10 | d:i2194 ab:firstName "Bradley" ; 11 | ab:lastName "Perry" ; 12 | ab:email "bradley.perry@corning.com" . 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex123.rq: -------------------------------------------------------------------------------- 1 | # filename: ex123.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?email 6 | FROM 7 | FROM 8 | WHERE 9 | { ?s ab:email ?email . } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex125.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex125.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | ab:course42 ab:courseTitle "Combining Public and Private RDF Data" . 7 | ab:course24 ab:courseTitle "Using Named Graphs" . 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex126.rq: -------------------------------------------------------------------------------- 1 | # filename: ex126.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?lname ?courseName 6 | FROM 7 | FROM NAMED 8 | FROM NAMED 9 | WHERE 10 | { 11 | { ?student ab:lastName ?lname } 12 | UNION 13 | { GRAPH { ?course ab:courseTitle ?courseName } } 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex128.rq: -------------------------------------------------------------------------------- 1 | # filename: ex128.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?g 6 | FROM NAMED 7 | FROM NAMED 8 | WHERE 9 | { 10 | GRAPH ?g { ?s ?p ?o } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex130.rq: -------------------------------------------------------------------------------- 1 | # filename: ex130.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?courseName 6 | FROM 7 | FROM NAMED 8 | FROM NAMED 9 | WHERE 10 | { 11 | { ?course ab:courseTitle ?courseName } 12 | 13 | UNION 14 | 15 | {GRAPH ?g { ?course ab:courseTitle ?courseName } } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex132.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex132.ttl 2 | 3 | @prefix images: . 4 | @prefix isi: . 5 | 6 | images:f43240.jpg isi:hasMetadata . 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex133.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex133.ttl 2 | 3 | @prefix images: . 4 | @prefix dc: . 5 | 6 | images:f43240.jpg dc:creator "Richard Mutt" ; 7 | dc:title "Fountain" ; 8 | dc:format "jpeg" . 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex134.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex134.ttl 2 | 3 | @prefix dc: . 4 | 5 | dc:date "2011-09-23" ; 6 | dc:creator "Richard Mutt" . 7 | 8 | dc:date "2011-09-24" ; 9 | dc:creator "Richard Mutt" . 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex135.rq: -------------------------------------------------------------------------------- 1 | # filename: ex135.rq 2 | 3 | PREFIX ab: 4 | PREFIX dc: 5 | 6 | SELECT ?graph ?email 7 | FROM 8 | FROM NAMED 9 | FROM NAMED 10 | WHERE 11 | { 12 | ?graph dc:date "2011-09-24" . 13 | { GRAPH ?graph { ?s ab:email ?email } } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex136.rq: -------------------------------------------------------------------------------- 1 | # filename: ex136.rq 2 | 3 | SELECT DISTINCT ?g 4 | WHERE 5 | { 6 | GRAPH ?g {?s ?p ?o } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex137.rq: -------------------------------------------------------------------------------- 1 | # filename: ex137.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?lastName ?courseName 6 | WHERE 7 | { 8 | { 9 | SELECT ?lastName 10 | WHERE { ?student ab:lastName ?lastName . } 11 | } 12 | 13 | { 14 | SELECT ?courseName 15 | WHERE { ?course ab:courseTitle ?courseName . } 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex138.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex138.ttl 2 | 3 | @prefix e: . 4 | @prefix d: . 5 | 6 | d:m40392 e:description "breakfast" ; 7 | e:date "2011-10-14T08:53" ; 8 | e:amount 6.53 . 9 | 10 | d:m40393 e:description "lunch" ; 11 | e:date "2011-10-14T13:19" ; 12 | e:amount 11.13 . 13 | 14 | d:m40394 e:description "dinner" ; 15 | e:date "2011-10-14T19:04" ; 16 | e:amount 28.30 . 17 | 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex139.rq: -------------------------------------------------------------------------------- 1 | # filename: ex139.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?amount ((?amount * .2) AS ?tip) 6 | ((?amount + ?tip) AS ?total) 7 | WHERE 8 | { 9 | ?meal e:description ?description ; 10 | e:amount ?amount . 11 | } 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex141.rq: -------------------------------------------------------------------------------- 1 | # filename: ex141.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT (UCASE(SUBSTR(?description,1,3)) 6 | as ?mealCode) ?amount 7 | 8 | WHERE 9 | { 10 | ?meal e:description ?description ; 11 | e:amount ?amount . 12 | } 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex143.rq: -------------------------------------------------------------------------------- 1 | # filename: ex143.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?mealCode ?amount 6 | WHERE 7 | { 8 | { 9 | SELECT ?meal (UCASE(SUBSTR(?description,1,3)) as ?mealCode) 10 | WHERE { ?meal e:description ?description . } 11 | } 12 | 13 | { 14 | SELECT ?meal ?amount 15 | WHERE { ?meal e:amount ?amount . } 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex144.rq: -------------------------------------------------------------------------------- 1 | # filename: ex144.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?mealCode ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:amount ?amount . 10 | BIND (UCASE(SUBSTR(?description,1,3)) as ?mealCode) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex145.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex145.ttl 2 | 3 | @prefix e: . 4 | @prefix d: . 5 | 6 | d:m40392 e:description "breakfast" ; 7 | e:date "2011-10-14" ; 8 | e:amount 6.53 . 9 | 10 | d:m40393 e:description "lunch" ; 11 | e:date "2011-10-14" ; 12 | e:amount 11.13 . 13 | 14 | d:m40394 e:description "dinner" ; 15 | e:date "2011-10-14" ; 16 | e:amount 28.30 . 17 | 18 | d:m40395 e:description "breakfast" ; 19 | e:date "2011-10-15" ; 20 | e:amount 4.32 . 21 | 22 | d:m40396 e:description "lunch" ; 23 | e:date "2011-10-15" ; 24 | e:amount 9.45 . 25 | 26 | d:m40397 e:description "dinner" ; 27 | e:date "2011-10-15" ; 28 | e:amount 31.45 . 29 | 30 | d:m40398 e:description "breakfast" ; 31 | e:date "2011-10-16" ; 32 | e:amount 6.65 . 33 | 34 | d:m40399 e:description "lunch" ; 35 | e:date "2011-10-16" ; 36 | e:amount 10.00 . 37 | 38 | d:m40400 e:description "dinner" ; 39 | e:date "2011-10-16" ; 40 | e:amount 25.05 . 41 | 42 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex146.rq: -------------------------------------------------------------------------------- 1 | # filename: ex146.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | } 12 | 13 | ORDER BY ?amount 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex148.rq: -------------------------------------------------------------------------------- 1 | # filename: ex148.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | } 12 | 13 | ORDER BY DESC(?amount) 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex149.rq: -------------------------------------------------------------------------------- 1 | # filename: ex149.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | } 12 | 13 | ORDER BY ?description DESC(?amount) 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex151.rq: -------------------------------------------------------------------------------- 1 | # filename: ex151.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | } 12 | 13 | ORDER BY DESC(?amount) 14 | LIMIT 1 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex153.rq: -------------------------------------------------------------------------------- 1 | # filename: ex153.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT (MAX(?amount) as ?maxAmount) 6 | WHERE { ?meal e:amount ?amount . } 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex155.rq: -------------------------------------------------------------------------------- 1 | # filename: ex155.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?maxAmount 6 | WHERE 7 | { 8 | { 9 | SELECT (MAX(?amount) as ?maxAmount) 10 | WHERE { ?meal e:amount ?amount . } 11 | } 12 | { 13 | ?meal e:description ?description ; 14 | e:date ?date ; 15 | e:amount ?maxAmount . 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex156.rq: -------------------------------------------------------------------------------- 1 | # filename: ex156.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT (AVG(?amount) as ?avgAmount) 6 | WHERE { ?meal e:amount ?amount . } 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex158.rq: -------------------------------------------------------------------------------- 1 | # filename: ex158.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT (GROUP_CONCAT(?amount; SEPARATOR = ",") AS ?amountList) 6 | WHERE { ?meal e:amount ?amount . } 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex160.rq: -------------------------------------------------------------------------------- 1 | # filename: ex160.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description (SUM(?amount) AS ?mealTotal) 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:amount ?amount . 10 | } 11 | GROUP BY ?description 12 | 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex162.rq: -------------------------------------------------------------------------------- 1 | # filename: ex162.rq 2 | 3 | SELECT ?p (COUNT(?p) AS ?pTotal) 4 | WHERE 5 | { ?s ?p ?o . } 6 | GROUP BY ?p 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex164.rq: -------------------------------------------------------------------------------- 1 | # filename: ex164.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description (SUM(?amount) AS ?mealTotal) 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:amount ?amount . 10 | } 11 | GROUP BY ?description 12 | HAVING (SUM(?amount) > 20) 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex166.rq: -------------------------------------------------------------------------------- 1 | # filename: ex166.rq 2 | 3 | PREFIX dc: 4 | 5 | SELECT ?title 6 | FROM 7 | WHERE { ?s dc:title ?title .} 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex167.rq: -------------------------------------------------------------------------------- 1 | # filename: ex167.rq 2 | 3 | PREFIX cat: 4 | PREFIX skos: 5 | PREFIX rdfs: 6 | PREFIX owl: 7 | PREFIX foaf: 8 | 9 | SELECT ?p ?o 10 | WHERE 11 | { 12 | SERVICE 13 | { SELECT ?p ?o 14 | WHERE { ?p ?o . } 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex170.rq: -------------------------------------------------------------------------------- 1 | # filename: ex170.rq 2 | 3 | PREFIX rdf: 4 | PREFIX rdfs: 5 | PREFIX gp: 6 | 7 | SELECT ?p ?o 8 | WHERE 9 | { 10 | SERVICE 11 | { gp:Hocking_Joseph ?p ?o . } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex172.rq: -------------------------------------------------------------------------------- 1 | # filename: ex172.rq 2 | 3 | PREFIX cat: 4 | PREFIX foaf: 5 | PREFIX gp: 6 | PREFIX owl: 7 | PREFIX rdf: 8 | PREFIX rdfs: 9 | PREFIX skos: 10 | 11 | SELECT ?dbpProperty ?dbpValue ?gutenProperty ?gutenValue 12 | WHERE 13 | { 14 | SERVICE 15 | { 16 | ?dbpProperty ?dbpValue . 17 | } 18 | 19 | SERVICE 20 | { 21 | gp:Hocking_Joseph ?gutenProperty ?gutenValue . 22 | } 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex174.rq: -------------------------------------------------------------------------------- 1 | # filename: ex174.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | 6 | SELECT ?person ?p ?o 7 | WHERE 8 | { 9 | ?person ab:firstName "Craig" ; 10 | ab:lastName "Ellis" ; 11 | ?p ?o . 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex176.rq: -------------------------------------------------------------------------------- 1 | # filename: ex176.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | 6 | CONSTRUCT 7 | { ?person ?p ?o . } 8 | 9 | WHERE 10 | { 11 | ?person ab:firstName "Craig" ; 12 | ab:lastName "Ellis" ; 13 | ?p ?o . 14 | } 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex178.rq: -------------------------------------------------------------------------------- 1 | # filename: ex178.rq 2 | 3 | PREFIX cat: 4 | PREFIX foaf: 5 | PREFIX gp: 6 | PREFIX owl: 7 | PREFIX rdf: 8 | PREFIX rdfs: 9 | PREFIX skos: 10 | 11 | CONSTRUCT 12 | { 13 | ?dbpProperty ?dbpValue . 14 | gp:Hocking_Joseph ?gutenProperty ?gutenValue . 15 | } 16 | 17 | 18 | WHERE 19 | { 20 | SERVICE 21 | { 22 | ?dbpProperty ?dbpValue . 23 | } 24 | 25 | SERVICE 26 | { 27 | gp:Hocking_Joseph ?gutenProperty ?gutenValue . 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex180.rq: -------------------------------------------------------------------------------- 1 | # filename: ex180.rq 2 | 3 | PREFIX ab: 4 | 5 | CONSTRUCT 6 | { ?course ab:courseTitle ?courseName . } 7 | WHERE 8 | { 9 | GRAPH { ?course ab:courseTitle ?courseName } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex182.rq: -------------------------------------------------------------------------------- 1 | # filename: ex182.rq 2 | 3 | CONSTRUCT 4 | { ?s ?p ?o } 5 | FROM 6 | WHERE 7 | { ?s ?p ?o } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex184.rq: -------------------------------------------------------------------------------- 1 | # filename: ex184.rq 2 | 3 | PREFIX dc: 4 | CONSTRUCT 5 | { 6 | dc:title "Jabez Easterbrook" . 7 | } 8 | WHERE 9 | {} 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex185.rq: -------------------------------------------------------------------------------- 1 | # filename: ex185.rq 2 | 3 | PREFIX ab: 4 | 5 | CONSTRUCT 6 | { 7 | ?person ?p ?o ; 8 | ab:areaCode ?areaCode . 9 | } 10 | WHERE 11 | { 12 | ?person ab:homeTel ?phone ; 13 | ?p ?o . 14 | BIND (SUBSTR(?phone,2,3) as ?areaCode) 15 | } 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex187.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex187.ttl 2 | 3 | @prefix d: . 4 | @prefix ab: . 5 | 6 | d:jane ab:hasParent d:gene . 7 | d:gene ab:hasParent d:pat ; 8 | ab:gender d:female . 9 | d:joan ab:hasParent d:pat ; 10 | ab:gender d:female . 11 | d:pat ab:gender d:male . 12 | d:mike ab:hasParent d:joan . 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex188.rq: -------------------------------------------------------------------------------- 1 | # filename: ex188.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | 6 | CONSTRUCT 7 | { ?p ab:hasGrandfather ?g . } 8 | WHERE 9 | { 10 | ?p ab:hasParent ?parent . 11 | ?parent ab:hasParent ?g . 12 | ?g ab:gender d:male . 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex190.rq: -------------------------------------------------------------------------------- 1 | # filename: ex190.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | 6 | CONSTRUCT 7 | { ?p ab:hasAunt ?aunt . } 8 | WHERE 9 | { 10 | ?p ab:hasParent ?parent . 11 | ?parent ab:hasParent ?g . 12 | ?aunt ab:hasParent ?g ; 13 | ab:gender d:female . 14 | 15 | FILTER (?parent != ?aunt) 16 | } 17 | 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex192.rq: -------------------------------------------------------------------------------- 1 | # filename: ex192.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | PREFIX rdf: 6 | 7 | CONSTRUCT 8 | { 9 | ?aunt rdf:type ab:Aunt . 10 | ?p ab:hasAunt ?aunt . 11 | } 12 | 13 | WHERE 14 | { 15 | ?p ab:hasParent ?parent . 16 | ?parent ab:hasParent ?g . 17 | ?aunt ab:hasParent ?g ; 18 | ab:gender d:female . 19 | 20 | FILTER (?parent != ?aunt) 21 | } 22 | 23 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex193.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex193.ttl 2 | 3 | @prefix rdf: . 4 | @prefix rdfs: . 5 | @prefix ab: . 6 | @prefix owl: . 7 | 8 | ab:Aunt rdf:type owl:Class ; 9 | rdfs:comment "The sister of one of the resource's parents." . 10 | 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex194.rq: -------------------------------------------------------------------------------- 1 | # filename: ex194.rq 2 | 3 | PREFIX ab: 4 | PREFIX v: 5 | 6 | CONSTRUCT 7 | { 8 | ?s v:given-name ?firstName ; 9 | v:family-name ?lastName ; 10 | v:email ?email ; 11 | v:homeTel ?homeTel . 12 | } 13 | WHERE 14 | { 15 | ?s ab:firstName ?firstName ; 16 | ab:lastName ?lastName ; 17 | ab:email ?email . 18 | OPTIONAL 19 | { ?s ab:homeTel ?homeTel . } 20 | } 21 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex196.rq: -------------------------------------------------------------------------------- 1 | # filename: ex196.rq 2 | 3 | PREFIX cat: 4 | PREFIX foaf: 5 | PREFIX gp: 6 | PREFIX owl: 7 | PREFIX rdf: 8 | PREFIX rdfs: 9 | PREFIX skos: 10 | PREFIX d: 11 | CONSTRUCT 12 | { 13 | d:HockingJoseph ?dbpProperty ?dbpValue ; 14 | ?gutenProperty ?gutenValue . 15 | 16 | } 17 | WHERE 18 | { 19 | SERVICE 20 | { 21 | ?dbpProperty ?dbpValue . 22 | } 23 | 24 | SERVICE 25 | { 26 | gp:Hocking_Joseph ?gutenProperty ?gutenValue . 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex198.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex198.ttl 2 | 3 | @prefix dm: . 4 | @prefix d: . 5 | 6 | d:item432 dm:cost 8.50 ; 7 | dm:amount 14 ; 8 | dm:approval d:emp079 ; 9 | dm:location . 10 | 11 | d:item201 dm:cost 9.25 ; 12 | dm:amount 12 ; 13 | dm:approval d:emp092 ; 14 | dm:location . 15 | 16 | d:item857 dm:cost 12 ; 17 | dm:amount 10 ; 18 | dm:location . 19 | 20 | d:item693 dm:cost 10.25 ; 21 | dm:amount 1.5 ; 22 | dm:location "Heidelberg" . 23 | 24 | d:item126 dm:cost 5.05 ; 25 | dm:amount 4 ; 26 | dm:location . 27 | 28 | 29 | d:emp092 dm:jobGrade 1 . 30 | d:emp041 dm:jobGrade 3 . 31 | d:emp079 dm:jobGrade 5 . 32 | 33 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex199.rq: -------------------------------------------------------------------------------- 1 | # filename: ex199.rq 2 | 3 | PREFIX dm: 4 | 5 | ASK WHERE 6 | { 7 | ?s dm:location ?city . 8 | FILTER (!(isURI(?city))) 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex201.rq: -------------------------------------------------------------------------------- 1 | # filename: ex201.rq 2 | 3 | PREFIX dm: 4 | PREFIX xsd: 5 | 6 | ASK WHERE 7 | { 8 | ?item dm:amount ?amount . 9 | FILTER ((datatype(?amount)) != xsd:integer) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex202.rq: -------------------------------------------------------------------------------- 1 | # filename: ex202.rq 2 | 3 | PREFIX dm: 4 | 5 | ASK WHERE 6 | { 7 | ?item dm:cost ?cost ; 8 | dm:amount ?amount . 9 | OPTIONAL 10 | { 11 | ?item dm:approval ?approvingEmployee . 12 | ?approvingEmployee dm:jobGrade ?grade . 13 | } 14 | 15 | BIND (?cost * ?amount AS ?totalCost) . 16 | FILTER ((?totalCost > 100) && 17 | ( (!(bound(?grade)) || (?grade < 5 ) ))) 18 | } 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex203.rq: -------------------------------------------------------------------------------- 1 | # filename: ex203.rq 2 | 3 | PREFIX dm: 4 | PREFIX rdfs: 5 | 6 | CONSTRUCT 7 | { 8 | ?s dm:problem dm:prob29 . 9 | dm:prob29 rdfs:label "Location value must be a URI." . 10 | } 11 | 12 | WHERE 13 | { 14 | ?s dm:location ?city . 15 | FILTER (!(isURI(?city))) 16 | } 17 | 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex205.rq: -------------------------------------------------------------------------------- 1 | # filename: ex205.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX dm: 5 | PREFIX xsd: 6 | 7 | CONSTRUCT 8 | { 9 | ?item dm:problem dm:prob32 . 10 | dm:prob32 rdfs:label "Amount must be an integer." . 11 | } 12 | 13 | WHERE 14 | { 15 | ?item dm:amount ?amount . 16 | FILTER ((datatype(?amount)) != xsd:integer) 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex207.rq: -------------------------------------------------------------------------------- 1 | # filename: ex207.rq 2 | 3 | PREFIX dm: 4 | PREFIX rdfs: 5 | 6 | CONSTRUCT 7 | { 8 | ?item dm:problem dm:prob44 . 9 | dm:prob44 rdfs:label "Expenditures over 100 require grade 5 approval." . 10 | } 11 | 12 | WHERE 13 | { 14 | ?item dm:cost ?cost ; 15 | dm:amount ?amount . 16 | OPTIONAL 17 | { 18 | ?item dm:approval ?approvingEmployee . 19 | ?approvingEmployee dm:jobGrade ?grade . 20 | } 21 | 22 | BIND (?cost * ?amount AS ?totalCost) . 23 | FILTER ((?totalCost > 100) && 24 | ( (!(bound(?grade)) || (?grade < 5 ) ))) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex209.rq: -------------------------------------------------------------------------------- 1 | # filename: ex209.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX dm: 5 | PREFIX xsd: 6 | 7 | CONSTRUCT 8 | { 9 | ?prob32item dm:problem dm:prob32 . 10 | dm:prob32 rdfs:label "Amount must be an integer." . 11 | 12 | ?prob29item dm:problem dm:prob29 . 13 | dm:prob29 rdfs:label "Location value must be a URI." . 14 | 15 | ?prob44item dm:problem dm:prob44 . 16 | dm:prob44 rdfs:label "Expenditures over 100 require grade 5 approval." . 17 | 18 | dm:probXX rdfs:label "This is a dummy problem." . 19 | } 20 | 21 | WHERE 22 | { 23 | { 24 | ?prob32item dm:amount ?amount . 25 | FILTER ((datatype(?amount)) != xsd:integer) 26 | } 27 | 28 | UNION 29 | 30 | { 31 | ?prob29item dm:location ?city . 32 | FILTER (!(isURI(?city))) 33 | } 34 | 35 | UNION 36 | 37 | { 38 | ?prob44item dm:cost ?cost ; 39 | dm:amount ?amount . 40 | OPTIONAL 41 | { 42 | ?item dm:approval ?approvingEmployee . 43 | ?approvingEmployee dm:jobGrade ?grade . 44 | } 45 | 46 | BIND (?cost * ?amount AS ?totalCost) . 47 | FILTER ((?totalCost > 100) && 48 | ( (!(bound(?grade)) || (?grade < 5 ) ))) 49 | } 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex211.rq: -------------------------------------------------------------------------------- 1 | # filename: ex211.rq 2 | 3 | PREFIX sch: 4 | PREFIX dm: 5 | PREFIX rdf: 6 | 7 | CONSTRUCT 8 | { 9 | [] rdf:type sch:Error; 10 | sch:message "location value should be a URI"; 11 | sch:implicated ?s. 12 | 13 | } 14 | WHERE 15 | { 16 | ?s dm:location ?city . 17 | FILTER (!(isURI(?city))) 18 | } 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex212.rq: -------------------------------------------------------------------------------- 1 | # filename: ex212.rq 2 | 3 | PREFIX spin: 4 | PREFIX rdfs: 5 | PREFIX dm: 6 | 7 | CONSTRUCT 8 | { 9 | _:b0 a spin:ConstraintViolation . 10 | _:b0 rdfs:comment "Location value must be a URI" . 11 | _:b0 spin:violationRoot ?this . 12 | 13 | } 14 | WHERE 15 | { 16 | ?this dm:location ?city . 17 | FILTER (!isURI(?city)) . 18 | } 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex213.rq: -------------------------------------------------------------------------------- 1 | # filename: ex213.rq 2 | 3 | DESCRIBE 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex215.rq: -------------------------------------------------------------------------------- 1 | # filename: ex215.rq 2 | 3 | DESCRIBE 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex216.rq: -------------------------------------------------------------------------------- 1 | # filename: ex216.rq 2 | 3 | PREFIX d: 4 | PREFIX ab: 5 | 6 | DESCRIBE ?course WHERE 7 | { d:i0432 ab:takingCourse ?course . } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex217.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex217.ttl 2 | 3 | @prefix d: . 4 | @prefix dm: . 5 | @prefix xsd: . 6 | @prefix mt: . 7 | 8 | d:item1a dm:prop "1" . 9 | d:item1b dm:prop "1"^^xsd:integer . 10 | d:item1c dm:prop 1 . 11 | d:item1d dm:prop 1.0e5 . 12 | d:item2a dm:prop "two" . 13 | d:item2b dm:prop "two"^^xsd:string . 14 | d:item2c dm:prop "two"^^mt:potrzebies . 15 | d:item2d dm:prop "two"@en . 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex218.rq: -------------------------------------------------------------------------------- 1 | # filename: ex218.rq 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | SELECT ?s 7 | WHERE { ?s ?p 1 . } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex220.rq: -------------------------------------------------------------------------------- 1 | # filename: ex220.rq 2 | 3 | PREFIX xsd: 4 | PREFIX d: 5 | PREFIX dm: 6 | 7 | SELECT ?s 8 | WHERE { ?s ?p "two" . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex221.rq: -------------------------------------------------------------------------------- 1 | # filename: ex221.rq 2 | 3 | PREFIX xsd: 4 | PREFIX d: 5 | PREFIX dm: 6 | 7 | SELECT ?s 8 | WHERE { ?s ?p "two"^^xsd:string . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex222.rq: -------------------------------------------------------------------------------- 1 | # filename: ex222.rq 2 | 3 | PREFIX d: 4 | PREFIX mt: 5 | 6 | SELECT ?s 7 | WHERE { ?s ?p "two"^^mt:potrzebies . } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex223.rq: -------------------------------------------------------------------------------- 1 | # filename: ex223.rq 2 | 3 | SELECT ?s 4 | WHERE 5 | { 6 | ?s ?p ?o . 7 | FILTER (str(?o) = "two") 8 | } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex224.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex224.ttl 2 | 3 | @prefix d: . 4 | @prefix rdfs: . 5 | 6 | d:item1 rdfs:label "sample string 1" . 7 | d:item2 rdfs:label 'sample string 2' . 8 | d:item3 rdfs:label 'These quotes are "ironic" quotes.' . 9 | d:item4 rdfs:label "These too are \"ironic\" quotes." . 10 | d:item5 rdfs:label "McDonald's is not my kind of place." . 11 | d:item6 rdfs:label """this 12 | 13 | has two carriage returns in the middle.""" . 14 | 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex225.rq: -------------------------------------------------------------------------------- 1 | # filename: ex225.rq 2 | 3 | PREFIX d: 4 | 5 | SELECT ?s ?o 6 | WHERE { ?s ?p ?o } 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex227.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex227.ttl 2 | 3 | @prefix e: . 4 | @prefix d: . 5 | @prefix xsd: . 6 | 7 | d:m40392 e:description "breakfast" ; 8 | e:date "2011-10-14T08:53:00"^^xsd:dateTime ; 9 | e:amount 6.53 . 10 | 11 | d:m40393 e:description "lunch" ; 12 | e:date "2011-10-14T13:19:00"^^xsd:dateTime ; 13 | e:amount 11.13 . 14 | 15 | d:m40394 e:description "dinner" ; 16 | e:date "2011-10-14T19:04:00"^^xsd:dateTime ; 17 | e:amount 28.30 . 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex228.rq: -------------------------------------------------------------------------------- 1 | # filename: ex228.rq 2 | 3 | PREFIX d: 4 | PREFIX e: 5 | PREFIX xsd: 6 | 7 | SELECT ?s ?p ?o 8 | WHERE { 9 | ?s e:amount ?amount; 10 | ?p ?o . 11 | FILTER (?amount < 20) 12 | } 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex230.rq: -------------------------------------------------------------------------------- 1 | # filename: ex230.rq 2 | 3 | PREFIX d: 4 | PREFIX e: 5 | PREFIX xsd: 6 | 7 | SELECT ?s ?p ?o 8 | WHERE { 9 | ?s e:date ?date; 10 | ?p ?o . 11 | FILTER (?date >= "2011-10-14T12:00:00"^^xsd:dateTime) 12 | } 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex232.rq: -------------------------------------------------------------------------------- 1 | # filename: ex232.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?amount ?tip ?total 6 | 7 | WHERE { 8 | ?meal e:description ?description ; 9 | e:amount ?amount . 10 | BIND ((?amount * .2) AS ?tip) 11 | BIND ((?amount + ?tip) AS ?total) 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex233.rq: -------------------------------------------------------------------------------- 1 | # filename: ex233.rq 2 | 3 | PREFIX dm: 4 | PREFIX d: 5 | SELECT * 6 | WHERE { 7 | ?item dm:quantity ?quantity; 8 | dm:costPerItem ?cost . 9 | BIND ( (?quantity * ?cost) as ?total ) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex235.rq: -------------------------------------------------------------------------------- 1 | # filename: ex235.rq 2 | 3 | SELECT ?answer 4 | WHERE 5 | { 6 | BIND ((IF (2 > 3, "Two is bigger","Three is bigger")) AS ?answer) 7 | } 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex237.rq: -------------------------------------------------------------------------------- 1 | # filename: ex237.rq 2 | 3 | PREFIX dm: 4 | PREFIX rdf: 5 | 6 | CONSTRUCT { ?locationURI rdf:type dm:Place . } 7 | WHERE 8 | { 9 | ?item dm:location ?locationValue . 10 | BIND (IF(isURI(?locationValue), 11 | ?locationValue, 12 | URI(CONCAT("http://learningsparql.com/ns/data#", 13 | ENCODE_FOR_URI(?locationValue))) 14 | ) AS ?locationURI 15 | 16 | ) . 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex239.rq: -------------------------------------------------------------------------------- 1 | # filename: ex239.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?firstName ?last 6 | WHERE { 7 | ?s ab:lastName ?last; 8 | ab:firstName ?first . 9 | OPTIONAL { 10 | ?s ab:nick ?nickname . 11 | } 12 | BIND (COALESCE(?nickname,?first) AS ?firstName) 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex241.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex241.ttl 2 | 3 | @prefix dm: . 4 | @prefix rdfs: . 5 | @prefix d: . 6 | @prefix xsd: . 7 | 8 | d:id1 dm:location _:b1 . 9 | d:id2 dm:location . 10 | d:id3 dm:amount 3 . 11 | d:id4 dm:amount "4"^^xsd:integer . 12 | d:id5 dm:amount 1.0e5 . 13 | d:id6 rdfs:label "5 bucks" . 14 | d:id7 dm:shipped true . 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex242.rq: -------------------------------------------------------------------------------- 1 | # filename: ex242.rq 2 | 3 | PREFIX dbr: 4 | SELECT ?o ?blankTest ?literalTest ?numericTest ?IRITest ?URITest 5 | WHERE 6 | { 7 | ?s ?p ?o . 8 | BIND (isBlank(?o) as ?blankTest) 9 | BIND (isLiteral(?o) as ?literalTest) 10 | BIND (isNumeric(?o) as ?numericTest) 11 | BIND (isIRI(?o) as ?IRITest) 12 | BIND (isURI(?o) as ?URITest) 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex244.rq: -------------------------------------------------------------------------------- 1 | # filename: ex244.rq 2 | 3 | PREFIX dbr: 4 | 5 | SELECT ?o ?datatype 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND (datatype(?o) as ?datatype) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex246.rq: -------------------------------------------------------------------------------- 1 | # filename: ex246.rq 2 | 3 | BASE 4 | 5 | CONSTRUCT {?s ?p ?testURI.} 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND (URI(?o) AS ?testURI) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex248.rq: -------------------------------------------------------------------------------- 1 | # filename: ex248.rq 2 | 3 | BASE 4 | 5 | CONSTRUCT {?s ?p ?testURI.} 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND (URI(ENCODE_FOR_URI(?o)) AS ?testURI) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex249.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex249.ttl 2 | 3 | @prefix dm: . 4 | @prefix rdfs: . 5 | @prefix d: . 6 | @prefix xsd: . 7 | 8 | d:id3 dm:amount 3 . 9 | d:id4 dm:amount "4"^^xsd:integer . 10 | d:id5 dm:amount 1.0e5 . 11 | d:id6 rdfs:label "5 bucks" . 12 | d:id7 dm:shipped true . 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex251.rq: -------------------------------------------------------------------------------- 1 | # filename: ex251.rq 2 | 3 | PREFIX d: 4 | 5 | SELECT ?s ?testStr 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND (str(?o) AS ?testStr) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex253.rq: -------------------------------------------------------------------------------- 1 | # filename: ex253.rq 2 | 3 | BASE 4 | 5 | CONSTRUCT {?s ?p ?testURI.} 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND (URI(ENCODE_FOR_URI(str(?o))) AS ?testURI) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex255.rq: -------------------------------------------------------------------------------- 1 | # filename: ex255.rq 2 | 3 | BASE 4 | 5 | CONSTRUCT {?s ?p ?testURI.} 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND( IF(isURI(?o), 10 | ?o, 11 | URI(ENCODE_FOR_URI(str(?o))) 12 | ) AS ?testURI 13 | ) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex257.rq: -------------------------------------------------------------------------------- 1 | # filename: ex257.rq 2 | 3 | PREFIX dbr: 4 | PREFIX xsd: 5 | 6 | SELECT ?o ?integerTest ?decimalTest ?floatTest ?doubleTest 7 | WHERE 8 | { 9 | ?s ?p ?o . 10 | BIND (xsd:integer(?o) as ?integerTest) 11 | BIND (xsd:decimal(?o) as ?decimalTest) 12 | BIND (xsd:float(?o) as ?floatTest) 13 | BIND (xsd:double(?o) as ?doubleTest) 14 | } 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex259.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex259.ttl 2 | 3 | @prefix dm: . 4 | @prefix rdfs: . 5 | @prefix d: . 6 | @prefix xsd: . 7 | 8 | d:id1 dm:location _:b1 . 9 | d:id3 dm:amount 3 . 10 | d:id4 dm:amount "4"^^xsd:integer . 11 | d:id5 dm:amount 1.0e5 . 12 | d:id6 rdfs:label "5 bucks" . 13 | d:id7 dm:shipped true . 14 | d:id8 dm:shipped "true" . 15 | d:id9 dm:shipped "True" . 16 | d:id10 dm:shipDate "2011-11-12" . 17 | d:id11 dm:shipDate "2011-11-13T14:30:00" . 18 | d:id12 dm:shipDate "2011-11-14T14:30:00"^^xsd:dateTime . 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex260.rq: -------------------------------------------------------------------------------- 1 | # filename: ex260.rq 2 | 3 | PREFIX xsd: 4 | 5 | SELECT ?o ?stringTest ?boolTest 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND (xsd:string(?o) as ?stringTest) 10 | BIND (xsd:boolean(?o) as ?boolTest) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex262.rq: -------------------------------------------------------------------------------- 1 | # filename: ex262.rq 2 | 3 | PREFIX xsd: 4 | 5 | SELECT ?o ?dateTimeTest 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | BIND (xsd:dateTime(?o) as ?dateTimeTest) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex264.rq: -------------------------------------------------------------------------------- 1 | # filename: ex264.rq 2 | 3 | PREFIX dbr: 4 | PREFIX xsd: 5 | 6 | SELECT ?o ?decimalTest 7 | WHERE 8 | { 9 | ?s ?p ?o . 10 | BIND (STRDT(str(?o),xsd:decimal) as ?decimalTest) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex266.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex266.ttl 2 | 3 | @prefix im: . 4 | @prefix d: . 5 | 6 | d:item1 im:product "kerosene" ; 7 | im:amount "14" ; 8 | im:units "liters" . 9 | 10 | d:item2 im:product "double-knit polyester" ; 11 | im:amount "10" ; 12 | im:units "squareMeters" . 13 | 14 | d:item3 im:product "gold-plated chain" ; 15 | im:amount "30" ; 16 | im:units "centimeters" . 17 | 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex267.rq: -------------------------------------------------------------------------------- 1 | # filename: ex267.rq 2 | 3 | PREFIX im: 4 | PREFIX dm: 5 | PREFIX u: 6 | 7 | CONSTRUCT { ?s dm:amount ?newAmount . } 8 | WHERE 9 | { 10 | ?s im:product ?prodName ; 11 | im:amount ?amount ; 12 | im:units ?units . 13 | 14 | BIND (STRDT(?amount, 15 | URI(CONCAT("http://learningsparql.com/ns/units#",?units))) 16 | AS ?newAmount) 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex269.rq: -------------------------------------------------------------------------------- 1 | # filename: ex269.rq 2 | 3 | SELECT * WHERE { 4 | :Ducati ?city . 5 | ?city rdfs:label ?cityName . 6 | FILTER ( lang(?cityName) = "en" ) 7 | } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex270.rq: -------------------------------------------------------------------------------- 1 | # filename: ex270.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label 6 | WHERE { ?s rdfs:label ?label .} 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex271.rq: -------------------------------------------------------------------------------- 1 | # filename: ex271.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label 6 | WHERE { 7 | ?s rdfs:label ?label . 8 | FILTER ( lang(?label) = "en" ) 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex273.rq: -------------------------------------------------------------------------------- 1 | # filename: ex273.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?strippedLabel 6 | WHERE { 7 | ?s rdfs:label ?label . 8 | FILTER ( lang(?label) = "en" ) 9 | BIND (str(?label) AS ?strippedLabel) 10 | } 11 | 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex276.rq: -------------------------------------------------------------------------------- 1 | # filename: ex276.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?strippedLabel 6 | WHERE { 7 | ?s rdfs:label ?label . 8 | FILTER ( langMatches(lang(?label),"en" )) 9 | BIND (str(?label) AS ?strippedLabel) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex278.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex278.ttl 2 | 3 | @prefix d: . 4 | @prefix rdfs: . 5 | 6 | d:item1 rdfs:label "dog" . 7 | d:item2 rdfs:label "cat"@en . 8 | d:item3 rdfs:label "turtle"@en-US . 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex279.rq: -------------------------------------------------------------------------------- 1 | # filename: ex279.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label 6 | WHERE 7 | { 8 | ?s rdfs:label ?label . 9 | FILTER (!(langMatches(lang(?label),"*"))) 10 | } 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex281.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex281.ttl 2 | 3 | @prefix rdfs: . 4 | @prefix dm: . 5 | @prefix d: . 6 | 7 | d:cell1 dm:row 1 ; 8 | dm:column 1 ; 9 | rdfs:label "truck" . 10 | 11 | d:cell2 dm:row 1 ; 12 | dm:column 2 ; 13 | rdfs:label "lorry" . 14 | 15 | d:cell3 dm:row 2 ; 16 | dm:column 1 ; 17 | rdfs:label "apartment" . 18 | 19 | d:cell4 dm:row 2 ; 20 | dm:column 2 ; 21 | rdfs:label "flat" . 22 | 23 | d:cell5 dm:row 3 ; 24 | dm:column 1 ; 25 | rdfs:label "elevator" . 26 | 27 | d:cell6 dm:row 3 ; 28 | dm:column 2 ; 29 | rdfs:label "lift" . 30 | 31 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex282.rq: -------------------------------------------------------------------------------- 1 | # filename: ex282.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX dm: 5 | PREFIX skos: 6 | 7 | CONSTRUCT 8 | { ?rowURI rdfs:type skos:Concept ; 9 | skos:prefLabel ?taggedUSTerm, ?taggedGBTerm . } 10 | WHERE 11 | { 12 | ?cell1 dm:row ?rownum ; 13 | dm:column 1 ; 14 | rdfs:label ?USTerm . 15 | 16 | BIND (STRLANG(?USTerm,"en-US") AS ?taggedUSTerm) 17 | 18 | ?cell2 dm:row ?rownum ; 19 | dm:column 2 ; 20 | rdfs:label ?GBTerm . 21 | 22 | BIND (STRLANG(?GBTerm,"en-GB") AS ?taggedGBTerm) 23 | 24 | BIND (URI(CONCAT("http://learningsparql.com/ns/terms#t",str(?rownum))) 25 | AS ?rowURI) 26 | } 27 | 28 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex284.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex284.ttl 2 | 3 | @prefix rdfs: . 4 | @prefix d: . 5 | 6 | d:item1 rdfs:label "My String" . 7 | 8 | d:item2 rdfs:label "123456" . 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex285.rq: -------------------------------------------------------------------------------- 1 | # filename: ex285.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label ?strlenTest ?substrTest ?ucaseTest ?lcaseTest 6 | WHERE 7 | { 8 | ?s rdfs:label ?label . 9 | BIND (STRLEN(?label) AS ?strlenTest) 10 | BIND (SUBSTR(?label,4,2) AS ?substrTest) 11 | BIND (UCASE(?label) AS ?ucaseTest) 12 | BIND (LCASE(?label) AS ?lcaseTest) 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex287.rq: -------------------------------------------------------------------------------- 1 | # filename: ex287.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?label ?startsTest ?endsTest ?containsTest ?regexTest 6 | WHERE 7 | { 8 | ?s rdfs:label ?label . 9 | BIND (STRSTARTS(?label,"12") AS ?startsTest) 10 | BIND (STRENDS(?label,"ing") AS ?endsTest) 11 | BIND (CONTAINS(?label," ") AS ?containsTest) 12 | BIND (regex(?label,"\\d{3}") AS ?regexTest) 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex289.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex289.ttl 2 | 3 | @prefix rdfs: . 4 | @prefix d: . 5 | 6 | d:item1 rdfs:label "My String" . 7 | 8 | d:item2 rdfs:label "http://www.learnsparql.com/cgi/func1&color=red" . 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex290.rq: -------------------------------------------------------------------------------- 1 | # filename: ex290.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT ?encodeTest 6 | WHERE 7 | { 8 | ?s rdfs:label ?label . 9 | BIND (ENCODE_FOR_URI(?label) AS ?encodeTest) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex292.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex292.ttl 2 | 3 | @prefix rdfs: . 4 | @prefix d: . 5 | @prefix dm: . 6 | 7 | d:item1 dm:amount 4 . 8 | d:item2 dm:amount 3.2 . 9 | d:item3 dm:amount 3.8 . 10 | d:item4 dm:amount -4.2 . 11 | d:item5 dm:amount -4.8 . 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex293.rq: -------------------------------------------------------------------------------- 1 | # filename: ex293.rq 2 | 3 | PREFIX dm: 4 | PREFIX xsd: 5 | 6 | SELECT ?amount ?absTest ?roundTest ?ceilTest ?floorTest 7 | WHERE 8 | { 9 | ?s dm:amount ?amount . 10 | BIND (abs(?amount) AS ?absTest ) 11 | BIND (round(?amount) AS ?roundTest ) 12 | BIND (ceil(?amount) AS ?ceilTest ) 13 | BIND (floor(?amount) AS ?floorTest ) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex295.rq: -------------------------------------------------------------------------------- 1 | # filename: ex295.rq 2 | 3 | SELECT ?randTest1 ?randTest2 4 | WHERE 5 | { 6 | ?s ?p ?o . 7 | BIND (rand() AS ?randTest1) 8 | BIND (floor(rand()*11)+20 AS ?randTest2) 9 | } 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex298.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex298.ttl 2 | 3 | @prefix xsd: . 4 | @prefix d: . 5 | @prefix t: . 6 | 7 | d:meeting1 t:starts "2011-10-14T12:30:00.000-05:00"^^xsd:dateTime . 8 | 9 | d:meeting2 t:starts "2011-10-15T12:30:00"^^xsd:dateTime . 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex299.rq: -------------------------------------------------------------------------------- 1 | # filename: ex299.rq 2 | 3 | PREFIX d: 4 | PREFIX t: 5 | 6 | SELECT ?mtg ?yearTest ?monthTest ?dayTest ?hoursTest ?minutesTest 7 | WHERE 8 | { 9 | ?mtg t:starts ?startTime . 10 | BIND (year(?startTime) AS ?yearTest) 11 | BIND (month(?startTime) AS ?monthTest) 12 | BIND (day(?startTime) AS ?dayTest) 13 | BIND (hours(?startTime) AS ?hoursTest) 14 | BIND (minutes(?startTime) AS ?minutesTest) 15 | } 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex301.rq: -------------------------------------------------------------------------------- 1 | # filename: ex301.rq 2 | 3 | PREFIX d: 4 | PREFIX t: 5 | PREFIX xsd: 6 | 7 | SELECT ?timezoneTest ?tzTest 8 | WHERE 9 | { 10 | ?mtg t:starts ?startTime . 11 | BIND (timezone(?startTime) AS ?timezoneTest) 12 | BIND (tz(?startTime) AS ?tzTest) 13 | } 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex303.rq: -------------------------------------------------------------------------------- 1 | # filename: ex303.rq 2 | 3 | PREFIX xsd: 4 | 5 | SELECT ?currentTime ?currentSeconds 6 | WHERE 7 | { 8 | BIND (now() AS ?currentTime) 9 | BIND (seconds(?currentTime) AS ?currentSeconds) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex305.rq: -------------------------------------------------------------------------------- 1 | # filename: ex305.rq 2 | 3 | PREFIX foaf: 4 | PREFIX ab: 5 | 6 | CONSTRUCT { 7 | ?s foaf:givenName ?first ; 8 | foaf:familyName ?last ; 9 | foaf:mbox_sha1sum ?hashEmail . 10 | } 11 | WHERE 12 | { 13 | ?s ab:firstName ?first ; 14 | ab:lastName ?last ; 15 | ab:email ?email . 16 | BIND (SHA1(?email) AS ?hashEmail ) 17 | } 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex307.py: -------------------------------------------------------------------------------- 1 | # filename: ex307.py 2 | 3 | import hashlib 4 | m = hashlib.sha1() 5 | m.update("richard49@hotmail.com") 6 | print m.hexdigest() 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex308.rq: -------------------------------------------------------------------------------- 1 | # filename: ex308.rq 2 | 3 | PREFIX afn: 4 | PREFIX d: 5 | 6 | SELECT DISTINCT ?s ?sLocalname ?sNamespace 7 | WHERE 8 | { 9 | ?s ?p ?o . 10 | BIND (afn:localname(?s) AS ?sLocalname ) 11 | BIND (afn:namespace(?s) AS ?sNamespace ) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex311.rq: -------------------------------------------------------------------------------- 1 | # filename: ex311.rq 2 | 3 | SELECT * 4 | WHERE 5 | { ?s ?p ?o } 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex312.ru: -------------------------------------------------------------------------------- 1 | # filename: ex312.ru 2 | 3 | PREFIX rdfs: 4 | PREFIX ab: 5 | PREFIX d: 6 | 7 | INSERT DATA 8 | { 9 | d:i8301 ab:homeTel "(718) 440-9821" . 10 | ab:Person a rdfs:Class . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex313.ru: -------------------------------------------------------------------------------- 1 | # filename: ex313.ru 2 | 3 | PREFIX rdfs: 4 | PREFIX ab: 5 | PREFIX d: 6 | 7 | INSERT 8 | { 9 | d:i8301 ab:homeTel "(718) 440-9821" . 10 | ab:Person a rdfs:Class . 11 | } 12 | WHERE {} 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex314.rq: -------------------------------------------------------------------------------- 1 | # filename: ex314.rq 2 | 3 | PREFIX ab: 4 | 5 | CONSTRUCT 6 | { ?person a ab:Person . } 7 | WHERE 8 | { 9 | ?person ab:firstName ?firstName ; 10 | ab:lastName ?lastName . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex316.ru: -------------------------------------------------------------------------------- 1 | # filename: ex316.ru 2 | 3 | PREFIX ab: 4 | 5 | INSERT 6 | { ?person a ab:Person . } 7 | WHERE 8 | { 9 | ?person ab:firstName ?firstName ; 10 | ab:lastName ?lastName . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex317.ru: -------------------------------------------------------------------------------- 1 | # filename: ex317.ru 2 | 3 | LOAD 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex318.rq: -------------------------------------------------------------------------------- 1 | # filename ex318.rq 2 | 3 | SELECT * WHERE 4 | { ?p ?o } 5 | 6 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex319.ttl: -------------------------------------------------------------------------------- 1 | 2 | 3 | "1918-09-21" . 4 | 5 | 6 | owl:sameAs 7 | . 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex320.ru: -------------------------------------------------------------------------------- 1 | # filename: ex320.ru 2 | 3 | PREFIX fb: 4 | PREFIX db: 5 | PREFIX owl: 6 | 7 | DELETE DATA 8 | { 9 | fb:en.tommy_potter fb:people.person.date_of_birth "1918-09-21" ; 10 | owl:sameAs db:Tommy_Potter . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex321.ru: -------------------------------------------------------------------------------- 1 | # filename: ex321.ru 2 | 3 | PREFIX fb: 4 | PREFIX db: 5 | PREFIX owl: 6 | 7 | DELETE 8 | { 9 | fb:en.tommy_potter fb:people.person.date_of_birth "1918-09-21" ; 10 | owl:sameAs db:Tommy_Potter . 11 | } 12 | WHERE {} 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex322.ru: -------------------------------------------------------------------------------- 1 | # filename: ex322.ru 2 | 3 | DELETE { ?s ?p "Tommy_Potter" } 4 | WHERE { ?s ?p "Tommy_Potter" } 5 | 6 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex323.ru: -------------------------------------------------------------------------------- 1 | # filename: ex323.ru 2 | 3 | DELETE WHERE { ?s ?p "Tommy_Potter" } 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex324.ru: -------------------------------------------------------------------------------- 1 | # filename: ex324.ru 2 | 3 | CLEAR DEFAULT 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex325.ru: -------------------------------------------------------------------------------- 1 | # filename: ex325.ru 2 | 3 | PREFIX foaf: 4 | PREFIX ab: 5 | 6 | DELETE 7 | { ?s ab:email ?o } 8 | INSERT 9 | { ?s foaf:mbox ?o } 10 | WHERE 11 | {?s ab:email ?o } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex326.rq: -------------------------------------------------------------------------------- 1 | # filename: ex326.rq 2 | 3 | PREFIX foaf: 4 | PREFIX ab: 5 | 6 | CONSTRUCT 7 | { ?s foaf:mbox ?o } 8 | WHERE 9 | {?s ab:email ?o } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex327.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex327.ttl 2 | 3 | @prefix skos: . 4 | @prefix d: . 5 | 6 | d:c1 a skos:Concept ; 7 | skos:prefLabel "Mammal" . 8 | 9 | d:c2 a skos:Concept ; 10 | skos:prefLabel "Dog" ; 11 | skos:broader d:c1 . 12 | 13 | d:c3 a skos:Concept ; 14 | skos:prefLabel "Cat" ; 15 | skos:broader d:c1 . 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex328.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex328.ttl 2 | 3 | @prefix skos: . 4 | @prefix xl: . 5 | @prefix d: . 6 | @prefix dc: . 7 | 8 | d:c1 a skos:Concept ; 9 | xl:prefLabel d:label1 . 10 | 11 | d:c2 a skos:Concept ; 12 | xl:prefLabel d:label2 ; 13 | skos:broader d:c1 . 14 | 15 | d:c3 a skos:Concept ; 16 | xl:prefLabel d:label3 ; 17 | skos:broader d:c1 . 18 | 19 | d:label1 a xl:Label ; 20 | xl:literalForm "Mammal" ; 21 | dc:source . 22 | 23 | d:label2 a xl:Label ; 24 | xl:literalForm "Dog" ; 25 | dc:source . 26 | 27 | d:label3 a xl:Label ; 28 | xl:literalForm "Cat" ; 29 | dc:source . 30 | 31 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex329.ru: -------------------------------------------------------------------------------- 1 | # filename: ex329.ru 2 | 3 | PREFIX skos: 4 | PREFIX xl: 5 | 6 | DELETE 7 | { ?concept skos:prefLabel ?labelString . } 8 | INSERT 9 | { 10 | ?newURI a xl:Label ; 11 | xl:literalForm ?labelString . 12 | ?concept xl:prefLabel ?newURI . 13 | } 14 | WHERE 15 | { 16 | ?concept skos:prefLabel ?labelString . 17 | BIND (URI(CONCAT("http://learningsparql.com/ns/data#", 18 | ENCODE_FOR_URI(str(?labelString))) 19 | ) AS ?newURI) 20 | } 21 | 22 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex330.ru: -------------------------------------------------------------------------------- 1 | # filename: ex330.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | CLEAR DEFAULT; 7 | 8 | INSERT DATA 9 | { 10 | d:x dm:tag "one" . 11 | d:x dm:tag "two" . 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex331.ru: -------------------------------------------------------------------------------- 1 | # filename: ex331.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT DATA 7 | { GRAPH d:g1 8 | { d:x dm:tag "three" } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex332.rq: -------------------------------------------------------------------------------- 1 | # filename: ex332.rq 2 | 3 | SELECT ?g ?s ?p ?o 4 | WHERE 5 | { 6 | { ?s ?p ?o } 7 | UNION 8 | { GRAPH ?g { ?s ?p ?o } } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex333.ru: -------------------------------------------------------------------------------- 1 | # filename: ex333.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT DATA 7 | { GRAPH d:g1 8 | { d:x dm:tag "four" . } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex334.ru: -------------------------------------------------------------------------------- 1 | # filename: ex334.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT DATA 7 | { GRAPH d:g2 8 | { 9 | d:x dm:tag "five" . 10 | d:x dm:tag "six" . 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex335.ru: -------------------------------------------------------------------------------- 1 | #filename: ex335.ru 2 | 3 | PREFIX d: 4 | 5 | DROP GRAPH d:g1 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex336.ru: -------------------------------------------------------------------------------- 1 | # filename: ex336.ru 2 | 3 | DROP DEFAULT 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex337.ru: -------------------------------------------------------------------------------- 1 | # filename: ex337.ru 2 | 3 | DROP ALL 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex338.ru: -------------------------------------------------------------------------------- 1 | # filename: ex338.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT DATA 7 | { 8 | d:x dm:tag "one" . 9 | d:x dm:tag "two" . 10 | 11 | GRAPH d:g1 12 | { 13 | d:x dm:tag "three" . 14 | d:x dm:tag "four" . 15 | } 16 | 17 | GRAPH d:g2 18 | { 19 | d:x dm:tag "five" . 20 | d:x dm:tag "six" . 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex339.ru: -------------------------------------------------------------------------------- 1 | # filename: ex339.ru 2 | 3 | DROP NAMED 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex340.ru: -------------------------------------------------------------------------------- 1 | # filename: ex340.ru 2 | 3 | PREFIX d: 4 | 5 | CREATE GRAPH d:g2 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex341.rq: -------------------------------------------------------------------------------- 1 | # filename: ex341.rq 2 | 3 | SELECT ?g 4 | WHERE 5 | { GRAPH ?g {} } 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex342.ru: -------------------------------------------------------------------------------- 1 | # filename: ex342.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | WITH d:g2 7 | INSERT 8 | { 9 | d:x dm:tag "five" . 10 | d:x dm:tag "six" . 11 | } 12 | WHERE {} 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex343.ru: -------------------------------------------------------------------------------- 1 | # filename: ex343.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT DATA 7 | { 8 | d:w dm:tag "five" . 9 | d:w dm:tag "six" . 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex344.ru: -------------------------------------------------------------------------------- 1 | # filename: ex344.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT 7 | { GRAPH d:g4 8 | { ?s dm:tag "five", "six" . } 9 | } 10 | USING d:g2 11 | WHERE 12 | { 13 | ?s dm:tag "five" . 14 | ?s dm:tag "six" . 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex345.ru: -------------------------------------------------------------------------------- 1 | # filename: ex345.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT 7 | { GRAPH d:g4 8 | { ?s dm:tag "five", "six" . } 9 | } 10 | USING NAMED d:g2 11 | WHERE 12 | { GRAPH d:g2 13 | { 14 | ?s dm:tag "five" . 15 | ?s dm:tag "six" . 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex346.ru: -------------------------------------------------------------------------------- 1 | # filename: ex346.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | DELETE DATA 7 | { GRAPH d:g2 8 | { d:x dm:tag "six" } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex347.ru: -------------------------------------------------------------------------------- 1 | # filename: ex347.ru 2 | 3 | DELETE 4 | { GRAPH ?g { ?s ?p "three" } } 5 | WHERE 6 | { GRAPH ?g { ?s ?p "three" } } 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex348.ru: -------------------------------------------------------------------------------- 1 | # filename: ex348.ru 2 | 3 | PREFIX d: 4 | 5 | WITH d:g1 6 | DELETE { ?s ?p "four"} 7 | WHERE { ?s ?p "four"} 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex349.ru: -------------------------------------------------------------------------------- 1 | # filename: ex349.ru 2 | 3 | PREFIX d: 4 | 5 | DELETE 6 | { GRAPH d:g2 { ?s ?p "five" } } 7 | INSERT 8 | { GRAPH d:g2 { ?s ?p "cinco" } } 9 | WHERE 10 | { GRAPH d:g2 { ?s ?p "five" } } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex350.ru: -------------------------------------------------------------------------------- 1 | # filename: ex350.ru 2 | 3 | PREFIX d: 4 | 5 | WITH d:g2 6 | DELETE 7 | { ?s ?p "five" } 8 | INSERT 9 | { ?s ?p "cinco" } 10 | WHERE 11 | { ?s ?p "five" } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex352.ru: -------------------------------------------------------------------------------- 1 | # filename: ex352.ru 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | PREFIX g: 6 | 7 | DELETE 8 | { GRAPH g:courses 9 | { d:course34 ab:courseTitle ?courseTitle } 10 | } 11 | INSERT 12 | { GRAPH g:courses 13 | { d:course34 ab:courseTitle "Modeling Data with RDFS and OWL" . } 14 | } 15 | WHERE 16 | { GRAPH g:courses 17 | { d:course34 ab:courseTitle ?courseTitle } 18 | } ; 19 | 20 | INSERT DATA 21 | { GRAPH g:courses 22 | { d:course86 ab:courseTitle "Querying and Updating Named Graphs" . } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex353.ru: -------------------------------------------------------------------------------- 1 | # filename: ex353.ru 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | 6 | DROP GRAPH ; 7 | 8 | INSERT DATA 9 | { 10 | GRAPH 11 | { 12 | d:course34 ab:courseTitle "Modeling Data with RDFS and OWL" . 13 | d:course71 ab:courseTitle "Enhancing Websites with RDFa" . 14 | d:course59 ab:courseTitle "Using SPARQL with non-RDF Data" . 15 | d:course85 ab:courseTitle "Updating Data with SPARQL" . 16 | d:course86 ab:courseTitle "Querying and Updating Named Graphs" . 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex354.rq: -------------------------------------------------------------------------------- 1 | # filename: ex354.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | PREFIX g: 6 | 7 | SELECT ?first ?last ?courseTitle WHERE 8 | { 9 | 10 | { GRAPH g:people 11 | { ?student ab:firstName ?first ; 12 | ab:lastName ?last . 13 | } 14 | } 15 | 16 | { GRAPH g:enrollment 17 | { ?student ab:takingCourse ?course . } 18 | } 19 | 20 | { GRAPH g:courses 21 | { ?course ab:courseTitle ?courseTitle . } 22 | } 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex355.rq: -------------------------------------------------------------------------------- 1 | # filename: ex355.rq 2 | SELECT ?elvisbday WHERE { 3 | 4 | ?elvisbday . 5 | } 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex358.py: -------------------------------------------------------------------------------- 1 | # filename: ex358.py 2 | # Send SPARQL query to SPARQL endpoint, store and output result. 3 | 4 | import urllib2 5 | 6 | endpointURL = "http://dbpedia.org/sparql" 7 | query = """ 8 | SELECT ?elvisbday WHERE { 9 | 10 | ?elvisbday . 11 | } 12 | """ 13 | escapedQuery = urllib2.quote(query) 14 | requestURL = endpointURL + "?query=" + escapedQuery 15 | request = urllib2.Request(requestURL) 16 | 17 | result = urllib2.urlopen(request) 18 | print result.read() 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex359.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 1935-01-08 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex361.py: -------------------------------------------------------------------------------- 1 | # filename: ex361.py 2 | # Query Linked Movie database endpoint about common actors of two directors 3 | 4 | from SPARQLWrapper import SPARQLWrapper, JSON 5 | 6 | sparql = SPARQLWrapper("http://data.linkedmdb.org/sparql") 7 | queryString = """ 8 | PREFIX m: 9 | SELECT DISTINCT ?actorName WHERE { 10 | 11 | ?dir1 m:director_name "Steven Spielberg" . 12 | ?dir2 m:director_name "Stanley Kubrick" . 13 | 14 | ?dir1film m:director ?dir1 ; 15 | m:actor ?actor . 16 | 17 | ?dir2film m:director ?dir2 ; 18 | m:actor ?actor . 19 | 20 | ?actor m:actor_name ?actorName . 21 | } 22 | """ 23 | 24 | sparql.setQuery(queryString) 25 | sparql.setReturnFormat(JSON) 26 | results = sparql.query().convert() 27 | 28 | if (len(results["results"]["bindings"]) == 0): 29 | print "No results found." 30 | else: 31 | for result in results["results"]["bindings"]: 32 | print result["actorName"]["value"] 33 | 34 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex365.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Find common actors between two directors 5 | 6 | 7 | 8 |

Find common actors between two directors

9 | 10 |
11 | 12 |

Enter each director's name and click "search" to list actors 13 | who have appeared in movies by both directors.

14 |

15 | 16 | 17 | 18 |

19 | 20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex366.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | http://dbpedia.org/resource/The_Night_of_the_Hunter_%28film%29 15 | 16 | 17 | The Night of the Hunter (film) 18 | 19 | 20 | 21 | 22 | 23 | http://dbpedia.org/resource/The_Man_on_the_Eiffel_Tower 24 | 25 | 26 | The Man on the Eiffel Tower 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex367.js: -------------------------------------------------------------------------------- 1 | { "head": { "link": [], "vars": ["film", "title"] }, 2 | "results": 3 | {"distinct": false, "ordered": true, 4 | "bindings": [ 5 | 6 | {"film": 7 | { "type": "uri", 8 | "value": "http://dbpedia.org/resource/The_Night_of_the_Hunter_%28film%29"}, 9 | "title": 10 | { "type": "literal", "xml:lang": "en", 11 | "value": "The Night of the Hunter (film)" 12 | } 13 | }, 14 | 15 | {"film": 16 | { "type": "uri", 17 | "value": "http://dbpedia.org/resource/The_Man_on_the_Eiffel_Tower" 18 | }, 19 | "title": 20 | { "type": "literal", "xml:lang": "en", 21 | "value": "The Man on the Eiffel Tower" 22 | } 23 | } 24 | 25 | ] 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex368.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex368.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | 6 | # Who's taking which courses 7 | 8 | d:i8301 ab:takingCourse d:course59 . 9 | d:i9771 ab:takingCourse d:course34 . 10 | d:i0432 ab:takingCourse d:course85 . 11 | d:i0432 ab:takingCourse d:course59 . 12 | d:i9771 ab:takingCourse d:course59 . 13 | 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex403.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex404.js: -------------------------------------------------------------------------------- 1 | { 2 | "head" : { } , 3 | "boolean" : true 4 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex405.js: -------------------------------------------------------------------------------- 1 | { "head": { "link": [], "vars": ["name", "homepage", "description"] }, 2 | "results": 3 | { "distinct": false, 4 | "ordered": true, 5 | "bindings": 6 | 7 | [ 8 | 9 | { "name": { "type": "literal", "xml:lang": "en", "value": "DONG Energy" } , 10 | "homepage": { "type": "uri", "value": "http://www.dongenergy.com" } , 11 | "description": { "type": "literal", 12 | "xml:lang": "en", 13 | "value": "DONG Energy is Denmark's leading energy company." 14 | } 15 | }, 16 | 17 | { "name": { "type": "literal", "xml:lang": "en", "value": "Garrad Hassan" }, 18 | "homepage": { "type": "uri", "value": "http://www.gl-garradhassan.com/" }, 19 | "description": { "type": "literal", 20 | "xml:lang": 21 | "en", "value": "GL Garrad Hassan (GH) is one of..." } 22 | } 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex406.rq: -------------------------------------------------------------------------------- 1 | # filename: ex406.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX dcterms: 5 | 6 | SELECT ?name ?homepage ?description 7 | WHERE 8 | { 9 | ?co dcterms:subject 10 | ; 11 | rdfs:label ?name ; 12 | rdfs:comment ?description ; 13 | ?homepage . 14 | FILTER ( lang(?name) = "en" ) 15 | FILTER ( lang(?description) = "en" ) 16 | } 17 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex408.rq: -------------------------------------------------------------------------------- 1 | # filename: ex408.rq 2 | 3 | SELECT ?s ?o 4 | WHERE 5 | { ?s ?p ?o } 6 | 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex409.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex409.ttl 2 | 3 | @prefix dm: . 4 | @prefix rdfs: . 5 | @prefix d: . 6 | 7 | d:id1 rdfs:label "book" . 8 | d:id2 rdfs:label "5 bucks"@en-US . 9 | d:id3 dm:shipped true . 10 | d:id4 dm:location _:b1 . 11 | d:id5 dm:amount 3 . 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex411.js: -------------------------------------------------------------------------------- 1 | { 2 | "head": { 3 | "vars": [ "s" , "o" ] 4 | } , 5 | "results": { 6 | "bindings": [ 7 | { 8 | "s": { "type": "uri" , "value": "http://learningsparql.com/ns/data#id3" } , 9 | "o": { "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , 10 | "type": "typed-literal" , "value": "true" } 11 | } , 12 | { 13 | "s": { "type": "uri" , "value": "http://learningsparql.com/ns/data#id1" } , 14 | "o": { "type": "literal" , "value": "book" } 15 | } , 16 | { 17 | "s": { "type": "uri" , "value": "http://learningsparql.com/ns/data#id4" } , 18 | "o": { "type": "bnode" , "value": "b0" } 19 | } , 20 | { 21 | "s": { "type": "uri" , "value": "http://learningsparql.com/ns/data#id2" } , 22 | "o": { "type": "literal" , "xml:lang": "en-US" , "value": "5 bucks" } 23 | } , 24 | { 25 | "s": { "type": "uri" , "value": "http://learningsparql.com/ns/data#id5" } , 26 | "o": { "datatype": "http://www.w3.org/2001/XMLSchema#integer" , 27 | "type": "typed-literal" , "value": "3" } 28 | } 29 | ] 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex412.csv: -------------------------------------------------------------------------------- 1 | s,o 2 | http://learningsparql.com/ns/data#id3,true 3 | http://learningsparql.com/ns/data#id1,book 4 | http://learningsparql.com/ns/data#id4,6cc1b60b:13608e5e580:-7ffe 5 | http://learningsparql.com/ns/data#id2,5 bucks 6 | http://learningsparql.com/ns/data#id5,3 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex413.tsv: -------------------------------------------------------------------------------- 1 | ?s ?o 2 | true 3 | "book" 4 | _:b0 5 | "5 bucks"@en-US 6 | 3 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex415.rq: -------------------------------------------------------------------------------- 1 | # filename: ex415.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?firstName ?lastName 6 | WHERE 7 | { 8 | ?person a ab:Musician ; 9 | ab:firstName ?firstName ; 10 | ab:lastName ?lastName . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex417.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex417.ttl 2 | 3 | @prefix rdfs: . 4 | @prefix dm: . 5 | @prefix d: . 6 | @prefix dc: . 7 | @prefix nfo: . 8 | 9 | dm:composer rdfs:subPropertyOf dc:creator . 10 | dm:photographer rdfs:subPropertyOf dc:creator . 11 | 12 | d:file02924 nfo:fileName "9894397.mp3" ; 13 | dm:composer "Charles Ives" . 14 | 15 | d:file74395 nfo:fileName "884930.mp3" ; 16 | dm:composer "Eric Satie" . 17 | 18 | d:file69383 nfo:fileName "119933.mp3" ; 19 | dm:photographer "Diane Arbus" . 20 | 21 | d:file54839 nfo:fileName "204364.mp3" ; 22 | dm:photographer "Henry Fox Talbot" . 23 | 24 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex418.rq: -------------------------------------------------------------------------------- 1 | # filename: ex418.rq 2 | 3 | PREFIX nfo: 4 | PREFIX dc: 5 | 6 | SELECT ?filename ?creator 7 | WHERE 8 | { 9 | ?resource nfo:fileName ?filename ; 10 | dc:creator ?creator . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex420.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex0420.ttl 2 | 3 | @prefix ab: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | 7 | ab:Musician rdfs:subClassOf ab:Person . 8 | 9 | ab:i0432 ab:firstName "Richard" ; 10 | ab:lastName "Mutt" ; 11 | NOT DONE 12 | 13 | ab:playsInstrument 14 | rdf:type rdf:Property ; 15 | rdfs:comment "Identifies the instrument that someone plays" ; 16 | rdfs:label "plays instrument" ; 17 | rdfs:domain ab:Musician ; 18 | rdfs:range ab:MusicalInstrument . 19 | 20 | 21 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex421.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex421.ttl 2 | 3 | @prefix ab: . 4 | @prefix d: . 5 | @prefix rdf: . 6 | @prefix rdfs: . 7 | 8 | ab:Musician rdf:type rdfs:Class . # could have said a instead of rdf:type 9 | 10 | d:i8301 rdf:type ab:Musician ; 11 | ab:firstName "Craig" ; 12 | ab:lastName "Ellis" . 13 | 14 | ab:Person a rdfs:Class . # could have said rdf:type instead of a 15 | ab:Musician rdfs:subClassOf ab:Person . 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex422.rq: -------------------------------------------------------------------------------- 1 | # filename: ex422.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last 6 | WHERE 7 | { 8 | ?person a ab:Person ; 9 | ab:firstName ?first ; 10 | ab:lastName ?last . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex425.rq: -------------------------------------------------------------------------------- 1 | # filename: ex425.rq 2 | 3 | PREFIX dm: 4 | PREFIX rdfs: 5 | 6 | SELECT ?name 7 | WHERE 8 | { 9 | ?musician a dm:TexasGuitarPlayer ; 10 | rdfs:label ?name . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex427.rq: -------------------------------------------------------------------------------- 1 | # filename: ex427.rq 2 | 3 | PREFIX owl: 4 | 5 | CONSTRUCT 6 | { ?resource2 ?property1 ?resource1 . } 7 | WHERE 8 | { 9 | ?property1 owl:inverseOf ?property2 . 10 | ?resource1 ?property2 ?resource2 . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex428.rq: -------------------------------------------------------------------------------- 1 | # filename: ex428.rq 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | CONSTRUCT 7 | { ?resource a dm:TexasGuitarPlayer } 8 | WHERE 9 | { 10 | ?resource dm:stateOfBirth d:TX ; 11 | dm:plays d:Guitar . 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex430.rq: -------------------------------------------------------------------------------- 1 | # filename: ex430.rq 2 | 3 | PREFIX foaf: 4 | PREFIX rdfs: 5 | 6 | SELECT * 7 | WHERE 8 | { ?subproperty rdfs:subPropertyOf foaf:page . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex432.rq: -------------------------------------------------------------------------------- 1 | # filename: ex432.rq 2 | 3 | PREFIX foaf: 4 | PREFIX rdfs: 5 | 6 | SELECT * 7 | WHERE 8 | { 9 | ?subproperty rdfs:subPropertyOf+ foaf:page ; 10 | rdfs:subPropertyOf ?parentProperty . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex434.rq: -------------------------------------------------------------------------------- 1 | # filename: ex434.rq 2 | 3 | PREFIX foaf: 4 | PREFIX rdfs: 5 | 6 | SELECT ?property 7 | WHERE 8 | { ?property rdfs:domain foaf:Person . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex436.rq: -------------------------------------------------------------------------------- 1 | # filename: ex436.rq 2 | 3 | SELECT * 4 | WHERE 5 | { 6 | ?s ?p ?o . 7 | } 8 | #LIMIT 50 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex437.rq: -------------------------------------------------------------------------------- 1 | # filename: ex437.rq 2 | 3 | SELECT ?g ?s ?p ?o 4 | WHERE 5 | { 6 | { ?s ?p ?o } 7 | UNION 8 | { GRAPH ?g { ?s ?p ?o } } 9 | } 10 | # LIMIT 50 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex438.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex438.ttl 2 | 3 | @prefix owl: . 4 | @prefix rdfs: . 5 | @prefix d: . 6 | 7 | d:emp91234 a d:Employee . # "a" a shortcut for "rdf:type" 8 | d:Employee a rdfs:Class . 9 | d:Employee a owl:Class . 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex439.rq: -------------------------------------------------------------------------------- 1 | # filename: ex439.rq 2 | 3 | PREFIX owl: 4 | PREFIX rdfs: 5 | 6 | SELECT * 7 | WHERE 8 | { 9 | { ?class a owl:Class } 10 | UNION 11 | { ?class a rdfs:Class } 12 | 13 | ?class a ?classType 14 | } 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex440.rq: -------------------------------------------------------------------------------- 1 | # filename: ex440.rq 2 | 3 | PREFIX owl: 4 | 5 | SELECT * 6 | WHERE 7 | { ?class a owl:Class } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex442.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex442.ttl (excerpt from void.ttl) 2 | 3 | void:Linkset a rdfs:Class, owl:Class; 4 | rdfs:label "linkset"; 5 | rdfs:comment "A collection of RDF links between two void:Datasets."; 6 | rdfs:subClassOf void:Dataset . 7 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex443.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex443.ttl 2 | 3 | @prefix ab: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | @prefix owl: . 7 | 8 | ab:playsInstrument rdf:type rdf:Property . 9 | ab:quantity rdf:type owl:DatatypeProperty . 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex444.rq: -------------------------------------------------------------------------------- 1 | # filename: ex444.rq 2 | 3 | PREFIX rdf: 4 | 5 | SELECT ?property 6 | WHERE { 7 | ?property a rdf:Property . # could have said rdf:type instead of a 8 | } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex445.rq: -------------------------------------------------------------------------------- 1 | # filename: ex445.rq 2 | 3 | PREFIX rdf: 4 | PREFIX rdfs: 5 | PREFIX owl: 6 | 7 | SELECT * 8 | WHERE 9 | { 10 | ?propClass rdfs:subClassOf+ rdf:Property . 11 | ?property a ?propClass . 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex447.rq: -------------------------------------------------------------------------------- 1 | # filename: ex447.rq 2 | 3 | SELECT DISTINCT ?class 4 | WHERE { 5 | ?instance a ?class . 6 | } 7 | ORDER by ?class 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex449.rq: -------------------------------------------------------------------------------- 1 | # filename: ex449.rq 2 | 3 | SELECT DISTINCT ?property 4 | WHERE 5 | { ?s ?property ?o . } 6 | # LIMIT 50 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex451.rq: -------------------------------------------------------------------------------- 1 | # filename: ex451.rq 2 | 3 | PREFIX gr: 4 | 5 | SELECT DISTINCT ?class 6 | WHERE { 7 | ?s gr:hasNext ?o ; 8 | a ?class . 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex453.rq: -------------------------------------------------------------------------------- 1 | # filename: ex453.rq 2 | 3 | PREFIX gr: 4 | 5 | SELECT (COUNT(?o) AS ?hasNextTotal) 6 | WHERE 7 | { ?s gr:hasNext ?o } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex454.rq: -------------------------------------------------------------------------------- 1 | # filename: ex454.rq 2 | 3 | SELECT ?p (COUNT(?p) AS ?pTotal) 4 | WHERE 5 | { ?s ?p ?o . } 6 | GROUP BY ?p 7 | ORDER BY DESC(?pTotal) 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex456.rq: -------------------------------------------------------------------------------- 1 | # filename: ex456.rq 2 | 3 | PREFIX dct: 4 | 5 | SELECT (COUNT(?s) AS ?agentTotal) 6 | WHERE 7 | { ?s a dct:Agent } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex457.rq: -------------------------------------------------------------------------------- 1 | # filename: ex457.rq 2 | 3 | SELECT ?class (COUNT(?s) AS ?instanceTotal) 4 | WHERE 5 | { ?s a ?class. } 6 | GROUP BY ?class 7 | ORDER BY DESC(?instanceTotal) 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex459.rq: -------------------------------------------------------------------------------- 1 | # filename: ex459.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX gr: 5 | 6 | SELECT * 7 | WHERE 8 | { 9 | ?bf a gr:BusinessFunction ; 10 | rdfs:label ?label . 11 | OPTIONAL { ?bf rdfs:comment ?comment } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex461.rq: -------------------------------------------------------------------------------- 1 | # filename: ex461.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT DISTINCT ?class 6 | WHERE 7 | { 8 | ?s rdfs:label ?label ; 9 | a ?class . 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex463.rq: -------------------------------------------------------------------------------- 1 | # filename: ex463.rq 2 | 3 | PREFIX foaf: 4 | 5 | SELECT DISTINCT ?property 6 | WHERE 7 | { 8 | ?person a foaf:Person ; 9 | ?property ?value . 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex465.rq: -------------------------------------------------------------------------------- 1 | # filename: ex465.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX void: 5 | 6 | SELECT * 7 | WHERE 8 | { ?property rdfs:domain void:Linkset } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex467.rq: -------------------------------------------------------------------------------- 1 | # filename: ex467.rq 2 | 3 | PREFIX gr: 4 | 5 | SELECT DISTINCT ?value 6 | WHERE 7 | { ?s gr:hasNext ?value } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex469.rq: -------------------------------------------------------------------------------- 1 | # filename: ex469.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX gr: 5 | 6 | SELECT * 7 | WHERE 8 | { gr:hasNext rdfs:range ?rangeValue . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex471.rq: -------------------------------------------------------------------------------- 1 | # filename: ex471.rq 2 | 3 | PREFIX dc: 4 | PREFIX foaf: 5 | PREFIX void: 6 | PREFIX rdf: 7 | 8 | SELECT ?creator ?propertyName ?propertyValue 9 | WHERE 10 | { 11 | ?s dc:creator ?creator . 12 | ?creator ?propertyName ?propertyValue . 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex473.rq: -------------------------------------------------------------------------------- 1 | # filename: ex473.rq 2 | 3 | SELECT * 4 | WHERE 5 | { 6 | ?s ?p ?o . 7 | FILTER (CONTAINS(LCASE(str(?o)), "publish")) 8 | } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex474.rq: -------------------------------------------------------------------------------- 1 | # filename: ex474.rq 2 | 3 | SELECT ?p ?o 4 | WHERE 5 | { 6 | SERVICE 7 | { ?p ?o . } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex475.rq: -------------------------------------------------------------------------------- 1 | # filename: ex475.rq 2 | 3 | PREFIX gp: 4 | 5 | SELECT ?dbpProperty ?dbpValue ?gutenProperty ?gutenValue 6 | WHERE 7 | { 8 | SERVICE 9 | { 10 | ?dbpProperty ?dbpValue . 11 | } 12 | 13 | SERVICE 14 | { 15 | gp:Hocking_Joseph ?gutenProperty ?gutenValue . 16 | } 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex476.rq: -------------------------------------------------------------------------------- 1 | # filename: ex476.rq 2 | 3 | CONSTRUCT 4 | { ?p ?o . } 5 | WHERE 6 | { 7 | SERVICE 8 | { ?p ?o . } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex477.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex477.ttl 2 | 3 | @prefix dm: . 4 | @prefix dc: . 5 | @prefix dcterms: . 6 | 7 | dm:i590 dc:title "Installation Guide" ; dcterms:dateCopyrighted "2012" . 8 | dm:i591 dc:title "Users Guide" ; dcterms:dateCopyrighted "2013" . 9 | dm:i592 dc:title "API Reference" ; dcterms:dateCopyrighted "2013" . 10 | dm:i593 dc:title "Tutorial" ; dcterms:dateCopyrighted "2011" . 11 | dm:i594 dc:title "Reference Guide" ; dcterms:dateCopyrighted "2013" . 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex478.ru: -------------------------------------------------------------------------------- 1 | # filename: ex478.ru 2 | 3 | PREFIX dcterms: 4 | 5 | DELETE {?document dcterms:dateCopyrighted "2013" . } 6 | INSERT {?document dcterms:dateCopyrighted "2014" . } 7 | WHERE {?document dcterms:dateCopyrighted "2013" . } 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex479.rq: -------------------------------------------------------------------------------- 1 | # filename: ex479.rq 2 | 3 | PREFIX dcterms: 4 | 5 | #DELETE {?document dcterms:dateCopyrighted "2013" . } 6 | #INSERT {?document dcterms:dateCopyrighted "2014" . } 7 | CONSTRUCT{?document dcterms:dateCopyrighted "2014" . } 8 | WHERE {?document dcterms:dateCopyrighted "2013" . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex480.rq: -------------------------------------------------------------------------------- 1 | # filename: ex480.rq 2 | 3 | PREFIX dcterms: 4 | 5 | #DELETE {?document dcterms:dateCopyrighted "2013" . } 6 | #INSERT {?document dcterms:dateCopyrighted "2014" . } 7 | CONSTRUCT{?document dcterms:dateCopyrighted "2013" . } 8 | WHERE {?document dcterms:dateCopyrighted "2013" . } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex481.ru: -------------------------------------------------------------------------------- 1 | # filename: ex481.ru 2 | 3 | PREFIX ab: 4 | PREFIX v: 5 | 6 | DELETE 7 | { 8 | ?s ab:firstName ?firstName ; 9 | ab:lastName ?lastName ; 10 | ab:email ?email . 11 | ?s ab:homeTel ?homeTel . 12 | } 13 | INSERT 14 | { 15 | ?s v:given-name ?firstName ; 16 | v:family-name ?lastName ; 17 | v:email ?email ; 18 | v:homeTel ?homeTel . 19 | } 20 | WHERE 21 | { 22 | ?s ab:firstName ?firstName ; 23 | ab:lastName ?lastName ; 24 | ab:email ?email . 25 | OPTIONAL 26 | { ?s ab:homeTel ?homeTel . } 27 | } 28 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex482.ru: -------------------------------------------------------------------------------- 1 | # filename: ex482.ru 2 | 3 | PREFIX v: 4 | PREFIX foaf: 5 | 6 | DELETE { ?s foaf:mbox ?o . } 7 | INSERT { ?s v:email ?o . } 8 | WHERE { ?s foaf:mbox ?o . } 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex483.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex483.ttl 2 | 3 | @prefix dm: . 4 | @prefix d: . 5 | @prefix rdfs: . 6 | @prefix xsd: . 7 | 8 | d:item1 rdfs:label "kerosene, 1 quart" ; 9 | dm:amount "14"^^xsd:integer . 10 | 11 | d:item2 rdfs:label "double-knit polyester vest" ; 12 | dm:amount 10 . 13 | 14 | d:item3 rdfs:label "gold-plated chain" ; 15 | dm:amount "30"^^xsd:string . 16 | 17 | d:item4 rdfs:label "reverse flange" ; 18 | dm:amount "12" . 19 | 20 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex484.ru: -------------------------------------------------------------------------------- 1 | # filename: ex484.ru 2 | 3 | PREFIX dm: 4 | PREFIX xsd: 5 | 6 | DELETE 7 | { ?s dm:amount ?amount } 8 | INSERT 9 | { ?s dm:amount ?integerAmount } 10 | WHERE 11 | { 12 | ?s dm:amount ?amount . 13 | BIND (xsd:integer(?amount) AS ?integerAmount ) 14 | } 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex485.rq: -------------------------------------------------------------------------------- 1 | # filename: ex485.rq 2 | 3 | SELECT DISTINCT ?p 4 | WHERE 5 | { 6 | ?s ?p ?o . 7 | MINUS { ?p a ?someType } 8 | } 9 | ORDER BY ?p 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex487.rq: -------------------------------------------------------------------------------- 1 | # filename: ex487.rq 2 | 3 | PREFIX dm: 4 | PREFIX rdfs: 5 | 6 | SELECT ?o 7 | WHERE 8 | { 9 | ?s dm:foobar ?o . 10 | FILTER(!(isIRI(?o))) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex488.ru: -------------------------------------------------------------------------------- 1 | # filename: ex488.ru 2 | 3 | PREFIX rdfs: 4 | PREFIX ab: 5 | PREFIX d: 6 | PREFIX rdf: 7 | 8 | INSERT 9 | { 10 | d:Student a rdfs:Class . 11 | d:Course a rdfs:Class . 12 | ?student a d:Student . 13 | ?course a d:Course . 14 | } 15 | WHERE { 16 | 17 | ?student ab:firstName ?fn ; 18 | ab:lastName ?ln . 19 | 20 | ?course ab:courseTitle ?ct . 21 | } 22 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex489.rq: -------------------------------------------------------------------------------- 1 | # filename: ex489.rq 2 | 3 | PREFIX owl: 4 | 5 | SELECT * 6 | WHERE 7 | { 8 | ?s a owl:Class . 9 | FILTER(CONTAINS(LCASE(str(?s)),"price")) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex491.rq: -------------------------------------------------------------------------------- 1 | # filename: ex491.rq 2 | 3 | PREFIX ab: 4 | PREFIX nn: 5 | 6 | CONSTRUCT 7 | { 8 | ?personURI ab:firstName ?fn ; 9 | ab:lastName ?ln ; 10 | ab:email ?email ; 11 | ab:homeTel ?tel . 12 | } 13 | WHERE { 14 | ?person ab:firstName ?fn ; 15 | ab:lastName ?ln ; 16 | ab:email ?email . 17 | OPTIONAL { 18 | ?person ab:homeTel ?tel . 19 | } 20 | BIND(ENCODE_FOR_URI(CONCAT(?fn,?ln)) AS ?encodedName) 21 | BIND("http://learningsparql.com/new/namespace/" AS ?baseURI) 22 | BIND(URI(CONCAT(?baseURI,?encodedName)) AS ?personURI) 23 | } 24 | 25 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex492.rq: -------------------------------------------------------------------------------- 1 | # filename: ex492.rq 2 | 3 | PREFIX dm: 4 | 5 | SELECT * 6 | WHERE { } 7 | VALUES (?color ?direction) { 8 | ( dm:red "north" ) 9 | ( dm:blue "west" ) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex494.rq: -------------------------------------------------------------------------------- 1 | # filename: ex494.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex496.rq: -------------------------------------------------------------------------------- 1 | # filename: ex496.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | VALUES ?description { "lunch" "dinner" } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex498.rq: -------------------------------------------------------------------------------- 1 | # filename: ex498.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | 12 | VALUES (?date ?description) { 13 | ("2011-10-15" "lunch") 14 | ("2011-10-16" "dinner") 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex500.rq: -------------------------------------------------------------------------------- 1 | # filename: ex500.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT ?description ?date ?amount 6 | WHERE 7 | { 8 | ?meal e:description ?description ; 9 | e:date ?date ; 10 | e:amount ?amount . 11 | 12 | VALUES (?date ?description) { 13 | (UNDEF "lunch") 14 | ("2011-10-16" UNDEF) 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex503.ru: -------------------------------------------------------------------------------- 1 | # filename: ex503.ru 2 | 3 | PREFIX d: 4 | COPY DEFAULT TO d:g2 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex505.ru: -------------------------------------------------------------------------------- 1 | # filename: ex505.ru 2 | 3 | PREFIX d: 4 | MOVE d:g2 TO d:g1 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex507.rq: -------------------------------------------------------------------------------- 1 | # filename: ex507.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?craigEmail ?craigTelephone 6 | WHERE 7 | { 8 | ?person ab:firstName "Craig" . 9 | ?person ab:email ?craigEmail . 10 | OPTIONAL { ?person ab:homeTel ?craigTelephone } 11 | FILTER(regex(?craigEmail,"yahoo")) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex508.rq: -------------------------------------------------------------------------------- 1 | #filename: ex508.rq 2 | 3 | PREFIX db: 4 | PREFIX dbo: 5 | 6 | SELECT ?pacinoFilm 7 | WHERE 8 | { 9 | ?pacinoFilm dbo:starring db:Al_Pacino . 10 | ?deNiroFilm dbo:starring db:Robert_De_Niro . 11 | FILTER(?pacinoFilm = ?deNiroFilm) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex509.rq: -------------------------------------------------------------------------------- 1 | #filename: ex509.rq 2 | 3 | PREFIX db: 4 | PREFIX dbo: 5 | SELECT ?pacinoFilm 6 | WHERE 7 | { 8 | ?pacinoFilm dbo:starring db:Al_Pacino . 9 | ?pacinoFilm dbo:starring db:Robert_De_Niro . 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex510.rq: -------------------------------------------------------------------------------- 1 | # filename: ex510.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT * 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | FILTER (CONTAINS(LCASE(?o), "yahoo")) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex511.rq: -------------------------------------------------------------------------------- 1 | # filename: ex511.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT * 6 | WHERE 7 | { 8 | ?s ?p ?o . 9 | FILTER (STRENDS(?o, "@yahoo.com")) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex512.rq: -------------------------------------------------------------------------------- 1 | # filename: ex512.rq 2 | 3 | PREFIX rdfs: 4 | 5 | SELECT * 6 | WHERE 7 | { ?s rdfs:label ?label } 8 | LIMIT 20 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex513.rq: -------------------------------------------------------------------------------- 1 | # filename: ex513.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last 6 | WHERE 7 | { 8 | ?person ab:homeTel "(229) 276-5135" . 9 | ?person ab:firstName ?first . 10 | ?person ab:lastname ?last . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex514.rq: -------------------------------------------------------------------------------- 1 | # filename: ex514.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT * 6 | WHERE 7 | { 8 | ?person ab:homeTel "(229) 276-5135" . 9 | } 10 | 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex515.rq: -------------------------------------------------------------------------------- 1 | # filename: ex515.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT * 6 | WHERE 7 | { 8 | ?person ab:homeTel "(229) 276-5135" . 9 | ?person ab:firstName ?first . 10 | } 11 | 12 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex516.rq: -------------------------------------------------------------------------------- 1 | # filename: ex516.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT * # ?first ?last 6 | WHERE 7 | { 8 | ?person ab:homeTel "(229) 276-5135" . 9 | # ?person ab:firstName ?first . 10 | # ?person ab:lastname ?last . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex517.rq: -------------------------------------------------------------------------------- 1 | # filename: ex517.rq 2 | 3 | PREFIX ab: 4 | 5 | SELECT ?first ?last ?homeTel 6 | WHERE 7 | { 8 | OPTIONAL { ?s ab:homeTel ?homeTel .} 9 | 10 | ?s ab:firstName ?first . 11 | FILTER(CONTAINS(?last,"M")) 12 | ?s ab:lastName ?last . 13 | } 14 | ORDER BY ?last 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex520.rq: -------------------------------------------------------------------------------- 1 | # filename: ex520.rq 2 | 3 | PREFIX ab: 4 | SELECT ?first ?last ?homeTel 5 | WHERE 6 | { 7 | OPTIONAL { ?s ab:homeTel ?homeTel .} 8 | ?s ab:firstName ?first . 9 | FILTER(CONTAINS(?last,"M")) 10 | ?s ab:lastName ?last . 11 | } 12 | ORDER BY ?last -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex521.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex521.ttl 2 | 3 | @prefix d: . 4 | @prefix rdfs: . 5 | @prefix skos: . 6 | 7 | skos:prefLabel rdfs:subPropertyOf rdfs:label . 8 | d:i4230 skos:prefLabel "Frank" . 9 | # d:i4230 rdfs:label "Frank" . 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex522.rq: -------------------------------------------------------------------------------- 1 | #filename: ex522.rq 2 | 3 | PREFIX db: 4 | PREFIX dbo: 5 | 6 | SELECT ?pacinoFilm 7 | WHERE 8 | { 9 | ?pacinoFilm dbo:starring db:Al_Pacino . 10 | ?deNiroFilm dbo:starring db:Robert_De_Niro . 11 | # FILTER(?pacinoFilm = ?deNiroFilm) 12 | FILTER(sameTerm(?pacinoFilm,?deNiroFilm)) 13 | } 14 | 15 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex523.rq: -------------------------------------------------------------------------------- 1 | # filename: ex523.rq 2 | 3 | PREFIX ab: 4 | PREFIX d: 5 | 6 | CONSTRUCT 7 | { ?p ab:hasAunt ?aunt . } 8 | WHERE 9 | { 10 | ?p ab:hasParent ?parent . 11 | ?parent ab:hasParent ?g . 12 | ?aunt ab:hasParent ?g ; 13 | ab:gender d:female . 14 | 15 | # FILTER (?parent != ?aunt) 16 | FILTER (!sameTerm(?parent,?aunt)) 17 | } 18 | 19 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex524.rq: -------------------------------------------------------------------------------- 1 | #filename: ex524.rq 2 | 3 | PREFIX apf: 4 | 5 | SELECT ?o 6 | WHERE 7 | { ?s apf:versionARQ ?o } 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex526.rq: -------------------------------------------------------------------------------- 1 | # filename: ex526.rq 2 | 3 | PREFIX tops: 4 | SELECT * 5 | WHERE 6 | { 7 | ?index tops:for(3 6) 8 | BIND(?index*100 AS ?mult) 9 | } 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex528.rq: -------------------------------------------------------------------------------- 1 | # filename: ex528.rq 2 | 3 | PREFIX co: 4 | 5 | SELECT ?name ?population 6 | WHERE 7 | { 8 | ?place gs:nearby(51.1789 -1.8264 10) ; 9 | gn:name ?name ; 10 | gn:population ?population . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex530.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex530.ttl 2 | 3 | @prefix d: . 4 | @prefix dm: . 5 | 6 | d:x dm:tag "seven" . 7 | d:x dm:tag "eight" . 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex531.rdf: -------------------------------------------------------------------------------- 1 | 4 | 5 | one 6 | two 7 | 8 | 9 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex532.rq: -------------------------------------------------------------------------------- 1 | # filename: ex532.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX void: 5 | 6 | SELECT ?property 7 | WHERE 8 | { ?property rdfs:domain void:Linkset } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex532.ttl: -------------------------------------------------------------------------------- 1 | 2 | 3 | "two" ; 4 | 5 | "one" . 6 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex533.rq: -------------------------------------------------------------------------------- 1 | # filename: ex533.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX gr: 5 | 6 | SELECT ?class 7 | WHERE 8 | { gr:hasCurrency rdfs:domain ?class } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex536.ttl: -------------------------------------------------------------------------------- 1 | # filename: ex536.ttl 2 | 3 | @prefix ab: . 4 | @prefix rdfs: . 5 | @prefix owl: . 6 | 7 | ab:Person a owl:Class . 8 | ab:MusicalInstrument a owl:Class . 9 | 10 | ab:firstName rdfs:domain ab:Person ; 11 | rdfs:label "first name" . 12 | ab:lastName rdfs:domain ab:Person ; 13 | rdfs:label "last name" . 14 | ab:homeTel rdfs:domain ab:Person ; 15 | rdfs:label "home telephone" . 16 | ab:email rdfs:domain ab:Person ; 17 | rdfs:label "email address" . 18 | 19 | ab:plays rdfs:domain ab:Person . 20 | ab:plays rdfs:range ab:MusicalInstrument . 21 | 22 | ab:guitar a ab:MusicalInstrument ; 23 | rdfs:label "guitar" . 24 | ab:bass a ab:MusicalInstrument ; 25 | rdfs:label "bass" . 26 | ab:drums a ab:MusicalInstrument ; 27 | rdfs:label "drums" . 28 | 29 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex537.rq: -------------------------------------------------------------------------------- 1 | #filename: ex537.rq 2 | 3 | PREFIX ab: 4 | PREFIX rdfs: 5 | 6 | SELECT ?property ?propName 7 | WHERE 8 | { 9 | ?property rdfs:domain ab:Person ; 10 | rdfs:label ?propName . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex538.rq: -------------------------------------------------------------------------------- 1 | # filename: ex538.rq 2 | 3 | SELECT DISTINCT ?graph ?property 4 | WHERE 5 | { 6 | { ?s ?property ?o . } 7 | UNION 8 | { GRAPH ?graph { ?s ?property ?o } } 9 | } 10 | # LIMIT 50 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex539.rq: -------------------------------------------------------------------------------- 1 | # filename: ex539.rq 2 | 3 | PREFIX cat: 4 | PREFIX skos: 5 | PREFIX rdfs: 6 | PREFIX owl: 7 | PREFIX foaf: 8 | 9 | SELECT ?p ?o 10 | WHERE 11 | { 12 | SERVICE 13 | { ?p ?o . } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex540.rq: -------------------------------------------------------------------------------- 1 | # filename: ex540.rq 2 | 3 | CONSTRUCT 4 | FROM 5 | WHERE 6 | { ?s ?p ?o } 7 | 8 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex541.rq: -------------------------------------------------------------------------------- 1 | # filename: ex541.rq 2 | 3 | PREFIX e: 4 | 5 | SELECT UCASE(SUBSTR(?description,1,3)) ?amount 6 | 7 | WHERE 8 | { 9 | ?meal e:description ?description ; 10 | e:amount ?amount . 11 | } 12 | 13 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex543.ru: -------------------------------------------------------------------------------- 1 | # filename: ex543.ru 2 | 3 | PREFIX d: 4 | PREFIX dm: 5 | 6 | INSERT 7 | { GRAPH d:g1 8 | { d:x dm:tag "three" } 9 | } 10 | WHERE {} 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex544.rq: -------------------------------------------------------------------------------- 1 | # filename: ex544.rq 2 | 3 | PREFIX rdfs: 4 | PREFIX void: 5 | 6 | SELECT ?property 7 | WHERE 8 | { ?property rdfs:domain void:Linkset } 9 | 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex546.ru: -------------------------------------------------------------------------------- 1 | # filename: ex546.rq 2 | 3 | LOAD 4 | 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex547.rq: -------------------------------------------------------------------------------- 1 | # filename: ex547.rq 2 | 3 | SELECT * WHERE 4 | { ?s ?p ?o } 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex548.ru: -------------------------------------------------------------------------------- 1 | # filename ex548.ru 2 | 3 | PREFIX wci: 4 | PREFIX owl: 5 | 6 | DELETE DATA 7 | { 8 | . 9 | } 10 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex549.ru: -------------------------------------------------------------------------------- 1 | # filename ex549.ru 2 | 3 | PREFIX wci: 4 | PREFIX owl: 5 | 6 | DELETE 7 | { 8 | . 9 | } 10 | WHERE {} 11 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex550.ru: -------------------------------------------------------------------------------- 1 | # filename: ex550.ru 2 | 3 | DELETE { ?p ?o } 4 | WHERE { ?p ?o } 5 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/LearningSPARQLExamples/ex551.ru: -------------------------------------------------------------------------------- 1 | # filename: ex551.ru 2 | 3 | DELETE WHERE { ?p ?o } 4 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/answers_sw_1.rq: -------------------------------------------------------------------------------- 1 | SELECT ?s WHERE { ?s ?o } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/answers_sw_2.rq: -------------------------------------------------------------------------------- 1 | 2 | SELECT ?s FROM WHERE { ?s ?o } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_112_delete_all.ru: -------------------------------------------------------------------------------- 1 | DELETE WHERE { ?l ?x ?y } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_112_delete_resource.ru: -------------------------------------------------------------------------------- 1 | DELETE WHERE { ?x ?y } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_112_delete_resources_with_a_date_object.ru: -------------------------------------------------------------------------------- 1 | DELETE WHERE { ?s ?o } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_112_delete_with_a_date_selector.ru: -------------------------------------------------------------------------------- 1 | DELETE WHERE { ?l ?x "2000-12-31"^^ } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_112_insert_with_datetime.ru: -------------------------------------------------------------------------------- 1 | INSERT DATA { 2 | a ; 3 | ; 4 | ; 5 | ; 6 | "2015-10-06T05:28:00.000Z"^^ . } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_53_diacriticts.rq: -------------------------------------------------------------------------------- 1 | SELECT * WHERE 2 | { 3 | ?s 'Frühe Neuzeit' 4 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_53_diacriticts.ttl: -------------------------------------------------------------------------------- 1 | "Frühe Neuzeit" . -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_53_square_brackets.rq: -------------------------------------------------------------------------------- 1 | SELECT * WHERE 2 | { 3 | ?s 'Konfiguration ' 4 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_53_square_brackets.ttl: -------------------------------------------------------------------------------- 1 | "Konfiguration " . -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_64_wrong_results.rq: -------------------------------------------------------------------------------- 1 | SELECT ?s WHERE 2 | { 3 | ?s . 4 | } -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/issue_64_wrong_results.ttl: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/one_triple_1.ttl: -------------------------------------------------------------------------------- 1 | @prefix sbjct: . 2 | 3 | sbjct:book1 sbjct:title "1" . 4 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/one_triple_2.ttl: -------------------------------------------------------------------------------- 1 | @prefix sbjct: . 2 | 3 | sbjct:book2 sbjct:title "2" . -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/one_triple_3.ttl: -------------------------------------------------------------------------------- 1 | @prefix sbjct: . 2 | 3 | sbjct:book3 sbjct:title "3" . 4 | -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/one_triple_4.ttl: -------------------------------------------------------------------------------- 1 | @prefix sbjct: . 2 | 3 | sbjct:book4 sbjct:title "4" . -------------------------------------------------------------------------------- /solrdf/solrdf-integration-tests/src/test/resources/sample_data/one_triple_per_shard.nt: -------------------------------------------------------------------------------- 1 | "Bla bla bla" . 2 | "true"^^ . -------------------------------------------------------------------------------- /solrdf/src/dev/eclipse/build-test-and-install.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /solrdf/src/dev/eclipse/install-without-tests.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | --------------------------------------------------------------------------------