summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Terry2013-07-19 09:34:45 (EDT)
committer David Terry2013-07-19 09:45:38 (EDT)
commit2a186cacfa072ace979e99ca1e5e00cf64c3b4ca (patch)
treedbd2a064f096944ed34f4ac5b8d84554cce3d176
parent6f9dcf77e6ceb508e37f490774914d255768d7ec (diff)
downloadorg.eclipse.lyo.core-2a186cacfa072ace979e99ca1e5e00cf64c3b4ca.zip
org.eclipse.lyo.core-2a186cacfa072ace979e99ca1e5e00cf64c3b4ca.tar.gz
org.eclipse.lyo.core-2a186cacfa072ace979e99ca1e5e00cf64c3b4ca.tar.bz2
[413313] Update TRS implementation to react to ldp:Container change (1refs/changes/01/14701/1
of 3) Change the code base to use ldp:Container instead of ldp:AggregateContainer Change-Id: I28f0d5349ceac182a7e7b1935cf3251232f3530a Signed-off-by: David Terry <dgterry@us.ibm.com>
-rw-r--r--org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/Base.java24
-rw-r--r--org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/ChangeLog.java28
-rw-r--r--org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TRSConstants.java4
-rw-r--r--org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TrackedResourceSet.java2
4 files changed, 33 insertions, 25 deletions
diff --git a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/Base.java b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/Base.java
index 4fe5622..f51f844 100644
--- a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/Base.java
+++ b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/Base.java
@@ -16,9 +16,9 @@
*******************************************************************************/
package org.eclipse.lyo.core.trs;
-import static org.eclipse.lyo.core.trs.TRSConstants.LDP_AGGREGATE_CONTAINER;
+import static org.eclipse.lyo.core.trs.TRSConstants.LDP_CONTAINER;
import static org.eclipse.lyo.core.trs.TRSConstants.LDP_NAMESPACE;
-import static org.eclipse.lyo.core.trs.TRSConstants.LDP_TERM_AGGREGATE_CONTAINER;
+import static org.eclipse.lyo.core.trs.TRSConstants.LDP_TERM_CONTAINER;
import static org.eclipse.lyo.core.trs.TRSConstants.RDFS_MEMBER;
import static org.eclipse.lyo.core.trs.TRSConstants.RDFS_TERM_MEMBER;
import static org.eclipse.lyo.core.trs.TRSConstants.TRS_CUTOFFEVENT;
@@ -50,14 +50,14 @@ import org.eclipse.lyo.oslc4j.core.model.AbstractResource;
*
* {@code
* <https://.../baseResources>
- * a ldp:AggregateContainer;
- * trs:cutoffEvent <#1> ;
- * rdfs:member <https://.../WorkItem/1> ;
- * rdfs:member <https://.../WorkItem/2> ;
- * rdfs:member <https://.../WorkItem/3> ;
- * ...
- * rdfs:member <https://.../WorkItem/199> ;
- * rdfs:member <https://.../WorkItem/200> .
+ * a ldp:Container;
+ * trs:cutoffEvent <urn:urn-3:cm1.example.com:2010-10-27T17:39:31.000Z:101> ;
+ * rdfs:member <http://cm1.example.com/bugs/1> ;
+ * rdfs:member <http://cm1.example.com/bugs/2> ;
+ * rdfs:member <http://cm1.example.com/bugs/3> ;
+ * ...
+ * rdfs:member <http://cm1.example.com/bugs/199> ;
+ * rdfs:member <http://cm1.example.com/bugs/200> .
* }
* </pre>
*
@@ -130,8 +130,8 @@ import org.eclipse.lyo.oslc4j.core.model.AbstractResource;
* that resource.
*/
@OslcNamespace(LDP_NAMESPACE)
-@OslcName(LDP_TERM_AGGREGATE_CONTAINER)
-@OslcResourceShape(title = "Tracked Resource Set Base Shape", describes = LDP_AGGREGATE_CONTAINER)
+@OslcName(LDP_TERM_CONTAINER)
+@OslcResourceShape(title = "Tracked Resource Set Base Shape", describes = LDP_CONTAINER)
public class Base extends AbstractResource {
private List<URI> members;
private URI cutoffEvent;
diff --git a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/ChangeLog.java b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/ChangeLog.java
index 54a7208..42fc3c9 100644
--- a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/ChangeLog.java
+++ b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/ChangeLog.java
@@ -49,34 +49,39 @@ import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle;
* trs:base <http://cm1.example.com/baseResources> ;
* trs:changeLog [
* a trs:ChangeLog ;
- * trs:change <#3>, <#2>, <#1>.
+ * trs:change <urn:urn-3:cm1.example.com:2010-10-27T17:39:33.000Z:103> ;
+ * trs:change <urn:urn-3:cm1.example.com:2010-10-27T17:39:32.000Z:102> ;
+ * trs:change <urn:urn-3:cm1.example.com:2010-10-27T17:39:31.000Z:101> .
* ] .
*
- * <#3>
+ * <urn:urn-3:cm1.example.com:2010-10-27T17:39:33.000Z:103>
* a trs:Creation ;
* trs:changed <http://cm1.example.com/bugs/23> ;
* trs:order "103"^^xsd:integer .
*
- * <#2>
+ * <urn:urn-3:cm1.example.com:2010-10-27T17:39:32.000Z:102>
* a trs:Modification ;
* trs:changed <http://cm1.example.com/bugs/22> ;
* trs:order "102"^^xsd:integer .
*
- * <#1>
+ * <urn:urn-3:cm1.example.com:2010-10-27T17:39:31.000Z:101>
* a trs:Deletion ;
* trs:changed <http://cm1.example.com/bugs/21> ;
* trs:order "101"^^xsd:integer .
* }
* </pre>
*
- * <p> As shown, a Change Log provides a set of Change Event entries in a
+ * <p>
+ * As shown, a Change Log provides a set of Change Event entries in a
* multi-valued RDF property called trs:change.
*
- * <p> Change Events MUST have URIs (i.e., they cannot be Blank Nodes) to allow
+ * <p>
+ * Change Events MUST have URIs (i.e., they cannot be Blank Nodes) to allow
* Clients to recognize entries they have seen before. The URI is only used to
* identify an event (i.e., it need not be HTTP GETable).
*
- * <p> Each Change Event has a sequence number, trs:order; sequence numbers are
+ * <p>
+ * Each Change Event has a sequence number, trs:order; sequence numbers are
* non-negative integer values that increase over time. A Change Event entry
* carries the URI of the changed Resource, trs:changed, and an indication, via
* rdf:type (a.k.a. "a" in Turtle), of whether the Resource was added to the
@@ -88,14 +93,16 @@ import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle;
* previous ones. The sequence numbers MAY be consecutive numbers but need not
* be.
*
- * <p> Note that the actual time of change is not included in a Change Event. Only a
+ * <p>
+ * Note that the actual time of change is not included in a Change Event. Only a
* sequence number, representing the "sequence in time" of each change is
* provided. The URI of a Change Event MUST be guaranteed unique, even in the
* wake of a Server roll back where sequence numbers get reused. A time stamp
* MAY be used to generate such a URI, as in the above example, although other
* ways of generating a unique URI are also possible.
*
- * <p> A Change Log represents a series of changes to its corresponding Resource Set
+ * <p>
+ * A Change Log represents a series of changes to its corresponding Resource Set
* over some period of time. The Change Log MUST contain Change Events for every
* Resource creation, deletion, and modification during that period. A Server
* MUST report a Resource modification event if a GET on it would return a
@@ -109,7 +116,8 @@ import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle;
* "false"), replaced vocabulary term used (e.g. change from dcterms:title to
* rdfs:label).
*
- * <p> The Server SHOULD NOT report unnecessary Change Events although it might
+ * <p>
+ * The Server SHOULD NOT report unnecessary Change Events although it might
* happen, for example, if changes occur while the base is being computed. A
* Client SHOULD ignore a creation event for a Resource that is already a member
* of the Resource Set, and SHOULD ignore a deletion or modification event for a
diff --git a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TRSConstants.java b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TRSConstants.java
index 404337c..8d71c5d 100644
--- a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TRSConstants.java
+++ b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TRSConstants.java
@@ -96,8 +96,8 @@ public interface TRSConstants extends OslcConstants {
//LDP Constants
public static final String LDP_NAMESPACE_PREFIX = "ldp";
public static final String LDP_NAMESPACE = "http://www.w3.org/ns/ldp#";
- public static final String LDP_TERM_AGGREGATE_CONTAINER = "AggregateContainer";
- public static final String LDP_AGGREGATE_CONTAINER = LDP_NAMESPACE + LDP_TERM_AGGREGATE_CONTAINER;
+ public static final String LDP_TERM_CONTAINER = "Container";
+ public static final String LDP_CONTAINER = LDP_NAMESPACE + LDP_TERM_CONTAINER;
public static final String LDP_TERM_PAGE = "Page";
public static final String LDP_PAGE = LDP_NAMESPACE + LDP_TERM_PAGE;
public static final String LDP_TERM_NEXT_PAGE = "nextPage"; //$NON-NLS-1$
diff --git a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TrackedResourceSet.java b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TrackedResourceSet.java
index 21e91c2..54377db 100644
--- a/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TrackedResourceSet.java
+++ b/org.eclipse.lyo.core.trs/src/main/java/org/eclipse/lyo/core/trs/TrackedResourceSet.java
@@ -43,7 +43,7 @@ import static org.eclipse.lyo.core.trs.TRSConstants.*;
trs:base <http://cm1.example.com/baseResources> ;
trs:changeLog [
a trs:ChangeLog ;
- trs:changes ( ... ) .
+ trs:changes ... .
] .
}
</pre>