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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »


  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?
  • From the SPARQL doc, it appears that if any one of the 'objects' (e.g., title, description, size, visibility) listed in the WHERE of the query is not defined for a virtual collection, then that virtual collection will not be included in the results.  I have not tested this.  Is there a way around this limitation?  I'd like the value for the missing object to be _BLANK_ or nil.

 



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.
  • The implementation of visibility (i.e., PUBLIC, PRIVATE, SHARED) has not yet been fully designed.
Questions
  • See also Common Questions section at the top of this document, especially for missing triples for an 'object'.
  • 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?

 


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.
  • The implementation of visibility (i.e., PUBLIC, PRIVATE, SHARED) has not yet been fully designed.
Questions
  • See also Common Questions section at the top of this document, especially for sorting and pagination, and missing triples for an 'object'.
  • 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?

 


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.rdf_subject
  • VirtualCollectionRDF.title
  • VirtualCollectionRDF.description
  • VirtualCollectionRDF.size   (NOTE:  Defined in Collections ontology. Is there an equivalent in the ORE ontology?)
Example Query

Example is INCOMPLETE -- Does not address sorting and pagination issues

Example is INCOMPLETE -- Visibility design is under development.

SELECT ?subject ?owner ?title ?description ?size
WHERE
{
   ?subject <http://TBD/visibility> "PUBLIC" .
   ?subject <http://purl.org/dc/terms/creator> ?owner .
   ?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 .
}
Notes
  • The implementation of visibility (i.e., PUBLIC, PRIVATE, SHARED) has not yet been fully designed.
Questions
  • See also Common Questions section at the top of this document, especially for sorting and pagination, and missing triples for an 'object'.
  • 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

 

 


 

 

  • No labels