CTS2-LE REST API: OWL Update
Updates an OWL ontology. If the ontology does not exist, it is created. The ontology is mapped to a code system version of the CTS2 information model.
Operation Syntax
POST /service/crud/owl/update
- Updates an OWL ontology. If the ontology does not exist, it is created. The ontology is mapped to a code system version of the CTS2 information model
- Request Body
application/xml- owl stream
- Parameters
- uri (type:
string, occurrence:required)- uri of the ontology. Note that the pair (
uri,version) uniquely defines a code system version within CTS2-LE
- uri of the ontology. Note that the pair (
- version (type:
string, occurrence:required)- version of the ontology
- isDefaultVersion (type:
boolean, occurrence:optional, default:true)- store as default version
- resourceId (type:
string, occurrence:required)- unique CTS2-LE identifier (not an URI) of the code system version (also displayed in the navigator)
- groupName (type:
string, occurrence:optional)- group corresponding to the terminology tree in the navigator
- defaultLanguage (type:
string, occurrence:optional, default:en)- default language of the code system version
- mappingSpec (type:
string, occurrence:optional)- json string of form {designations: [{propertyRegex:
p, languageSelector:s, role:r}, ...]} wherepis an regex,sis an integer (as quoted string) or '@' androlematching regex (PREFERRED)|(ALTERNATIVE).
semantics: Let (R, P, L) be a triple. If local name of P matchespthen a designation for R with value L is added. Ifsis '@' then the designation language is the lang tag of L. Ifsis integer i then the lang tag is the lower case content of the i-th capturing group ofp.ris the role of the designation.
- json string of form {designations: [{propertyRegex:
- Responses
application/xml409specified in error XML
- Example
http://{{host_port}}/WebCts2LE/service/crud/owl/update
?uri=http://www.fao.org/countryprofiles/geoinfo/geopolitical/resource
&version=1.1
&resourceId=FAO-Geopolitical-ontology
&groupName=DEMIS2
&mappingSpec={designations: [{propertyRegex: 'nameOfficial(.*)', languageSelector: '1', role: 'PREFERRED'}]}