Page tree
Skip to end of metadata
Go to start of metadata

These training archives may be out of date, but have been retained and kept available for the community's benefit in reviewing previous sessions.

Current training documentation can be found here: Training

Learning Outcomes

  • Deploying Fedora
  • Explore core and external features
  • Gain insight into content modeling (PCDM)

Prerequisites

Either

  1. Vagrant setup:
  2. Or, Standalone apps setup

Explore Features

Using Google Chrome PostMan app, execute the following requests (attached)

 Click here to expand...
  1. curl -XPUT localhost:8080/fcrepo/rest/objects/
  2. curl -XGET localhost:8080/fcrepo/rest/objects/
  3. curl -XPUT -H"Content-Type: text/turtle" --data-binary @body localhost:8080/fcrepo/rest/objects/raven/

    body
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>
    
    <> a indexing:Indexable ;
      indexing:hasIndexingTransformation \"default\" ."
    
  4. curl -XGET localhost:8080/fcrepo/rest/objects/raven/
  5. curl -XPUT -H"Content-Type: text/turtle" --data-binary @body localhost:8080/fcrepo/rest/objects/raven/files/

    body
    PREFIX ldp: <http://www.w3.org/ns/ldp#>
    PREFIX pcdm: <http://pcdm.org/models#>
    
    <> a ldp:DirectContainer; 
      ldp:membershipResource </fcrepo/rest/objects/raven/>;
      ldp:hasMemberRelation pcdm:hasFiles ."
    
  6. curl -XGET localhost:8080/fcrepo/rest/objects/raven/files/
  7. curl -XGET -H"Prefer: return=representation; include=\"http://fedora.info/definitions/v4/repository#EmbedResources\"" localhost:8080/fcrepo/rest/objects/raven/files/
  8. curl -XGET -H"Prefer: return=representation; omit=\"http://fedora.info/definitions/v4/repository#ServerManaged\"" localhost:8080/fcrepo/rest/objects/raven/files/
  9. curl -XPUT -H"Content-Type: application/pdf" localhost:8080/fcrepo/rest/objects/raven/files/page0
  10. curl -XPATCH -H"Content-Type: application/sparql-update" --data-binary @body localhost:8080/fcrepo/rest/objects/raven/files/page0/fcr:metadata

    body
    PREFIX dc: <http://purl.org/dc/elements/1.1/>
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>
    DELETE { }
    INSERT {
      <> indexing:hasIndexingTransformation \"default\";
      rdf:type indexing:Indexable }
    WHERE { }"
    
  11. curl -XPUT -H"Content-Type: application/pdf" localhost:8080/fcrepo/rest/objects/raven/files/page1
  12. curl -XPATCH -H"Content-Type: application/sparql-update" --data-binary @body localhost:8080/fcrepo/rest/objects/raven/files/page1/fcr:metadata

    body
    PREFIX dc: <http://purl.org/dc/elements/1.1/>
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>
    DELETE { }
    INSERT {
      <> indexing:hasIndexingTransformation \"default\";
      rdf:type indexing:Indexable }
    WHERE { }"
    
  13. curl -XPUT -H"Content-Type: text/turtle" --data-binary @body localhost:8080/fcrepo/rest/collections/

    body
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>
    
    <> a indexing:Indexable ;
      indexing:hasIndexingTransformation \"default\" ."
    
  14. curl -XGET -H"Content-Type: text/turtle" --data-binary @body localhost:8080/fcrepo/rest/collections/poe/

    body
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>
    
    <> a indexing:Indexable ;
      indexing:hasIndexingTransformation \"default\" ."
    
  15. curl -XGET localhost:8080/fcrepo/rest/collections/poe/
  16. curl -XPUT -H"Content-Type: text/turtle" --data-binary @body localhost:8080/fcrepo/rest/collections/poe/members/

    body
    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 </fcrepo/rest/collections/poe/>;
      ldp:hasMemberRelation pcdm:hasMember ;
      ldp:insertedContentRelation ore:proxyFor ."
    
  17. curl -XPUT -H"Content-Type: text/turtle" --data-binary @body localhost:8080/fcrepo/rest/collections/poe/members/member0

    body
    PREFIX ore: <http://www.openarchives.org/ore/terms/>
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>
    
    <> a ore:Proxy; 
      ore:proxyIn </fcrepo/rest/collections/poe/> ;
      ore:proxyFor </fcrepo/rest/objects/raven/> ;
      indexing:hasIndexingTransformation \"default\";
      rdf:type indexing:Indexable ."
    

 

 

SPARQL Query

In Fuseki console (localhost:3030)

  1. Select "Control Panel"
  2. Select Dataset "/test"
  3. Select Output "Text"
  4. Select "Force the accept header text/plain regardless"
  5. Query

    prefix pcdm: <http://pcdm.org/models#>
    select ?work 
    where {
      <http://localhost:8080/fcrepo/rest/collections/poe> pcdm:hasMember ?work .
      ?work pcdm:hasFiles ?files .
    }
    group by ?work 
    having (count(?files) > 1)

Using Admin Features

Transactions (docs)

Versioning (docs)

Create a version with a label

curl -XPOST http://localhost:8080/rest/item/fcr:versions/my-label

Import/Export (docs)

Additional Resources

  • No labels