r6 - 10 Nov 2008 - 13:34:12 - NoelWinstanleyYou are here: TWiki >  VOTech Web  >  StageFive > StageFiveHackAThon > SimpleRegistryQueryLanguage

SRQL - Simple Registry Query Language

As XPath is too techie, and Adql unforgiving and still evolving, I'd like to suggest a user-facing query language called SRQL. It's a forgiving, google-ish little language, where the user can rarely input a syntactically incorrect query.

I've implemented a standalone java library that converts SRQL to XQuery. It'd be straightforward to extend this to target other query languages. - srql.tgz: zip of sources, tests, docs and executable jarfile.

SRQL is used as the query language in VOExplorer, a resource browser for the vo.

All text matching is case insensitive. So if you enter 'John', it will match resources containing 'John','john','JOhN', etc.

All matching is done by substring. So if you enter 'sol' it will match resources containing 'sol','solar', 'insole', etc.

SRQL query Searches For
galaxy resources containing galaxy in any of title, shortName, identifier, content/description and content/subject fields
radio galaxy resources containing radio or galaxy in any of title, ... fields
radio or galaxy resources containing radio or galaxy in any of title, ... fields
radio and galaxy resources containing radio and galaxy in any of title, ... fields
"radio galaxy" resources containing the phrase "radio galaxy" in any of title, ...fields
not "radio galaxy" resources that do not contain the phrase "radio galaxy" in any of title, ... fields
not (radio galaxy) resources that do not contain radio or galaxy in any of title, ... fields
pulsar and not (radio galaxy) resources that contain pulsar that do not contain radio or galaxy in any of title, ... fields
specifying the target of a query
name = first resources that contain first in just the title or shortname fields
name = (first wfcam) resources that contain =first or wfcam in just the title or shortname fields
shortname = expr resources that match _expr in just the shortname field
title = expr resources that match _expr in just the title field
title = first or shortname = wfcam resources that contain first in just the title field, or that contain wfcam in just the shortname field
subject = expr resources that match _expr in just the content/subject field
description = expr resources that match _expr in just the content/description field
id = expr resources that match _expr in just the identifier field
any = expr resources that match _expr in any field
default =_expr resources that match expr in just the shortname fields
curation = expr resources that match _expr anywhere in the curation fields (creator, publisher, contributor, etc)
type = expr resources that match _expr in just the xsi:type or content/type fields
waveband = expr resources that match _expr in just the coverage/spectral/waveband field
level = expr resources that match _expr in just the _content/contentLevel field
col = expr resources that match _expr in a column name
ucd = expr resources that match _expr in a column ucd
Inline XPath query - denoted by backquotes (Optional, assumes XQuery backend). Could implement pass-thru sql in same way
type = cone and `cs:capability/cs:maxSR > 90` resources that are of type cone where the xpath cs:capability/cs:maxSR > 90 evaluates to true (i.e. catalog services where the maximum search radius is larger than 90 degrees)

targetted and untargetted expressions can be mixed in the same query.

Examples.

abell and ucd=pos_eq_ra_main and waveband=(not uv)

Performance

Using a more targetted search like name = first will be faster than just first, while any = first takes much longer.

-- NoelWinstanley - 09 Mar 2007

  • srql.tgz: zip of sources, tests, docs and jarfile.
toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
ziptgz srql.tgz manage 86.5 K 12 Mar 2007 - 13:46 NoelWinstanley zip of sources, tests, docs and jarfile.
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback