CTS2-LE REST API: OWL Update: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
== Operation Syntax ==
+
<big>'''DEPRECATED !!!'''</big> use [[CTS2-LE REST API: OWL TBOX Update|OWL TBOX 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.
 
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.
  
;Signature
+
== Operation Syntax ==
 
 
:Response webCts2Le.service.crud.OwlResource.update(
 
::@QueryParam(value="uri") String uri,
 
::@QueryParam(value="version") String version,
 
::@QueryParam(value="isDefaultVersion") @DefaultValue(value="true") boolean isDefaultVersion,
 
::@QueryParam(value="resourceId") String resourceId,
 
::@QueryParam(value="groupName") String groupName,
 
::@QueryParam(value="defaultLanguage") @DefaultValue(value="en") String defaultLanguage,
 
::@QueryParam(value="mappingSpec") String mappingSpec)
 
:@POST
 
:@Path(value="/service/crud/owl/update")
 
:@Consumes(value={"application/xml"})
 
:@Produces(value={"application/xml"})
 
  
 +
<b>POST</b> /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
 +
:<code>application/xml</code>
 +
:owl stream
 
;Parameters
 
;Parameters
 
+
:<b>uri</b> (type: <code>string</code>, occurrence: <code>required</code>)
:<code>uri</code>
+
::uri of the ontology. Note that the pair (<code>uri</code>, <code>version</code>) uniquely defines a code system version within CTS2-LE
::uri of the ontology. Note that the pair (<code>uri</code>, <code>version</code>) uniquely defines a code system version within CTS2-LE  
+
:<b>version</b> (type: <code>string</code>, occurrence: <code>required</code>)
::<code>Cardinality: 1..1</code>
+
::version of the ontology
:<code>version</code>
+
:<b>isDefaultVersion</b> (type: <code>boolean</code>, occurrence: <code>optional</code>, default: <code>true</code>)
::version of the ontology  
+
::store as default version
::<code>Cardinality: 1..1</code>
+
:<b>resourceId</b> (type: <code>string</code>, occurrence: <code>required</code>)
:<code>isDefaultVersion</code>
+
::unique CTS2-LE identifier (not an URI) of the code system version (also displayed in the navigator)
::store as default version  
+
:<b>groupName</b> (type: <code>string</code>, occurrence: <code>optional</code>)
::<code>Cardinality: 0..1</code>
+
::group corresponding to the terminology tree in the navigator
:<code>resourceId</code>
+
:<b>defaultLanguage</b> (type: <code>string</code>, occurrence: <code>optional</code>, default: <code>en</code>)
::unique CTS2-LE identifier (not an URI) of the code system version (also displayed in the navigator)  
+
::default language of the code system version
::<code>Cardinality: 1..1</code>
+
:<b>mappingSpec</b> (type: <code>string</code>, occurrence: <code>optional</code>)
:<code>groupName</code>
+
::json string of form {designations: [{propertyRegex: <code>p</code>, languageSelector: <code>s</code>, role: <code>r</code>}, ...]} where <code>p</code> is an regex, <code>s</code> is an integer (as quoted string) or '@' and <code>role</code> matching regex (PREFERRED)|(ALTERNATIVE). <br> semantics: Let (R, P, L) be a triple. If local name of P matches <code>p</code> then a designation for R with value L is added. If <code>s</code> is '@' then the designation language is the lang tag of L. If <code>s</code> is integer i then the lang tag is the lower case content of the i-th capturing group of <code>p</code>. <code>r</code> is the role of the designation.  
::group corresponding to the terminology tree in the navigator  
+
;Responses
::<code>Cardinality: 0..1</code>
+
:<code>application/xml</code>
:<code>defaultLanguage</code>
+
:<code>409</code> specified in error XML
::default language of the code system version  
 
::<code>Cardinality: 0..1</code>
 
:<code>mappingSpec</code>
 
::json string of form {designations: [{propertyRegex: <code>p</code>, languageSelector: <code>s</code>, role: <code>r</code>},...]} where <code>p</code> is an regex, <code>s</code> is an integer (as quoted string) or '@' and <code>role</code> matching regex (PREFERRED)|(ALTERNATIVE). <br> semantics: Let (R, P, L) be a triple. If local name of P matches <code>p</code> then a designation for R with value L is added. If <code>s</code> is '@' then the designation language is the lang tag of L. If <code>s</code> is integer i then the lang tag is the the lower case content of the i-th capturing group of <code>p</code>. <code>r</code> is the role of the designation.  
 
::<code>Cardinality: 0..1</code>
 
 
 
 
 
;Consumed POST Body
 
OWL stream.
 
:Cardinality: 1..1
 
 
 
;Result
 
:empty response if no error occurs otherwise an error XML.
 
  
 
;Example
 
;Example

Aktuelle Version vom 9. September 2019, 18:33 Uhr

DEPRECATED !!! use OWL TBOX 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
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}, ...]} where p is an regex, s is an integer (as quoted string) or '@' and role matching regex (PREFERRED)|(ALTERNATIVE).
semantics: Let (R, P, L) be a triple. If local name of P matches p then a designation for R with value L is added. If s is '@' then the designation language is the lang tag of L. If s is integer i then the lang tag is the lower case content of the i-th capturing group of p. r is the role of the designation.
Responses
application/xml
409 specified 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'}]}