Skip to content

Instantly share code, notes, and snippets.

@daniel-dgi
Created October 15, 2015 14:02

Revisions

  1. daniel-dgi created this gist Oct 15, 2015.
    71 changes: 71 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,71 @@
    ~ $ curl -X POST "http://127.0.0.1:8080/fcrepo/rest/"
    http://127.0.0.1:8080/fcrepo/rest/aa/71/6b/1f/aa716b1f-0021-4ed3-9179-79c4c99f9722

    ~ $ curl -X POST "http://127.0.0.1:8080/fcrepo/rest/"
    http://127.0.0.1:8080/fcrepo/rest/b4/b8/05/e3/b4b805e3-4570-4d07-a862-ddccf7d87a00

    indirect.ttl
    ============
    @prefix ldp: <http://www.w3.org/ns/ldp#>
    @prefix pcdm: <http://pcdm.org/models#>
    @prefix ore: <http://www.openarchives.org/ore/terms/>

    <> a ldp:IndirectContainer ;
    ldp:membershipResource <http://127.0.0.1:8080/fcrepo/rest/aa/71/6b/1f/aa716b1f-0021-4ed3-9179-79c4c99f9722> ;
    ldp:isMemberOfRelation pcdm:memberOf ;
    ldp:insertedContentRelation ore:proxyFor .


    proxy.ttl
    =========
    @prefix ore: <http://www.openarchives.org/ore/terms/>

    <> ore:proxyFor <http://127.0.0.1:8080/fcrepo/rest/b4/b8/05/e3/b4b805e3-4570-4d07-a862-ddccf7d87a00> ;
    ore:proxyIn <http://127.0.0.1:8080/fcrepo/rest/aa/71/6b/1f/aa716b1f-0021-4ed3-9179-79c4c99f9722> .

    ~ $ curl -X POST -H "Content-Type: text/turtle" --data-binary "@indirect.ttl" "http://127.0.0.1:8080/fcrepo/rest/aa/71/6b/1f/aa716b1f-0021-4ed3-9179-79c4c99f9722"
    http://127.0.0.1:8080/fcrepo/rest/aa/71/6b/1f/aa716b1f-0021-4ed3-9179-79c4c99f9722/f5/18/e9/f2/f518e9f2-4679-4eb4-9992-e8e6f0869a60

    ~ $ curl -X POST -H "Content-Type: text/turtle" --data-binary "@proxy.ttl" "http://127.0.0.1:8080/fcrepo/rest/aa/71/6b/1f/aa716b1f-0021-4ed3-9179-79c4c99f9722/f5/18/e9/f2/f518e9f2-4679-4eb4-9992-e8e6f0869a60"
    http://127.0.0.1:8080/fcrepo/rest/aa/71/6b/1f/aa716b1f-0021-4ed3-9179-79c4c99f9722/f5/18/e9/f2/f518e9f2-4679-4eb4-9992-e8e6f0869a60/f3/09/74/92/f3097492-4ebf-4903-b1de-1ed9f2d02671

    ~ $ curl -H "Accept: text/turtle" "http://127.0.0.1:8080/fcrepo/rest/b4/b8/05/e3/b4b805e3-4570-4d07-a862-ddccf7d87a00"
    @prefix premis: <http://www.loc.gov/premis/rdf/v1#> .
    @prefix nt: <http://www.jcp.org/jcr/nt/1.0> .
    @prefix pcdm: <http://pcdm.org/models#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    @prefix xsi: <http://www.w3.org/2001/XMLSchema-instance> .
    @prefix mode: <http://www.modeshape.org/1.0> .
    @prefix pcdmuse: <http://pcdm.org/use#> .
    @prefix audit: <http://fedora.info/definitions/v4/audit#> .
    @prefix xml: <http://www.w3.org/XML/1998/namespace> .
    @prefix fedoraconfig: <http://fedora.info/definitions/v4/config#> .
    @prefix mix: <http://www.jcp.org/jcr/mix/1.0> .
    @prefix prov: <http://www.w3.org/ns/prov#> .
    @prefix foaf: <http://xmlns.com/foaf/0.1/> .
    @prefix image: <http://www.modeshape.org/images/1.0> .
    @prefix ore: <http://www.openarchives.org/ore/terms/> .
    @prefix sv: <http://www.jcp.org/jcr/sv/1.0> .
    @prefix test: <info:fedora/test/> .
    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix fedora: <http://fedora.info/definitions/v4/repository#> .
    @prefix ebucore: <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
    @prefix ldp: <http://www.w3.org/ns/ldp#> .
    @prefix xs: <http://www.w3.org/2001/XMLSchema> .
    @prefix dc: <http://purl.org/dc/terms/> .


    <http://127.0.0.1:8080/fcrepo/rest/b4/b8/05/e3/b4b805e3-4570-4d07-a862-ddccf7d87a00> 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> , <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:createdBy "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fedora:primaryType "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
    fedora:created "2015-10-15T13:49:43.347Z"^^<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-10-15T13:55:56.079Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    fedora:writable "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
    fedora:hasParent <http://127.0.0.1:8080/fcrepo/rest/> ;
    fedora:exportsAs <http://127.0.0.1:8080/fcrepo/rest/b4/b8/05/e3/b4b805e3-4570-4d07-a862-ddccf7d87a00/fcr:export?format=jcr/xml> .

    <http://127.0.0.1:8080/fcrepo/rest/b4/b8/05/e3/b4b805e3-4570-4d07-a862-ddccf7d87a00/fcr:export?format=jcr/xml> <http://purl.org/dc/elements/1.1/format> <http://fedora.info/definitions/v4/repository#jcr/xml> .

    Am expecting to see pcdm:memberOf, but getting nothing on the child object :(