datasets


URI

<relationship_uri>/datasets[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

relationship

Child resources

dataset

Introduction

The datasets resource represents a dataset collection in a datasource.

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

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/datacatalog/rest/datacatalog/relationship/datasets.rjson

GET request

Gets all datasets information in a specified datasource.

Response structure

The structure of the response resource representation after implementing the GET request on the datasets resource will be as follows:

Field Type Description

childUriList

List<String> URL corresponding to Dataset name, which is the url to visit the child resource(dataset resource).
datasetCount int Dataset count.

datasetNames

String Dataset names.

Response example

The returned rjson format representation after implementing the GET request on the datasets resource http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datasets.rjson is as follows:

{

  "childUriList": "http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datasets/newyorkZone_R_816363505,   http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datasets/singleRegion_R_1623065691",

  "datasetCount":" 2",

  "datasetNames": "newyorkZone_R_816363505, singleRegion_R_1623065691",

}

POST request

Creates a dataset.

Request parameter

The following arguments need to be contained within request body:

Name Type Description
name String dataset name(required)
type String dataset type(required)
charset String dataset charset

isFileCache

boolean Whether to store cache with file format.

description

String The descriptive information of dataset.

prjCoordSys

String Projected coordinate system.

Response structure

The structure of the response resource representation after implementing the POST request on the datasets resource will be as follows:

Field Type Description
newResourceID String Resource ID of new created dataset.

newResourceLocation

String Resource URI of new created dataset.

postResultType

String Represents child resource.

succeed

boolean Whether it's successful to create dataset.

Response example

Execute POST request on datasets resource: http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datasets.rjson. The request arguments are as follows:

{   

     "prjCoordSys":

               {

                “distanceUnit":"METER",

                ”projectionParam":null,

                “epsgCode":4326,

                ”coordUnit":"DEGREE",

                “name":"Longitude / Latitude Coordinate System---GCS_WGS_1984",

                ”projection":null,

                “type":"PCS_EARTH_LONGITUDE_LATITUDE",

                ”coordSystem":

                      {“datum":

                            {

                             ”name":"D_WGS_1984",

                             “type":"DATUM_WGS_1984",

                             ”spheroid":

                                    {“flatten":0.00335281066474748,

                                     ”name":"WGS_1984", "axis":6378137,

                                     “type":"SPHEROID_WGS_1984"

                                    }

                              },

                        ”unit":"DEGREE",

                        “spatialRefType":"SPATIALREF_EARTH_LONGITUDE_LATITUDE",

                        ”name":"GCS_WGS_1984", "type":"GCS_WGS_1984",

                        “primeMeridian":

                            {

                              ”longitudeValue":0,

                              “name":"Greenwich",

                              ”type":"PRIMEMERIDIAN_GREENWICH"

                            }

                       }

                  },

     “name":"test1",

     ”type":"POINT",

     “charset":"",

      ”isFileCache":"",

      “description":""

}

The returned rjson format representation after implementing the POST request:

{

    ”newResourceID": "/test1",

    “newResourceLocation": "http://supermapiserver:8090/iserver/services/datacatalog/rest/datacatalog/relationship/datasets/test1.json",

    ”postResultType": "CreateChild",

    “succeed": True

}

HEAD request

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 contained 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 whether the datasets resource exists, or whether the the client has the permission to access it. It can also determine if the datasets resource supports an output format <format> if performed on a URI with .<format> included.

See