Planning | Description | Requirements | UI Mockup | Triples Examples | Queries Examples
Table of Contents
Common Questions
- Can queries be done across triplestores? The original plan was to reference an external URI for bibliographic references (e.g.,
http://da-rdf.library.cornell.edu/individual/b3652730
) and not copy any information about the bibliographic reference into our local triplestore. The requirement to sort by title, author, and publication date with you to require that this information be copied into the local triplestore, or that the SPARQL queries are capable of querying across two distinct triplestores. - How does SPARQL handle sorting?
- How does SPARQL track paginated results? How does SPARQL track tokens for retrieving the next set of search results?
Get a Virtual Collection's Metadata
Data Referenced in Query
- VirtualCollectionRDF.rdf_subject == _VIRTUAL_COLLECTION_URI_
Data Returned
- VirtualCollectionRDF.title
- VirtualCollectionRDF.description
- VirtualCollectionRDF.size
- VirtualCollectionRDF.visibility (NOTE: ' Visibility' implementation is TBD.)
Example Query
# _VIRTUAL_COLLECTION_URI_ = "http://localhost:3000/individual/vc123" SELECT ?title ?description ?size ?visibility WHERE { <http://localhost:3000/individual/vc123> <http://purl.org/dc/elements/1.1/title> ?title . <http://localhost:3000/individual/vc123> <http://purl.org/dc/elements/1.1/description> ?description . <http://localhost:3000/individual/vc123> <http://purl.org/co/size> ?size . <http://localhost:3000/individual/vc123> <http://TBD/visibility> ?visibility . }
Notes
- This should be fairly straightforward query that matches a single Virtual Collection.
Questions
- size is not currently defined in VirtualCollectionRDF because I'm modeling the ORE ontology. It is defined in the Collections ontology. Is there an equivalent in the ORE ontology?
- The implementation of visibility (i.e., PUBLIC, PRIVATE, SHARED) has not yet been fully designed.
- From the SPARQL doc, it appears that if any one of the selected 'objects' (i.e., title, description, size, visibility) is not defined for a virtual collection, then it will not be included in the results. I have not tested this.
Get List of Virtual Collections with Pagination
Owned by Me and Sorted by Collection Name
Data Referenced in Query
- VirtualCollectionRDF.owner == _CURRENT_USER_URI_
- number of virtual collections to return in the results
- token identifying starting point for next set of results
Data Returned
- VirtualCollectionRDF.rdf_subject
- VirtualCollectionRDF.title
- VirtualCollectionRDF.description
- VirtualCollectionRDF.size
- VirtualCollectionRDF.visibility
Example Query
Example is INCOMPLETE -- Does not address sorting and pagination issues
# _CURRENT_USER_URI_ = "http://localhost:3000/individual/p234" SELECT ?subject ?title ?description ?size ?visibility WHERE { ?subject <http://purl.org/dc/terms/creator> <http://localhost:3000/individual/p234> ?subject <http://purl.org/dc/elements/1.1/title> ?title . ?subject <http://purl.org/dc/elements/1.1/description> ?description . ?subject <http://purl.org/co/size> ?size . ?subject <http://TBD/visibility> ?visibility . }
Notes
- The concept of owner will not be represented by dc:creator. See Triples Examples page for more details.
Questions
- See sorting and pagination questions in the Common Questions section at the top of this document.
- size is not currently defined in VirtualCollectionRDF because I'm modeling the ORE ontology. It is defined in the Collections ontology. Is there an equivalent in the ORE ontology?
- The implementation of visibility (i.e., PUBLIC, PRIVATE, SHARED) has not yet been fully designed.
Watched by Me and Sorted by Collection Name
NOTE: 'Watched by' implementation is TBD.
Public and Sorted by Collection Name
NOTE: 'Visibility' implementation is TBD.
Data Referenced in Query
- VirtualCollectionRDF.visibility == "PUBLIC" (NOTE: ' Visibility' implementation is TBD.)
Data Returned
- VirtualCollectionRDF.title
- VirtualCollectionRDF.description
- VirtualCollectionRDF.size (NOTE: Defined in Collections ontology. Is there an equivalent in the ORE ontology?)
Challenges
- Same as for "Owned by Me and Sorted by Collection Name"
Get List of Items in a Virtual Collection with Pagination
Sorted by List Order
Sorted by Bibliographic Resource Title
Sorted by Bibliographic Author
Sorted by Bibliographic Publication Date
Unsorted with no List Order