Created
August 24, 2016 12:08
-
-
Save DiegoPino/29bf971aa0a8c65ef76b082ea6a43dba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- convert ORE to PCDM 2.0 -- | |
PREFIX ldp: <http://www.w3.org/ns/ldp#> | |
PREFIX ore: <http://www.openarchives.org/ore/terms/> | |
PREFIX pcdm: <http://pcdm.org/models#> | |
CONSTRUCT { | |
?obj a pcdm:Object ; | |
iana:first ?first ; | |
iana:last ?last ; | |
pcdm:hasMember ?page . | |
?page a pcdm:Object ; | |
iana:prev ?prev ; | |
iana:next ?next ; | |
pcdm:hasFileSet ?fs . | |
?fs a pcdm:FileSet ; | |
pcdm:hasFile ?file . | |
?file a pcdm:File . } | |
WHERE { | |
<http://localhost:8080/fcrepo/rest/resourceMaps/1> ore:describes ?obj . | |
?obj a ore:Aggregation ; ore:aggregates ?page . | |
?page a ore:Aggregation ; ore:aggregates ?fs . | |
?fs a ore:Aggregation ; ore:aggregates ?file . | |
?file a ldp:NonRdfSource . | |
OPTIONAL { | |
?obj iana:first ?first . | |
} | |
OPTIONAL { | |
?obj iana:last ?last . | |
} | |
OPTIONAL { | |
?page iana:prev ?prev . | |
} | |
OPTIONAL { | |
?page iana:next ?next . | |
} | |
} | |
-- convert ORE to PCDM 1.0 -- | |
PREFIX ldp: <http://www.w3.org/ns/ldp#> | |
PREFIX ore: <http://www.openarchives.org/ore/terms/> | |
PREFIX pcdm: <http://pcdm.org/models#> | |
CONSTRUCT { | |
?obj a pcdm:Object ; | |
pcdm:hasMember ?page . | |
?page a pcdm:Object ; | |
pcdm:hasFile ?file . | |
?file a pcdm:File . } | |
WHERE { | |
<http://localhost:8080/fcrepo/rest/resourceMaps/1> ore:describes ?obj . | |
?obj a ore:Aggregation ; | |
ore:aggregates ?page . | |
?page a ore:Aggregation ; | |
ore:aggregates ?file . | |
?file a ldp:NonRdfSource . } | |
-- Convert PCDM 1.0 to PCDM 2.0 -- | |
PREFIX ldp: <http://www.w3.org/ns/ldp#> | |
PREFIX ore: <http://www.openarchives.org/ore/terms/> | |
PREFIX pcdm: <http://pcdm.org/models#> | |
CONSTRUCT { | |
?obj a pcdm:Object ; | |
pcdm:hasMember ?page . | |
?page a pcdm:Object ; | |
pcdm:hasFileSet [ | |
a pcdm:FileSet ; | |
pcdm:hasFile ?file ] . | |
?file a pcdm:File . } | |
WHERE { | |
BIND(<http://localhost:8080/fcrepo/rest/objects/1> AS ?obj) . | |
?obj a pcdm:Object ; | |
pcdm:hasMember ?page . | |
?page a pcdm:Object ; | |
pcdm:hasFile ?file . | |
?file a ldp:NonRdfSource , pcdm:File . } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment