Skip to content

Instantly share code, notes, and snippets.

@mjgiarlo
Last active August 29, 2015 14:28
Show Gist options
  • Save mjgiarlo/92848e33b47cc801a5bc to your computer and use it in GitHub Desktop.
Save mjgiarlo/92848e33b47cc801a5bc to your computer and use it in GitHub Desktop.
content/fcr:metadata triples from a simple GF
2.2.2 :017 > puts gf.content.metadata.ldp_source.graph.dump(:ttl)
<http://127.0.0.1:8983/fedora/rest/dev/xk/81/jk/37/xk81jk370/content> 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>,
<http://fedora.info/definitions/v4/repository#Binary>,
<http://fedora.info/definitions/v4/repository#Resource>,
<http://www.jcp.org/jcr/mix/1.0created>,
<http://www.jcp.org/jcr/mix/1.0referenceable>;
<http://fedora.info/definitions/v4/repository#created> "2015-08-25T16:59:59.062Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
<http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin";
<http://fedora.info/definitions/v4/repository#digest> <urn:sha1:33826fd48ecca50029765a4d21c2635b0806b222>;
<http://fedora.info/definitions/v4/repository#hasFixityService> <http://127.0.0.1:8983/fedora/rest/dev/xk/81/jk/37/xk81jk370/content/fcr:fixity>;
<http://fedora.info/definitions/v4/repository#lastModified> "2015-08-25T16:59:59.062Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
<http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin";
<http://fedora.info/definitions/v4/repository#mimeType> "text/plain";
<http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:Binary";
<http://fedora.info/definitions/v4/repository#primaryType> "nt:resource";
<http://fedora.info/definitions/v4/repository#uuid> "b78bd60c-0a11-4b2c-9b3a-6a3975cf137a";
<http://www.iana.org/assignments/relation/describedby> <http://127.0.0.1:8983/fedora/rest/dev/xk/81/jk/37/xk81jk370/content/fcr:metadata>;
<http://www.loc.gov/premis/rdf/v1#hasOriginalName> "";
<http://www.loc.gov/premis/rdf/v1#hasSize> "11728"^^<http://www.w3.org/2001/XMLSchema#long> .
<http://127.0.0.1:8983/fedora/rest/dev/xk/81/jk/37/xk81jk370/content/fcr:metadata> a <http://www.w3.org/ns/ldp#RDFSource>,
<http://www.jcp.org/jcr/nt/1.0file>,
<http://www.jcp.org/jcr/nt/1.0hierarchyNode>,
<http://www.jcp.org/jcr/nt/1.0base>,
<http://www.jcp.org/jcr/mix/1.0created>,
<http://fedora.info/definitions/v4/repository#NonRdfSourceDescription>,
<http://fedora.info/definitions/v4/repository#Resource>,
<http://www.jcp.org/jcr/mix/1.0versionable>,
<http://www.jcp.org/jcr/mix/1.0lastModified>,
<http://www.jcp.org/jcr/mix/1.0referenceable>,
<http://www.jcp.org/jcr/mix/1.0simpleVersionable>;
<http://fedora.info/definitions/v4/repository#created> "2015-08-25T16:59:59.062Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
<http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin";
<http://fedora.info/definitions/v4/repository#hasParent> <http://127.0.0.1:8983/fedora/rest/dev/xk/81/jk/37/xk81jk370>;
<http://fedora.info/definitions/v4/repository#hasVersions> <http://127.0.0.1:8983/fedora/rest/dev/xk/81/jk/37/xk81jk370/content/fcr:versions>;
<http://fedora.info/definitions/v4/repository#lastModified> "2015-08-25T16:59:59.115Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
<http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin";
<http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:NonRdfSourceDescription",
"fedora:Resource",
"mix:versionable";
<http://fedora.info/definitions/v4/repository#primaryType> "nt:file";
<http://fedora.info/definitions/v4/repository#uuid> "76e49371-7cc2-4fcb-b21d-39a4335cffa7";
<http://fedora.info/definitions/v4/repository#writable> true;
<http://www.iana.org/assignments/relation/describes> <http://127.0.0.1:8983/fedora/rest/dev/xk/81/jk/37/xk81jk370/content> .
2.2.2 :005 > gf.content.metadata.ldp_source.graph.query(predicate: RDF::Vocab::Fcrepo4.digest).first.object.to_s
=> "urn:sha1:33826fd48ecca50029765a4d21c2635b0806b222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment