Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Number the proposals, clarify language

...

LDP ConceptFedora ConceptLDP Interaction ModesConstraints on Content
LDPCObjectLDPC, LDP-RSRDF, must contain LDP membership triples, subjects must be repository objects, subjects must be the URI of the object
LDP-NRDatastreamLDPR for properties, LDP-NR for bitstreamnone
LDP-RS-NC---

The issue at hand is whether Fedora should support the LDP construct of an RDF source that is not also a container (LDP-RS-NC), and how such an resource in LDP would map to a concept in Fedora.

 

 

 

Proposal 1:  Fedora container object with a child resource at a specified path redirecting to external content

LDP to Fedora mapping

LDP ConceptFedora ConceptLDP Interaction ModesConstraints on Content
LDPCObjectLDPC, LDP-RSRDF, must contain LDP membership triples, subjects must be repository objects, subjects must be the URI of the object
LDP-NRDatastreamLDPR for properties, LDP-NR for bitstreamnone
LDP-RS-NC---

Note that this proposal maintains the current behaviour in that LDP-RS-NC is not supported.

...

Code Block
languagexml
curl -H "Accept: text/turtle" -H "Prefer:  return=representation; include=\"http://fedora.info/definitions/v4/repository#EmbedResources\";" "http://localhost:8080/rest/my_external_datastream_obj"

<http://localhost:8080/rest/my_external_datastream_obj> a ldp:RDFSource , ldp:Container , <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , fedora:Container , fedora:Resource , fedora:Resource , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0referenceable> ;
        fedora:lastModifiedBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:uuid "fe7a8497-d826-490d-a786-ba601e039055"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:createdBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:primaryType "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:created "2015-03-12T20:56:08.468Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        fedora:mixinTypes "fedora:Container"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:Resource"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:lastModified "2015-03-12T21:08:33.787Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        fedora:writable "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
        fedora:hasParent <http://localhost:8080/rest/> ;
        ldp:contains <http://localhost:8080/rest/my_external_datastream_obj/extds> .

<http://localhost:8080/rest/my_external_datastream_obj/extds> a <http://www.jcp.org/jcr/nt/1.0resource> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0mimeType> , <http://www.jcp.org/jcr/mix/1.0lastModified> , fedora:Binary , fedora:Resource , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0referenceable> ;
        fedora:lastModifiedBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:uuid "86aa4107-768d-4e2d-9064-78be072c0888"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:mimeType "message/external-body; access-type=URL; url=\"http://en.wikipedia.org/wiki/File:Harry_Whittier_Frees_-_What%27s_Delaying_My_Dinner.jpg\""^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:digest <urn:sha1:da39a3ee5e6b4b0d3255bfef95601890afd80709> ;
        premis:hasSize "0"^^<http://www.w3.org/2001/XMLSchema#long> ;
        fedora:createdBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:primaryType "nt:resource"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:created "2015-03-12T21:08:33.787Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        fedora:mixinTypes "fedora:Binary"^^<http://www.w3.org/2001/XMLSchema#string> ;
        fedora:lastModified "2015-03-12T21:08:33.787Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
        premis:hasOriginalName ""^^<http://www.w3.org/2001/XMLSchema#string> .

<http://localhost:8080/rest/my_external_datastream_obj> fedora:exportsAs <http://localhost:8080/rest/my_external_datastream_obj/fcr:export?format=jcr/xml> .

<http://localhost:8080/rest/my_external_datastream_obj/fcr:export?format=jcr/xml> dc:format <http://fedora.info/definitions/v4/repository#jcr/xml> .

<http://fedora.info/definitions/v4/repository#jcr/xml> rdfs:label "jcr/xml"^^<http://www.w3.org/2001/XMLSchema#string> .

Proposal 2: LDP-RS as datastreams

In this proposal, an LDP-RS-NC maps to a Fedora datastream.  In the fedora object model, they are no different from the datastreams that already exist, and have no inherent characteristics that make them different in any way.  The difference lies in the HTTP API, in that they support the LDP-RS interaction mode as described in the background section of this document. 

...

LDP ConceptFedora ConceptLDP Interaction ModesConstraints on Content
LDPCObjectLDPC, LDP-RSRDF, must contain LDP membership triples, subjects must be repository objects, subjects must be the URI of the object
LDP-NRDatastreamLDPR for properties, LDP-NR for bitstreamnone
LDP-RS-NCDatastreamSpecial datastreamLDPR, LDP-RSRDF

Note that 'Objects' objects in the Fedora model map to the LDPC interaction model, while 'Datastreams' in Fedora any resource that provides a datastream's properties and the new special type of datastream introduced here both map to the LDPR interaction model. The distinguishing factor of a Fedora object, as exposed by LDP, is that it is a container.  The distinguishing factor of a special datastream, exposed in LDP, is that it is not a container (i.e. it is a leaf node in the LDP model).

...

  1. The Fedora object model does not change at all with this proposal
  2. The LDP-RS-NCs created by Fedora may contain arbitrary RDF.  This is a consequence of their 'datastream' nature, in that their content is largely opaque to the Fedora model.  They are blobs, so there is no inherent need to constrain their content other than to verify that they contain RDF as implied by an LDP-RS.
    1. No inherent restriction on allowable subjects, predicates, or objects in the triples
    2. No inherent restriction on constructs such as blank nodes
    3. This implies an unknown but high cost for implementation.
  3. The LDP-RS-NCs created to by Fedora may be 'pure' in that they are logically unmodified from client requests.  Again, this is due to their nature as an opaque datastream as far as the fedora model is concerned.  
    1. No server managed triples are added by Fedora
  4. The LDP-RS-NCs benefit from the LDP-RS interaction model as defined by LDP on these resources:
    1. Retrieve triples in specified representation (xml, turtle, ntriples, etc); as per LDP spec text/turtle and application/ld+json representations are always available.
    2. SPARQL Update semantics (PATCH)
    3. Interpretation of relative URIs in RDF content as per the LDP spec (for example, allowing null relative URIs "<>" to refer to the to-be-created resource URI)
    4. This also implies an unknown but high cost for implementation.

If it helps, this proposal can be also be conceptualized as a kind of 'service' provided on top of a datastream to provide an enhanced RDF CRUD API that neatly maps to an LDP concept that Fedora does not currently support, but most LDP servers do.  

...

  1. Fedora may describe these resources using slightly different metadata in their corresponding 'fcr:metadata' resources.
    1. For example, "fedora:mixinTypes "fedora:NonRdfSourceDescription"^^<http://www.w3.org/2001/XMLSchema#string>" is probably not appropriate.
  2. Basic validation as well-formed RDF or SPARQL/update statements is a prerequisite for accepting content.
  3. The binary representation of an LDP-RS-NC as persisted in Fedora as datastream content may potentially be opaque (a decision would need to be made on this)
    1. The serialization format may be specified in advance.  For example, Fedora may chose to serialize as turtle, always
    2. Fedora may perhaps chose to store the exact binary content supplied by the client via PUT, and record metadata indicating which RDF serialization had been persisted.
    3. Likewise, the content may be entirely opaque, leaving it an implementation decision that can change at any time.

Proposal 3:  LDPRs as "Pointlike objects"

In this view, LDP-RS-NCs appear in the repository as objects without datastreams or contained objects. They would possess all the functions of other objects, except that attempts to add children to them (datastreams or child objects) would fail under all circumstances. They could support the interaction described in section 5.2.3.4 of the LDP specification, if a client so specifies in the appropriate way when creating one. Their serializations would be no different from those of any other object, nor would they offer a special binary representation of any kind, other than as provided for by any object in the repository.

...

LDP ConceptFedora ConceptLDP Interaction ModesConstraints on Content
LDPCObjectLDPC, LDP-RSRDF, must contain LDP membership triples, subjects must be repository objects, subjects must be the URI of the object
LDP-NRDatastreamLDPR for properties, LDP-NR for bitstreamnone
LDP-RS-NCObjectLDPR, LDP-RSRDF, subjects must be repository objects, subjects must be the URI of the object

Note that 'Objects' objects in the Fedora model map to the LDP-RS interaction model, while 'Datastreams' datastreams in Fedora map to the LDPR and LDP-NR interaction model.  The distinguishing factor of a Fedora object, as exposed by LDP, is that is an RDF source.   The distinguishing factor of a datastream is that it is a non-RDF sourcemodels.

Proposal 4: LDPRs as "Pointlike objects" with no constraints on RDF statements.

(This is included largely for completeness sake, but it is very interesting)

This is like the "LDPRs as pointlike objects" proposal, except that it removes Fedora's existing constraints on triples associated with objects in general.  In this view, a Fedora object an LDP-RS can be seen as a bag of triples with an identity (named graph).  Fedora enhances the value of these bags resources by defining an ontology, and maintaining a set of triples that express its identity in the Fedora object model according to this ontology.  This bestows LDP-RS resources with the identity and structure of Fedora objects.  Triples within an LDP-RS that are not part of the Fedora model, and violate Fedora's assumptions (such as "subjects must be the URI of the resource") are preserved as part of the resource and named by its URI, but may be ignored by services that are build on top of the Fedora object model.  Users of Fedora can embrace or extend the Fedora model, or ignore it completely.  

LDP ConceptFedora ConceptLDP Interaction ModesConstraints on Content
LDPCObjectLDPC, LDP-RSRDF, must contain LDP membership triples
LDP-NRDatastreamLDPR for properties, LDP-NR for bitstreamnone
LDP-RS-NCObjectLDPR, LDP-RSRDF

Note that 'Objects' in the Fedora model map to the LDP-RS interaction model, while 'Datastreams' in Fedora map to the LDP-NR interaction model.  The distinguishing factor of a Fedora object, as exposed by LDP, is that is an RDF source.   The distinguishing factor of the resource that provides a datastream's bitstream is that it is a non-RDF source.

...