The resource is used to store a semantic description pertaining to a resource and potentially sub-resources. Such a description may be provided according to ontologies. The semantic information is used by the semantic functionalities of the oneM2M system and is also available to applications or CSEs. For resource type description see oneM2M TS-0001 [1]clause 9.6.30.
6.1.2 Create
This procedure shall be used for creating a resource.
All parameters defined in oneM2M TS-0001 [1]table 8.1.2‑2, Table 8.1.2‑2 apply with the specific details for: Content:Content: The resource content shall provide the information as defined in clause 9.6.30 in oneM2M TS-0001 [1]
shall check that the descriptor attribute conforms to the syntax as defined in the descriptorRepresentation attribute.
shall trigger the semantic validation process as specified in clause 7.10 if the validationEnable attribute of the resource is set to true, and shall set the semanticValidated attribute of __resource according to the validation result.
, with the following specific details:
shall check that the descriptor attribute conforms to the syntax as defined in the descriptorRepresentation attribute.
shall trigger the semantic validation process as specified in clause 7.10 if the validationEnable attribute of the resource is set to true, and shall set the semanticValidated attribute of resource according to the validation result.
All parameters defined in oneM2M TS-0001 [1], Table 8.1.2‑2 apply with the specific details for:
the Content request parameter which may contain the new descriptor information in one of the following ways:
full representation of the descriptor attribute; or
partial representation of the descriptor attribute as described in SPARQL statements [2] in the semanticOpExec attribute.
table 8.1.2‑2 apply with the specific details for:
the Content request parameter which may contain the new descriptor information in one of the following ways:
full representation of the descriptor attribute; or
partial representation of the descriptor attribute as described in SPARQL statements [2] in the semanticOpExec attribute.
check if both semanticOpExec attribute and ontologyContent attribute exist in the Content request parameter, if so, return an error code;
shall update the descriptor attribute according to the execution result of the SPARQL statements [2] in the semanticOpExec attribute, if it presents in the Content request parameter;
shall check that the descriptor attribute conforms to the syntax as defined in the descriptorRepresentation attribute, if it presents in the Content request parameter.shall trigger the semantic validation process as specified in clause 7.10 if the validationEnable attribute of the resource is set to true, and shall update the semanticValidated attribute of resource according to the validation result.
in oneM2M TS-0001 [1], with the following specific details:
check if both semanticOpExec attribute and ontologyContent attribute exist in the the Content request parameter, if so, return an error code;
shall update the descriptor attribute according to the execution result of the SPARQL statements [2] in the semanticOpExec attribute, if it presents in the Content request parameter;
shall check that the descriptor attribute conforms to the syntax as defined in the descriptorRepresentation attribute, if it presents in the Content request parameter.shall trigger the semantic validation process as specified in clause 7.10 if the validationEnable attribute of the resource is set to true, and shall update the semanticValidated attribute of resource according to the validation result.
The resource is a virtual resource because it does not have a representation. It is the child resource of a resource and shall be targeted only by RETRIEVE requests. When a request (for semantic discovery or semantic query) is sent to the resource the host uses the memberIDs attribute of the parent resource to retrieve all the related descriptors, then proceeds with the corresponding processing.
See clause 9.6.14a in oneM2M TS-0001 [1] for a full description of the resource type. The use of for semantic resource discovery and semantic query is further described in clause 7.4.
6.2.2 Retrieve
The RETRIVE operation on shall be used for two purposes:
performing semantic resource discovery; and
performing semantic query.
The procedure below shall be used for performing a semantic discovery or a semantic query procedure using the descriptor content of all member semantic resources belonging to an existing resource.
Table 6.2.2‑1: RETRIEVE for Semantic Resource Discovery and Semantic Query
For the semantic query case, the request message shall include the parameter Semantic Query Indicator, which shall not be included in the request for semantic resource discovery.
Processing at Originator before sending Request
For the semantic resource discovery case, the Originator shall request a semantic discovery to be performed using the content of the semantic descriptors of all member resources belonging to an existing <group> resource.
For the semantic query case, the Originator may discover various <group> resources defining different explicit query scopes and select the one having the desired query scope. Then, the Originator shall request a semantic query to be performed using the semantic information of all member resources belonging to this <group> resource.
The Originator may be an AE or CSE.
Processing at Receiver
The Receiver shall:
The Receiver shall:
Check if the Originator has RETRIEVE privilege in the resource referenced by the membersAccessControlPolicyIDs in the parent resource. In the case membersAccessControlPolicyIDs is not provided, the access control policy defined for the parent resource shall be used.
Upon successful validation, obtain the URIs of all the member semantic resources from the memberIDs attribute of the parent resource.
If there are semantic resources stored on different CSEs, individual RETRIEVE requests are sent to each CSE for retrieving the descriptors, otherwise the descriptor attributes are simply retrieved for all the semantic resources hosted locally. All semantic descriptors are accessed based on the respective access control policies.
Once all of the related descriptor attributes have been retrieved, the SPARQL request is being executed on the combined content.
Check if the Originator has RETRIEVE privilege in the resource referenced by the membersAccessControlPolicyIDs in the parent resource. In the case membersAccessControlPolicyIDs is not provided, the access control policy defined for the parent resource shall be used.
Upon successful validation, obtain the URIs of all the member semantic resources from the memberIDs attribute of the parent resource.
If there are semantic resources stored on different CSEs, individual RETRIEVE requests are sent to each CSE for retrieving the descriptors, otherwise the descriptor attributes are simply retrieved for all the semantic resources hosted locally. All semantic descriptors are accessed based on the respective access control policies.
Once all of the related descriptor attributes have been retrieved, the SPARQL request is being executed on the combined content.
Information in Response message
The result of the SPARQL request executed on the content retrieved from the semantic resources_._.
The resource represents a Semantic Mashup Job Profile (SMJP). The resource type description is specified in theclause 9.6.53 of oneM2M TS-0001 clause 9.6.53 in oneM2M TS-0001 [1].
A resource can be provisioned to a Hosting CSE which provides semantic mashup function; alternatively, an AE or CSE can request to create resource at the Hosting CSE. Once a resource is provisioned or created at the Hosting CSE, other oneM2M CSEs/AEs, which act as Mashup Requestors, can discover, retrieve, update, or delete it based on the requirements.
Figure 6.3.1‑1 illustrates a generic procedure (e.g. Create/Retrieve/Update/Delete) to operate on a resource.
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in oneM2M TS-0001 [1] apply with the specific details for: Content: : The resource content shall provide the information about an resource (e.g. attribute values) as described in the clause 9.6.53 in oneM2M TS-0001 [1].
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 Table 8.1.3‑1 in oneM2M TS-0001 [1] apply with the specific details for: Content: Address of the created resource, according to clause 10.1.1.1 in oneM2M TS-0001 [1].
The Receiver shall verify the existence (including Filter Criteria checking, if it is given) of the target resource or the attribute and check if the Originator has appropriate privileges to retrieve information stored in the resource/attribute. Otherwise clause 10.1.2 in oneM2M TS-0001 [1] applies.
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 Table 8.1.3‑1 in oneM2M TS-0001 [1] apply with the specific details for: Content: attributes of the resource as defined in the clause 9.6.53 in oneM2M TS-0001 [1].
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in oneM2M TS-0001 [1] apply with the specific details for: Content: attributes of the resource as defined in the clause 9.6.53 in oneM2M TS-0001 [1] to be updated.
If the to be deleted has smiID attribute and the smiID attribute has a value, the Receiver notifies each resource as included in the smiID attribute of the removal of the since those resources use this .
If the to be deleted has child resources, all those child resources shall be removed accordingly.
in oneM2M TS-0001 [1]:
If the to be deleted has smiID attribute and the smiID attribute has a value, the Receiver notifies each resource as included in the smiID attribute of the removal of the since those resources use this .
If the to be deleted has child resources, all those child resources shall be removed accordingly.
models and represents a Semantic Mashup Instance (SMI) resource. resource type is specified in theclause 9.6.54 of oneM2M TS-0001 clause 9.6.54 in oneM2M TS-0001 [1].
A CSE/AE as a Mashup Requestor can request to create resources at another oneM2M CSE which implements the semantic mashup function. Each created resource corresponds to a semantic mashup job profile (i.e. a resource); in other words, how the resource should execute the mashup operation to calculate the mashup result is specified in the corresponding resource. Note that the and its corresponding resources may be placed at the same CSE or at different CSEs, and the smjpID attribute of the allows locating the corresponding resource. If the resource has a as its child resource, the Mashup Requestor may use it to retrieve the mashup result.
Figure 6.4.1‑1 illustrates the procedural flow to operate a resource (e.g. Create/Retrieve/Update/Delete a resource).
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in oneM2M TS-0001 [1] apply with the specific details for: Content: The resource content shall provide the information about a resource (e.g. attribute values) as described in the clause 9.6.54 in oneM2M TS-0001 [1].
If the Originator knows the identifier or URI of each mashup member, it can include the value of mashupMember in the Request message.
in oneM2M TS-0001 [1]:
- If the Originator knows the identifier or URI of each mashup member, it can include the value of mashupMember in the Request message.
The Receiver shall first check if the corresponding as denoted by smjpID attribute exists or not. If it does not exist, the Receiver shall not create the and shall report an error (e.g. " does not exist") in the Response message to the Originator. If it exists, the Receiver shall retrieve its content.
The Receiver shall check if smjpInputParameter included in the Request message meets the input parameter requirement as specified by the inputDescripto r attribute of corresponding . If it does not meet the requirement, the Receiver shall not create the and shall report an error (e.g. "smjpInputParameter " does not meet the requirement") in the Response message to the Originator.
According to the memberFilter attribute of the retrieved , the Receiver extracts the SPARQL query contained in memberFilter and use it to discover and determine mashup member resources for the to be created.
Dependent on the memberStoreType attribute contained in the Request message, the Receiver maintains each member resource in different ways. If memberStoreType ="URI Only", the Receiver creates the mashupMember attribute containing the URIs of the determined member resources. If memberStoreType ="URI and Value", the Receiver creates the mashupMember attribute, retrieves the content value of each member resource and then stores both the identifier and the content value of each member resource in the mashupMember attribute.
Depending on the resultGenType attribute contained in the Request message, the Receiver prepares to execute the corresponding semantic mashup job profile as follows:
If resultGenType =" When SMI Is Created", the Receiver retrieves the content value of each member resource if not retrieved yet; then it executes mashup functions as specified by the and generates semantic mashup result, which shall be stored in the child resource.
If resultGenType ="When A Mashup Requestor Requests", there is no further processing at the Receiver.
If resultGenType ="Periodically", the Receiver shall set up a timer according to the periodForResultGen attribute contained in the Request message. When the timer expires, the Receiver shall retrieve the content value of each member resource and re-generate the mashup result; then it renews the timer.
If resultGenType ="When A Mashup Member Is Updated", there is no further processing at the Receiver.
in oneM2M TS-0001 [1]:
- The Receiver shall first check if the corresponding as denoted by smjpID attribute exists or not. If it does not exist, the Receiver shall not create the and shall report an error (e.g. " does not exist") in the Response message to the Originator. If it exists, the Receiver shall retrieve its content.
- The Receiver shall check if smjpInputParameter included in the Request message meets the input parameter requirement as specified by the inputDescripto r attribute of corresponding . If it does not meet the requirement, the Receiver shall not create the and shall report an error (e.g. "smjpInputParameter " does not meet the requirement") in the Response message to the Originator.
- According to the memberFilter attribute of the retrieved , the Receiver extracts the SPARQL query contained in memberFilter and use it to discover and determine mashup member resources for the to be created.
- Dependent on the memberStoreType attribute contained in the Request message, the Receiver maintains each member resource in different ways. If memberStoreType ="URI Only", the Receiver creates the mashupMember attribute containing the URIs of the determined member resources. If memberStoreType ="URI and Value", the Receiver creates the mashupMember attribute, retrieves the content value of each member resource and then stores both the identifier and the content value of each member resource in the mashupMember attribute.
- Depending on the resultGenType attribute contained in the Request message, the Receiver prepares to execute the corresponding semantic mashup job profile as follows:
- If resultGenType =" When SMI Is Created", the Receiver retrieves the content value of each member resource if not retrieved yet; then it executes mashup functions as specified by the and generates semantic mashup result, which shall be stored in the child resource.
- If resultGenType ="When A Mashup Requestor Requests", there is no further processing at the Receiver.
- If resultGenType ="Periodically", the Receiver shall set up a timer according to the periodForResultGen attribute contained in the Request message. When the timer expires, the Receiver shall retrieve the content value of each member resource and re-generate the mashup result; then it renews the timer.
- If resultGenType ="When A Mashup Member Is Updated", there is no further processing at the Receiver.
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 Table 8.1.3‑1 in oneM2M TS-0001 [1] apply with the specific details for: Content: Address of the created resource and address of created resource if any, according to clause 10.1.1.1 in oneM2M TS-0001 [1].
The Receiver shall verify the existence (including Filter Criteria checking, if it is given) of the target resource or the attribute and check if the Originator has appropriate privileges to retrieve information stored in the resource/attribute. Otherwise clause 10.1.2 in oneM2M TS-0001 [1] applies.
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 Table 8.1.3‑1 in oneM2M TS-0001 [1] apply with the specific details for: Content: attributes of the resource as defined in the clause 9.6.54 in oneM2M TS-0001 [1].
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in oneM2M TS-0001 [1] apply with the specific details for: Content: attributes of the resource as defined theclause 9.6.54 of oneM2M TS-0001 clause 9.6.54 in oneM2M TS-0001 [1] to be updated.
If the updated attribute in the Request message is smjpInputParameter, the Receiver shall recalculate the semantic mashup result using the new values of input parameters.
If the mashupMember attribute is updated (e.g. an existing mashup member is not available anymore and a new mashup member is identified) and resultGenType ="When A Mashup Member Is Updated", the Hosting CSE shall re-calculate the semantic mashup result using the new mashup members.
If the updated attribute in the Request message is memberStoreType, the Receiver needs to change the way to maintain mashup member resources. For example, if memberStoreType is updated from "URI Only" to "URI and Value", the Receiver needs to retrieve the content value of each mashup member resource and store the values together with URI in mashupMember attribute. If memberStoreTy pe is updated from "URI and Value" to "URI Only", the Receiver needs mashupMember attribute to only maintain the identifier of each mashup member.
If the updated attribute in the Request message is resultGenType, the Receiver changes the way to calculate/generate the semantic mashup result accordingly.
in oneM2M TS-0001 [1]:
- If the updated attribute in the Request message is smjpInputParameter, the Receiver shall recalculate the semantic mashup result using the new values of input parameters.
- If the mashupMember attribute is updated (e.g. an existing mashup member is not available anymore and a new mashup member is identified) and resultGenType ="When A Mashup Member Is Updated", the Hosting CSE shall re-calculate the semantic mashup result using the new mashup members.
- If the updated attribute in the Request message is memberStoreType, the Receiver needs to change the way to maintain mashup member resources. For example, if memberStoreType is updated from "URI Only" to "URI and Value", the Receiver needs to retrieve the content value of each mashup member resource and store the values together with URI in mashupMember attribute. If memberStoreTy pe is updated from "URI and Value" to "URI Only", the Receiver needs mashupMember attribute to only maintain the identifier of each mashup member.
- If the updated attribute in the Request message is resultGenType, the Receiver changes the way to calculate/generate the semantic mashup result accordingly.
is a virtual resource because it does not have a representation. It is the child resource of a resource. When a RETRIEVE operation is sent to the resource, it triggers a calculation and generation of the mashup result based on its parent resource .
The resource type is specified in oneM2M TS-0001 [1], clause 9.6.55.
Only Retrieve operation shall be allowed on a virtual resource. A Create, an Update, or a Delete operation on a virtual resource shall not be supported.
6.5.2 Retrieve
This procedure shall be used for triggering the CSE which hosts the to recalculate mashup results and returning the mashup result back to the requestor (e.g. an AE) of this retrieve request as described in Table 6.5.2‑1.
RETRIEVE :==================================================+:================================================================================= Associated Reference Point | Mca, Mcc and Mcc'.
Information in Request message
All parameters defined in Table 8.1.2‑3 in oneM2M TS-0001 [1] apply | with the specific details for: | To:/ Content: void. |
The Receiver shall check if the Originator has appropriate privileges. Otherwise clause 10.1.2 in oneM2M TS-0001 [1] applies:
The Hosting CSE triggers the recalculation of semantic mashup result for 's parent resource . The recalculated mashup result shall be stored in the 's child resource .
Information in Response message
All parameters defined in Table 8.1.3‑1 in oneM2M TS-0001 [1] apply with the specific details for: Content: the mashup result, if indicated in the request.
The Receiver shall check if the Originator has appropriate privileges. Otherwise clause 10.1.2 in oneM2M TS-0001 [1] applies:
The Hosting CSE triggers the recalculation of semantic mashup result for 's parent resource . The recalculated mashup result shall be stored in the 's child resource .
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 [1] apply with the specific details for: Content: the mashup result, if indicated in the request.
According to clause 10.1.2 in oneM2M TS-0001 [1].
In addition: a timer has expired. The Receiver responds with an error.
6.6 Operations
6.6.1 Introduction
resource stores the mashup result. It is the child resource of a resource. A resource shall be automatically generated by a Hosting CSE when it executes a semantic mashup operation on a resource. The resource type is specified in the clause 9.6.56 in oneM2M TS-0001 [1].
Figure 6.6.1‑1 illustrates the procedure to operate a resource. A resource shall be automatically created when a Hosting CSE executes semantic mashup operation on a resource. Only Retrieve and Delete operations shall be allowed on a resource. Detail descriptions are given in following clauses.
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in oneM2M TS-0001 [1] apply with the specific details for: ContentContent:: void.
The Receiver shall verify the existence (including Filter Criteria checking, if it is given) of the target resource or the attribute and check if the Originator has appropriate privileges to retrieve information stored in the resource/attribute. Otherwise clause 10.1.2 in oneM2M TS-0001 [1] applies.
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 Table 8.1.3‑1 in oneM2M TS-0001 [1] apply with the specific details for: ContentContent:: attributes of the resource as defined in theclause 9.6.56 of oneM2M TS-0001 clause 9.6.56 in oneM2M TS-0001 [1].
The represents an ontology repository which may contain any number of managed ontologies represented as child resources (see clause 6.8). The ontology repository may further provide semantic validation function by the virtual child resource (see clause 6.9).
6.7.2 Create
This procedure shall be used for creating a resource.
All parameters defined in Table 8.1.2-2 of oneM2M TS-0001 table 8.1.2‑2 in oneM2M TS-0001 [1] apply with the specific details for: Content:Content: The resource content shall provide the information as defined in theclause 9.6.50 of oneM2M TS-0001 clause 9.6.50 in oneM2M TS-0001 [1].
According to clause 10.1.2 in oneM2M TS-0001 [1].
The hosting CSE shall also create the virtual child-resource if the addressed resource is successfully created.
According to clause 10.1.5 in oneM2M TS-0001 [1].
The hosting CSE shall also delete the virtual child-resource if the addressed resource is successfully created.
Each resource represents an ontology under management in the oneM2M system. It may contain the full representation or the IRI reference of the managed ontology. It is managed by simple CRUD operations as ordinary resource or by more advanced SPARQL operations (contained in the payload of the Update and Retrieve) at the granularity of RDF-triple level.
6.8.2 Create
This procedure shall be used for deleting an existing resource.
All parameters defined in Table 8.1.2-2 of oneM2M TS-0001 table 8.1.2‑2 in oneM2M TS-0001 [1] apply with the specific details for: Content:Content: The resource content shall provide the information as defined in clause 9.6.51 in oneM2M TS-0001 [1].
According to clause 10.1.2 in oneM2M TS-0001 [1] with the specific details as follows:
The Hosting CSE shall check that the ontologyContent attribute conforms to the syntax as defined in the ontologyFormat attribute.
All parameters defined in Table 8.1.2-2 of oneM2M TS-0001 [1] shall apply with the specific details for the Content request parameter which may contain the new ontology information in one of the following ways:
the full representation of the new ontology triples in the ontologyContent attribute; or
the new IRI of the ontology in the ontologyContent attribute; or
the partial representation of the new ontology as described in SPARQL statements [2] in the semanticOpExec attribute in the case that the ontologyFormat is not 'IRI'.
in oneM2M TS-0001 [1] shall apply with the specific details for the Content request parameter which may contain the new ontology information in one of the following ways:
the full representation of the new ontology triples in the ontologyContent attribute; or
the new IRI of the ontology in the ontologyContent attribute; or
the partial representation of the new ontology as described in SPARQL statements [2] in the semanticOpExec attribute in the case that the ontologyFormat is not 'IRI'.
Check if both semanticOpExec attribute and ontologyContent attribute exist in the Content request parameter, if so, return an error code.
In the case that the Content request parameter contains partial representation of the new ontology as described in SPARQL statements [2] in the semanticOpExec attribute, and the ontologyFormat is not set to 'IRI', the Hosting CSE shall update the ontologyContent attribute according to the execution result of the SPARQL statements [2].
In the case that the Content request parameter contains the ontologyContent attribute, the Hosting CSE shall check that the ontologyContent attribute conforms to the syntax as defined in the ontologyFormat attribute.
in oneM2M TS-0001 [1] with the specific details as follows:
Check if both semanticOpExec attribute and ontologyContent attribute exist in the the Content request parameter, if so, return an error code.
In the case that the Content request parameter contains partial representation of the new ontology as described in SPARQL statements [2] in the semanticOpExec attribute, and the ontologyFormat is not set to 'IRI', the Hosting CSE shall update the ontologyContent attribute according to the execution result of the SPARQL statements [2].
In the case that the Content request parameter contains the ontologyContent attribute, the Hosting CSE shall check that the ontologyContent attribute conforms to the syntax as defined in the ontologyFormat attribute.
Table 6.8.6‑1: Semantic query on resource via RETRIEVE
Semantic query on resource via RETRIEVE
Associated Reference Point
Mca, Mcc and Mcc'
Information in Request message
All parameters defined in
All parameters defined in Table 8.1.2-2 of oneM2M TS-0001 [1] apply.
In addition, the semantic query request shall be issued as a RETRIEVE operation with:
A SPARQL query statement in the semanticsFilter condition tag of the Filter Criteria request parameter.
A Result Content request parameter with the value set to 'semantic-content'.
A Semantic Query Indicator request parameter with the value set to 'TRUE'.
See more details in clause 7.5.
in oneM2M TS-0001 [1] apply.
In addition, the semantic query request shall be issued as a RETRIEVE operation with:
A SPARQL query statement in the semanticsFilter condition tag of the Filter Criteria request parameter.
A Result Content request parameter with the value set to 'semantic-content'.
A Semantic Query Indicator request parameter with the value set to 'TRUE'.
See more details in clause 7.5.
According to clause 10.1.3 in oneM2M TS-0001 [1] with the following specific details:
The hosting CSE shall execute the SPARQL query statement against the content attribute of the resource and return the SPARQL result to the Originator. If the content attribute contains IRI of an external ontology, the hosting CSE shall retrieve the referenced ontology following the IRI and perform the SPARQL query against it. If the content attribute contains the RDF triples, the SPARQL query can be performed directly against it.
Semantic query defined in clause 7.5 shall be used for retrieving the semantic information (triples) from an resource.
Some SPARQL query statement examples are given as follows:
get all classes of an ontology:
get all classes of an ontology:
SELECT ?subject WHERE { ?subject rdfs:subClassOf+ owl:Thing }
get all object | data properties of ontology:
get all object | data properties of ontology:
SELECT ?subject WHERE { {?subject rdf:type+ owl:ObjectProperty } UNION {?subject rdf:type+ owl:DatatypeProperty } }
get direct subclasses of class A:
get direct subclasses of class A:
SELECT ?subject WHERE { ?subject rdfs:subClassOf saref:Command }
get also transitive subclasses class A:
get also transitive subclasses class A:
e.g. if information from instances of class A is requested, all subclasses of class A also need to be included as they are also instances of class A;
SELECT ?subject WHERE { ?subject rdfs:subClassOf + saref:Command }
get all the superclasses of class A:
get all the superclasses of class A:
e.g. if for derived ontologies the class of the base ontology needs to be found from which the class is derived, for example to apply rules defined for the base ontology, e.g. for creating a resource structure;
SELECT ?object WHERE { saref:SetAbsoluteLevelCommand rdfs:subClassOf + ?object }
get all object | data properties where class A is in the domain:
get all object | data properties where class A is in the domain:
e.g. to find out what properties an instance of class A can possibly have;
SELECT ?subject ?object WHERE { ?subject rdfs:domain saref:Service }
get all object | data properties where class A is in the range:
get all object | data properties where class A is in the range:
SELECT ?subject ?object WHERE { ?subject rdfs:range saref:Command }
get all sub-properties of a property A:
get all sub-properties of a property A:
e.g. if information concerning property A is requested all sub-properties of A also need to be included;
SELECT ?subject WHERE { ?subject rdfs:subPropertyOf om:singular_unit }
get classes that are equivalent to class A:
get classes that are equivalent to class A:
SELECT ?class WHERE {{ saref:Device owl:equivalentClass ?class} UNION {?class owl:equivalentClass saref:Device}}
6.9 Operations
6.9.1 Introduction
The resource, as a virtual resource of resource, is used for validating an input resource sent from an authorized originator.
6.9.2 Create
The resource shall be created when the parent resource is created by the hosting CSE. The Create operation is not applicable via Mca, Mcc or Mcc'.
6.9.3 Retrieve
The Retrieve operation is not applicable for .
6.9.4 Update
This procedure shall be used for validating a resource contained in the Update request against its referenced ontology. The semantic validation process shall also take into account linked resources (if any) of the resource in the request.
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 table 8.1.2‑3 in oneM2M TS-0001 [1]. Besides, the resource representation in the Content parameter of the request message shall be set as the resource to be validated.
retrieve the semantic description (i.e. the triples in descriptor attribute of), the URI to the referenced ontology in ontologyRef attribute and potential links to other linked resources from the resource to be validated;
retrieve the referenced ontology, any linked resources and the referenced ontologies of the linked resources_;_
perform semantic validation according to clause 7.10.
in oneM2M TS-0001 [1], with the following specific details:
retrieve the semantic description (i.e. the triples in descriptor attribute of), the URI to the referenced ontology in ontologyRef attribute and potential links to other linked resources from the resource to be validated;
retrieve the referenced ontology, any linked resources and the referenced ontologies of the linked resources_;_
perform semantic validation according to clause 7.10.
According to clause 10.1.4 in oneM2M TS-0001 [1].
In case the Originator is the hosting CSE of the resource being validated, the Originator shall update the semanticValidated attribute (true or false) of the hosted resource according to the received response code accordingly.
The resource shall be deleted when the parent resource is deleted by the hosting CSE. The Delete operation is not applicable via Mca, Mcc or Mcc'.
6.10 Operations
6.10.1 Introduction
The ontology mapping task shall be performed by the Create or Update operation against an resource on a Hosting CSE. A Retrieve operation against the same resource shall be used to get the result of ontology mapping. A Delete operation against a resource shall follow the basic procedure as specified in clauseoneM2M TS-0001 [1], clause 10.1.5.
6.10.2 Create (Ontology Mapping)
This procedure shall be used for performing the ontology mapping task by creating a resource as described in Table 6.10.2‑1. Detailed message flows are described in Figure 6.10.2‑1.
All parameters defined in oneM2M TS-0001 [1]tTable 8.1.2‑2 apply with the specific details for: Content: The resource content shall provide the information about an resource (e.g. attribute values) as described in oneM2M TS-0001 [1].
Determine the source and target 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 mappingAlgorithmLinks attributes provided in the request;
Retrieve the source and target resources from a remote CSE if needed;
Retrieve the resources from a remote CSE if needed;
Create the ontology mapping relationships between the source and the target ;
Store the mapping result in the resource in the successful case.
, with the following specific details:
Determine the source and target 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 mappingAlgorithmLinks attributes provided in the request;
Retrieve the source and target resources from a remote CSE if needed;
Retrieve the resources from a remote CSE if needed;
Create the ontology mapping relationships between the source and the target ;
Store the mapping result in the resource in the successful case.
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 table 8.1.3‑1 in [1] shall apply with the specific details for: Content: Address of the created resource, according to clause 10.1.2 in oneM2M TS-0001 [1].
Figure 6.10.2‑1: The ontology mapping procedure by Create/Update a resource
Figure 6.10.2‑1: The ontology mapping procedure by Create/Update a resource
The normal message flow Create 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
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 resource. The request shall contain the resourceID s of the source and target resources indicated by the sourceOntology and targetOntology attributes in the 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.
resource. The request shall contain the resourceID s of the source and target resources indicated by the sourceOntology and targetOntology attributes in the 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
The hosting CSE shall determine the source and target ontologies according to the resourceID s of the source and target 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.
resourceID
Table 6.10.2‑2: Ontology mapping process according to different mapping policies and the provided mapping algorithms
s of the source and target
+----------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ | mappingPolicy | mappingAlgorithmLinks | Ontology mapping process by the hosting CSE | +:===========================+:=================================================================================+:================================================================================+ | Single | Contains the resourceID (s) of one or more existing | Decide to use a single ontology mapping algorithm for the ontology mapping | | | resources, or the resourceID of an existing | between the source and target ontologies. | | | resource. | If more than one resource is provided by the | | | | mappingAlgorithmLinks, or contained in the referenced | | | | 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 | Decide to use two or more different types of mapping algorithms (based on the | | | _ resources of different types, or the resourceID| algorithmType attribute of the resource) for | | | of an existing resource which contains | the ontology mapping between the source and target ontologies. | | | two or more resources of different types. | 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 | Decide to use all the provided ontology mapping algorithms in a traversal way | | | resources, or the resourceID of an existing | for the ontology mapping between the source and target ontologies. | | | resource. | | +----------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------+ | > 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. | | | | > NOTE 2: For a pre-configured algorithm already stored in the system, the | | 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. | | | | > NOTE 3: If more than one algorithms are used, the final ontology mapping | | result shall be a union of all the results from each algorithm. | +----------------------------+----------------------------------------------------------------------------------+---------------------------------------------------------------------------------+
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.
The hosting CSE may need to retrieve the source and/or target 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 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 resource.
The hosting CSE shall return a success response to the originator.
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 resources, or the resourceID of an existing resource.
Decide to use a single ontology mapping algorithm for the ontology mapping between the source and target ontologies.
If more than one resource is provided by the mappingAlgorithmLinks, or contained in the referenced 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 resources of different types, or the resourceID of an existing resource which contains two or more resources of different types.
Decide to use two or more different types of mapping algorithms (based on the algorithmType attribute of the 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 resources, or the resourceID of an existing 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.
NOTE 2: For a pre-configured algorithm already stored in the system, the 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.
NOTE 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 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 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 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 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).
The mapping relationships (RDF Triple #1/2/3/4) are stored in the mappingResult attribute of the resource to be created.
The hosting CSE shall return the successful response to the Originator with the resourceID of the created resource.
Figure 6.10.2‑2: Example of the mapping result between ontology A and ontology B
Figure 6.10.2‑2: Example of the mapping result between ontology A and ontology B
6.10.3 Retrieve (Get the ontology mapping result)
The ontology mapping result can be retrieved by the Retrieve operation against an resource as described in Table 6.10.3‑1. The mapping result is contained in the mappingResult attribute. No resource specific process is required.
The receiver shall follow the basic procedure according to clause 10.1.2 of oneM2M TS-0001 [1].
Information in Response message
All parameters defined in tTable 8.1.3‑1 apply with the specific details for: ContentContent: : attributes of the resource as specified in oneM2M TS-0001 [1]. The resulted mapping relationships are contained in the mappingResult attribute of the resource.
The ontology mapping task may also be performed by the Update operation against an resource. This operation shall be used to generate new mapping results based upon an existing configuration of the with only necessary modifications. The procedure is similar to the Create operation described in clause 6.10.2.
All parameters defined in oneM2M TS-0001 [1]table 8.1.2‑2, Table 8.1.2‑2 apply with the specific details for: Content: : The resource content shall provide the information about an resource (e.g. attribute values) as described in oneM2M TS-0001 [1].
Determine the source and target 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 mappingAlgorithmLinks attributes provided in the request;
Retrieve the source and target resources from a remote CSE if needed;
Retrieve the resources from a remote CSE if needed;
Create the ontology mapping relationships between the source and the target ;
Store the mapping result in the resource in the successful case.
, with the following specific details:
Determine the source and target 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 mappingAlgorithmLinks attributes provided in the request;
Retrieve the source and target resources from a remote CSE if needed;
Retrieve the resources from a remote CSE if needed;
Create the ontology mapping relationships between the source and the target ;
Store the mapping result in the resource in the successful case.
Ontology mapping algorithms are represented as resources under an resource. They can be added, updated, retrieved and deleted by the CRUD operation against a resource following the basic procedures as specified in clause 10.1 in oneM2M TS-0001 [1]. There is no resource-specific process to be defined.
6.12 Procedure
The CRUD operation against a resource following the basic procedures as specified in clause 10.1 in oneM2M TS-0001 [1]. There is no resource-specific process to be defined.
6.13 Operations
6.13.1 Introduction
A resource is a child resource of the resource. The resource may have one or multiple child resources to represent different sets of reasoning rules in the oneM2M system. A reasoning initiator can create child resources of a resource to initiate desired reasoning operations.
6.13.2 Create
This procedure is used for creating a resource as described in Table 6.13.2‑1.
All parameters defined in oneM2M TS-0001 [1]table 8.1.2‑3, Table 8.1.2‑3 apply with the specific details for: Content :Content: The resource content provides the information as defined in the resource definition of resource.
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 table 8.1.3‑1 in [1] apply with the specific details for: Content: Address of the created resource, according to clause 10.1.2 in oneM2M TS-0001 [1].
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in [1] apply.
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 Table 8.1.3‑1 in [1] apply with the specific details for: Content: Attributes of the resource.
Associated Reference Point
Mca, Mcc and Mcc'.
6.13.4 Update
This procedure is used for updating the attributes of a resource as described in Table 6.13.4‑1.X.4-1.
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in [1] apply with the specific details for: Content: : Attributes of the resource to be updated.
A resource can be used to store a set of related reasoning rules (e.g. for supporting a particular application). A resource is a child resource of the resource. By performing the CRUD operations on the resources, various reasoning rules (e.g., user-defined reasoning rules based on business logic) can be created, discovered, retrieved, updated and deleted inside the oneM2M system.
6.14.2 Create
This procedure is used for creating a resource as described in Table 6.14.2‑1.
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in TS-0001 [1] apply with the specific details for: Content :Content: The resource content provides the information as defined in the resource definition of resource.
All parameters defined in Table 8.1.3-1 of table 8.1.3‑1 in [i.3] apply with the specific details for: Content: : Address of the created resource, according to clause 10.1.2 in oneM2M TR-0033 [i.3].
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 Table 8.1.2‑3 in [1] apply with the specific details for: Content: : Attributes of the resource to be updated.
A Reasoning Initiator (RI), such as an AE or CSE, may trigger two types of reasoning operations. One type is a "one-time" reasoning operation. This is applicable to the case where a reasoning operation can be executed over a Fact Set (FS) and a Rule Set (RS) that may not change over time. In comparison, the other type is a "continuous" reasoning operation. The second type is applicable to the cases where the input FS and RS for reasoning may change over time, and accordingly the previously inferred knowledge may not be valid anymore. Therefore, new reasoning is executed over the latest version of FS and RS in order to generate up-to-date inferred knowledge.
A resource represents a specific reasoning job instance for enabling the two types of reasoning operations. A RI initiates a desired reasoning operation by creating a resource as a child resource of a resource.
6.15.2 Create
This procedure is used for creating a resource as described in Table 6.15.2‑1.
All parameters defined in oneM2M TS-0001 [1]table 8.1.2‑3, Table 8.1.2‑3 apply with the specific details for: Content:Content: The resource content provides the information as defined in the resource definition of resource.
The receiver first retrieves the facts from the resources referred to by the factSet attribute. For example:
If a referred resource is a type of resource, the RDF triples included in the descriptor attribute will be collected.
If a referred resource is a type of resource, the data included in the ontologyContent attribute will be collected.
The receiver retrieves all the related reasoning rules for the resources referred to by the ruleSet attribute. For example:
If a referred resource is a resource, the rules included in the ruleRepresentation attribute will be collected.
The receiver includes the retrieved facts and rules from the previous steps, as well as optional facts/rules based on local policies, as inputs for the semantic reasoning operation. The receiver performs semantic reasoning processing using these inputs and produces the reasoning result and stores it in the resultRepresentation attribute of the created resource.
If the created resource represents a continuous reasoning operation (i.e., the reasoningType attribute is set to "continuous"), subsequent reasoning processing will be automatically triggered and performed according to the values of reasoningMode and reasoningPeriod attributes and the resultRepresentation attribute will be overwritten with the latest reasoning result.
in oneM2M TS-0001 [1], with the following specific details:
1. The receiver first retrieves the facts from the resources referred to by the factSet attribute. For example,
- If a referred resource is a type of resource, the RDF triples included in the descriptor attribute will be collected.
- If a referred resource is a type of resource, the data included in the ontologyContent attribute will be collected.
2. The receiver retrieves all the related reasoning rules for the resources referred to by the ruleSet attribute. For example,
- If a referred resource is a resource, the rules included in the ruleRepresentation attribute will be collected.
3. The receiver includes the retrieved facts and rules from the previous steps, as well as optional facts/rules based on local policies, as inputs for the semantic reasoning operation. The receiver performs semantic reasoning processing using these inputs and produces the reasoning result and stores it in the resultRepresentation attribute of the created resource.
4. If the created resource represents a continuous reasoning operation (i.e., the reasoningType attribute is set to "continuous"), subsequent reasoning processing will be automatically triggered and performed according to the values of reasoningMode and reasoningPeriod attributes and the resultRepresentation attribute will be overwritten with the latest reasoning result.
Information in Response message
All parameters defined in Table 8.1.3-1 of oneM2M TS-0001 table 8.1.3‑1 in [1] apply with the specific details for: Content :Content: Address of the created resource, according to clause 10.1.2 in oneM2M TS-0001 [1].
All parameters defined in Table 8.1.3-1 of oneM2M TR-0033 table 8.1.3‑1 in [i.3] apply with the specific details for: ContentContent:: Attributes of the resource.
All parameters defined in Table 8.1.2-3 of oneM2M TS-0001 table 8.1.2‑3 in [1] apply with the specific details for: ContentContent: : Attributes of the to be updated.