Project

General

Profile

Actions

Query » History » Revision 14

« Previous | Revision 14/29 (diff) | Next »
Alison Craig, 03/04/2015 01:03 PM


Query

The Query parameter are named as

/<prefix>/query/<query-parameters>

For the Query Protocol, the user will send query parameters as a JSON list, with the format: {[field1]=[search1],[field2]=[search2],?=[search3]} where field1 and field2 are Name components, ? indicates an autocomplete search, and search* is what to use for searching on. (See Schema)

In response, the Query backend of the Catalog will make Data available that includes a list of names that match the query.


JSON Schemas

JSON Query


{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Catalog Query",
    "type": "array",
    "items": {
        "title": "QueryField",
        "type": "object",
        "properties": {
            "Name": {
                "type": "string"
            },
            "Activity": {
                "type": "string"
            },
            "Product": {
                "type": "string"
            },
            "Organization": {
                "type": "string"
            },
            "Model": {
                "type": "string"
            },
            "Experiment": {
                "type": "string"
            },
            "Frequency": {
                "type": "string"
            },
            "modeling realm": {
                "type": "string"
            },
            "variable name": {
                "type": "string"
            },
            "ensemble member": {
                "type": "string"
            },
            "Ensemble": {
                "type": "string"
            },"Sample Granularity": {
                "type": "string"
            },"Start Time": {
                "type": "string"
            },"field campaign": {
                "type": "string"
            },
            "optical properties for radiation": {
                "type": "string"
            },
            "grid resolution": {
                "type": "string"
            }"output type": {
                "type": "string"
            },
            "timestamp": {
                "type": "string"
            },
            "?": {
                "description": "Autocomplete search field"
                "type": "string"
            }
        },
        "required": []
    }
}

Query Results Data TLV

The Query results TLV Data matches the Query Interest TLV. It has an added Blob (or payload) of the List of Names that match the Query. This Blob is defined by a second TLV such that we have either Name results:

Type = Name (0x07)
Length = 4000
Value = Name

or next fields (with an autocomplete)

Type = [?]
Length = 4000
Value = Possible next field

Updated by Alison Craig over 9 years ago · 29 revisions