This proposal defines a general baselining capability. There are two concepts: a camera capability for finding or making immutable snapshots, copies, or versions of resources, and a Baseline resource that holds links to members of a baseline. The camera capability manipulates resources from a single OSLC provider; the baseline capability allows arbitrary resources to be members of a baseline, including non-OSLC and non-RDF resources.
Note : this proposal is not recommended; it is over-complex, and is included only as a basis for discussion of where resource rewriting might lead. For an overall description of the baseline scope and scenarios, and links to current proposals, see Baselines In Oslc.
An OSLC service provider MAY provide a camera capability, to form or discover immutable snapshots, copies, or versions of its resources. The camera also identifies dependent resources – those that should be part of a snapshot. The camera capability is indicated by the presence of a camera property on the service provider resource, giving the URI of the camera, as well as information about the snapshots currently in progress.
Additional property on oslc:ServiceProvider
resource:
Prefixed Name | Occurs | Value-type | Repr. | Range | Description |
---|---|---|---|---|---|
oslc:camera | zero-or-one | Resource | Either | oslc:SnapshotRequest | The camera capability for this service provider. A GET on this resource returns the set of interim snapshot request resources that currently exist; a POST on this resource is a request to perform a snapshot of one or more resources. |
The oslc:SnapshotRequest
resource has the following properties:
Prefixed Name | Occurs | Value-type | Repr. | Range![]() |
Description |
---|---|---|---|---|---|
oslc:externals | zero-or-many | Resource | Reference | Any | The resources in set R3 (see below). |
oslc:resourceMap | one-or-many | Local Resource | Inline | n/a | The map of original URIs to the equivalent immutable URIs, for resources in the sets R1 and R2 (see below). There must be at least one map entry, since there must be at least one original URI in a snapshot request; it is an error to request a snapshot of no resources. |
The oslc:resourceMap
property is a blank node with the following properties:
Prefixed Name | Occurs | Value-type | Repr. | Range | Description |
---|---|---|---|---|---|
oslc:originalResource | exactly-one | Resource | Reference | Any | The original resource |
oslc:immutableResource | exactly-one | Resource | Reference | Any | A reference to what is or will be an immutable equivalent of the original resource; it is possible that this is the same as the original resource URI. |
oslc:readOnly
state predicate set to true.
oslc:readOnly
state predicate set to true.
If a client finds a resource in any of the S3 external references for which the service provider is unknown, not an OSLC provider, or a provider that does not offer the camera service, it is up to the client how to proceed. The client could decide to abandon the snapshot process (when doing this the client SHOULD delete all open SnapshotRequest resources), or it could just leave that resource out of the snapshot, or it could arrange to make its own immutable copy of that resource and add the resulting URI to the map.
Recently created snapshots can be found by performing a GET on the camera and examining the SnapshotRequest resources. If we feel there is a need to find all snapshots, the last step above could be modified to allow auto-deletion only for SnapshotRequest resources that were never completed.
The snapshots for a given resource could be found if we added an oslc:snapshotOf
property to a snapshot - though this might not make sense for providers that use versions, where a snapshot might be taken by making the existing version immutable, so the oslc:snapshotOf
property would either always point to itself (which is not very useful) or to some other version such as the next or last version (neither of which would necessarily be very meaningful).
This baseline resource is adapted from the OSLC SCM baseline, for a more general usage across OSLC:
Prefixed Name | Occurs | Value-type | Representation | Range | Description |
---|---|---|---|---|---|
Dublin Core properties | |||||
dcterms:created | zero-or-one | DateTime | n/a | n/a | Timestamp of resource creation (reference: Dublin Core) |
dcterms:creator | zero-or-many | Resource | either | any | Creator or creators of resource (reference: Dublin Core). It is likely that the target resource is a foaf:Person but that is not necessarily the case. |
dcterms:description | zero-or-one | XMLLiteral | n/a | n/a | Descriptive text (reference: Dublin Core) about resource represented as rich text in XHTML content; this SHOULD include only content that is valid and suitable inside an XHTML <div> element. This is intended to be a a human-readable description of the baseline. |
dcterms:identifier | zero-or-one | String | n/a | n/a | An internal identifier, usually assigned by the service provider. If this property exists, its value SHOULD be unique amongst all currently existing baseline resources from this service provider. The string is not necessarily intended to be conveniently readable to humans. |
dcterms:modified | zero-or-one | DateTime | n/a | n/a | Timestamp of the latest resource modification (reference: Dublin Core) |
dcterms:shortTitle | zero-or-one | String | n/a | n/a | A short name that is often used for an abbreviated identifier and used for presentation to end-users. |
dcterms:subject | zero-or-many | String | n/a | n/a | Tag or keyword for a resource. Each occurrence of a dcterms:subject property denotes an additional tag for the resource. |
dcterms:title | zero-or-one | XMLLiteral | n/a | n/a | Title (reference: Dublin Core) of the resource represented as rich text in XHTML content; this SHOULD include only content that is valid inside an XHTML <span> element. This is intended to be a human readable name or synopsis of the baseline. |
Other common properties | |||||
oslc:instanceShape | zero-or-one | Resource | reference | oslc:ResourceShape |
Resource Shape that specifies allowed and required fields. |
oslc:serviceProvider | zero-or-one | Resource | reference | oslc:ServiceProvider |
A link to the resource's OSLC Service Provider. |
oslc:readOnly | zero-or-one | Boolean | n/a | n/a | A read-only state predicate indicating whether or not the resource is an immutable version or snapshot; if this value is true , the resource SHOULD NOT be modifiable. |
rdf:type | one-or-many | Resource | reference | n/a | The resource type URI |
Baseline-specific properties | |||||
rdfs:member | zero-or-many | Resource | reference | any | A resource that is a member of this baseline. Such a resource SHOULD NOT be modifiable. |
The proposals above use the property rdfs:member
for the immediate members of a baseline, and provider-specific properties for dependent resources.
When forming a baseline, a client can snapshot one or more resources, and then either add just the immutable versions of those original resources to a baseline, or add those and the immutable versions of all the dependent resources as well.
When examining the contents of a baseline, a client can see the immediate members of that baseline. If the baseline was created without adding all the dependent members, a client must have provider-specific knowledge about how to navigate through the resource graph to find all dependent resources.