6.4 _<semanticMashupInstance>_ Operations
6.4.1 Introduction
<semanticMashupInstance> models and represents a Semantic Mashup Instance (SMI) resource. <semanticMashupInstance>_ resource type is specified in the clause 9.6.54 in oneM2M TS-0001 [1].
A CSE/AE as a Mashup Requestor can request to create <semanticMashupInstance> resources at another oneM2M CSE which implements the semantic mashup function. Each created <semanticMashupInstance> resource corresponds to a semantic mashup job profile (i.e. a <semanticMashupJobProfile> resource); in other words, how the <semanticMashupInstance> resource should execute the mashup operation to calculate the mashup result is specified in the corresponding <semanticMashupJobProfile> resource. Note that the <semanticMashupInstance> and its corresponding <semanticMashupJobProfile> resources may be placed at the same CSE or at different CSEs, and the smjpID attribute of the <semanticMashupInstance> allows locating the corresponding <semanticMashupJobProfile> resource. If the <semanticMashupInstance> resource has a <semanticMashupResult> 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 <semanticMashupInstance> resource (e.g. Create/Retrieve/Update/Delete a <semanticMashupInstance> resource).
Figure 6.4.1-1: Procedures for Operating a <semanticMashupInstance> Resource
Editor's Note: Replace with PlantUML Diagram
6.4.2 Create <semanticMashupInstance>
This procedure shall be used for creating a <semanticMashupInstance> resource as described in Table 6.4.21.
Table 6.4.2-1: <semanticMashupInstance> CREATE
<semanticMashupInstance> CREATE | <semanticMashupInstance> CREATE |
---|---|
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: Content : The resource content shall provide the information about a <semanticMashupInstance> resource (e.g. attribute values) as described in the clause 9.6.54 in oneM2M TS-0001 [1]. |
Processing at Originator before sending Request | According to clause 10.1.1.1 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. |
Processing at Receiver | According to clause 10.1.1.1 in oneM2M TS-0001 [1]: - The Receiver shall first check if the corresponding <semanticMashupJobProfile> as denoted by smjpID attribute exists or not. If it does not exist, the Receiver shall not create the <semanticMashupInstance> and shall report an error (e.g. "<semanticMashupJobProfile> 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 <semanticMashupJobProfile>. If it does not meet the requirement, the Receiver shall not create the <semanticMashupInstance> 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 <semanticMashupJobProfile>, the Receiver extracts the SPARQL query contained in memberFilter and use it to discover and determine mashup member resources for the <semanticMashupInstance> 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 <semanticMashupJobProfile> and generates semantic mashup result, which shall be stored in the <semanticMashupResult> 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 in oneM2M TS-0001 [1] apply with the specific details for: Content : Address of the created <semanticMashupInstance> resource and address of created <semanticMashupResult> resource if any, according to clause 10.1.1.1 in oneM2M TS-0001 [1]. |
Processing at Originator after receiving Response | According to clause 10.1.1.1 in oneM2M TS-0001 [1]. |
Exceptions | According to clause 10.1.1.1 in oneM2M TS-0001 [1]. |
6.4.3 Retrieve <semanticMashupInstance>
This procedure shall be used for retrieving the attributes of a <semanticMashupInstance> resource as described in Table 6.4.31.
Table 6.4.3-1: <semanticMashupInstance> RETRIEVE
<semanticMashupInstance> RETRIEVE | <semanticMashupInstance> 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: Content : void. |
Processing at Originator before sending Request | According to clause 10.1.2 in oneM2M TS-0001 [1]. |
Processing at Receiver | 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 in oneM2M TS-0001 [1] apply with the specific details for: Content : attributes of the <semanticMashupInstance> resource as defined in the clause 9.6.54 in oneM2M TS-0001 [1]. |
Processing at Originator after receiving Response | According to clause 10.1.2 in oneM2M TS-0001 [1]. |
Exceptions | According to clause 10.1.2 in oneM2M TS-0001 [1]. |
6.4.4 Update <semanticMashupInstance>
This procedure as described in Table 6.4.4-1 shall be used to update an existing <semanticMashupInstance>, e.g. an update to its memberStoreType attribute.
Table 6.4.4-1: <semanticMashupInstance> UPDATE
<semanticMashupInstance> UPDATE | <semanticMashupInstance> UPDATE |
---|---|
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: Content : attributes of the <semanticMashupInstance> resource as defined the clause 9.6.54 in oneM2M TS-0001 [1] to be updated. |
Processing at Originator before sending Request | According to clause 10.1.3 in oneM2M TS-0001 [1]. |
Processing at Receiver | According to clause 10.1.3 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. |
Information in Response message | According to clause 10.1.3 in oneM2M TS-0001 [1]. |
Processing at Originator after receiving Response | According to clause 10.1.3 in oneM2M TS-0001 [1]. |
Exceptions | According to clause 10.1.3 in oneM2M TS-0001 [1]. |
6.4.5 Delete <semanticMashupInstance>
This procedure as described in Table 6.4.5-1 shall be used to delete an existing <semanticMashupInstance>.
Table 6.4.5-1: <semanticMashupInstance> DELETE
<semanticMashupInstance> DELETE | <semanticMashupInstance> DELETE |
---|---|
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. |
Processing at Originator before sending Request | According to clause 10.1.4.1 in oneM2M TS-0001 [1]. |
Processing at Receiver | According to clause 10.1.4.1 in oneM2M TS-0001 [1]. - In addition, The Receiver removes this <semanticMashupInstance> from the smiID attribute of the corresponding <semanticMashupJobProfile>. |
Information in Response message | According to clause 10.1.4.1 in oneM2M TS-0001 [1]. |
Processing at Originator after receiving Response | According to clause 10.1.4.1 in oneM2M TS-0001 [1]. |
Exceptions | According to clause 10.1.4.1 in oneM2M TS-0001 [1]. |