Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.lyo.core.trs
Class Base

    java.lang.Object
      org.eclipse.lyo.oslc4j.core.model.AbstractResource
          org.eclipse.lyo.core.trs.Base

All Implemented Interfaces:
  IExtendedResource, IResource

    public class Base

extends AbstractResource

The Base of a Tracked Resource Set is a W3C Linked Data Platform (LDP) Container where each member references a Resource that was in the Resource Set at the time the Base was computed. HTTP GET on a Base URI returns an RDF container with the following structure:

     @prefix trs: <http://open-services.net/ns/core/trs#> .
     @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
     @prefix ldp: <http://www.w3.org/ns/ldp#> .

     <https://.../baseResources>
      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> .

Each Resource in the Resource Set MUST be referenced from the container using an rdfs:member predicate. The Base MAY be broken into multiple pages in which case the Server will respond with a 30x redirect message, directing the Client to the first "page resource". The representation of a page resource will contain a subset of the Base’s rdfs:member predicates. In addition, it will contain another triple, whose subject is the page resource itself (i.e., not the Base resource), with a reference to the next page:

     <https://.../baseResources/page1>
       a ldp:Page;
       ldp:pageOf <https://.../baseResource>;
       ldp:nextPage <https://../baseResources/page2> .

The last page in the list is indicated by a ldp:nextPage value of rdf:nil. The Tracked Resource Set protocol does not attach significance to the order in which a Server enumerates the resources in the Base or breaks the Base up into pages.

The first page of a Base MUST include a trs:cutoffEvent property, whose value is the URI of the most recent Change Event in the corresponding Change Log that is already reflected in the Base. This corresponds to the latest point in the Change Log from which a Client can begin incremental monitoring/updating if it wants to remain synchronized with further changes to the Resource Set. As mentioned above, the cutoff Change Event MUST appear in the non-truncated portion of the Change Log. When the trs:cutoffEvent is rdf:nil, the Base enumerates the (possibly empty) Resource Set at the beginning of time.

Because of the highly dynamic nature of the Resource Set, a Server may have difficulty enumerating the exact set of resources at a point in time. Because of that, the Base can be only an approximation of the Resource Set. A Base might omit mention of a Resource that ought to have been included or include a Resource that ought to have been omitted. For each erroneously reported Resource in the Base, the Server MUST at some point include a corrective Change Event in the Change Log more recent that the base cutoff event. The corrective Change Event corrects the picture for that Resource, allowing the Client to compute the correct set of member Resources. A corrective Change Event might not appear in the Change Log that was retrieved when the Client dereferenced the Tracked Resource Set URI. The Client might only see a corrective Change Event when it processes the Change Log resource obtained by dereferencing the Tracked Resource Set URI on later occasions.

When a Base is broken into pages, the Client will discover and retrieve Base page resources to determine the Resources in the Base. A Client MUST retrieve all the page resources of the Base. A Client MAY retrieve the Base page resources in any order, including retrieving some Base page resources in parallel. A Client retrieves the Base page resources at its own pace, and MAY retrieve any of the Base page resources more than once. If the Server allows the representation of Base page resources to vary over time, the Server MUST ensure that the set of Resources a Client would infer as members is necessarily an approximation of the Resource Set which, when corrected by Change Events after the Base’s cutoff event, yields the correct set of member Resources in the Resource Set.

A Server MUST refer to a given resource using the exact same URI in the Base ( rdfs:member reference) and every Change Event ( trs:changed reference) for that resource.

Constructor Summary
`Base()`

Method Summary
`URI` | `getCutoffEvent()`
`List<URI>` | `getMembers()`
`Page` | `getNextPage()` Return a Page object containing information about the next base page.
`void` | `setCutoffEvent(URI cutoffEvent)`
`void` | `setMembers(List<URI> members)`
`void` | `setNextPage(Page nextPage)`

Methods inherited from class org.eclipse.lyo.oslc4j.core.model.AbstractResource
`addType, getAbout, getExtendedProperties, getTypes, setAbout, setExtendedProperties, setTypes`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Base

    public Base()

Method Detail

### getMembers

    public List<URI> getMembers()

  Returns:
    the members

### setMembers

    public void setMembers(List<URI> members)

  Parameters:
    `members` - the members to set

### getCutoffEvent

    public URI getCutoffEvent()

  Returns:
    the cutoffIdentifier

### setCutoffEvent

    public void setCutoffEvent(URI cutoffEvent)

  Parameters:
    `cutoffIdentifier` - the cutoffIdentifier to set

### getNextPage

    public Page getNextPage()

  Return a Page object containing information about the next base page. The OslcHidden annotation works around a limitation in OSLC4J. If we do not hide the nextPage variable we get an incorrect ldp:nextPage reference in the Base.

  Returns:
    the nextPage

### setNextPage

    public void setNextPage(Page nextPage)

  Parameters:
    `nextPage` - the nextPage to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013. All rights reserved.