6.10 _<ontologyMapping>_ Operations
6.10.1 Introduction
The ontology mapping task shall be performed by the Create or Update operation against an <ontologyMapping> resource on a Hosting CSE. A Retrieve operation against the same <ontologyMapping> resource shall be used to get the result of ontology mapping. A Delete operation against a <ontologyMapping> resource shall follow the basic procedure as specified in clause [1].
6.10.2 Create <ontologyMapping> (Ontology Mapping)
This procedure shall be used for performing the ontology mapping task by creating a <ontologyMapping> resource as described in Table 6.10.2-1. Detailed message flows are described in Figure 6.10.2-1.
Table 6.10.2-1: <ontologyMapping > CREATE
<ontologyMapping> CREATE | <ontologyMapping> CREATE |
---|---|
Associated Reference Point | Mca, Mcc and Mcc'. |
Information in Request message | All parameters defined in [1] table 8.1.2-2 apply with the specific details for: Content : The resource content shall provide the information about an <ontologyMapping> resource (e.g. attribute values) as described in [1]. |
Processing at Originator before sending Request | According to clause 10.1.2 in [1]. |
Processing at Receiver | The receiver shall follow the basic procedure according to clause 10.1.2 of [1], with the following specific details: Determine the source <ontology> and target <ontology> resources to be mapped according to the sourceOntology and targetOntology attributes provided in the request; Determine the ontology mapping method according to the mapping method description including the mappingPolicy and mappingAlgorithm Links attributes provided in the request; Retrieve the source <ontology> and target <ontology> resources from a remote CSE if needed; Retrieve the <ontologyMappingAlgorithm> resources from a remote CSE if needed; Create the ontology mapping relationships between the source <ontology> and the target <ontology> ; Store the mapping result in the <ontologyMapping> resource in the successful case. |
Information in Response message | All parameters defined in table 8.1.3-1 in [1] shall apply with the specific details for: Content : Address of the created <ontologyMapping> resource, according to clause 10.1.2 in [1]. |
Processing at Originator after receiving Response | According to clause 10.1.2 in [1]. |
Exceptions | According to clause 10.1.2 in [1]. |
Figure 6.10.2-1: The ontology mapping procedure by Create/Update a <ontologyMapping> resource
Editor's note: Replace with PlantUML Diagram
The normal message flow Create <ontologyMapping> procedure is described as follows:
- The hosting CSE (e.g. an oneM2M platform) receives an ontology mapping request from an Originator (e.g. an oneM2M application) in the form of a Create operation against an <ontologyMapping> resource. The request shall contain the resourceID s of the source and target <ontology> resources indicated by the sourceOntology and targetOntology attributes in the <ontologyMapping> resource. It shall also contain the information of mapping method description including the mapping policy and the mapping algorithms indicated by the attributes of mappingPolicy and mappingAlgorithmLinks respectively.
-
The hosting CSE shall determine the source and target ontologies according to the resourceID s of the source and target <ontology> resources provided in the request. It shall also determine the ontology mapping method according to the information of mapping method description provided in the request. Specifically, the hosting CSE shall first determine the mapping algorithm policy (single, multiple or traversal) according to the mappingPolicy attribute provided in the request. Then it shall determine the mapping algorithm(s) to be used according to the determined mapping algorithm policy and the available mapping algorithm(s) provided by the mappingAlgorithmLinks attribute, and shall perform the ontology mapping process according to Table 6.10.2-2.
Table 6.10.2-2: ontology mapping process according to different mapping policies and the provided mapping algorithms
mappingPolicy mappingAlgorithmLinks ontology mapping process by the hosting CSE single contains the resourceID (s) of one or more existing <ontologyMappingAlgorithm> resources, or the resourceID of an existing <ontologyMappingAlgorithmRepository> resource. Decide to use a single ontology mapping algorithm for the ontology mapping between the source and target ontologies.
If more than one <ontologyMappingAlgorithm> resource is provided by the mappingAlgorithmLinks , or contained in the referenced <ontologyMappingAlgorithmRepository> resource, the hosting CSE may decide to use one of the provided algorithms according to its local policy.multiple contains the resourceID s of two or more existing <ontologyMappingAlgorithm> resources of different types, or the resourceID of an existing <ontologyMappingAlgorithmRepository> resource which contains two or more <ontologyMappingAlgorithm> resources of different types. Decide to use two or more different types of mapping algorithms (based on the algorithmType attribute of the <ontologyMappingAlgorithm> resource) for the ontology mapping between the source and target ontologies.
The hosting CSE may decide to use a subset (at least two types) of the provided algorithms according to its local policy.
If the number of the types of the provided algorithms is less than two, the hosting CSE shall reject the request with an error.traversal contains the resourceID (s) of one or more existing <ontologyMappingAlgorithm> resources, or the resourceID of an existing <ontologyMappingAlgorithmRepository> resource. Decide to use all the provided ontology mapping algorithms in a traversal way for the ontology mapping between the source and target ontologies.
Note
1: Any combination of mappingPolicy and mappingAlgorithmLinks not covered by this table shall be considered as an exceptional case, and the hosting CSE shall reject the request with an error. 2: For a pre-configured algorithm already stored in the system, the <ontologyMappingAlgorithm> resource may not contain the executable of the algorithm. In this case, the hosting CSE may invoke the algorithm from the system locally according to the resourceName or resourceID attribute. 3: If more than one algorithms are used, the final ontology mapping result shall be a union of all the results from each algorithm.
- The hosting CSE may need to retrieve the source and/or target <ontology> resources from a remote CSE the sourceOntology and targetOntology attributes if they are not hosted locally.
- The hosting CSE may need to retrieve the used <mappingAlgorithm> resources from a remote CSE according to the mappingAlgorithmLinks attribute if they are not hosted locally.
- The hosting CSE shall create the ontology mapping relationships between the source and target ontologies according to the determined mapping method, and shall store the resulted mapping relationships in the <ontologyMapping> resource.
Figure 6.10.2-2 shows an example of the ontology mapping between the source ontology (Ontology-A) and the target ontology (Ontology-B). Assuming the mappingPolicy=multiple and the mappingAlgorithmLinks points to two <ontologyMappingAlgorithm> resources which are a "linguistic-feature extraction algorithm" and an "external resource acquisition algorithm" respectively. The hosting CSE first performs the "linguistic-feature extraction algorithm" against Ontology-A and Ontology-B, and generates three mapping relationships (as formatted by Triple#1, Triple#2 and Triple#3 below). The hosting CSE then performs the "external resource acquisition algorithm" with the support from external resources (e.g. the WordNet dictionary), and generates a fourth mapping relationship (as Triple#4 below).
- RDF Triple #1: Ontology-A:Thing owl:equivalentClass Ontology-B:Thing
- RDF Triple #2: Ontology-A:Devices owl:equivalentClass Ontology-B:Device
- RDF Triple #3: Ontology-A:LightSensor owl:equivalentClass Ontology-B:Light_Sensor
- RDF Triple #4: Ontology-A:Switch_off owl:equivalentProperty Ontology-B:Turn_off
The mapping relationships (RDF Triple #1/2/3/4) are stored in the mappingResult attribute of the <ontologyMapping> resource to be created.
The hosting CSE shall return the successful response to the Originator with the resourceID of the created <ontologyMapping> resource.
Figure 6.10.2-2: Example of the mapping result between ontology A and ontology B
6.10.3 Retrieve <ontologyMapping> (Get the ontology mapping result)
The ontology mapping result can be retrieved by the Retrieve operation against an <ontologyMapping> resource as described in Table 6.10.3-1. The mapping result is contained in the mappingResult attribute. No resource specific process is required.
Table 6.10.3-1: <ontologyMapping> RETRIEVE
<ontologyMapping> RETRIEVE | <ontologyMapping> RETRIEVE |
---|---|
Associated Reference Point | Mca, Mcc and Mcc'. |
Information in Request message | All parameters defined in [1] table 8.1.2-2. |
Processing at Originator before sending Request | According to clause 10.1.3 in [1]. |
Processing at Receiver | The receiver shall follow the basic procedure according to clause 10.1.2 of [1]. |
Information in Response message | All parameters defined in table 8.1.3-1 apply with the specific details for: Content : attributes of the <ontologyMapping> resource as specified in [1]. The resulted mapping relationships are contained in the mappingResult attribute of the <ontologyMapping> resource. |
Processing at Originator after receiving Response | According to clause 10.1.3 in [1]. |
Exceptions | According to clause 10.1.3 in [1]. |
6.10.4 Update <ontologyMapping> (Ontology Mapping)
The ontology mapping task may also be performed by the Update operation against an <ontologyMapping> resource. This operation shall be used to generate new mapping results based upon an existing configuration of the <ontologyMapping> with only necessary modifications. The procedure is similar to the Create operation described in clause 6.10.2.
Table 6.10.4-1: <ontologyMapping> UPDATE
<ontologyMapping> UPDATE | <ontologyMapping> UPDATE |
---|---|
Associated Reference Point | Mca, Mcc and Mcc'. |
Information in Request message | All parameters defined in [1] table 8.1.2-2 apply with the specific details for: Content : The resource content shall provide the information about an <ontologyMapping> resource (e.g. attribute values) as described in [1]. |
Processing at Originator before sending Request | According to clause 10.1.4 in [1]. |
Processing at Receiver | The receiver shall follow the basic procedure according to clause 10.1.4 of [1], with the following specific details: Determine the source <ontology> and target <ontology> resources to be mapped according to the sourceOntology and targetOntology attributes provided in the request; Determine the ontology mapping method according to the mapping method description including the mappingPolicy and mappingAlgorithm Links attributes provided in the request; Retrieve the source <ontology> and target <ontology> resources from a remote CSE if needed; Retrieve the <mappingAlgorithm> resources from a remote CSE if needed; Create the ontology mapping relationships between the source <ontology> and the target <ontology> ; Store the mapping result in the <ontologyMapping> resource in the successful case. |
Information in Response message | According to clause 10.1.4 in [1]. |
Processing at Originator after receiving Response | According to clause 10.1.4 in [1]. |
Exceptions | According to clause 10.1.4 in [1]. |
6.10.5 Delete <ontologyMapping>
This procedure shall be used for deleting a <ontologyMapping> resource.
Table 6.10.5-1: <ontologyMapping> DELETE
__< ontologyMapping> DELETE | __< ontologyMapping> DELETE |
---|---|
Associated Reference Point | Mca, Mcc and Mcc' |
Information in Request message | All parameters defined in table 8.1.2-2 in [1] apply |
Processing at Originator before sending Request | According to clause 10.1.5 in [1] |
Processing at Receiver | According to clause 10.1.5 in [1] |
Information in Response message | According to clause 10.1.5 in [1] |
Processing at Originator after receiving Response | According to clause 10.1.5 in [1] |
Exceptions | According to clause 10.1.5 in [1] |