Personal tools
Document Actions

getCategories

by roland — last modified 2007-06-22 14:35

This is the top-level service for the UI. From here you get a list of named containers called categories.

The first call to construct a user interface is to get the top-level containers that the user can select to begin interacting with the data discover portion of the LAS interface.  This call (http://server.com/las/getCategories.do) will return the top-level category containers and each will be marked according to what type of children it has.  A category can have other categories as children or it can have a data set with variables as a child.  (The new rules for category construction prohibit mixing variables from different data sets into the same category).

For example, the default LAS configuration give the following result.

{"categories": {"category": [
{
"doc": "",
"url": "file:coads_climatology",
"properties": {"property_group": {
"type": "ferret",
"property": {
"value": "shade",
"name": "land_type"
}
}},
"name": "COADS climatology",
"children": "variables",
"ID": "coads_climatology_cdf"
},
{
"doc": "docs/levitus_monthly.html",
"url": "file:levitus_climatology",
"properties": {"property_group": {
"type": "ferret",
"property": {
"value": "shade",
"name": "land_type"
}
}},
"name": "Levitus Climatology",
"children": "variables",
"ID": "levitus_climatology_cdf"
},
{
"doc": "http://www.cdc.noaa.gov/cdc/data.ncep.pac.ocean.html",
"name": "NCEP Pacific Ocean Analysis",
"children": "variables",
"ID": "NOAA-CIRES-CDC-Leetmaa_Ocean_Analysis"
},
{
"doc": "",
"url": "Indian",
"properties": {"property_group": [
{
"type": "ui",
"property": {
"value": "file:ui.xml#insitu_demo",
"name": "default"
}
},
{
"type": "database_access",
"property": [
{
"value": "mysql",
"name": "db_type"
},
{
"value": "LAS_insitu_demo",
"name": "db_name"
},
{
"value": "LAS in-situ demo",
"name": "db_title"
},
{
"value": "localhost",
"name": "db_host"
},
{
"value": "las",
"name": "db_login"
},
{
"value": "lasrules",
"name": "db_passwd"
},
{
"value": "Indian",
"name": "db_table"
},
{
"value": "Longitude",
"name": "longitude"
},
{
"value": "0:360",
"name": "lon_domain"
},
{
"value": "Latitude",
"name": "latitude"
},
{
"value": "Depth",
"name": "depth"
},
{
"value": "meters",
"name": "depth_units"
},
{
"value": "t",
"name": "time"
},
{
"value": "19990101",
"name": "time_sample"
},
{
"value": "int",
"name": "time_type"
},
{
"value": "YYYYMMdd",
"name": "time_format"
},
{
"value": "hours since 1970-01-01 00:00:00",
"name": "time_units"
},
{
"value": {},
"name": "hours_1970"
},
{
"value": {},
"name": "profID"
},
{
"value": "CruiseNum",
"name": "cruiseID"
},
{
"value": {},
"name": "metadata"
},
{
"value": {},
"name": "executable"
},
{
"value": "-999",
"name": "missing"
},
{
"value": "180",
"name": "timeout"
}
]
}
]},
"name": "LAS in-situ demo",
"children": "variables",
"ID": "Indian_Data"
},
{
"doc": "",
"url": "platforms",
"properties": {"property_group": [
{
"type": "ui",
"property": {
"value": "file:ui.xml#insitu_demo_2",
"name": "default"
}
},
{
"type": "database_access",
"property": [
{
"value": "mysql",
"name": "db_type"
},
{
"value": "LAS_insitu_demo",
"name": "db_name"
},
{
"value": "LAS in-situ demo 2",
"name": "db_title"
},
{
"value": "localhost",
"name": "db_host"
},
{
"value": "las",
"name": "db_login"
},
{
"value": "lasrules",
"name": "db_passwd"
},
{
"value": "platforms",
"name": "db_table"
},
{
"value": "lon",
"name": "longitude"
},
{
"value": "0:360",
"name": "lon_domain"
},
{
"value": "lat",
"name": "latitude"
},
{
"value": {},
"name": "depth"
},
{
"value": {},
"name": "depth_units"
},
{
"value": "time",
"name": "time"
},
{
"value": "1999-01-01",
"name": "time_sample"
},
{
"value": "string",
"name": "time_type"
},
{
"value": "yyyy-MM-dd HH:mm:ss.SSS",
"name": "time_format"
},
{
"value": "hours since 1970-01-01 00:00:00",
"name": "time_units"
},
{
"value": {},
"name": "hours_1970"
},
{
"value": {},
"name": "profID"
},
{
"value": {},
"name": "cruiseID"
},
{
"value": "id,country,type",
"name": "string_vars"
},
{
"value": "ID,Country,Platform Type",
"name": "string_var_titles"
},
{
"value": "8,2,16",
"name": "string_var_lengths"
},
{
"value": {},
"name": "metadata"
},
{
"value": {},
"name": "executable"
},
{
"value": "-999",
"name": "missing"
},
{
"value": "180",
"name": "timeout"
}
]
}
]},
"name": "Platforms with IDs",
"children": "variables",
"ID": "platforms"
},
{
"doc": "",
"url": "http://nwioos.coas.oregonstate.edu:8080/dods/drds/1998%20Hake%20Survey%20ADCP",
"properties": {"property_group": [
{
"type": "ui",
"property": {
"value": "file:ui.xml#nwioos_demo",
"name": "default"
}
},
{
"type": "database_access",
"property": [
{
"value": "drds",
"name": "db_type"
},
{
"value": "NWIOOS Server",
"name": "db_server"
},
{
"value": "1998 Hake Survey ADCP",
"name": "db_name"
},
{
"value": "1998 Hake Survey ADCP",
"name": "db_title"
},
{
"value": "localhost",
"name": "db_host"
},
{
"value": "adcp98",
"name": "db_table"
},
{
"value": "X",
"name": "longitude"
},
{
"value": "-180:180",
"name": "lon_domain"
},
{
"value": "Y",
"name": "latitude"
},
{
"value": "Z",
"name": "depth"
},
{
"value": "meters",
"name": "depth_units"
},
{
"value": "yearday",
"name": "time"
},
{
"value": "double",
"name": "time_type"
},
{
"value": "days since 1998-01-01 00:00:00",
"name": "time_units"
},
{
"value": {},
"name": "hours_1970"
},
{
"value": "-9999.0",
"name": "missing"
},
{
"value": "down",
"name": "positive"
}
]
}
]},
"name": "1998 Hake Survey ADCP (Example of data from a DRDS Server)",
"children": "variables",
"ID": "hake98"
},
{
"doc": "",
"url": "http://las.pfeg.noaa.gov/dods/ndbc/all_noaa_time_series.cdp",
"properties": {"property_group": [
{
"type": "ui",
"property": {
"value": "file:ui.xml#dapper_demo",
"name": "default"
}
},
{
"type": "database_access",
"property": [
{
"value": "down",
"name": "positive"
},
{
"value": "location.profile.TIME",
"name": "time"
},
{
"value": "meters",
"name": "depth_units"
},
{
"value": "all_noaa_time_series.cdp",
"name": "db_table"
},
{
"value": "location.DEPTH",
"name": "depth"
},
{
"value": "NOAA Time Series",
"name": "db_title"
},
{
"value": "NaN",
"name": "missing"
},
{
"value": "0:360",
"name": "lon_domain"
},
{
"value": "msec since 1970-01-01 00:00:00",
"name": "time_units"
},
{
"value": "location.LON",
"name": "longitude"
},
{
"value": "NOAA Time Series",
"name": "db_name"
},
{
"value": "PFEG Server",
"name": "db_server"
},
{
"value": "double",
"name": "time_type"
},
{
"value": "dapper",
"name": "db_type"
},
{
"value": "location.LAT",
"name": "latitude"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "1000",
"name": "ui_timeout"
},
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "false",
"name": "use_cache"
}
]
}
]},
"name": "NOAA Time Series (Example of data from a Dapper Server)",
"children": "variables",
"ID": "pfeg"
}
]}}

Each of these categories is marked as having "variables" as children.  Which is to say that the response from a query for the children of one of these categories will be a single category/dataset container with all of the member children include.  For example:

{"categories": {"category": {"dataset": {
"doc": "docs/levitus_monthly.html",
"variables": {"variable": [
{
"grid": {"IDREF": "levitus_climatology_cdf_grid"},
"grid_type": "regular",
"intervals": "xyz",
"units": "PPT",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "fill",
"name": "fill_type"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "SALINITY",
"points": "xyz",
"ID": "salt"
},
{
"grid": {"IDREF": "levitus_climatology_cdf_grid"},
"grid_type": "regular",
"intervals": "xyz",
"units": "DEG C",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "fill",
"name": "fill_type"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "TEMPERATURE",
"points": "xyz",
"ID": "temp"
}
]},
"url": "file:levitus_climatology",
"properties": {"property_group": {
"type": "ferret",
"property": {
"value": "shade",
"name": "land_type"
}
}},
"name": "Levitus Climatology",
"ID": "levitus_climatology_cdf"
}}}}

Since categories are an optional part of the LAS configuration that is used to reorganized the presentation of the datasets included, behind the scenes the services are translating the bare-bones <dataset> and <variable> containers into categories.

However, if the installer organizes the dataset presentation into categories, a UI client will need to traverse several levels of categories to eventually descend to a <dataset> which contains variables.  For example, reconfiguring the default collection of data sets into categories would yield a top-level set of categories that look like this:

{"categories": {"category": [
{
"name": "Climatologies defined on a grid",
"children": "categories",
"ID": "C5064686391F0C35C10B07A6B1989FF9"
},
{
"name": "Monthly data defined on a grid",
"children": "categories",
"ID": "15C4A42D3FBB6645D6792E538BB86FB8"
},
{
"name": "Observational Point Data",
"children": "categories",
"ID": "A3901A996B3FCD83E86E7FF69B8D91CB"
}
]}}

Following that hierarchy down one level.

getCategories.do?catid=C5064686391F0C35C10B07A6B1989FF9

{"categories": {"category": [
{
"name": "COADS Climatology",
"children": "variables",
"ID": "4DC17D42B35521AC833A3621857444C1"
},
{
"name": "Levitus Climatology",
"children": "variables",
"ID": "49C75B06D653861A2E7B6B9288A09739"
}
]}}

Finally, a data set with it's member variables is at the end of the chain.

getCategories.do?catid=4DC17D42B35521AC833A3621857444C1

{"categories": {"category": {
"dataset": {
"composite": {"variable": {
"grid": {"IDREF": "coads_climatology_cdf"},
"link": {"match": "/lasdata/datasets/coads_climatology_cdf/variables/vwnd"},
"properties": {"property_group": {
"type": "ui",
"property": {
"value": "file:ui.xml#VecVariable",
"name": "default"
}
}},
"name": "wind vectors",
"ID": "wind_vectors"
}},
"doc": "",
"variables": {"variable": [
{
"grid": {"IDREF": "coads_climatology_cdf_COADSX_COADSY_TIME_grid"},
"grid_type": "regular",
"intervals": "xyt",
"units": "DEG C",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "fill",
"name": "fill_type"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "AIR TEMPERATURE",
"points": "xyt",
"ID": "airt"
},
{
"grid": {"IDREF": "coads_climatology_cdf_COADSX_COADSY_TIME_grid"},
"grid_type": "regular",
"intervals": "xyt",
"units": "G/KG",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "fill",
"name": "fill_type"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "SPECIFIC HUMIDITY",
"points": "xyt",
"ID": "speh"
},
{
"grid": {"IDREF": "coads_climatology_cdf_COADSX_COADSY_TIME_grid"},
"grid_type": "regular",
"intervals": "xyt",
"units": "Deg C",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "fill",
"name": "fill_type"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "SEA SURFACE TEMPERATURE",
"points": "xyt",
"ID": "sst"
},
{
"grid": {"IDREF": "coads_climatology_cdf_COADSX_COADSY_TIME_grid"},
"grid_type": "regular",
"intervals": "xyt",
"units": "M/S",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "light_centered",
"name": "palette"
},
{
"value": "fill",
"name": "fill_type"
},
{
"value": "20c",
"name": "fill_levels"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "ZONAL WIND",
"points": "xyt",
"ID": "uwnd"
},
{
"grid": {"IDREF": "coads_climatology_cdf_COADSX_COADSY_TIME_grid"},
"grid_type": "regular",
"intervals": "xyt",
"units": "M/S",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "fill",
"name": "fill_type"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "WIND SPEED",
"points": "xyt",
"ID": "wspd"
},
{
"grid": {"IDREF": "coads_climatology_cdf_COADSX_COADSY_TIME_grid"},
"grid_type": "regular",
"intervals": "xyt",
"units": "M/S",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "light_centered",
"name": "palette"
},
{
"value": "fill",
"name": "fill_type"
},
{
"value": "20c",
"name": "fill_levels"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "MERIDIONAL WIND",
"points": "xyt",
"ID": "vwnd"
},
{
"grid": {"IDREF": "coads_climatology_cdf_COADSX_COADSY_TIME_grid"},
"grid_type": "regular",
"intervals": "xyt",
"units": "MB",
"properties": {"property_group": [
{
"type": "ferret",
"property": [
{
"value": "fill",
"name": "fill_type"
},
{
"value": "contour",
"name": "land_type"
}
]
},
{
"type": "product_server",
"property": [
{
"value": "3600",
"name": "ps_timeout"
},
{
"value": "20",
"name": "ui_timeout"
},
{
"value": "true",
"name": "use_cache"
}
]
}
]},
"name": "SEA LEVEL PRESSURE",
"points": "xyt",
"ID": "slp"
}
]},
"url": "file:coads_climatology",
"properties": {"property_group": {
"type": "ferret",
"property": {
"value": "shade",
"name": "land_type"
}
}},
"name": "COADS climatology",
"ID": "coads_climatology_cdf"
},
"name": "COADS Climatology",
"ID": "4DC17D42B35521AC833A3621857444C1"
}}}

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: