You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/03/15 15:18:59 UTC
[19/22] fixed the remaining license headers (RAT works now)
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/PrefixServiceCCTests.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/PrefixServiceCCTests.java b/platform/marmotta-core/src/test/disabled/PrefixServiceCCTests.java
deleted file mode 100644
index bbb74a8..0000000
--- a/platform/marmotta-core/src/test/disabled/PrefixServiceCCTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.platform.core.services.prefix;
-
-import org.junit.Before;
-
-public class PrefixServiceCCTests extends PrefixServiceTests {
-
- @Before
- @Override
- public void setup() {
- prefixService = new PrefixServiceCC();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/PrefixServiceTests.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/PrefixServiceTests.java b/platform/marmotta-core/src/test/disabled/PrefixServiceTests.java
deleted file mode 100644
index b8a99c8..0000000
--- a/platform/marmotta-core/src/test/disabled/PrefixServiceTests.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.platform.core.services.prefix;
-
-import org.apache.marmotta.platform.core.api.prefix.PrefixService;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Prefix Manager tests
- *
- * @author Sergio Fernández
- *
- */
-// @RunWith(WeldJUnit4Runner.class)
-public class PrefixServiceTests {
-
- private final String PREFIX = "foo";
- private final String NS = "http://example.org/foo#";
- private final String PREFIX2 = "bar";
- private final String NS2 = "http://example.org/bar#";
-
- // @Inject
- protected PrefixService prefixService;
-
- @Before
- public void setup() {
- prefixService = new PrefixServiceImpl();
- }
-
- @Test
- public void testAddition() {
- int size = prefixService.getMappings().size();
- prefixService.add(PREFIX, NS);
- assertEquals(size + 1, prefixService.getMappings().size());
- assertTrue(prefixService.containsPrefix(PREFIX));
- assertTrue(prefixService.containsNamespace(NS));
- assertEquals(NS, prefixService.getNamespace(PREFIX));
- assertEquals(PREFIX, prefixService.getPrefix(NS));
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testDoubleAddition() {
- int size = prefixService.getMappings().size();
- prefixService.add(PREFIX, NS);
- assertEquals(size + 1, prefixService.getMappings().size());
- prefixService.add(PREFIX, NS);
- }
-
- @Test
- public void testDoubleForceAddition() {
- int size = prefixService.getMappings().size();
- prefixService.add(PREFIX, NS);
- assertEquals(size + 1, prefixService.getMappings().size());
- assertTrue(prefixService.containsPrefix(PREFIX));
- assertTrue(prefixService.containsNamespace(NS));
- assertEquals(NS, prefixService.getNamespace(PREFIX));
- assertEquals(PREFIX, prefixService.getPrefix(NS));
- prefixService.forceAdd(PREFIX, NS2);
- assertEquals(size + 1, prefixService.getMappings().size());
- assertTrue(prefixService.containsPrefix(PREFIX));
- assertFalse(prefixService.containsNamespace(NS));
- assertTrue(prefixService.containsNamespace(NS2));
- assertEquals(NS2, prefixService.getNamespace(PREFIX));
- assertEquals(PREFIX, prefixService.getPrefix(NS2));
- prefixService.forceAdd(PREFIX2, NS2);
- assertEquals(size + 1, prefixService.getMappings().size());
- assertFalse(prefixService.containsPrefix(PREFIX));
- assertTrue(prefixService.containsPrefix(PREFIX2));
- assertFalse(prefixService.containsNamespace(NS));
- assertTrue(prefixService.containsNamespace(NS2));
- assertEquals(NS2, prefixService.getNamespace(PREFIX2));
- assertEquals(PREFIX2, prefixService.getPrefix(NS2));
- }
-
- @Test
- public void testMissingMapping() {
- assertFalse(prefixService.containsPrefix(PREFIX));
- assertFalse(prefixService.containsNamespace(NS));
- assertNull(prefixService.getPrefix(NS));
- assertNull(prefixService.getNamespace(PREFIX));
- }
-
- @Test
- public void validateCurie() {
- int size = prefixService.getMappings().size();
- prefixService.add(PREFIX, NS);
- assertEquals(size + 1, prefixService.getMappings().size());
- String curie = prefixService.getCurie(NS + PREFIX);
- assertNotNull(curie);
- assertEquals(PREFIX + ":" + PREFIX, curie);
- }
-
- @Test
- public void validateUnregisteredCurie() {
- assertFalse(prefixService.containsNamespace(NS));
- assertNull(prefixService.getCurie(NS + PREFIX));
- }
-
- @Test
- public void validateWrongCurie() {
- int size = prefixService.getMappings().size();
- prefixService.add(PREFIX, NS);
- assertEquals(size + 1, prefixService.getMappings().size());
- assertNull(prefixService.getCurie(NS));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/ResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/ResourceServiceTest.java b/platform/marmotta-core/src/test/disabled/ResourceServiceTest.java
deleted file mode 100644
index 18d6183..0000000
--- a/platform/marmotta-core/src/test/disabled/ResourceServiceTest.java
+++ /dev/null
@@ -1,414 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.platform.core.test.resource;
-
-import com.google.code.tempusfugit.concurrency.ConcurrentRule;
-import com.google.code.tempusfugit.concurrency.RepeatingRule;
-import com.google.code.tempusfugit.concurrency.annotations.Concurrent;
-import com.google.code.tempusfugit.concurrency.annotations.Repeating;
-import com.googlecode.jatl.Html;
-import org.apache.marmotta.platform.core.test.base.LMFBaseTest;
-import org.hamcrest.Matchers;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.UUID;
-
-import static com.jayway.restassured.RestAssured.expect;
-import static com.jayway.restassured.RestAssured.given;
-import static org.hamcrest.Matchers.*;
-
-/**
- * Resource service rest tests
- *
- * @author Sebastian Schaffert
- * @author Sergio Fernández
- */
-public class ResourceServiceTest extends LMFBaseTest {
-
- @Rule
- public ConcurrentRule concurrently = new ConcurrentRule();
-
- @Rule
- public RepeatingRule repeatedly = new RepeatingRule();
-
- private final static int THREADS = 5;
- private final static int REPETITIONS = 10;
-
- @Ignore
- @Test
- public void testCreateResource() {
-
- String resourceId = UUID.randomUUID().toString();
-
- // try creating the resource
- expect().
- statusCode(201).
- when().
- post("/resource/"+resourceId);
-
-
- // check whether resource exists (without accept header), should return 406 and a Content-Type header with
- // possible types
- given().
- header("Accept","type/subtype").
- expect().
- statusCode(406).
- header("Content-Type", Matchers.notNullValue()).
- header("Content-Type", containsString("application/json")).
- header("Content-Type", containsString("application/rdf+xml")).
- when().
- get("/resource/"+resourceId);
-
- // check redirect
- given().
- redirects().follow(false).
- header("Accept", "application/json").
- expect().
- statusCode(isOneOf(300, 303)).
- header("Location", endsWith("meta/application/json/" + resourceId)).
- when().
- get("/resource/" + resourceId);
-
- // check the content after manually carrying out the redirect
- given().
- header("Accept","application/json").
- expect().
- statusCode(200).
- header("Content-Type",containsString("application/json")).
- body(equalTo("{}")).
- when().
- get("/meta/application/json/" + resourceId);
-
- // delete the resource
- expect().
- statusCode(200).
- when().
- delete("/resource/"+resourceId);
- }
-
- @Ignore
- @Test
- @Concurrent(count = THREADS)
- @Repeating(repetition = REPETITIONS)
- public void testUploadMetadata() {
- String subjectId = UUID.randomUUID().toString();
- String predicateId1 = UUID.randomUUID().toString();
- String predicateId2 = UUID.randomUUID().toString();
- String objectId1 = UUID.randomUUID().toString();
- String objectValue2 = UUID.randomUUID().toString();
-
- // create resources
- for(String uuid : new String[]{subjectId,predicateId1,predicateId2,objectId1}) {
- expect().
- statusCode(201).
- when().
- post("/resource/" + uuid);
- }
-
- // configure redirects
- given().
- header("Content-Type","application/json").
- content("[true]").
- expect().
- statusCode(200).
- when().
- post("/config/data/linkeddata.redirect.put");
-
-
- // create some RDF data
- String rdfData = String.format(
- "<" + baseResource + " + %s> <" + baseResource + " + %s> <" + baseResource + " + %s> . " +
- "<" + baseResource + " + %s> <" + baseResource + " + %s> \"%s\" .",
- subjectId,predicateId1,objectId1,
- subjectId,predicateId2,objectValue2);
-
- // upload to resource, expect 300/303 redirect and a Location header
- given().
- redirects().follow(false).
- header("Content-Type", "text/rdf+n3").
- body(rdfData).
- expect().
- statusCode(isOneOf(300, 303)).
- header("Location", endsWith("meta/text/rdf+n3/" + subjectId)).
- when().
- put("/resource/" + subjectId);
-
- // execute redirect and upload data to resource, expect 200 ok
- given().
- header("Content-Type", "text/rdf+n3").
- body(rdfData).
- expect().
- statusCode(200).
- when().
- put("/meta/text/rdf+n3/" + subjectId);
-
- // check redirect
- given().
- redirects().follow(false).
- header("Accept", "application/json").
- expect().
- statusCode(isOneOf(300, 303)).
- header("Location", endsWith("meta/application/json/" + subjectId)).
- when().
- get("/resource/" + subjectId);
-
- // check the RDF/JSON content after manually carrying out the redirect
- given().
- header("Accept", "application/json").
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/json")).
- body(baseResource + subjectId + "." + baseResource + predicateId1 + ".type", hasItems("uri")).
- body(baseResource + subjectId + "." + baseResource + predicateId1 + ".value", hasItems(baseResource + objectId1)).
- body(baseResource + subjectId + "." + baseResource + predicateId2 + ".type", hasItems("literal")).
- body(baseResource + subjectId + "." + baseResource + predicateId2 + ".value", hasItems(objectValue2)).
- when().
- get("/meta/application/json/" + subjectId);
-
- // delete the resources
- for(String uuid : new String[]{subjectId,predicateId1,predicateId2,objectId1}) {
- expect().
- statusCode(200).
- when().
- delete("/resource/" + uuid);
- }
- }
-
-
- /**
- * Test uploading of content to a resource
- * 1. creates a resource
- * 2. uploads content to the resource using PUT with Content-Type header text/html; rel=content; checks for redirect
- * and successful upload
- * 3. retrieves the content from the resource using GET with Accept: image/jpeg; rel=content and checks for 406 error
- * 4. retrieves the content from the resource using GET with Accept: text/html; rel=content; checks for redirect and
- * successful retrieval of content
- * 5. deletes resource
- *
- */
- @Ignore
- @Test
- @Concurrent(count = THREADS)
- @Repeating(repetition = REPETITIONS)
- public void testUploadTripleContent() {
- final String subjectId = UUID.randomUUID().toString();
-
- // create resources
- expect().
- statusCode(201).
- when().
- post("/resource/" + subjectId);
-
- // configure redirects
- given().
- header("Content-Type","application/json").
- content("[true]").
- expect().
- statusCode(200).
- when().
- post("/config/data/linkeddata.redirect.put");
-
-
- // create some HTML content
- StringWriter writer = new StringWriter();
- new Html(writer) {{
- html().
- head().title().text(subjectId).end().
- body().
- h1().text(subjectId).end().
- p().text("Lorem Ipsum Dolor Sit Amet").end().
- endAll();
- }};
- String htmlContent = writer.toString();
-
-
- // upload to resource, expect 300/303 redirect and a Location header
- given().
- redirects().follow(false).
- header("Content-Type","text/html; rel=content").
- body(htmlContent).
- expect().
- statusCode(isOneOf(300, 303)).
- header("Location", endsWith("content/text/html/" + subjectId)).
- when().
- put("/resource/" + subjectId);
-
- // execute redirect and upload data to resource, expect 200 ok
- given().
- header("Content-Type", "text/html; rel=content").
- body(htmlContent).
- expect().
- statusCode(200).
- when().
- put("/content/text/html/" + subjectId);
-
-
- // check redirect for unsupported image/jpeg, should return 406 (unsupported media type)
- given().
- header("Accept", "image/jpeg; rel=content").
- expect().
- statusCode(406).
- when().
- get("/resource/" + subjectId);
-
- // check redirect for supported HTML
- given().
- redirects().follow(false).
- header("Accept", "text/html; rel=content").
- expect().
- statusCode(isOneOf(300, 303)).
- header("Location", endsWith("content/text/html/" + subjectId)).
- when().
- get("/resource/" + subjectId);
-
- // check the text/html content after manually carrying out the redirect
- given().
- header("Accept", "text/html; rel=content").
- expect().
- statusCode(200).
- header("Content-Type", containsString("text/html")).
- body("html.head.title",equalToIgnoringWhiteSpace(subjectId)).
- body("html.body.h1",equalToIgnoringWhiteSpace(subjectId)).
- when().
- get("/content/text/html/" + subjectId);
-
- // delete the resources
- expect().
- statusCode(200).
- when().
- delete("/resource/" + subjectId);
- }
-
-
- /**
- * Test uploading of content to a resource
- * 1. creates a resource
- * 2. uploads content to the resource using PUT with Content-Type header text/html; rel=content; checks for redirect
- * and successful upload
- * 3. retrieves the content from the resource using GET with Accept: image/jpeg; rel=content and checks for 406 error
- * 4. retrieves the content from the resource using GET with Accept: text/html; rel=content; checks for redirect and
- * successful retrieval of content
- * 5. deletes resource
- *
- */
- @Ignore
- @Test
- @Concurrent(count = THREADS)
- @Repeating(repetition = REPETITIONS)
- public void testUploadFileContent() throws UnsupportedEncodingException {
- final String subjectId = "file://" + basePath + "/resources/testdata/"+UUID.randomUUID().toString()+".html";
-
- // create resources
- given().
- queryParam("uri",subjectId).
- expect().
- statusCode(201).
- when().
- post("/resource");
-
-
- // configure redirects
- given().
- header("Content-Type","application/json").
- content("[true]").
- expect().
- statusCode(200).
- when().
- post("/config/data/linkeddata.redirect.put");
-
-
-
-
- // create some HTML content
- StringWriter writer = new StringWriter();
- new Html(writer) {{
- html().
- head().title().text(subjectId).end().
- body().
- h1().text(subjectId).end().
- p().text("Lorem Ipsum Dolor Sit Amet").end().
- endAll();
- }};
- String htmlContent = writer.toString();
-
-
- // upload to resource, expect 300/303 redirect and a Location header
- given().
- redirects().follow(false).
- header("Content-Type","text/html; rel=content").
- body(htmlContent).
- expect().
- statusCode(isOneOf(300, 303)).
- header("Location", endsWith("content/text/html?uri=" + URLEncoder.encode(subjectId,"UTF-8"))).
- when().
- put("/resource?uri=" + subjectId);
-
- // execute redirect and upload data to resource, expect 200 ok
- given().
- header("Content-Type", "text/html; rel=content").
- body(htmlContent).
- expect().
- statusCode(200).
- when().
- put("/content/text/html?uri=" + URLEncoder.encode(subjectId,"UTF-8"));
-
-
- // check redirect for unsupported image/jpeg, should return 406 (unsupported media type)
- given().
- header("Accept", "image/jpeg; rel=content").
- expect().
- statusCode(406).
- when().
- get("/resource?uri=" + URLEncoder.encode(subjectId,"UTF-8"));
-
- // check redirect for supported HTML
- given().
- redirects().follow(false).
- header("Accept", "text/html; rel=content").
- expect().
- statusCode(isOneOf(300, 303)).
- header("Location", endsWith("content/text/html?uri=" + URLEncoder.encode(subjectId,"UTF-8"))).
- when().
- get("/resource?uri=" + URLEncoder.encode(subjectId,"UTF-8"));
-
- // check the text/html content after manually carrying out the redirect
- given().
- header("Accept", "text/html; rel=content").
- expect().
- statusCode(200).
- header("Content-Type", containsString("text/html")).
- body("html.head.title",equalToIgnoringWhiteSpace(subjectId)).
- body("html.body.h1",equalToIgnoringWhiteSpace(subjectId)).
- when().
- get("/content/text/html?uri=" + URLEncoder.encode(subjectId,"UTF-8"));
-
- // delete the resources
- /*
- expect().
- statusCode(200).
- when().
- delete("/resource?uri=" + URLEncoder.encode(subjectId,"UTF-8"));
- */
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/SparqlServiceTest.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/SparqlServiceTest.java b/platform/marmotta-core/src/test/disabled/SparqlServiceTest.java
deleted file mode 100644
index 50ff133..0000000
--- a/platform/marmotta-core/src/test/disabled/SparqlServiceTest.java
+++ /dev/null
@@ -1,573 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.platform.core.test.sparql;
-
-import com.google.code.tempusfugit.concurrency.ConcurrentRule;
-import com.google.code.tempusfugit.concurrency.RepeatingRule;
-import com.google.code.tempusfugit.concurrency.annotations.Concurrent;
-import com.google.code.tempusfugit.concurrency.annotations.Repeating;
-import com.google.common.io.Resources;
-import com.jayway.restassured.RestAssured;
-import com.jayway.restassured.parsing.Parser;
-import org.apache.marmotta.platform.core.test.base.LMFBaseTest;
-import org.junit.Rule;
-import org.junit.Test;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.NamespaceContext;
-import java.io.IOException;
-import java.nio.charset.Charset;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.regex.Matcher;
-
-import static com.jayway.restassured.RestAssured.expect;
-import static com.jayway.restassured.RestAssured.given;
-import static org.hamcrest.Matchers.*;
-
-/**
- * Tests the SPARQL Web Service, querying and updating.
- *
- * @author Sebastian Schaffert
- */
-public class SparqlServiceTest extends LMFBaseTest {
-
- @Rule
- public ConcurrentRule concurrently = new ConcurrentRule();
-
- @Rule
- public RepeatingRule repeatedly = new RepeatingRule();
-
-
- private final static int THREADS = 5;
- private final static int REPETITIONS = 10;
-
-
- /**
- * Test running a SPARQL ASK { ...} query
- * @throws IOException
- */
- @Test
- @Concurrent(count = THREADS)
- @Repeating(repetition = REPETITIONS)
- public void testSparqlAsk() throws IOException {
-
- RestAssured.registerParser("application/sparql-results+xml", Parser.XML);
- RestAssured.registerParser("application/sparql-results+json", Parser.JSON);
-
-
- // generate some random N3 data
- String s1 = generateRandomUri();
- String s2 = generateRandomUri();
- String s3 = generateRandomUri();
- String v1 = generateRandomContent(20);
- String v2 = generateRandomContent(15);
- String v3 = generateRandomContent(25);
-
-
- String n3data =
- Resources.toString(this.getClass().getResource("data.n3"), Charset.defaultCharset()).
- replaceAll("\\$1", Matcher.quoteReplacement(s1)).
- replaceAll("\\$2", Matcher.quoteReplacement(s2)).
- replaceAll("\\$3", Matcher.quoteReplacement(s3)).
- replaceAll("\\$v1", Matcher.quoteReplacement(v1)).
- replaceAll("\\$v2", Matcher.quoteReplacement(v2)).
- replaceAll("\\$v3", Matcher.quoteReplacement(v3));
-
-
- // import data using import webservice; result must be 200 ok
- given().
- header("Content-Type", "text/rdf+n3").
- body(n3data).
- expect().
- statusCode(200).
- when().
- post("/import/upload");
-
-
- // carry out SPARQL ASK query for s1 foaf:knows s2; result must be SPARQL/XML and true
- String askQuery =
- "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"+
- "ASK { <$1> foaf:knows <$2> }".
- replaceAll("\\$1", s1).
- replaceAll("\\$2", s2);
-
- given().
- header("Accept", "application/xml").
- header("Content-Type","text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body("sparql.boolean", equalTo("true")).
- when().
- post("/sparql/select");
-
-
- // carry out SPARQL ASK query for s1 foaf:knows s2; result must be SPARQL/JSON and true
- given().
- header("Accept", "application/json").
- header("Content-Type", "text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+json")).
- body("boolean", equalTo(true)).
- when().
- post("/sparql/select");
-
-
- // carry out SPARQL ASK query for s1 foaf:knows s2; result must be SPARQL/JSON and true
- given().
- header("Accept", "text/html").
- header("Content-Type", "text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("text/html")).
- body("html.head.title", equalTo("SPARQL Query Results")).
- when().
- post("/sparql/select");
-
-
-
- for(String uri : new String[] {s1,s2,s3}) {
- // delete the resource
- expect().
- statusCode(200).
- when().
- delete("/resource/"+uri.substring(baseResource.length()));
- }
-
- }
-
-
- /**
- * Test running a SPARQL SELECT ... WHERE { ... } query
- * @throws IOException
- */
- @Test
- @Concurrent(count = THREADS)
- @Repeating(repetition = REPETITIONS)
- public void testSparqlSelect() throws IOException {
-
- RestAssured.registerParser("application/sparql-results+xml", Parser.XML);
- RestAssured.registerParser("application/sparql-results+json", Parser.JSON);
-
- // register the SPARQL namespace for XPath queries
- NamespaceContext ns = new NamespaceContext() {
- @Override
- public String getNamespaceURI(String prefix) {
- if("".equals(prefix)) {
- return "http://www.w3.org/2005/sparql-results#";
- } else if(XMLConstants.XMLNS_ATTRIBUTE.equals(prefix)) {
- return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
- } else if(XMLConstants.XML_NS_PREFIX.equals(prefix)) {
- return XMLConstants.XML_NS_URI;
- } else {
- return XMLConstants.NULL_NS_URI;
- }
- }
-
- @Override
- public String getPrefix(String namespaceURI) {
- if("http://www.w3.org/2005/sparql-results#".equals(namespaceURI)) {
- return XMLConstants.DEFAULT_NS_PREFIX;
- } else {
- return null;
- }
- }
-
- @Override
- public Iterator<String> getPrefixes(String namespaceURI) {
- if("http://www.w3.org/2005/sparql-results#".equals(namespaceURI)) {
- return Collections.singleton(XMLConstants.DEFAULT_NS_PREFIX).iterator();
- } else {
- return null;
- }
- }
- };
-
- // generate some random N3 data
- String s1 = generateRandomUri();
- String s2 = generateRandomUri();
- String s3 = generateRandomUri();
- String v1 = generateRandomContent(20);
- String v2 = generateRandomContent(15);
- String v3 = generateRandomContent(25);
-
-
- String n3data =
- Resources.toString(this.getClass().getResource("data.n3"), Charset.defaultCharset()).
- replaceAll("\\$1", Matcher.quoteReplacement(s1)).
- replaceAll("\\$2", Matcher.quoteReplacement(s2)).
- replaceAll("\\$3", Matcher.quoteReplacement(s3)).
- replaceAll("\\$v1", Matcher.quoteReplacement(v1)).
- replaceAll("\\$v2", Matcher.quoteReplacement(v2)).
- replaceAll("\\$v3", Matcher.quoteReplacement(v3));
-
-
- // import data using import webservice; result must be 200 ok
- given().
- header("Content-Type", "text/rdf+n3").
- body(n3data).
- expect().
- statusCode(200).
- when().
- post("/import/upload");
-
-
- // carry out SPARQL SELECT query, selecting all persons and their names foaf:known by s1; must be s2 and s3
- String selectQuery =
- ("PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"+
- "SELECT ?p ?n " +
- "WHERE { <$1> foaf:knows ?p . " +
- " ?p foaf:name ?n }").
- replaceAll("\\$1", s1);
-
- given().
- header("Accept", "application/xml").
- header("Content-Type", "text/plain").
- body(selectQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body(hasXPath("/sparql/results/result/binding[@name='p']/uri", ns, isOneOf(s2, s3))).
- body(hasXPath("/sparql/results/result/binding[@name='n']/literal", ns, isOneOf(v2, v3))).
- when().
- post("/sparql/select");
-
-
- // carry out SPARQL ASK query for s1 foaf:knows s2; result must be SPARQL/JSON and true
- given().
- header("Accept", "application/json").
- header("Content-Type", "text/plain").
- body(selectQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+json")).
- body("results.bindings.p.value", hasItems(s2, s3)).
- body("results.bindings.n.value", hasItems(v2, v3)).
- when().
- post("/sparql/select");
-
-
- // carry out SPARQL ASK query for s1 foaf:knows s2; result must be SPARQL/JSON and true
- given().
- header("Accept", "text/html").
- header("Content-Type", "text/plain").
- body(selectQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("text/html")).
- body("html.head.title", equalTo("SPARQL Query Results")).
- when().
- post("/sparql/select");
-
-
- for(String uri : new String[] {s1,s2,s3}) {
- // delete the resource
- expect().
- statusCode(200).
- when().
- delete("/resource/"+uri.substring(baseResource.length()));
- }
- }
-
-
- /**
- * Test running SPARQL INSERT DATA { ... } statements
- * @throws IOException
- */
- @Test
- @Concurrent(count = THREADS)
- @Repeating(repetition = REPETITIONS)
- public void testSparqlInsertData() throws IOException {
- RestAssured.registerParser("application/sparql-results+xml", Parser.XML);
- RestAssured.registerParser("application/sparql-results+json", Parser.JSON);
-
- // generate some random N3 data
- String s1 = generateRandomUri();
- String s2 = generateRandomUri();
- String s3 = generateRandomUri();
- String v1 = generateRandomContent(20);
- String v2 = generateRandomContent(15);
- String v3 = generateRandomContent(25);
-
-
- String n3data =
- Resources.toString(this.getClass().getResource("data.n3"),Charset.defaultCharset()).
- replaceAll("\\$1", Matcher.quoteReplacement(s1)).
- replaceAll("\\$2", Matcher.quoteReplacement(s2)).
- replaceAll("\\$3", Matcher.quoteReplacement(s3)).
- replaceAll("\\$v1", Matcher.quoteReplacement(v1)).
- replaceAll("\\$v2", Matcher.quoteReplacement(v2)).
- replaceAll("\\$v3", Matcher.quoteReplacement(v3));
-
-
- // import base data using import webservice; result must be 200 ok
- given().
- header("Content-Type", "text/rdf+n3").
- body(n3data).
- expect().
- statusCode(200).
- when().
- post("/import/upload");
-
-
- // check that not(s2 foaf:knows s3)
- String askQuery =
- "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"+
- "ASK { <$2> foaf:knows <$3> }".
- replaceAll("\\$3", s3).
- replaceAll("\\$2", s2);
- given().
- header("Accept", "application/xml").
- header("Content-Type","text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body("sparql.boolean", equalTo("false")).
- when().
- post("/sparql/select");
-
-
- // load SPARQL INSERT from file insert.sparql
- String sparqlInsert = Resources.toString(this.getClass().getResource("insert.sparql"), Charset.defaultCharset()).
- replaceAll("\\$1",s1).
- replaceAll("\\$2", s2).
- replaceAll("\\$3", s3);
-
- // execute insert by posting it to the /sparql/update webservice, expect 200
- given().
- header("Content-Type", "text/plain").
- body(sparqlInsert).
- expect().
- statusCode(200).
- when().
- post("/sparql/update");
-
-
- // now expect the ASK query to yield "true"
- given().
- header("Accept", "application/xml").
- header("Content-Type", "text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body("sparql.boolean", equalTo("true")).
- when().
- post("/sparql/select");
-
- for(String uri : new String[] {s1,s2,s3}) {
- // delete the resource
- expect().
- statusCode(200).
- when().
- delete("/resource/"+uri.substring(baseResource.length()));
- }
- }
-
- /**
- * Test running SPARQL INSERT { ... } WHERE { ... } statements
- * @throws IOException
- */
- @Test
- // no concurrency, since the tests themselves and update programs are not thread safe
- @Repeating(repetition = REPETITIONS)
- public void testSparqlInsertWhere() throws IOException {
- RestAssured.registerParser("application/sparql-results+xml", Parser.XML);
- RestAssured.registerParser("application/sparql-results+json", Parser.JSON);
-
- // generate some random N3 data
- String s1 = generateRandomUri();
- String s2 = generateRandomUri();
- String s3 = generateRandomUri();
- String v1 = generateRandomContent(20);
- String v2 = generateRandomContent(15);
- String v3 = generateRandomContent(25);
-
-
- String n3data =
- Resources.toString(this.getClass().getResource("data.n3"),Charset.defaultCharset()).
- replaceAll("\\$1", Matcher.quoteReplacement(s1)).
- replaceAll("\\$2", Matcher.quoteReplacement(s2)).
- replaceAll("\\$3", Matcher.quoteReplacement(s3)).
- replaceAll("\\$v1", Matcher.quoteReplacement(v1)).
- replaceAll("\\$v2", Matcher.quoteReplacement(v2)).
- replaceAll("\\$v3", Matcher.quoteReplacement(v3));
-
-
- // import base data using import webservice; result must be 200 ok
- given().
- header("Content-Type", "text/rdf+n3").
- body(n3data).
- expect().
- statusCode(200).
- when().
- post("/import/upload");
-
-
- // check that not(s2 foaf:knows s3)
- String askQuery =
- "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"+
- "ASK { <$2> foaf:knows <$3> }".
- replaceAll("\\$3", s3).
- replaceAll("\\$2", s2);
- given().
- header("Accept", "application/xml").
- header("Content-Type","text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body("sparql.boolean", equalTo("false")).
- when().
- post("/sparql/select");
-
-
- // load SPARQL INSERT from file insert.sparql
- String sparqlInsert = Resources.toString(this.getClass().getResource("update.sparql"), Charset.defaultCharset());
-
- // execute insert by posting it to the /sparql/update webservice, expect 200
- given().
- header("Content-Type", "text/plain").
- body(sparqlInsert).
- expect().
- statusCode(200).
- when().
- post("/sparql/update");
-
-
- // now expect the ASK query to yield "true"
- given().
- header("Accept", "application/xml").
- header("Content-Type","text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body("sparql.boolean", equalTo("true")).
- when().
- post("/sparql/select");
-
- for(String uri : new String[] {s1,s2,s3}) {
- // delete the resource
- expect().
- statusCode(200).
- when().
- delete("/resource/"+uri.substring(baseResource.length()));
- }
- }
-
-
- /**
- * Test running SPARQL DELETE updates
- * @throws IOException
- */
- @Test
- // no concurrency, since the tests themselves and update programs are not thread safe
- @Repeating(repetition = REPETITIONS)
- public void testSparqlDelete() throws IOException {
- RestAssured.registerParser("application/sparql-results+xml", Parser.XML);
- RestAssured.registerParser("application/sparql-results+json", Parser.JSON);
-
- // generate some random N3 data
- String s1 = generateRandomUri();
- String s2 = generateRandomUri();
- String s3 = generateRandomUri();
- String v1 = generateRandomContent(20);
- String v2 = generateRandomContent(15);
- String v3 = generateRandomContent(25);
-
-
- String n3data =
- Resources.toString(this.getClass().getResource("data.n3"), Charset.defaultCharset()).
- replaceAll("\\$1", Matcher.quoteReplacement(s1)).
- replaceAll("\\$2", Matcher.quoteReplacement(s2)).
- replaceAll("\\$3", Matcher.quoteReplacement(s3)).
- replaceAll("\\$v1", Matcher.quoteReplacement(v1)).
- replaceAll("\\$v2", Matcher.quoteReplacement(v2)).
- replaceAll("\\$v3", Matcher.quoteReplacement(v3));
-
-
- // import base data using import webservice; result must be 200 ok
- given().
- header("Content-Type", "text/rdf+n3").
- body(n3data).
- expect().
- statusCode(200).
- when().
- post("/import/upload");
-
-
- // check that s1 foaf:knows s2
- String askQuery =
- "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"+
- "ASK { <$1> foaf:knows <$2> }".
- replaceAll("\\$1", s1).
- replaceAll("\\$2", s2);
- given().
- header("Accept", "application/xml").
- header("Content-Type","text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body("sparql.boolean", equalTo("true")).
- when().
- post("/sparql/select");
-
-
- // load SPARQL DELETE from file delete.sparql
- String sparqlInsert = Resources.toString(this.getClass().getResource("delete.sparql"), Charset.defaultCharset());
-
- // execute insert by posting it to the /sparql/update webservice, expect 200
- given().
- header("Content-Type","text/plain").
- body(sparqlInsert).
- expect().
- statusCode(200).
- when().
- post("/sparql/update");
-
-
- // now expect the ASK query to yield "false"
- given().
- header("Accept", "application/xml").
- header("Content-Type","text/plain").
- body(askQuery).
- expect().
- statusCode(200).
- header("Content-Type", containsString("application/sparql-results+xml")).
- body("sparql.boolean", equalTo("false")).
- when().
- post("/sparql/select");
-
- for(String uri : new String[] {s1,s2,s3}) {
- // delete the resource
- expect().
- statusCode(200).
- when().
- delete("/resource/"+uri.substring(baseResource.length()));
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/data.n3
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/data.n3 b/platform/marmotta-core/src/test/disabled/data.n3
deleted file mode 100644
index d96ed80..0000000
--- a/platform/marmotta-core/src/test/disabled/data.n3
+++ /dev/null
@@ -1,10 +0,0 @@
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-<$1> foaf:name "$v1" .
-<$1> foaf:knows <$2> .
-<$1> foaf:knows <$3> .
-<$2> foaf:name "$v2" .
-<$2> foaf:knows <$1> .
-<$3> foaf:name "$v3" .
-<$3> foaf:knows <$1> .
-<$3> foaf:knows <$2> .
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/delete.sparql
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/delete.sparql b/platform/marmotta-core/src/test/disabled/delete.sparql
deleted file mode 100644
index 339e9cb..0000000
--- a/platform/marmotta-core/src/test/disabled/delete.sparql
+++ /dev/null
@@ -1,8 +0,0 @@
-PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-PREFIX foaf: <http://xmlns.com/foaf/0.1/>
-DELETE {
- ?s ?p ?o
-} WHERE {
- ?s foaf:name ?v .
- ?s ?p ?o
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/insert.sparql
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/insert.sparql b/platform/marmotta-core/src/test/disabled/insert.sparql
deleted file mode 100644
index 5d40517..0000000
--- a/platform/marmotta-core/src/test/disabled/insert.sparql
+++ /dev/null
@@ -1,5 +0,0 @@
-PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-PREFIX foaf: <http://xmlns.com/foaf/0.1/>
-INSERT DATA {
- <$2> foaf:knows <$3>
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-core/src/test/disabled/update.sparql
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/test/disabled/update.sparql b/platform/marmotta-core/src/test/disabled/update.sparql
deleted file mode 100644
index 19f22ad..0000000
--- a/platform/marmotta-core/src/test/disabled/update.sparql
+++ /dev/null
@@ -1,7 +0,0 @@
-PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-PREFIX foaf: <http://xmlns.com/foaf/0.1/>
-INSERT {
- ?x foaf:knows ?y
-} WHERE {
- ?y foaf:knows ?x
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-reasoner/src/main/resources/uploadOWL.sh
----------------------------------------------------------------------
diff --git a/platform/marmotta-reasoner/src/main/resources/uploadOWL.sh b/platform/marmotta-reasoner/src/main/resources/uploadOWL.sh
index f2746a4..dd87880 100644
--- a/platform/marmotta-reasoner/src/main/resources/uploadOWL.sh
+++ b/platform/marmotta-reasoner/src/main/resources/uploadOWL.sh
@@ -1,2 +1,19 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
curl -i -H "Content-Type: text/plain" -X POST --data-binary @owl.kwrl http://localhost:8080/LMF/reasoner/program/owl
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-reasoner/src/main/resources/uploadRDFS.sh
----------------------------------------------------------------------
diff --git a/platform/marmotta-reasoner/src/main/resources/uploadRDFS.sh b/platform/marmotta-reasoner/src/main/resources/uploadRDFS.sh
index b469b28..eea8cab 100644
--- a/platform/marmotta-reasoner/src/main/resources/uploadRDFS.sh
+++ b/platform/marmotta-reasoner/src/main/resources/uploadRDFS.sh
@@ -1,2 +1,19 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
curl -i -H "Content-Type: text/plain" -X POST --data-binary @rdfs.kwrl http://localhost:8080/LMF/reasoner/program/rdfs
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-reasoner/src/main/resources/uploadSKOS.sh
----------------------------------------------------------------------
diff --git a/platform/marmotta-reasoner/src/main/resources/uploadSKOS.sh b/platform/marmotta-reasoner/src/main/resources/uploadSKOS.sh
index e60237f..8f14db9 100644
--- a/platform/marmotta-reasoner/src/main/resources/uploadSKOS.sh
+++ b/platform/marmotta-reasoner/src/main/resources/uploadSKOS.sh
@@ -1,2 +1,19 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
curl -i -H "Content-Type: text/plain" -X POST --data-binary @skos.kwrl http://localhost:8080/LMF/reasoner/program/skos
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.initial.ttl
----------------------------------------------------------------------
diff --git a/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.initial.ttl b/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.initial.ttl
index 0d26c3f..09cac15 100644
--- a/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.initial.ttl
+++ b/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.initial.ttl
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
@prefix local : <http://localhost:8080/LMF/resource/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.result.ttl
----------------------------------------------------------------------
diff --git a/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.result.ttl b/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.result.ttl
index 3db39ad..855ea5e 100644
--- a/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.result.ttl
+++ b/platform/marmotta-reasoner/src/test/resources/org/apache/marmotta/platform/reasoner/test/engine/test-001.result.ttl
@@ -1,3 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
@prefix local : <http://localhost:8080/LMF/resource/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/README.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/README.html b/platform/marmotta-sparql/src/test/resources/test-suite-archive/README.html
deleted file mode 100644
index ae31478..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/README.html
+++ /dev/null
@@ -1,278 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html lang="en-GB" xml:lang="en-GB" xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>DAWG: Test case structure</title>
- <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/base.css" />
-
-<style type="text/css">
-
- pre.diag { background-color: #f0f0f0 ; padding: 0.5em ; border: 1px solid black ; margin-right: 4em ; }
- span.code { font-family: monospace;}
- pre.cvs-id {color: gray}
-
-#tableResult td, th { padding-left:0.5em; padding-right: 0.5em; padding-top:0.2ex ; padding-bottom:0.2ex ;}
-
-/* Tables */
-table, td { text-align: left; }
-table, td, th { border-style: solid;
- border-width: 1px;
- border-color: black;
- border-bottom-color: gray;
- border-right-color: gray; }
-table.plain { border-spacing: 0px; padding: 0px ; border-collapse: collapse ; }
- /* cellpadding="0" cellspacing="1" style="border-collapse: collapse */
-
-
- </style>
- <meta name="RCS-Id" content="$Id: README.html,v 1.20 2007/11/27 17:33:43 lfeigenb Exp $" />
-</head>
-<body>
- <div class="head">
- <a href="http://www.w3.org/"><img height="48" width="72" alt="W3C" src="
- http://www.w3.org/Icons/w3c_home" /></a>
-<h1 id="main">DAWG: Test case structure</h1>
- <dl>
- <dd> </dd>
- <dt>Document Editor</dt>
- <dd><a href="mailto:swh@ecs.soton.ac.uk">Steve Harris</a> –
- IAM Research Group, Southampton</dd>
- <dd><a href="mailto:j.broekstra@tue.nl">Jeen Broekstra</a> –
- Information Systems Group, Eindhoven University of Technology</dd>
- <dd><a href="mailto:feigenbl@us.ibm.com">Lee Feigenbaum</a> –
- IBM</dd>
- <dt>Version:</dt>
- <dd><code>$Revision: 1.20 $</code></dd>
- </dl>
-
- <p class="copyright"><a href="
- http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
- 2004 <a href="http://www.w3.org/"><acronym title="
- World Wide Web Consortium">W3C</acronym></a><sup>®</sup> ( <a href="
- http://www.csail.mit.edu/"><acronym title="
- Massachusetts Institute of Technology">MIT</acronym></a>, <a href="
- http://www.ercim.org/"><acronym title="
- European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
- <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
- <a href="
- http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
- <a href="
- http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
- and <a href="
- http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
-
- rules apply.</p></div>
-
-<hr title="Separator for header" />
-<div>
-<h2 id="abstract">Abstract</h2>
-<p>This document describes the testing process used by the
-<a href="http://www.w3.org/2001/sw/DataAccess/tests">RDF Data Access Working
-Group</a>.</p>
-</div>
-<div>
- <h2><a name="status" id="status">Status of This Document</a></h2>
- <p>Working Document.</p>
-</div>
- <hr />
-<p>
-The
-<a href="http://www.w3.org/2001/sw/DataAccess/">RDF Data Access Working
-Group</a> (DAWG) uses a test-driven process. The
-<a href="r2">test area</a> is a
-collection of the current test cases of the working group. </p>
- <p>
-Tests are divided into collections (corresponding to directories) for manageability. Each collection
-of tests has a <em>manifest file</em> within its directory (usually named
-<tt>manifest.ttl</tt>, but sometimes <tt>manifest.n3</tt>).
-There is also a pair of overall manifests containing entries pointing to the
-individual test collection manifests: One is a <a
-href="http://www.w3.org/2001/sw/DataAccess/tests/data-r2/manifest-syntax.ttl">manifest
-of syntax-only tests</a> (positive and negative tests); the other is a <a
-href="http://www.w3.org/2001/sw/DataAccess/tests/data-r2/manifest-evaluation.ttl">manifest
-of query-evaluation tests</a>.</p>
-
-<h4>Reorganization</h4>
-<p>
-The Working Group recently completed reorganizing the test suite. The
-output of this reorganization process can be found in the <a
-href="data-r2">data-r2</a> directory. The tests here are restructured
-copies of tests from the previous test suite along with new tests aimed at
-covering as much of the SPARQL Query Language as possible. The purpose of this
-restructuring is to enhance usability, clear away obsolete tests and
-provide an up-to-date, consistent, and easy-to-use suite of test cases that
-SPARQL query language implementors can use to evaluate and report on their
-implementation.
-</p>
-<p>
-The Working Group decided on <a
-href="http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html#item05">21
-Aug 2007</a> that the tests as-is constitute a test suite that the group will
-use to generate an implementation report for the SPARQL Query Language for
-RDF.</p>
-</p>
- <h4>Manifest Vocabularies</h4>
-
- <p>The DAWG's test manifest files define three vocabularies to express
- tests:</p>
-
- <ol>
- <li><a href="test-manifest.n3">manifest vocabulary</a> (prefixed with
- <tt>mf:</tt> below)</li>
- <li><a href="test-query.n3">query-evaluation test vocabulary</a> (prefixed
- with <tt>qt:</tt> below)</li>
- <li><a href="test-dawg.n3">DAWG test approval vocabulary</a> (prefixed
- with <tt>dawgt:</tt> below)</li>
- </ol>
-
- <p>All examples below use these prefix bindings (specified in <a
- href="http://www.w3.org/2001/sw/DataAccess/df1/">turtle</a>):</p>
-
- <pre class="diag">@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
-@prefix dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> .
-@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
- </pre>
-
- <h4>Manifest Structure</h4>
-
- <p>
-A manifest is a list (RDF Collection) of tests. Every test has
-a name (<tt>mf:name</tt>); many tests also have a comment
-(<tt>rdfs:comment</tt>) explaining the purpose of the test. The <tt>dawgt:approval</tt> predicate relates a test
-to its official Working Group status (e.g. <tt>dawgt:Approved</tt>). Tests are
-grouped (via their <tt>rdf:type</tt>) as syntax tests (an <tt>rdf:type</tt> of
-either <tt>mf:PositiveSyntaxTest</tt> or <tt>mf:NegativeSyntaxTest</tt>) or
-query-evaluation test (an <tt>rdf:type</tt> of
-<tt>mf:QueryEvaluationTest</tt>).</p>
-
- <h4>Syntax Tests</h4>
-
- <p>
-Each syntax test has an <tt>mf:action</tt>, the object of which is a
-resource identifying a (possible) query string. An example definition of a
-syntax test is:
- </p>
-
-<pre class="diag">
-<#syntax-basic-01> mf:name "syntax-basic-01.rq" ;
- rdf:type mf:PositiveSyntaxTest ;
- mf:action <syntax-basic-01.rq> ;
- dawgt:approvedBy <http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JanMar/0047> ;
- dawgt:approval dawgt:Approved .
-</pre>
-
-<p>
-A SPARQL implementation passes a <tt>mf:PositiveSyntaxTest</tt> if it parses
-the query string without error. A SPARQL implementation passes a
-<tt>mf:NegativeSyntaxTest</tt> if it raises an error while attempting to parse
-the query string.
-</p>
-
- <h4>Query-Evaluation Tests</h4>
-
- <p>Each query-evaluation test has an <tt>mf:action</tt> and an
- <tt>mf:result</tt>. The object of <tt>mf:action</tt> is a resource with
- properties taken from the query-evaluation test vocabulary. At a minimum, a
- test's action includes a <tt>qt:data</tt> relation and a <tt>qt:query</tt>
- relation. The <tt>qt:data</tt> predicate points to a URI
- that can be dereferenced to yield the default graph for the test. The
- <tt>qt:query</tt> prediate points to a URI that can be dereferenced to yield
- the query string for the test. Query-evaluation tests may also use the
- <tt>qt:graphData</tt> predicate to indicate the named graph components of
- the test's RDF dataset.</p>
-
- <p>Query evaluation tests also contain an <tt>mf:result</tt> which points to
- a URI that can be dereferenced to yield the
- expected results of the test query. These results are expressed in one of
- several possible ways:</p>
-
- <ul>
- <li>The <a href="http://www.w3.org/TR/rdf-sparql-XMLres/">SPARQL Query
- Results XML Format</a>. SELECT or ASK queries.</li>
- <li>The <a href="result-set.n3">DAWG result-set RDF vocabulary</a>.
- SELECT or ASK queries.</li>
- <li><a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML</a> or <a
- href="http://www.dajobe.org/2004/01/turtle/">Turtle</a>. CONSTRUCT queries.</li>
- </ul>
-
-<p>A SPARQL implementation passes a query-evaluation test if the graph
-produced by evaluating the query against the RDF dataset (and encoding in the
-DAWG result set vocabulary, if necessary) is
-href="http://www.w3.org/TR/rdf-concepts/#section-graph-equality">equivalent</a> [RDF-CONCEPTS]
-to the graph named in the result (after encoding in the DAWG result set
-vocabulary, if necessary). Equivalence can be tested by
-checking that the graphs are isomorphic and have identical IRI and
-literal nodes. Note that testing whether two result sets are isomorphic is simpler than full graph isomorphism. Iterating over rows in one set, finding a match with the other set, removing this pair, then making sure all rows are accounted for, achieves the same effect.</p>
-
-<p>Query evaluation tests that involve the <a href="http://www.w3.org/TR/rdf-sparql-query#modReduced">REDUCED</a> keyword have slightly different passing criteria. These tests are indicated in the manifest files with the <tt>mf:resultCardinality</tt> predicate with an object of <tt>mf:LaxCardinality</tt>. To pass such a test, the result set produced by a SPARQL implementation must contain each solution in the expected result set at least once and no more than the number of times that the solution occurs in the expected result set. (That is, the expected result set contains the solutions with cardinalities as they would be if the query did not contain REDUCED; to pass the test, an implementation must produce the correct results with cardinalities between one and the cardainlity in the expected result set.)</p>
-
-<p>An example definition of a query-evaluation test is:</p>
-
-<pre class="diag">
-<#dawg-regex-002> a mf:QueryEvaluationTest ;
- mf:name "regex-query-002" ;
- dawgt:approval dawgt:Approved ;
- dawgt:approvedBy <http://lists.w3.org/Archives/Public/public-rdf-dawg/2007AprJun/0029.html> ;
- rdfs:comment
- "Case insensitive unanchored match test" ;
- mf:action
- [ qt:query <regex-query-002.rq> ;
- qt:data <regex-data-01.n3> ] ;
- mf:result <regex-result-002.n3> .
-</pre>
-
- <h4>Test annotations</h4>
- <h5>mf:requires</h5>
- <p>A number of tests in the open-world directory illustrate features of SPARQL
- by depending on how a SPARQL query processor can extend the set of core types
- and operations as defined by the operator table [<a href="http://www.w3.org/TR/rdf-sparql-query/">http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping</a>].</p>
- <p>These tests are marked by property <code>mf:requires</code> and an object value from one
- of the URIs described below.</p>
- <dl>
- <dt><code>mf:XsdDateOperations</code></dt>
- <dd>Requires the processor to understand comparisons of
- literal of type xsd:date. Without proivding operations on the xsd:date datatype, a
- processor would raise an error on the operations of "=" and "!="
- etc. With
- an understanding of xsd:date, a processor can perform value-based operations
- and provide the operations described in "XQuery 1.0 and XPath 2.0 Functions
- and Operators" (e.g. <a href="http://www.w3.org/TR/xpath-functions/">
- date-equals</a> <a href="http://www.w3.org/TR/xpath-functions/">
- date-less-than</a>)</dd>
-
- <dt><code>mf:StringSimpleLiteralCmp</code></dt>
- <dd>This indicates that the test uses the fact that plain literals, without
- language tags test are the same value as an xsd;string with the same
- lexicial form. This is covered by rules "xsd 1a" and "xsd 1b" from RDF
- Semantics [<a href="http://www.w3.org/TR/rdf-mt/">http://www.w3.org/TR/rdf-mt/#DtypeRules</a>].</dd>
-
- <dt><code>mf:KnownTypesDefault2Neq</code></dt>
- <dd>This indicates that a processor extends the SPARQL operator model by
- using the fact that values of literals can be in disjoint value spaces and
- hence can not be equal by value. For example, an xsd:integer can not be the
- same value as an xsd:boolean because these two datatypes define disjoint
- value spaces.</dd>
-
-<dt><code>mf:LangTagAwareness</code></dt>
- <dd>This indicates that the test assumes the SPARQL query processor has support
-for plain literals with language tags. The minimum set of operators in the
- <a href="http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping">SPARQL operator table</a>
-does not include language tag handling, only plain literals without language
-tag (simple literals) and certain XSD datatypes.
-
-</dl>
-
- <h5>mf:notable</h5>
- <p>This annotation indicates a feature of SPARQL that implementers might note:</p>
- <dl>
- <dt><code>mf:IllFormedLiteral</code></dt>
- <dd>The test involves handling of ill-formed literals.</dd>
-
-</dl>
-
- <p> </p>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/LICENSE
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/LICENSE b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/LICENSE
deleted file mode 100644
index eaa1cba..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-All tests materials are licensed under the W3C Software Notice and License, as follows:
-____________________________________
-W3C� SOFTWARE NOTICE AND LICENSE
-http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
-
-This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
-
-Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications:
-
- 1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
- 2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code.
- 3. Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
-
-THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
-
-____________________________________
-
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/README
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/README b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/README
deleted file mode 100755
index 94f9013..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/README
+++ /dev/null
@@ -1,16 +0,0 @@
-Data Access Working Group SPARQL Query Language test suite reorganization
-
-This directory contains restructured copies of tests from
-the DAWG test suite (available at
-http://www.w3.org/2001/sw/DataAccess/tests/data/). The purpose of this
-restructuring is to enhance usability, clear away obsolete tests and
-provide an up-to-date, consistent and easy to use suite of test cases
-that SPARQL query language implementors can use to evaluate their
-implementation.
-
-
-The Working Group decided
-(http://lists.w3.org/Archives/Public/public-rdf-dawg/2007JulSep/att-0096/21-dawg-minutes.html#item05)
-on 21 Aug 2007 that the tests as-is constitute a test suite that the group will
-use to generate an implementation report for the SPARQL Query Language for
-RDF.
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra-expressions.txt
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra-expressions.txt b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra-expressions.txt
deleted file mode 100644
index 896cb0d..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra-expressions.txt
+++ /dev/null
@@ -1,112 +0,0 @@
- I. LeftJoin(BGP(..),{..})
- II. Join(BGP(..),Graph(varOrIRI,{..}))
- III. Join(BGP(..),Union(..,..))
- IV. Graph(varOrIRI,{..})
- V. LeftJoin({},{..})
- VI. Union(..,..)
- VII. BGP(..)
- Join(I.,I.) => Join(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..}))
- Union(I.,I.) => Union(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..}))
-LeftJoin(I.,I.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin(BGP(..),{..}))
- Join(I.,II.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..})))
- Union(I.,II.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..})))
-LeftJoin(I.,II.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Graph(varOrIRI,{..})))
- Join(I.,III.) => Join(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))
- Union(I.,III.) => Union(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))
-LeftJoin(I.,III.) => LeftJoin(LeftJoin(BGP(..),{..}),Join(BGP(..),Union(..,..)))
- Join(I.,IV.) => Join(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..}))
- Union(I.,IV.) => Union(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..}))
-LeftJoin(I.,IV.) => LeftJoin(LeftJoin(BGP(..),{..}),Graph(varOrIRI,{..}))
- Join(I.,V.) => Join(LeftJoin(BGP(..),{..}),LeftJoin({},{..}))
- Union(I.,V.) => Union(LeftJoin(BGP(..),{..}),LeftJoin({},{..}))
-LeftJoin(I.,V.) => LeftJoin(LeftJoin(BGP(..),{..}),LeftJoin({},{..}))
- Join(I.,VI.) => Join(LeftJoin(BGP(..),{..}),Union(..,..))
- Union(I.,VI.) => Union(LeftJoin(BGP(..),{..}),Union(..,..))
-LeftJoin(I.,VI.) => LeftJoin(LeftJoin(BGP(..),{..}),Union(..,..))
- Join(I.,VII.) => Join(LeftJoin(BGP(..),{..}),BGP(..))
- Union(I.,VII.) => Union(LeftJoin(BGP(..),{..}),BGP(..))
-LeftJoin(I.,VII.) => LeftJoin(LeftJoin(BGP(..),{..}),BGP(..))
-LeftJoin(II.,I.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin(BGP(..),{..}))
- Join(II.,II.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..})))
- Union(II.,II.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..})))
-LeftJoin(II.,II.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Graph(varOrIRI,{..})))
- Join(II.,III.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..)))
- Union(II.,III.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..)))
-LeftJoin(II.,III.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Join(BGP(..),Union(..,..)))
- Join(II.,IV.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..}))
- Union(II.,IV.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..}))
-LeftJoin(II.,IV.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Graph(varOrIRI,{..}))
- Join(II.,V.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..}))
- Union(II.,V.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..}))
-LeftJoin(II.,V.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),LeftJoin({},{..}))
- Join(II.,VI.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..))
- Union(II.,VI.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..))
-LeftJoin(II.,VI.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),Union(..,..))
- Join(II.,VII.) => Join(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..))
- Union(II.,VII.) => Union(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..))
-LeftJoin(II.,VII.) => LeftJoin(Join(BGP(..),Graph(varOrIRI,{..})),BGP(..))
-LeftJoin(III.,I.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin(BGP(..),{..}))
-LeftJoin(III.,II.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Graph(varOrIRI,{..})))
- Join(III.,III.) => Join(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..)))
- Union(III.,III.) => Union(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..)))
-LeftJoin(III.,III.) => LeftJoin(Join(BGP(..),Union(..,..)),Join(BGP(..),Union(..,..)))
- Join(III.,IV.) => Join(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..}))
- Union(III.,IV.) => Union(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..}))
-LeftJoin(III.,IV.) => LeftJoin(Join(BGP(..),Union(..,..)),Graph(varOrIRI,{..}))
- Join(III.,V.) => Join(Join(BGP(..),Union(..,..)),LeftJoin({},{..}))
- Union(III.,V.) => Union(Join(BGP(..),Union(..,..)),LeftJoin({},{..}))
-LeftJoin(III.,V.) => LeftJoin(Join(BGP(..),Union(..,..)),LeftJoin({},{..}))
- Join(III.,VI.) => Join(Join(BGP(..),Union(..,..)),Union(..,..))
- Union(III.,VI.) => Union(Join(BGP(..),Union(..,..)),Union(..,..))
-LeftJoin(III.,VI.) => LeftJoin(Join(BGP(..),Union(..,..)),Union(..,..))
- Join(III.,VII.) => Join(Join(BGP(..),Union(..,..)),BGP(..))
- Union(III.,VII.) => Union(Join(BGP(..),Union(..,..)),BGP(..))
-LeftJoin(III.,VII.) => LeftJoin(Join(BGP(..),Union(..,..)),BGP(..))
-LeftJoin(IV.,I.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin(BGP(..),{..}))
-LeftJoin(IV.,II.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Graph(varOrIRI,{..})))
-LeftJoin(IV.,III.) => LeftJoin(Graph(varOrIRI,{..}),Join(BGP(..),Union(..,..)))
- Join(IV.,IV.) => Join(Graph(varOrIRI,{..}),Graph(varOrIRI,{..}))
- Union(IV.,IV.) => Union(Graph(varOrIRI,{..}),Graph(varOrIRI,{..}))
-LeftJoin(IV.,IV.) => LeftJoin(Graph(varOrIRI,{..}),Graph(varOrIRI,{..}))
- Join(IV.,V.) => Join(Graph(varOrIRI,{..}),LeftJoin({},{..}))
- Union(IV.,V.) => Union(Graph(varOrIRI,{..}),LeftJoin({},{..}))
-LeftJoin(IV.,V.) => LeftJoin(Graph(varOrIRI,{..}),LeftJoin({},{..}))
- Join(IV.,VI.) => Join(Graph(varOrIRI,{..}),Union(..,..))
- Union(IV.,VI.) => Union(Graph(varOrIRI,{..}),Union(..,..))
-LeftJoin(IV.,VI.) => LeftJoin(Graph(varOrIRI,{..}),Union(..,..))
- Join(IV.,VII.) => Join(Graph(varOrIRI,{..}),BGP(..))
- Union(IV.,VII.) => Union(Graph(varOrIRI,{..}),BGP(..))
-LeftJoin(IV.,VII.) => LeftJoin(Graph(varOrIRI,{..}),BGP(..))
-LeftJoin(V.,I.) => LeftJoin(LeftJoin({},{..}),LeftJoin(BGP(..),{..}))
-LeftJoin(V.,II.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Graph(varOrIRI,{..})))
-LeftJoin(V.,III.) => LeftJoin(LeftJoin({},{..}),Join(BGP(..),Union(..,..)))
-LeftJoin(V.,IV.) => LeftJoin(LeftJoin({},{..}),Graph(varOrIRI,{..}))
- Join(V.,V.) => Join(LeftJoin({},{..}),LeftJoin({},{..}))
- Union(V.,V.) => Union(LeftJoin({},{..}),LeftJoin({},{..}))
-LeftJoin(V.,V.) => LeftJoin(LeftJoin({},{..}),LeftJoin({},{..}))
- Join(V.,VI.) => Join(LeftJoin({},{..}),Union(..,..))
- Union(V.,VI.) => Union(LeftJoin({},{..}),Union(..,..))
-LeftJoin(V.,VI.) => LeftJoin(LeftJoin({},{..}),Union(..,..))
- Join(V.,VII.) => Join(LeftJoin({},{..}),BGP(..))
- Union(V.,VII.) => Union(LeftJoin({},{..}),BGP(..))
-LeftJoin(V.,VII.) => LeftJoin(LeftJoin({},{..}),BGP(..))
-LeftJoin(VI.,I.) => LeftJoin(Union(..,..),LeftJoin(BGP(..),{..}))
-LeftJoin(VI.,II.) => LeftJoin(Union(..,..),Join(BGP(..),Graph(varOrIRI,{..})))
-LeftJoin(VI.,III.) => LeftJoin(Union(..,..),Join(BGP(..),Union(..,..)))
-LeftJoin(VI.,IV.) => LeftJoin(Union(..,..),Graph(varOrIRI,{..}))
-LeftJoin(VI.,V.) => LeftJoin(Union(..,..),LeftJoin({},{..}))
- Join(VI.,VI.) => Join(Union(..,..),Union(..,..))
- Union(VI.,VI.) => Union(Union(..,..),Union(..,..))
-LeftJoin(VI.,VI.) => LeftJoin(Union(..,..),Union(..,..))
- Join(VI.,VII.) => Join(Union(..,..),BGP(..))
- Union(VI.,VII.) => Union(Union(..,..),BGP(..))
-LeftJoin(VI.,VII.) => LeftJoin(Union(..,..),BGP(..))
-LeftJoin(VII.,I.) => LeftJoin(BGP(..),LeftJoin(BGP(..),{..}))
-LeftJoin(VII.,II.) => LeftJoin(BGP(..),Join(BGP(..),Graph(varOrIRI,{..})))
-LeftJoin(VII.,III.) => LeftJoin(BGP(..),Join(BGP(..),Union(..,..)))
-LeftJoin(VII.,IV.) => LeftJoin(BGP(..),Graph(varOrIRI,{..}))
-LeftJoin(VII.,V.) => LeftJoin(BGP(..),LeftJoin({},{..}))
-LeftJoin(VII.,VI.) => LeftJoin(BGP(..),Union(..,..))
- Join(VII.,VII.) => Join(BGP(..),BGP(..))
- Union(VII.,VII.) => Union(BGP(..),BGP(..))
-LeftJoin(VII.,VII.) => LeftJoin(BGP(..),BGP(..))
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-1.ttl
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-1.ttl b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-1.ttl
deleted file mode 100755
index aa2efdc..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-1.ttl
+++ /dev/null
@@ -1,5 +0,0 @@
-@prefix : <http://example/> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-
-:x :p "1"^^xsd:integer .
-
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-2.ttl
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-2.ttl b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-2.ttl
deleted file mode 100755
index 1bbf6e4..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/data-2.ttl
+++ /dev/null
@@ -1,11 +0,0 @@
-@prefix : <http://example/> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-
-:x :p "1"^^xsd:integer .
-:x :p "2"^^xsd:integer .
-:x :p "3"^^xsd:integer .
-:x :p "4"^^xsd:integer .
-
-:x :q "1"^^xsd:integer .
-:x :q "2"^^xsd:integer .
-:x :q "3"^^xsd:integer .
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.rq
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.rq b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.rq
deleted file mode 100755
index 78f2853..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT ?v
-{ :x :p ?v . FILTER(?v = 1) }
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.srx
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.srx b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.srx
deleted file mode 100755
index 3a0f024..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-1.srx
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<sparql
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:xs="http://www.w3.org/2001/XMLSchema#"
- xmlns="http://www.w3.org/2005/sparql-results#" >
- <head>
- <variable name="v"/>
- </head>
- <results>
- <result>
- <binding name="v">
- <literal datatype="http://www.w3.org/2001/XMLSchema#integer">1</literal>
- </binding>
- </result>
- </results>
-</sparql>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.rq
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.rq b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.rq
deleted file mode 100755
index 8430cef..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.rq
+++ /dev/null
@@ -1,4 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT ?v
-{ :x :p ?v . { FILTER(?v = 1) } }
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.srx
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.srx b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.srx
deleted file mode 100755
index 8ac7e1c..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-nested-2.srx
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<sparql
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:xs="http://www.w3.org/2001/XMLSchema#"
- xmlns="http://www.w3.org/2005/sparql-results#" >
- <head>
- <variable name="v"/>
- </head>
- <results>
- </results>
-</sparql>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.rq
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.rq b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.rq
deleted file mode 100755
index cdabba4..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.rq
+++ /dev/null
@@ -1,7 +0,0 @@
-PREFIX : <http://example/>
-
-SELECT ?v
-{
- ?s :p ?v .
- FILTER (?v = 2)
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/69202230/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.srx
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.srx b/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.srx
deleted file mode 100755
index 7f4d990..0000000
--- a/platform/marmotta-sparql/src/test/resources/test-suite-archive/data-r2/algebra/filter-placement-1.srx
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<sparql
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:xs="http://www.w3.org/2001/XMLSchema#"
- xmlns="http://www.w3.org/2005/sparql-results#" >
- <head>
- <variable name="v"/>
- </head>
- <results>
- <result>
- <binding name="v">
- <literal datatype="http://www.w3.org/2001/XMLSchema#integer">2</literal>
- </binding>
- </result>
- </results>
-</sparql>