summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Terry2013-06-26 14:49:28 (EDT)
committer David Terry2013-06-27 15:59:49 (EDT)
commitb6deeedc53fe903d0431108f12d0ec3eb8ecc269 (patch)
treeac5f4b20e3501f1833080034f7758edf94c6bcd8
parent27d4ab2710f28421fdcdc436713b94e7674185f1 (diff)
downloadorg.eclipse.lyo.testsuite-b6deeedc53fe903d0431108f12d0ec3eb8ecc269.zip
org.eclipse.lyo.testsuite-b6deeedc53fe903d0431108f12d0ec3eb8ecc269.tar.gz
org.eclipse.lyo.testsuite-b6deeedc53fe903d0431108f12d0ec3eb8ecc269.tar.bz2
Bug 411606 - Update TRS implementation to conform to the 2.0refs/changes/01/14101/4
specification (3 of 4) Change-Id: Ide52f6c50aa0bafb6180febef5c74cfd2cd17c41 Signed-off-by: David Terry <dgterry@us.ibm.com>
-rw-r--r--org.eclipse.lyo.testsuite.trs/pom.xml14
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/BaseTest.java88
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogCreationTest.java40
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogTest.java222
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogUpdationTest.java31
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/TRSTest.java3
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/FetchUtil.java8
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/ITRSVocabulary.java51
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/TestCore.java4
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/messages.properties8
-rw-r--r--org.eclipse.lyo.testsuite.trs/src/main/resources/config.properties4
11 files changed, 342 insertions, 131 deletions
diff --git a/org.eclipse.lyo.testsuite.trs/pom.xml b/org.eclipse.lyo.testsuite.trs/pom.xml
index e8ec70f..0e9efc4 100644
--- a/org.eclipse.lyo.testsuite.trs/pom.xml
+++ b/org.eclipse.lyo.testsuite.trs/pom.xml
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.lyo</groupId>
- <version>0.5.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<name>Toolkit Test</name>
<artifactId>org.eclipse.lyo.testsuite.trs</artifactId>
<description>Toolkit to assist with TRS implementation testing.</description>
@@ -16,12 +16,12 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
- <version>4.1.2</version>
+ <version>[4.1.2,)</version>
</dependency>
<dependency>
<groupId>org.eclipse.lyo</groupId>
<artifactId>oslc-trs</artifactId>
- <version>[0.5.0-SNAPSHOT,)</version>
+ <version>[2.0-SNAPSHOT,)</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
@@ -31,22 +31,22 @@
<dependency>
<groupId>org.eclipse.lyo.oslc4j.core</groupId>
<artifactId>oslc4j-core</artifactId>
- <version>[1.1-SNAPSHOT,)</version>
+ <version>[1.2-SNAPSHOT,)</version>
</dependency>
<dependency>
<groupId>org.eclipse.lyo.oslc4j.core</groupId>
<artifactId>oslc4j-wink</artifactId>
- <version>[1.0,)</version>
+ <version>[1.2-SNAPSHOT,)</version>
</dependency>
<dependency>
<groupId>org.eclipse.lyo.oslc4j.core</groupId>
<artifactId>oslc4j-json4j-provider</artifactId>
- <version>[1.1-SNAPSHOT,)</version>
+ <version>[1.2-SNAPSHOT,)</version>
</dependency>
<dependency>
<groupId>org.eclipse.lyo.oslc4j.core</groupId>
<artifactId>oslc4j-jena-provider</artifactId>
- <version>[1.1-SNAPSHOT,)</version>
+ <version>[1.2-SNAPSHOT,)</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/BaseTest.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/BaseTest.java
index 57a06e8..7724f15 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/BaseTest.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/BaseTest.java
@@ -12,6 +12,7 @@
* Contributors:
*
* Joseph Leong, Sujeet Mishra - Initial implementation
+ * David Terry - TRS 2.0 Specification Tests
*******************************************************************************/
package org.eclipse.lyo.testsuite.oslcv2.trs;
@@ -36,7 +37,10 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import com.hp.hpl.jena.rdf.model.Model;
+import com.hp.hpl.jena.rdf.model.ResIterator;
import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.vocabulary.RDF;
public class BaseTest extends TestCore{
private static Properties prop = null;
@@ -53,11 +57,14 @@ public class BaseTest extends TestCore{
//Read the base end point from the TRS Resource
String trsEndpoint = prop.getProperty("configTrsEndpoint");
+
+ String acceptType = prop.getProperty("acceptType");
+
httpContext =
new DefaultedHttpContext(new BasicHttpContext(), new SyncBasicHttpContext(null));
- trsResource = getResource(trsEndpoint, httpClient, httpContext);
+ trsResource = getResource(trsEndpoint, httpClient, httpContext, acceptType);
String trsEndpointBase =trsResource.getProperty(ITRSVocabulary.BASE_PROPERTY).getObject().toString();
- trsBaseResource = getResource(trsEndpointBase, httpClient, httpContext);
+ trsBaseResource = getResource(trsEndpointBase, httpClient, httpContext, acceptType);
} catch (FileNotFoundException e) {
terminateTest(Messages.getServerString("tests.general.config.properties.missing"), e);
} catch (InterruptedException e) {
@@ -123,5 +130,82 @@ public class BaseTest extends TestCore{
e.getLocalizedMessage()));
}
}
+
+ /**
+ * Validates that the RDF graph contains a ldp:Page resource with the appropriate
+ * properties when the base resource is requested.
+ */
+ @Test
+ public void testBaseHasLdpPage() {
+ // Get the model the trsBaseResource belongs to. This is because the
+ // page resource we are interested in should exist outside the base resource
+ // but at the same level as the base resource.
+ Model baseModel = trsBaseResource.getModel();
+
+ // Query the model for rdf:type ldp:Page
+ ResIterator iter =
+ baseModel.listResourcesWithProperty(RDF.type, ITRSVocabulary.PAGE_RESOURCE);
+
+ try {
+ if (iter == null || iter.hasNext() != true) {
+ throw new InvalidTRSException(
+ Messages.getServerString("validators.missing.rdf.type.ldp.page"));
+ }
+
+ Resource page = iter.nextResource();
+
+ Assert.assertTrue("Exactly one page resource should exist in the graph",
+ page != null && iter.hasNext() == false);
+ // This should always pass since we queried the model for this but
+ // validate it again just to be certain.
+ if(!page.hasProperty(RDF.type, ITRSVocabulary.PAGE_RESOURCE)) {
+ throw new InvalidTRSException(
+ Messages.getServerString("validators.missing.rdf.type.ldp.page"));
+ }
+
+ // Verify the ldp:Page has a ldp:nextPage property
+ if(!page.hasProperty(ITRSVocabulary.NEXT_PAGE_PROPERTY)) {
+ throw new InvalidTRSException(
+ Messages.getServerString("validators.missing.ldp.next.page"));
+ }
+
+ // Verify the ldp:Page has a ldp:pageOf property that points back to
+ // the trsBaseResource aggregate container.
+ if(!page.hasProperty(ITRSVocabulary.PAGE_OF_RESOURCE, trsBaseResource)) {
+ throw new InvalidTRSException(
+ Messages.getServerString("validators.missing.ldp.page.of"));
+ }
+ } catch (InvalidTRSException e) {
+ e.printStackTrace();
+ Assert.fail(e.getLocalizedMessage());
+ } catch (Exception e) {
+ e.printStackTrace();
+ Assert.fail(MessageFormat.format(
+ Messages.getServerString("tests.general.error"),
+ e.getLocalizedMessage()));
+ }
+ }
+
+ /**
+ * Determine if the base resource contains the rdf:type ldp:AggregateContainer
+ * property.
+ */
+ @Test
+ public void testBaseHasType() {
+ try {
+ if(!trsBaseResource.hasProperty(RDF.type, ITRSVocabulary.CONTAINER_RESOURCE)) {
+ throw new InvalidTRSException(
+ Messages.getServerString("validators.missing.rdf.type.ldp.container"));
+ }
+ } catch (InvalidTRSException e) {
+ e.printStackTrace();
+ Assert.fail(e.getLocalizedMessage());
+ } catch (Exception e) {
+ e.printStackTrace();
+ Assert.fail(MessageFormat.format(
+ Messages.getServerString("tests.general.error"),
+ e.getLocalizedMessage()));
+ }
+ }
}
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogCreationTest.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogCreationTest.java
index 1a98754..eaf1f36 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogCreationTest.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogCreationTest.java
@@ -41,9 +41,10 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
-import com.hp.hpl.jena.rdf.model.RDFList;
-import com.hp.hpl.jena.rdf.model.RDFNode;
+import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Statement;
+import com.hp.hpl.jena.rdf.model.StmtIterator;
import com.hp.hpl.jena.vocabulary.RDF;
/**
@@ -69,6 +70,7 @@ public class ChangeLogCreationTest extends TestCore{
String resCreationContent = (prop.getProperty("configResContentFile").equals("")?prop.getProperty("configResContent"):readFileAsString(new File(RESOURCES + FileSep + prop.getProperty("configResContentFile"))));
String resContentType = prop.getProperty("configContentType");
String trsEndpoint = prop.getProperty("configTrsEndpoint");
+ String acceptType = prop.getProperty("acceptType");
httpClient = new DefaultHttpClient();
httpContext =
@@ -78,7 +80,7 @@ public class ChangeLogCreationTest extends TestCore{
createdResourceUrl=SendUtil.createResource(resCreationFactoryUri, httpClient, httpContext, resContentType,resCreationContent);
- trsResource = getResource(trsEndpoint, httpClient, httpContext);
+ trsResource = getResource(trsEndpoint, httpClient, httpContext, acceptType);
} catch (FileNotFoundException e) {
terminateTest(Messages.getServerString("tests.general.config.properties.missing"), e);
} catch (InterruptedException e) {
@@ -93,15 +95,15 @@ public class ChangeLogCreationTest extends TestCore{
}
@Test
- public void testChangeLogHasChangesProperty() {
+ public void testChangeLogHasChangeProperty() {
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)) {
- if (!changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY)) {
+ if (!changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY)) {
throw new InvalidTRSException(
- Messages.getServerString("validators.missing.trs.changes.property")); //$NON-NLS-1$
+ Messages.getServerString("validators.missing.trs.change.property")); //$NON-NLS-1$
}
}
@@ -120,21 +122,33 @@ public class ChangeLogCreationTest extends TestCore{
public void testChangeLogEventChangedPropertyHasCreatedResource() {
boolean matchFound = false;
try {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
+ // Get the trs resource's change log
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
- {
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
+ {
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
+
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
+ // Now that we have the change event, determine if it matches
+ // the change event created during the test's setup method
if (changeEvent.hasProperty(ITRSVocabulary.CHANGED_PROPERTY))
{
if (changeEvent
@@ -169,7 +183,5 @@ public class ChangeLogCreationTest extends TestCore{
Messages.getServerString("tests.general.error"),
e.getLocalizedMessage()));
}
-
}
-
}
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogTest.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogTest.java
index 2032a92..da51055 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogTest.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogTest.java
@@ -37,9 +37,11 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
-import com.hp.hpl.jena.rdf.model.RDFList;
+import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Statement;
+import com.hp.hpl.jena.rdf.model.StmtIterator;
import com.hp.hpl.jena.vocabulary.RDF;
public class ChangeLogTest extends TestCore{
@@ -55,11 +57,12 @@ public class ChangeLogTest extends TestCore{
prop = getConfigPropertiesInstance();
String trsEndpoint = prop.getProperty("configTrsEndpoint");
+ String acceptType = prop.getProperty("acceptType");
httpContext =
new DefaultedHttpContext(new BasicHttpContext(), new SyncBasicHttpContext(null));
- trsResource = getResource(trsEndpoint, httpClient, httpContext);
+ trsResource = getResource(trsEndpoint, httpClient, httpContext, acceptType);
} catch (FileNotFoundException e) {
terminateTest(Messages.getServerString("tests.general.config.properties.missing"), e);
} catch (InterruptedException e) {
@@ -72,15 +75,15 @@ public class ChangeLogTest extends TestCore{
}
@Test
- public void testChangeLogHasChangesProperty() {
+ public void testChangeLogHasChangeProperty() {
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)) {
- if (!changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY)) {
+ if (!changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY)) {
throw new InvalidTRSException(
- Messages.getServerString("validators.missing.trs.changes.property")); //$NON-NLS-1$
+ Messages.getServerString("validators.missing.trs.change.property")); //$NON-NLS-1$
}
}
@@ -96,42 +99,18 @@ public class ChangeLogTest extends TestCore{
}
@Test
- public void testChangeLogHasExactlyOneChangesProperty() {
- try {
- Resource changeLogResource =
- trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
-
- if (changeLogResource != null && !changeLogResource.equals(RDF.nil)) {
- if (changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY) && getStatementsForProp(changeLogResource,ITRSVocabulary.CHANGES_PROPERTY).toList().size()!=1) {
- throw new InvalidTRSException(
- Messages.getServerString("validators.invalid.trs.changes.property")); //$NON-NLS-1$
- }
-
- }
- } catch (InvalidTRSException e) {
- e.printStackTrace();
- Assert.fail(e.getLocalizedMessage());
- } catch (Exception e) {
- e.printStackTrace();
- Assert.fail(MessageFormat.format(
- Messages.getServerString("tests.general.error"),
- e.getLocalizedMessage()));
- }
- }
-
- @Test
- public void testChangeLogIsList() {
+ public void testChangeLogIsResource() {
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- if (!isList(changeLogResource.getProperty(ITRSVocabulary.CHANGES_PROPERTY).getObject())) {
+ if (!changeLogResource.getProperty(ITRSVocabulary.CHANGE_PROPERTY).getObject().isURIResource()) {
throw new InvalidTRSException(
- Messages.getServerString("validators.invalid.trs.changes.property")); //$NON-NLS-1$
+ Messages.getServerString("validators.invalid.trs.change.property")); //$NON-NLS-1$
}
}
@@ -148,17 +127,26 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventIsURIResource() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
+ // Get the trs resource's change log
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
+
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ RDFNode changeNode = rdfModel.getResource(trsChangeReference.getObject().toString());
- for (RDFNode changeNode : changeEvents.asJavaList()) {
if (!changeNode.isURIResource()) {
throw new InvalidTRSException(
Messages.getServerString("validators.missing.uri.change.event")); //$NON-NLS-1$
@@ -179,18 +167,27 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventType() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
@@ -219,18 +216,27 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventHasExactlyOneEventType() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
@@ -268,19 +274,28 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventHasChangedProperty() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
+
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
@@ -305,18 +320,28 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventHasExactlyOneChangedProperty() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
- {
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
+ {
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
+
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
@@ -341,18 +366,27 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventChangedPropertyIsURIResource() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
- {
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
+ {
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
@@ -378,18 +412,28 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventHasOrderProperty() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
+
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
@@ -415,19 +459,28 @@ public class ChangeLogTest extends TestCore{
@Test
public void testChangeLogEventHasExactlyOneOrderProperty() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
- {
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
+ {
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
+
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
@@ -450,18 +503,27 @@ public class ChangeLogTest extends TestCore{
}
@Test
public void testChangeLogEventOrderPropertyIsPositiveNumber() {
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogUpdationTest.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogUpdationTest.java
index 62c3b1c..1d1d3f4 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogUpdationTest.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/ChangeLogUpdationTest.java
@@ -42,9 +42,12 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.RDFList;
import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.Statement;
+import com.hp.hpl.jena.rdf.model.StmtIterator;
import com.hp.hpl.jena.vocabulary.RDF;
/**
@@ -72,6 +75,7 @@ public class ChangeLogUpdationTest extends TestCore {
String resContentType = prop.getProperty("configContentType");
String resUpdateContentType = prop.getProperty("configUpdateContentType");
String trsEndpoint = prop.getProperty("configTrsEndpoint");
+ String acceptType = prop.getProperty("acceptType");
httpClient = new DefaultHttpClient();
httpContext =
@@ -88,7 +92,7 @@ public class ChangeLogUpdationTest extends TestCore {
SendUtil.updateResource(createdResourceUrl, httpClient, httpContext,resUpdateContentType, updateContent);
- trsResource = getResource(trsEndpoint, httpClient, httpContext);
+ trsResource = getResource(trsEndpoint, httpClient, httpContext, acceptType);
} catch (FileNotFoundException e) {
@@ -124,15 +128,15 @@ public class ChangeLogUpdationTest extends TestCore {
}
@Test
- public void testChangeLogHasChangesProperty() {
+ public void testChangeLogHasChangeProperty() {
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)) {
- if (!changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY)) {
+ if (!changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY)) {
throw new InvalidTRSException(
- Messages.getServerString("validators.missing.trs.changes.property")); //$NON-NLS-1$
+ Messages.getServerString("validators.missing.trs.change.property")); //$NON-NLS-1$
}
}
@@ -150,18 +154,27 @@ public class ChangeLogUpdationTest extends TestCore {
@Test
public void testChangeLogEventChangedPropertyHasCreatedResource() {
boolean matchFound = false;
+ // Get the overall model, we will need it to follow trs:change
+ // references in the change log to the actual change event later.
+ Model rdfModel = trsResource.getModel();
+
try {
Resource changeLogResource =
trsResource.getPropertyResourceValue(ITRSVocabulary.CHANGELOG_PROPERTY);
if (changeLogResource != null && !changeLogResource.equals(RDF.nil)
- && changeLogResource.hasProperty(ITRSVocabulary.CHANGES_PROPERTY))
+ && changeLogResource.hasProperty(ITRSVocabulary.CHANGE_PROPERTY))
{
- RDFList changeEvents =
- changeLogResource.getPropertyResourceValue(ITRSVocabulary.CHANGES_PROPERTY).as(RDFList.class);
+ // Iterate over all trs:change properties referenced by the change log
+ StmtIterator iter = changeLogResource.listProperties(ITRSVocabulary.CHANGE_PROPERTY);
- for (RDFNode changeNode : changeEvents.asJavaList()) {
- Resource changeEvent = changeNode.asResource();
+ while (iter.hasNext()) {
+ Statement trsChangeReference = iter.nextStatement();
+
+ // Obtain the actual change event resource using the URI
+ // mentioned in the change log's trs:change property we are
+ // currently examining
+ Resource changeEvent = rdfModel.getResource(trsChangeReference.getObject().toString());
if (RDF.nil.getURI().equals(changeEvent.getURI()))
break;
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/TRSTest.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/TRSTest.java
index 6da57c0..ea881f6 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/TRSTest.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/oslcv2/trs/TRSTest.java
@@ -52,11 +52,12 @@ public class TRSTest extends TestCore{
prop = getConfigPropertiesInstance();
String trsEndpoint = prop.getProperty("configTrsEndpoint");
+ String acceptType = prop.getProperty("acceptType");
httpContext =
new DefaultedHttpContext(new BasicHttpContext(), new SyncBasicHttpContext(null));
- trsResource = getResource(trsEndpoint, httpClient, httpContext);
+ trsResource = getResource(trsEndpoint, httpClient, httpContext, acceptType);
} catch (FileNotFoundException e) {
terminateTest(Messages.getServerString("tests.general.config.properties.missing"), e);
} catch (InterruptedException e) {
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/FetchUtil.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/FetchUtil.java
index a586269..de0f749 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/FetchUtil.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/FetchUtil.java
@@ -33,7 +33,7 @@ import com.hp.hpl.jena.rdf.model.Model;
*/
public class FetchUtil {
/**
- * Fetches an application/rdf+xml resource. In case of success, this method
+ * Fetches a resource. In case of success, this method
* returns an instance of the {@link Model}.
*
* @param uri
@@ -42,6 +42,8 @@ public class FetchUtil {
* client used to fetch the resource
* @param httpContext
* http context to use for the call
+ * @param acceptType
+ * value to use in the accept header
* @throws InterruptedException
* if the thread is interrupted
* @throws FetchException
@@ -50,7 +52,7 @@ public class FetchUtil {
* if an error occurs while updating the retryable error
* information into the error handler
*/
- public static Model fetchResource(String uri, HttpClient httpClient, HttpContext httpContext)
+ public static Model fetchResource(String uri, HttpClient httpClient, HttpContext httpContext, String acceptType)
throws InterruptedException, FetchException
{
if (uri == null)
@@ -67,7 +69,7 @@ public class FetchUtil {
HttpGet get = new HttpGet(uri);
- get.setHeader(HttpConstants.ACCEPT, HttpConstants.CT_APPLICATION_RDF_XML);
+ get.setHeader(HttpConstants.ACCEPT, acceptType);
// Caches must revalidate with origin server. This is to prevent a cache
// from serving stale data. We may still get a cached response if the
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/ITRSVocabulary.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/ITRSVocabulary.java
index 077fb86..ff45399 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/ITRSVocabulary.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/ITRSVocabulary.java
@@ -12,6 +12,7 @@
* Contributors:
*
* Joseph Leong, Sujeet Mishra - Initial implementation
+ * David Terry - Add fields for TRS 2.0 compliance
*******************************************************************************/
package org.eclipse.lyo.testsuite.server.trsutils;
@@ -34,7 +35,7 @@ public interface ITRSVocabulary {
public static final String CUTOFFEVENT_LOCALNAME = "cutoffEvent"; //$NON-NLS-1$
public static final String NEXT_LOCALNAME = "nextPage"; //$NON-NLS-1$
public static final String CHANGELOG_LOCALNAME = "changeLog"; //$NON-NLS-1$
- public static final String CHANGES_LOCALNAME = "changes"; //$NON-NLS-1$
+ public static final String CHANGE_LOCALNAME = "change"; //$NON-NLS-1$
public static final String CHANGED_LOCALNAME = "changed"; //$NON-NLS-1$
public static final String ORDER_LOCALNAME = "order"; //$NON-NLS-1$
public static final String PREVIOUS_LOCALNAME = "previous"; //$NON-NLS-1$
@@ -42,11 +43,14 @@ public interface ITRSVocabulary {
public static final String CREATION_LOCALNAME = "Creation"; //$NON-NLS-1$
public static final String MODIFICATION_LOCALNAME = "Modification"; //$NON-NLS-1$
public static final String DELETION_LOCALNAME = "Deletion"; //$NON-NLS-1$
+ public static final String AGGREGATE_CONTAINER_LOCALNAME = "AggregateContainer"; //$NON-NLS-1$
+ public static final String PAGE_LOCALNAME = "Page"; //$NON-NLS-1$
+ public static final String PAGE_OF_LOCALNAME = "pageOf"; //$NON-NLS-1$
/**
* The namespace of the vocabulary as a string
*/
- public static final String NS = "http://jazz.net/ns/trs#"; //$NON-NLS-1$
+ public static final String NS = "http://open-services.net/ns/core/trs#"; //$NON-NLS-1$
/**
* Get a specific vocabulary within the TRS provider as a string
@@ -75,22 +79,16 @@ public interface ITRSVocabulary {
CUTOFFEVENT_LOCALNAME);
/**
- * The property for the next page predicate in a TRS or base resource
- */
- public static final Property NEXT_PAGE_PROPERTY = ResourceFactory.createProperty(NS,
- NEXT_LOCALNAME);
-
- /**
* The property for a change log predicate within a tracked resource set
*/
public static final Property CHANGELOG_PROPERTY = ResourceFactory.createProperty(NS,
CHANGELOG_LOCALNAME);
/**
- * The property for the changes predicate in a TRS
+ * The property for the change predicate in a TRS
*/
- public static final Property CHANGES_PROPERTY = ResourceFactory.createProperty(NS,
- CHANGES_LOCALNAME);
+ public static final Property CHANGE_PROPERTY = ResourceFactory.createProperty(NS,
+ CHANGE_LOCALNAME);
/**
* The property for the changes predicate of a change log entry
@@ -134,4 +132,35 @@ public interface ITRSVocabulary {
public static final Resource DELETION_RESOURCE = ResourceFactory.createResource(NS
+ DELETION_LOCALNAME);
+ // LDP related namespace, resources, and properties
+ /**
+ * Namespace for the Linked Data Platform
+ */
+ public static final String LDP_NS = "http://www.w3.org/ns/ldp#"; //$NON-NLS-1$
+
+ /**
+ * The AggregateContainer resource type used by the base resource
+ */
+ public static final Resource CONTAINER_RESOURCE = ResourceFactory.createResource(LDP_NS
+ + AGGREGATE_CONTAINER_LOCALNAME);
+
+ /**
+ * The Page resource type used by the base resource to reference the next
+ * page in the base sequence.
+ */
+ public static final Resource PAGE_RESOURCE = ResourceFactory.createResource(LDP_NS
+ + PAGE_LOCALNAME);
+
+ /**
+ * A reference back to the aggregate container this page belongs to
+ */
+ public static final Property PAGE_OF_RESOURCE = ResourceFactory.createProperty(LDP_NS
+ + PAGE_OF_LOCALNAME);
+
+ /**
+ * The property for the next page resource in a base resource
+ */
+ public static final Property NEXT_PAGE_PROPERTY = ResourceFactory.createProperty(LDP_NS,
+ NEXT_LOCALNAME);
+
} \ No newline at end of file
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/TestCore.java b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/TestCore.java
index 1ecd6aa..6a825b6 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/TestCore.java
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/TestCore.java
@@ -49,10 +49,10 @@ public class TestCore {
}
}
- protected static Resource getResource(String uri, HttpClient httpClient, HttpContext httpContext)
+ protected static Resource getResource(String uri, HttpClient httpClient, HttpContext httpContext, String acceptType)
throws InterruptedException, FetchException
{
- Model model = FetchUtil.fetchResource(uri, httpClient, httpContext);
+ Model model = FetchUtil.fetchResource(uri, httpClient, httpContext, acceptType);
return model.createResource(uri);
}
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/messages.properties b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/messages.properties
index 8b507f6..b36d5df 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/messages.properties
+++ b/org.eclipse.lyo.testsuite.trs/src/main/java/org/eclipse/lyo/testsuite/server/trsutils/messages.properties
@@ -48,15 +48,19 @@ http.response.util.no.instance = Instance creation is not supported
validators.invalid.trs.base.property = Invalid trs:base property
validators.invalid.trs.changed.property = Invalid trs:changed property
validators.invalid.trs.changelog.property = Invalid trs:changeLog property
-validators.invalid.trs.changes.property = Invalid trs:changes property
+validators.invalid.trs.change.property = Invalid trs:change property
validators.invalid.trs.cutoffevent.property = Invalid trs:cutoffEvent property
validators.invalid.type.change.event = Invalid rdf:type
validators.invalid.trs.order.property = Invalid trs:order property
+validators.missing.ldp.next.page = Missing ldp:nextPage property
+validators.missing.ldp.page.of = Missing or invalid ldp:pageOf property
validators.missing.rdf.type.oslc.trs = Missing rdf:type trs:TrackedResourceSet
+validators.missing.rdf.type.ldp.container = Missing rdf:type ldp:AggregateContainer
+validators.missing.rdf.type.ldp.page = Missing rdf:type ldp:Page
validators.missing.trs.base.property = Missing trs:base property
validators.missing.trs.changed.property = Missing trs:changed property
validators.missing.trs.changelog.property = Missing trs:changeLog property
-validators.missing.trs.changes.property = Missing trs:changes property
+validators.missing.trs.change.property = Missing trs:change property
validators.missing.trs.cutoffevent.property = Missing trs:cutoffEvent property
validators.missing.trs.order.property = Missing trs:order property
validators.missing.type.change.event = Missing the type of the Change Event. One of trs:Creation, trs:Modification, or trs:Deletion.
diff --git a/org.eclipse.lyo.testsuite.trs/src/main/resources/config.properties b/org.eclipse.lyo.testsuite.trs/src/main/resources/config.properties
index 57d2daa..61c8342 100644
--- a/org.eclipse.lyo.testsuite.trs/src/main/resources/config.properties
+++ b/org.eclipse.lyo.testsuite.trs/src/main/resources/config.properties
@@ -1,4 +1,8 @@
##TRS service configuration Parameters##
+
+#Accept Type for obtaining a REST resource.
+acceptType = text/turtle
+
#End Point for the TRS Service
configTrsEndpoint = http://localhost:8082/org.eclipse.lyo.rio.trs/rest/trs