Difference between revisions of "SPQL: SPecies Query Language"

From Gcube Wiki
Jump to: navigation, search
(Created page with ' ''SPQL'' is a language uset to query the '''Species Product Discovery''' Service == Grammar == <source lang="xml"> query: terms (IN identifiers)? (WHERE expressions)? (RETURN …')
 
m (Grammar)
Line 4: Line 4:
 
== Grammar ==
 
== Grammar ==
  
<source lang="xml">
+
<source lang="java">
 
query: terms (IN identifiers)? (WHERE expressions)? (RETURN returnExpression)?
 
query: terms (IN identifiers)? (WHERE expressions)? (RETURN returnExpression)?
 
   
 
   

Revision as of 18:46, 20 March 2013

SPQL is a language uset to query the Species Product Discovery Service

Grammar

query: terms (IN identifiers)? (WHERE expressions)? (RETURN returnExpression)?
 
terms: term  (',' term)*
 
term: words AS (('ScientificName'|'SN') | ('CommonName'|'CN'))
 
words: word (',' word)*
 
word : STRING
 
identifiers:  identifier (',' identifier)*
 
identifier: ID
 
expressions: expression (AND expression)*
 
expression:	(bc=boundCondition | dateCondition)
 
boundCondition: ('lowerBound' | 'upperBound') IS coordinate
 
dateCondition: ('fromDate' | 'toDate') IS date
 
date: INT '/' INT '/' INT
 
coordinate: FLOAT ',' FLOAT
 
returnExpression: '*' | 'Occurrence' | 'Taxon'
 
havingExpression: HAVING 'Occurrence' | 'Taxon'