DDE realizes the interoperability of knowledge related functions and contents through knowledge APIs. Based on these APIs, users can build more flexible related applications. The knowledge APIs can be divided into knowledge navigation service, knowledge retrieval service and knowledge online reference service according to functions.
DDE knowledge graph is a technical method to describe the geological knowledge and its relationships with a graph model. A knowledge graph instance is a basic unit that organizes a collection of domain related knowledge contents, including classes, relationships, attributes and instances. The following is a detailed table describing the DDE knowledge graph:
DDE Knowledge Graph
Class
Relation
Attribute
This part provides developers with a standard API interface for obtaining knowledge from the DDE platform, and supports developers' knowledge navigation, knowledge retrieval, and knowledge online acquisition needs.
GET https://deep-time.org/v1.0/api/kg/list/{page_num}/{page_size}
This interface enables developers to get the list of knowledge graphs currently contained in the DDE.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/list/1/30
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "total": 68, "rows": [ { "id": 6, "nameEN": "Data Morphology Ontology", "nameCN": "数据形态本体", "infoEN": "Morphology characteristics (MCs) of geoscience data refer to the internal structure and external form of data, including data type, digital format, storage media, unit of measurement, data structure, spatial precision, temporal granularity, etc. ", "infoCN": null, "graphIRI": null, "graphId": 6, "parentId": 1, "type": 2 }, { "id": 7, "nameEN": "Data Provenance Ontology", "nameCN": "数据来源本体", "infoEN": "Geoscience data provenance is a procedure which records how people or agencies use tools for data activities (such as data acquisition, data processing, data\ndistribution, and data management) in a certain temporal-spatial range during a\ncomplete geoscience data life cycle (the process from data creation, storage to\ndeletion). ", "infoCN": null, "graphIRI": null, "graphId": 4, "parentId": 1, "type": 2 } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}
This interface enables developers to get the specified knowledge graph information with its id.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "id": 10, "nameEN": "Uniform Spatial Ontology", "nameCN": "统一空间本体", "infoEN": "The goal of Unified Spatial Ontology (USO) is to provide a unified and basic representation for the spatial components of Geoscience objects, thereby making their semantic information machine-understandable and -computable. ", "infoCN": null, "graphIRI": null, "graphId": 3, "parentId": 5, "type": 2 } }
GET https://deep-time.org/v1.0/api/kg/{id}/ontology
This interface enables developers to get the ontology description of a specified knowledge graph with its id.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10/ontology
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "id": 4144, "label": "Ontology", "properties": [ { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#comment", "value": [ { "value": "An ontology designed for the descripton of spatial characteristics of geoscience objects.", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#label", "value": [ { "value": "Uniform Spatial Ontology", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "uri", "value": [ { "value": "http://bo4gk.org/uso", "meta": {} } ] }, { "cardinality": "single", "key": "http://purl.org/dc/terms/creator", "value": [ { "value": "Yunqiang Zhu Group", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "list", "key": "http://purl.org/dc/terms/contributor", "value": [ { "value": "Yunqiang Zhu", "meta": { "datatype": "LangString", "lang": "en" } }, { "value": "Kai Sun", "meta": { "datatype": "LangString", "lang": "en" } }, { "value": "Lei Hu", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://purl.org/dc/terms/date", "value": [ { "value": "2022-01-15", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://purl.org/dc/terms/title", "value": [ { "value": "Uniform Spatial Ontology", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://purl.org/dc/terms/description", "value": [ { "value": "An ontology designed for the descripton of spatial characteristics of geoscience objects.", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2002/07/owl#versionInfo", "value": [ { "value": "1.0", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2002/07/owl#versionIRI", "value": [ { "value": "http://bo4gk.org/uso/1.0", "meta": {} } ] } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/class/list/{page_num}/{page_size}
This interface enables developers to get the list of classes contained in a knowledge graph.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10/class/list/1/2
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "total": 19, "rows": [ { "id": 4240, "uri": "http://bo4gk.org/uso#toponym", "nid": null }, { "id": 8256, "uri": "http://bo4gk.org/uso#featureclass", "nid": null } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/class
This interface enables developers to get the specified class information with its id.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api//kg/10/class?uri=http://bo4gk.org/uso%23classificationsystem
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "id": 16608, "label": "Class", "properties": [ { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#comment", "value": [ { "value": "topic list to classify spatial objects into different classes", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#label", "value": [ { "value": "classification_system", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "uri", "value": [ { "value": "http://bo4gk.org/uso#classificationsystem", "meta": {} } ] } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/instance/list/{page_num}/{page_size}
This interface enables the developers to obtain the instance list belonging to the specified class.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/list/10/instance/list/1/1?classURI=http://bo4gk.org/uso%23classificationsystem
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "total": 1, "rows": [ { "id": 4320, "uri": "http://bo4gk.org/uso#GCMD", "nid": null } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/instance
This interface enables developers to get the specified instance information with its id.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10/instance?uri=http://bo4gk.org/uso%23GCMD
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "id": 4320, "label": "Individual", "properties": [ { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#isDefinedBy", "value": [ { "value": "https://earthdata.nasa.gov/earth-observation-data/find-data/idn/gcmd-keywords", "meta": { "datatype": "http://www.w3.org/2001/XMLSchema#string" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#comment", "value": [ { "value": "Global Change Master Directory (GCMD) Keywords are a hierarchical set of controlled Earth Science vocabularies that help ensure Earth science data, services, and variables are described in a consistent and comprehensive manner and allow for the precise searching of metadata and subsequent retrieval of data, services, and variables.", "meta": { "datatype": "http://www.w3.org/2001/XMLSchema#string" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#label", "value": [ { "value": "GCMD", "meta": { "datatype": "http://www.w3.org/2001/XMLSchema#string" } } ] }, { "cardinality": "single", "key": "uri", "value": [ { "value": "http://bo4gk.org/uso#GCMD", "meta": {} } ] }, { "cardinality": "single", "key": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", "value": [ { "value": "http://bo4gk.org/uso#classificationsystem", "meta": {} } ] } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/object_property/list/{page_num}/{page_size}
This interface enables developers to get the list of relations contained in a knowledge graph.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10/object_property/list/1/2
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "total": 30, "rows": [ { "id": 4152, "uri": "http://bo4gk.org/uso#pt_geometry_dp", "nid": null }, { "id": 4160, "uri": "http://bo4gk.org/uso#z_coordinate", "nid": null } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/object_property
This interface enables developers to get the specified relation information with its id.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10/object_property?uri=http://bo4gk.org/uso%23location_op
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "id": 12512, "label": "ObjectProperty", "properties": [ { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#comment", "value": [ { "value": "showing the object properties of location", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#label", "value": [ { "value": "location_op", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "uri", "value": [ { "value": "http://bo4gk.org/uso#location_op", "meta": {} } ] } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/data_property/list/{page_num}/{page_size}
This interface enables developers to get the list of attributes contained in a knowledge graph.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10/data_property/list/1/2
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "total": 3, "rows": [ { "id": 28720, "uri": "http://bo4gk.org/uso#featureclass_dp", "nid": null }, { "id": 32896, "uri": "http://bo4gk.org/uso#location_dp", "nid": null } ] } }
GET https://deep-time.org/v1.0/api/kg/{id}/data_property
This interface enables developers to get the specified attribute information with its id.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/10/data_property?uri=http://bo4gk.org/uso%23featureclass_dp
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "id": 28720, "label": "DataTypeProperty", "properties": [ { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#comment", "value": [ { "value": "data properties for feature class", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "http://www.w3.org/2000/01/rdf-schema#label", "value": [ { "value": "featureclass_dp", "meta": { "datatype": "LangString", "lang": "en" } } ] }, { "cardinality": "single", "key": "uri", "value": [ { "value": "http://bo4gk.org/uso#featureclass_dp", "meta": {} } ] } ] } }
GET https://deep-time.org/v1.0/api/kg/search/compound
This interface enables developers to retrieve knowledge content of interest.
i. Request parameters
ii. Request example
https://deep-time.org/v1.0/api/kg/search/compound?containInstance=true&discipline=Stratigraphy,Spatial Ontology&source=BO4GK,GAKG,GPKG&pageNum=1&pageSize=2&keyword=spatial
iii. Response parameters
iv. Response example
{ "code": 200, "message": "success", "data": { "total": 23, "GPKG": { "total": 1, "rows": [ { "name": "Spatial Scale", "description": "The spatial scale depends on the cause of the chemostratigraphic index/marker being local, regional, basinal, and global, based on which, the chemozone recognized could be correlated at an appropriate scale.", "source": "GPKG", "id": 1262, "discipline": "Stratigraphy", "label": "Class", "uri": "Spatial Scale" } ] }, "GAKG": { "total": 0, "rows": [] }, "time": 120, "BO4GK": { "total": 22, "rows": [ { "id": "graph3_16440", "source": "BO4GK", "label": "ObjectProperty", "uri": "http://bo4gk.org/uso#geometry_op", "name": "geometry_op", "description": "object properties for geometry of spatial objects", "discipline": "Spatial Ontology" }, { "id": "graph3_16448", "source": "BO4GK", "label": "Class", "uri": "http://bo4gk.org/uso#geometry_type", "name": "geometry_type", "description": "describing the geometry type of spatial object", "discipline": "Spatial Ontology" } ] } } }