Knowledge Integration Services (KIS) ************************************ #. Check whether given data and model match .. http:get:: /modelDataMatches :synopsis: Returns whether the given data graph provides all the variables that the given model requires, in JSON format. :query string model: name of the model graph :query string modelVarPropertyName: name of the variable property used in the model graph :query string data: name of the data graph :query string dataVarPropertyName: name of the variable property used in the data graph **Example request**: .. sourcecode:: http GET /gsis/modelDataMatches?model=model-3&modelVarPropertyName=http://ecgs.ncsa.illinois.edu/bmi_models/temp/hasStandardName&data=data-3&dataVarPropertyName=http://ecgs.ncsa.illinois.edu/gsis/sas/vars HTTP/1.1 Host: ecgs.ncsa.illinois.edu User-Agent: curl/7.43.0 Accept: */* **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Server: nginx/1.4.6 (Ubuntu) Date: Tue, 03 May 2016 20:59:37 GMT Content-Type: application/json .. code-block:: json { "model variables" : "http://vocabulary.odm2.org/variablename/windSpeed,http://csdms.colorado.edu/wiki/CSN_Searchable_List/atmosphere_bottom_air__brutsaert_emissivity_canopy_factor", "data variables, original" : "http://csdms.colorado.edu/wiki/CSN_Searchable_List/atmosphere_bottom_air__brutsaert_emissivity_canopy_factor,http://csdms.colorado.edu/wiki/CSN_Searchable_List/land_surface_air_flow__speed", "data variables, with inference" : "http://csdms.colorado.edu/wiki/CSN_Searchable_List/atmosphere_bottom_air__brutsaert_emissivity_canopy_factor,http://csdms.colorado.edu/wiki/CSN_Searchable_List/land_surface_air_flow__speed,http://vocabulary.odm2.org/variablename/windGustSpeed,http://vocabulary.odm2.org/variablename/windSpeed", "missing variables" : "", "Matching status" : "true" } .. jsoncall:: /gsis/modelDataMatches {"model": "model-3", "modelVarPropertyName": "http://ecgs.ncsa.illinois.edu/bmi_models/temp/hasStandardName", "data": "data-3", "dataVarPropertyName": "http://ecgs.ncsa.illinois.edu/gsis/sas/vars"} #. Find equivalent variable names .. http:get:: /var/sameAs/skos :synopsis: Returns the equivalent variable names using the **skos:exactMatch** relationship. :query string varName: the variable name **Example request**: .. sourcecode:: http GET /gsis/var/sameAs/skos?varName=http://vocabulary.odm2.org/variablename/windSpeed HTTP/1.1 Host: ecgs.ncsa.illinois.edu User-Agent: curl/7.43.0 Accept: */* **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Server: nginx/1.4.6 (Ubuntu) Date: Tue, 03 May 2016 20:59:37 GMT Content-Type: application/json .. code-block:: json ["http://csdms.colorado.edu/wiki/CSN_Searchable_List/land_surface_air_flow__speed","http://vocabulary.odm2.org/variablename/windSpeed","http://vocabulary.odm2.org/variablename/windGustSpeed"] .. jsoncall:: /gsis/var/sameAs/skos {"varName": "http://vocabulary.odm2.org/variablename/windSpeed"} .. http:get:: /var/sameAs/owl :synopsis: Returns the equivalent variable names using the **owl:sameAs** relationship. :query string varName: the variable name **Example request**: .. sourcecode:: http GET /gsis/var/sameAs/owl?varName=http://vocabulary.odm2.org/variablename/windSpeed HTTP/1.1 Host: ecgs.ncsa.illinois.edu User-Agent: curl/7.43.0 Accept: */* **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Server: nginx/1.4.6 (Ubuntu) Date: Tue, 03 May 2016 20:59:37 GMT Content-Type: application/json .. code-block:: json ["http://csdms.colorado.edu/wiki/CSN_Searchable_List/land_surface_air_flow__speed","http://vocabulary.odm2.org/variablename/windSpeed","http://vocabulary.odm2.org/variablename/windGustSpeed"] .. jsoncall:: /gsis/var/sameAs/owl {"varName": "http://vocabulary.odm2.org/variablename/windSpeed"} #. Search data for a given model .. http:get:: /searchDataForModel :synopsis: Returns the files in Clowder containing the variables needed by the models in the given RDF graph (knowledge base) in JSON format. :query string graph: name of the graph (knowledge base) containing the models :query string modelVarPropertyName: name of the variable property used in the model graph :query string sameAsType: one of "skos", "owl", defaults to "skos" :query string clowderUrl: URL of clowder :query string clowderMetadataKeyName: the metadata key name used in Clowder, defaults to "SAS+Variable+Name" **Example request**: .. sourcecode:: http GET /gsis/searchDataForModel?graph=demo-model&modelVarPropertyName=http://ecgs.ncsa.illinois.edu/bmi_models/temp/hasStandardName&clowderUrl=http://ecgs.ncsa.illinois.edu/clowder HTTP/1.1 Host: ecgs.ncsa.illinois.edu User-Agent: curl/7.43.0 Accept: */* **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Server: nginx/1.4.6 (Ubuntu) Date: Tue, 03 May 2016 20:59:37 GMT Content-Type: application/json .. code-block:: json [{"variable":"http://vocabulary.odm2.org/variablename/windSpeed","files":[{"equivalent_variable":"odm2:windGustSpeed","file_info":[{"id":"569d5567e4b0f3739374070c","name":"Saybrook_h2o.csv"}]}]},{"variable":"http://csdms.colorado.edu/wiki/CSN_Searchable_List/atmosphere_bottom_air__brutsaert_emissivity_canopy_factor","files":[{"equivalent_variable":"csn:atmosphere_bottom_air__brutsaert_emissivity_canopy_factor","file_info":[{"id":"56144d06e4b098271477dcf5","name":"Dog_Canyon_Data.xlsx"}]}]}] .. jsoncall:: /gsis/searchDataForModel {"graph": "demo-model", "modelVarPropertyName": "http://ecgs.ncsa.illinois.edu/bmi_models/temp/hasStandardName", "clowderUrl": "http://ecgs.ncsa.illinois.edu/clowder"}