-
Notifications
You must be signed in to change notification settings - Fork 1
Fedora4 Structure and Sparql Examples
thomas edited this page Nov 18, 2016
·
11 revisions
#Install Blazegraph
- Blazegraph : https://superb-dca2.dl.sourceforge.net/project/bigdata/bigdata/2.1.1/blazegraph.jar
- java -server -Xmx4g -jar blazegraph.jar
#Document Objectives
- Explore core and external features
- Explore Fedora HTML UI
- Gain insight into content modeling (PCDM)
- Gain insight into interaction models (LDP)
#Fedora Vagrant Components
- Solr
- Triplestore
- (Fuseki, Sesame)
- Audit Service
- SPARQL-Query
- F4
- LDP / WebAC?? / Memento??
- Apache Camel
Final result (structure)
- ● cover/
- ○ files/
- ■ cover.jpg
- ■ cover.tiff
- ○ files/
- ● book/
- ○ members/
- ■ coverProxy
- ● favorites/
- ○ members/
- ■ bookProxy
- ○ members/
- ● favorites/
- ■ coverProxy
- ○ members/
Final result (relationships)
- ● cover/
- ○ pcdm:hasFile
- ■ cover.jpg
- ■ cover.tiff
- ○ pcdm:hasFile
- ● book/
- ○ pcdm:hasMember
- ■ cover/
- ○ pcdm:hasMember
- ● favorites/
- ○ pcdm:hasMember
- ■ book/
- ○ pcdm:hasMember
Final result (relationships)
- pcdm:hasFile <cover.jpg>
- pcdm:hasFile <cover.tiff>
- pcdm:hasMember
- pcdm:hasMember
PREFIX pcdm: <http://pcdm.org/models#>
INSERT {
<http://localhost:8080/fcrepo/rest/cover>
rdf:type
pcdm:Object
}
WHERE { }
PREFIX pcdm: <http://pcdm.org/models#>
INSERT { <> a pcdm:Object }
WHERE { }
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX pcdm: <http://pcdm.org/models#>
INSERT {
</fcrepo/rest/cover/files/> rdf:type ldp:DirectContainer .
<> rdf:type pcdm:Object .
<> ldp:membershipResource </fcrepo/rest/cover/> .
<> ldp:hasMemberRelation pcdm:hasFile .
}
WHERE { }
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX pcdm: <http://pcdm.org/models#>
INSERT {
<> a ldp:DirectContainer, pcdm:Object ;
ldp:membershipResource </fcrepo/rest/cover/> ;
ldp:hasMemberRelation pcdm:hasFile .
}
WHERE { }
- cover.jpg
- cover.tif
- See auto-generated relationship on “cover”
- Fixity
PREFIX pcdm: <http://pcdm.org/models#>
INSERT { <> a pcdm:Object }
WHERE { }
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX pcdm: <http://pcdm.org/models#>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
INSERT {
<> a ldp:IndirectContainer, pcdm:Object ;
ldp:membershipResource </fcrepo/rest/book/> ;
ldp:hasMemberRelation pcdm:hasMember ;
ldp:insertedContentRelation ore:proxyFor .
}
WHERE { }
PREFIX pcdm: <http://pcdm.org/models#>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
INSERT {
<> a pcdm:Object ;
ore:proxyFor </fcrepo/rest/cover/> ;
ore:proxyIn </fcrepo/rest/book/> .
}
WHERE { }
PREFIX pcdm: <http://pcdm.org/models#>
INSERT { <> a pcdm:Collection }
WHERE { }
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX pcdm: <http://pcdm.org/models#>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
INSERT {
<> a ldp:IndirectContainer, pcdm:Object ;
ldp:membershipResource </fcrepo/rest/favorites/> ;
ldp:hasMemberRelation pcdm:hasMember ;
ldp:insertedContentRelation ore:proxyFor .
}
WHERE { }
PREFIX pcdm: <http://pcdm.org/models#>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
INSERT {
<> a pcdm:Object ;
ore:proxyFor </fcrepo/rest/book/> ;
ore:proxyIn </fcrepo/rest/favorites/> .
}
WHERE { }
- Versioning
- Transactions
- Transform
- Authorization
prefix pcdm: <http://pcdm.org/models#>
select ?r where {
?r a pcdm:Collection
}
prefix pcdm: <http://pcdm.org/models#>
select ?r ?m where {
?r pcdm:hasMember ?m
}
prefix pcdm: <http://pcdm.org/models#>
prefix fedora: <http://fedora.info/definitions/v4/repository#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
select ?r ?m ?f where {
?r pcdm:hasMember ?m .
?m pcdm:hasFile ?f .
?f fedora:mimeType "image/tiff"^^xsd:string
}
prefix pcdm: <http://pcdm.org/models#>
prefix fedora: <http://fedora.info/definitions/v4/repository#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
select ?r ?m ?f where {
?r pcdm:hasMember+ ?m .
?m pcdm:hasFile ?f .
?f fedora:mimeType "image/tiff"^^xsd:string
}
prefix premis: <http://www.loc.gov/premis/rdf/v1#>
prefix fedora: <http://fedora.info/definitions/v4/repository#>
select ?r ?s where {
?r a fedora:Binary .
?r premis:hasSize ?s .
FILTER (?s > 100000)
}