Differences between revisions 10 and 11
Revision 10 as of 2009-09-02 06:59:14
Size: 3646
Editor: arta-mbp
Comment:
Revision 11 as of 2013-05-01 04:35:25
Size: 3650
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
See the '''[http://hmi.stanford.edu/doc/JSOC/DRMS_dataset_names.pdf DRMS Dataset Names]''' document for more a more detailed discussion of the semantics (the Word document from which this file is generated is at /web/hmi/htdocs/development/JSOC_Documents/Drafts/DRMS_dataset_names.doc). See the '''[[http://hmi.stanford.edu/doc/JSOC/DRMS_dataset_names.pdf|DRMS Dataset Names]]''' document for more a more detailed discussion of the semantics (the Word document from which this file is generated is at /web/hmi/htdocs/development/JSOC_Documents/Drafts/DRMS_dataset_names.doc).
Line 21: Line 21:
* SOI TN 94-116: [http://soi.stanford.edu/technotes/94.116.html]; * SOI TN 94-116: [[http://soi.stanford.edu/technotes/94.116.html]];

DRMS Names

See the DRMS Dataset Names document for more a more detailed discussion of the semantics (the Word document from which this file is generated is at /web/hmi/htdocs/development/JSOC_Documents/Drafts/DRMS_dataset_names.doc).

In the extended BNF expression below white space is explicitly denoted <WS>. Literals are quoted as in 'literal', while \' indicates apostrophe character.

Basic non-terminals used:

 <Name> ::= <Letter> { <NameEnd> }
 <NameEnd> ::= ( <Letter> | <Digit> | '_' ) { <NameEnd> }
 <Letter> ::= 'a' | 'b' | ... | 'z' | 'A' | 'B' | ... | 'Z'
 <Digit> ::= '0' | '1' | ... | '9'
 <Value> ::= <Integer> | <Real> | <Time> | \'<String>\'
 <Time> ::= See SOI TN 94-116*
 <Value_Increment> ::= <Integer> | <Real> | <Time_Increment>
 <Time_Increment> ::= <Real><Time_Increment_Specifier>
 <Time_Increment_Specifier> ::= 's' | 'm' | 'h' | 'd'

* SOI TN 94-116: http://soi.stanford.edu/technotes/94.116.html;

Main rules:

 <RecordSet>  ::= <SeriesName> <RecordSet_Filter> 
 <SeriesName> ::= <Name>

 <RecordSet_Filter> ::= '[' ( <RecordQuery> | <RecordList> ) ']' { <SegmentList> }
                         { <RecordSet_Filter> }

 <RecordQuery> ::= '?' <SQL where clause> '?' | '!' <SQL where clause> '!'

 <RecordList> ::= ( ':'<RecnumRangeSet> | 
                    {<Primekey_Name>'='}<PrimekeyRangeSet> )

 <SegmentList> ::= <Name> { ',' <SegmentList> }

 <RecnumRangeSet> ::= <IndexRangeSet>
 <Primekey_Name> :: <Name>

 <PrimekeyRangeSet> ::= ( <IndexRangeSet> | <ValueRangeSet> )

 <IndexRangeSet> ::= ( '#' '^' |
                       '#' '$' |
                       '#' <Integer> |
                       '#' <Integer> '-' '#' { '@' <Integer> } |
                       '#' '-' '#' <Integer> { '@' <Integer> } |
                       '#' <Integer> '-' '#' <Integer> { '@' <Integer> } |
                       '#' <Integer> '/' <Integer> { '@' <Integer> } 
                      ) { ',' <IndexRangeSet> }

 <ValueRangeSet> ::= ( <Value> |
                       <Value> '-' <Value> { '@' <Value_Increment> } |
                       <Value> '/' <Value_Increment> { '@' <Value_Increment> } 
                      ) { ',' <ValueRangeSet> }

Some notes on usage:

  • Note first that more than one RecordSetFilter may be supplied. In this case each one can serve to limit the set of records selected. If no RecordSetFilter is specified the entire series is implied. Also note that SQL-like queries can be mixed with prime key queries.

  • If the RecordList is not a RecnumRangeSet (i.e. set of absolute record numbers) then it will be a set based on one of the prime keys.

  • The prime key name need not be specified but care must be used in this case. RecordLists with implied keyword names will be matched to the prime keys in the order in which the RecordLists are encountered. An empty ValueRangeSet in the special case where no prime keytword is given simply advances the prime key counter. Thus if you want to specify a range of e.g. four days in the second prime key you can use a form like:

seriesname[][2006.01.04/4d]
  • In a [? ... ?] clause, a test for value of a string type keyword must have the string to match in single quotes, i.e.

[? MagnetidType = 'Alpha' ?]

works, but using ".." or no quotes fails. This is because anything between the question marks are treated without modification as part of the SQL WHERE clause. For valid SQL syntax, please refer to http://www.postgresql.org/docs/8.2/static/sql-syntax.html

JsocWiki: DrmsNames (last edited 2013-05-01 04:35:25 by localhost)