Scenario 1: Fedora dropped on top of non-Fedora aware OCFL containing RDF. 

Starting with an OCFL like this:

[/myroot]
├── 0=ocfl_1.0
├── ocfl_1.0.html (optional copy of the OCFL specification)
├── myobject1
                  ├── 0=ocfl_object_1.0
                  ├── inventory.json
                  ├── inventory.json.sha512

                  ├── v1

                             ├── content

                                            ├── myobject1.ttl

                                            └── myobject1/

                                                          └── child.ttl

                  

Scenario 1.A.1:  myobject1.ttl contains relative subjects 

@prefix dcterms: <http://purl.org/dc/terms/>.
</myroot/myobject1> dcterms:title "my object 1" .


curl -X GET http://localhost:8080/root/myobject
curl -i http://localhost:8080/rest/myroot/myobject1
HTTP/1.1 200 OK
Date: Thu, 07 Mar 2019 23:46:18 GMT
ETag: W/"243866ce79cb4bdea2baf53f764c107a04312bf1"
Last-Modified: Thu, 07 Mar 2019 23:44:00 GMT
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#Container>;rel="type"
Link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type"
Link: <http://www.w3.org/ns/ldp#BasicContainer>;rel="type"
Link: <http://localhost:8080/rest/myroot/myobject1>; rel="timegate"
Link: <http://localhost:8080/rest/myroot/myobject1>; rel="original"
Link: <http://localhost:8080/rest/myroot/myobject1/fcr:versions>; rel="timemap"
Link: <http://mementoweb.org/ns#OriginalResource>; rel="type"
Link: <http://mementoweb.org/ns#TimeGate>; rel="type"
Accept-External-Content-Handling: copy,redirect,proxy
Accept-Patch: application/sparql-update
Accept-Post: text/turtle,text/rdf+n3,text/n3,application/rdf+xml,application/n-triples,application/ld+json
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Link: <http://localhost:8080/rest/myroot/myobject1/fcr:acl>; rel="acl"
Preference-Applied: return=representation
Vary: Prefer
Vary: Accept
Vary: Range
Vary: Accept-Encoding
Vary: Accept-Language
Vary: Accept-Datetime
Content-Type: text/turtle;charset=utf-8
Content-Length: 860
Server: Jetty(9.3.25.v20180904)

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<http://localhost:8080/rest/myroot/myobject1>
rdf:type fedora:Container ;
rdf:type fedora:Resource ;
rdf:type ldp:BasicContainer ;
fedora:lastModifiedBy "bypassAdmin" ;
fedora:createdBy "bypassAdmin" ;
fedora:created "2019-03-07T23:43:44.13Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
fedora:lastModified "2019-03-07T23:44:00.991Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
dcterms:title "my object 1" ;
rdf:type ldp:RDFSource ;
rdf:type ldp:Container .

Questions:

  1. Where do the server managed triples come from if they are not specified in the RDF?   
    One possibility:  when fedora starts up on an previously unread OCFL,  it performs an indexing task.  If the OCFL lacks .fcrepo directories, then Fedora will add any necessary server managed triples to the .fcrepo and automatically create a new version with the fedora updates.
  2. Do we 
    1. need to maintain the current Fedora 5x behavior of returning the URL in the subject? ie subject = <http://localhost:8080/rest/myroot/myobject1>
    2. return  the non-server managed subjects exactly as we found them?   ie subject = </myroot/myobject1>
    3. return  the non-server managed subjects modified to include the context path (  resource relative to the host) e.g. subject = </rest/myroot/myobject1>

Scenario 1b:  myobject1.ttl contains external URLsubjects

@prefix dcterms: <http://purl.org/dc/terms/>.
<http://non-fedora-host:port/context/myobject1> dcterms:title "my object 1".
                    

curl -X GET http://localhost:8080/root/myobject

curl -X GET http://localhost:8080/root/myobject
curl -i http://localhost:8080/rest/myroot/myobject1
HTTP/1.1 200 OK
Date: Thu, 07 Mar 2019 23:46:18 GMT
ETag: W/"243866ce79cb4bdea2baf53f764c107a04312bf1"
Last-Modified: Thu, 07 Mar 2019 23:44:00 GMT
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#Container>;rel="type"
Link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type"
Link: <http://www.w3.org/ns/ldp#BasicContainer>;rel="type"
Link: <http://localhost:8080/rest/myroot/myobject1>; rel="timegate"
Link: <http://localhost:8080/rest/myroot/myobject1>; rel="original"
Link: <http://localhost:8080/rest/myroot/myobject1/fcr:versions>; rel="timemap"
Link: <http://mementoweb.org/ns#OriginalResource>; rel="type"
Link: <http://mementoweb.org/ns#TimeGate>; rel="type"
Accept-External-Content-Handling: copy,redirect,proxy
Accept-Patch: application/sparql-update
Accept-Post: text/turtle,text/rdf+n3,text/n3,application/rdf+xml,application/n-triples,application/ld+json
Allow: MOVE,COPY,DELETE,POST,HEAD,GET,PUT,PATCH,OPTIONS
Link: <http://localhost:8080/rest/myroot/myobject1/fcr:acl>; rel="acl"
Preference-Applied: return=representation
Vary: Prefer
Vary: Accept
Vary: Range
Vary: Accept-Encoding
Vary: Accept-Language
Vary: Accept-Datetime
Content-Type: text/turtle;charset=utf-8
Content-Length: 860
Server: Jetty(9.3.25.v20180904)

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<http://non-fedora-host:port/context/myobject1>
dcterms:title "my object 1" ;

<http://localhost:8080/rest/myroot/myobject1>
rdf:type fedora:Container ;
rdf:type fedora:Resource ;
rdf:type ldp:BasicContainer ;
fedora:lastModifiedBy "bypassAdmin" ;
fedora:createdBy "bypassAdmin" ;
fedora:created "2019-03-07T23:43:44.13Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
fedora:lastModified "2019-03-07T23:44:00.991Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
rdf:type ldp:RDFSource ;
rdf:type ldp:Container .

Questions/Notes:

  1. Subject of the original RDF is maintained as is.
  2. Server managed triples use the Fedora resource URL


Scenario 1c:  myobject1.ttl contains LDP type and containment info 


@prefix ldp: <http://www.w3.org/ns/ldp#>.
</some-context/myobject1> a <http://www.w3.org/ns/ldp#RDFSource>, <http://www.w3.org/ns/ldp#BasicContainer>;
                         ldp:contains </some-context/myobject1/child> .
                    

Is this a scenario we need to consider?

Scenario 2:  PATCH resource


Scenario 2.a  With external URL subjects

Request body:

PREFIX dcterms: <http://purl.org/dc/terms/>
DELETE {
   <http://non-fedora-host:port/context/myobject1> dcterms:title "my object 1" .
}
INSERT { 
   <http://non-fedora-host:port/context/myobject1> dcterms:title "My Splendid Object" .
}
WHERE { }


Result: 

fedora:lastModified triple in /myroot/myobject/cache/.fcrepo/metadata?.ttl is updated

/myroot/myobject/cache/myroot/myobject1


@prefix dcterms: <http://purl.org/dc/terms/>.
<http://non-fedora-host:port/context/myobject1> dcterms:title "my object 1".
                    


Notes:  Looks fairly straight forward.

  • No labels