<dataset_uri>/domain[.<format>]
The domain resource depicts the domain information of the field. The domain resource contains the fields for the current dataset with domain set, and the domain information for these fields, including field name, field type, domain type, and domain range, etc.
The domain type includes CODE and RANGE.
Supported Methods:
Supported output formats: rjson, json, html, xml.
Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.
http://supermapiserver:8090/iserver/services/data-jingjin/rest/data/datasources/Jingjin/datasets/Landuse_R/domain.rjson
Get the domain information for all fields of the dataset. You can acquire the field name, field type, domain type, domain range, etc.
None
Return the domain information for all fields of the dataset. The result should be an array of domain information for all fields. The response structure of domain information of each field is as follows:
Field | Type | Description |
discription | String | The descriptive information. |
name | String | The name of the domain. |
FieldName | String | The name of the field. |
Type | DomainType | The domain type. |
ValueType | FieldType | The data type of the domain. |
codeCount | int | The number of enumeration values. While the domain type is CODE, the field will be returned. |
codeInfo | CodeInfo[] | The content description of the enumeration.While the domain type is CODE, the field will be returned. |
rangeCount | int | The number of enumeration values. While the domain type is CODE, the field will be returned. |
rangeInfos | RangeInfo[] | The description of the domain range. While the domain type is RANGE, the field will be returned. |
where codeInfo field represents the specific enumeration content. Please refer to CodeInfo for structure. Specific parameters are as follows:
Field | Type | Description |
value | String | The enumeration values, that is, values of the field can only be selected from enumeration values. |
ValueType | FieldType | The field type of the enumberation value. |
rangeInfo field represents specified value range. Please refer to RangeInfo for structure. Specific parameters are as follows:
Field | Type | Description |
max | String | The maximum value of the specified value range. |
min | String | The minimum value of the specified value range. |
type | RangeType | The range type of the domain. For example, CLOSE_CLOSE indicates closed interval, such as [min,max]; CLOSE_OPEN indicates left closed and right open interval, such as [min,max). |
ValueType | FieldType | The field type of the enumberation value. |
Implement the GET reqeust on the domain resource
http://localhost:8090/iserver/services/data-jingjin/rest/data/datasources/Jingjin/datasets/Landuse_R/domain.rjson
The result returned is as follows:
[
{
"codeCount": 11,
"codeInfos": [
{
"value": "City",
"valueType": "TEXT"
},
{
"value": "Dry land",
"valueType": "TEXT"
},
{
"value": "Irrigated land",
"valueType": "TEXT"
},
{
"value": "Paddy field",
"valueType": "TEXT"
},
{
"value": "Desert",
"valueType": "TEXT"
},
{
"value": "Swamp",
"valueType": "TEXT"
},
{
"value": "Lakes and reservoirs",
"valueType": "TEXT"
},
{
"value": "Shrub",
"valueType": "TEXT"
},
{
"value": "Timber",
"valueType": "TEXT"
},
{
"value": "Forest",
"valueType": "TEXT"
},
{
"value": "Grassland",
"valueType": "TEXT"
}
],
"description": "",
"fieldName": "LANDTYPE",
"name": "LANDTYPE",
"type": "CODE",
"valueType": "TEXT"
},
{
"description": "",
"fieldName": "Area",
"name": "Area",
"rangeCount": 1,
"rangeInfos": [{
"max": "999999.0",
"min": "0.0",
"type": "CLOSE_OPEN",
"valueType": "SINGLE"
}],
"type": "RANGE",
"valueType": "SINGLE"
}
]
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
HEAD request can be used to check if the domain resource exists, or if the domain resource can be accessed by clients. It can also determine if the domain resource supports an output format <format> if performed on a URI with .<format> included.