Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  Planning | Description | Requirements | UI Mockup |  Triples Examples | Queries Examples

...

 

Warning

This page needs to be re-written with a focus on SOLR queries instead of SPARQL queries.

 

Table of Contents

Table of Contents
maxLevel4

...

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.across two distinct triplestores.
    • Drive app data from SOLR instead of triplestore.
    • Can search across multiple SOLR indexes? 
      • Some say yes, some say no, looks like no.
      • Can make individual queries and meld results.
    • Can add data to my SOLR from multiple triplestores/apps?
      • YES, but questions about each app keeping multiple SOLR data in sync
      • For example, will library catalog system update my SOLR index when the name of a bib ref gets updated?
        • Need some process added to blacklight-cornell catalog that will update my SOLR index
        • Need some process to add my triple data into the cornell catalog SOLR index
        • Both of these are post Use Case and production implementation issues
    • Process:
      • adding an item
        • copy title, author, pubdate from blacklight-cornell catalog system into my SOLR index
        • updates to virtual collection items go into triplestore and into SOLR index
      • queries go to my SOLR index
    • Why separate SOLR indices?  Efficiency of queries, data management (buffer against changes), ease of use by multiple apps
  • How does SPARQL handle sorting?
    • look at order_by
  • How does SPARQL track paginated results? How does SPARQL track tokens for retrieving the next set of search results?
    • look at limit and offset
  • Missing Triples for an 'object' -- 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.
    • Example from SPARQL doc

      Data:

      Code Block
      languagenone
      @prefix foaf:  <http://xmlns.com/foaf/0.1/> .
      
      _:a  foaf:name   "Johnny Lee Outlaw" .
      _:a  foaf:mbox   <mailto:jlow@example.com> .
      _:b  foaf:name   "Peter Goodguy" .
      _:b  foaf:mbox   <mailto:peter@example.org> .
      _:c  foaf:mbox   <mailto:carol@example.org> .

      Query:

      Code Block
      languagenone
      PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
      SELECT ?name ?mbox
      WHERE
        { ?x foaf:name ?name .
          ?x foaf:mbox ?mbox }

      Query Result:

      namembox
      "Johnny Lee Outlaw"<mailto:jlow@example.com>
      "Peter Goodguy"<mailto:peter@example.org>

      Question:
      - Why isn't mbox=<mailto:carol@example.org> part of the result with name=_BLANK_?

       

...

  • 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.
  • Sorting: look at order_by
  • Pagination: look at limit and offset
  • Better option: pull data from SOLR
    • look at how ActiveFedora triggers updates to SOLR
    • VIVO also has triggers to update SOLR that may be useful
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?

...

Get List of Items in a Virtual Collection with Pagination

Sorted by List Order

Data Referenced in Query
  • VirtualCollectionRDF.owner == _CURRENT_USER_URI_
  • VirtualCollectionRDF.rdf_subject == _SELECTED_VIRTUAL_COLLECTION_URI_
  • VirtualCollectionItemRDF.proxyFor == _SELECTED_VIRTUAL_COLLECTION_URI_
  • VirtualCollectionItemRDF.next - assume it plays a role in the query since this predicate specifies the list order
  • number of items to return in the results
  • token identifying starting point for next set of results

...

  • See also Common Questions section at the top of this document, especially for sorting and pagination, and missing triples for an 'object'.

 

...

Sorted by Bibliographic Resource Title

Data Referenced in Query
  • Same as for Get List of Items in a Virtual Collection with Pagination - Sorted by List Order except...
    • REMOVE REF TO:  VirtualCollectionItemRDF.next
    • ADD REF TO:          BibliographicReferenceRDF.title

...

  • Same as for Query for Get List of Items in a Virtual Collection with Pagination - Sorted by List Order.

 

...

Sorted by Bibliographic Author

Data Referenced in Query
  • Same as for Get List of Items in a Virtual Collection with Pagination - Sorted by List Order except...
    • REMOVE REF TO:  VirtualCollectionItemRDF.next
    • ADD REF TO:          BibliographicReferenceRDF.description

...

  • Same as for Query for Get List of Items in a Virtual Collection with Pagination - Sorted by List Order.

 

...

Sorted by Bibliographic Publication Date

Data Referenced in Query
  • Same as for Get List of Items in a Virtual Collection with Pagination - Sorted by List Order except...
    • REMOVE REF TO:  VirtualCollectionItemRDF.next
    • ADD REF TO:          BibliographicReferenceRDF.pubdate

...

  • Same as for Query for Get List of Items in a Virtual Collection with Pagination - Sorted by List Order.

 

...

Unsorted with no List Order

Data Referenced in Query
  • Same as for Get List of Items in a Virtual Collection with Pagination - Sorted by List Order except...
    • REMOVE REF TO:  VirtualCollectionItemRDF.next

...