1

In oneM2M, the <semanticDescriptor> can be updated with SPARQL UPDATE operation with INSERT/DELETE and a Semantic Query (SELECT, CONSTRUCT, ASK, DESCRIBE) can be targeted towards a resource to derive semantic information.

For Update of <semanticDescriptor> resource in TR-0007-Study of Abstraction and Semantics Enablements example is given:

INSERT DATA { GRAPH graph_uri { .. RDF payload .. } }

EXAMPLE 1: Add semantic instance to a resource using INSERT DATA statement:

INSERT DATA {

GRAPH <http://<Hosting CSE address>/<CSEBase>/<AE>/<semanticDescriptor>> {

saref:WASH_LG_123 msm:hasOperation saref:WashingOperation_123

}

EDITED:

So SPARQL Query and UPDATE operations can have graph_uri which can be specified in queries, in technical terms Named Graphs.

First Question:

My question is in context of Semantics, as a Semantics Repository (RDF Database) is collection of GRAPHS, so in our case probably each Semantic Descriptor would be represented as a single Graph.

In this context, does oneM2M recommend using structured resource id: <http://<Hosting CSE address>/<CSEBase>/<AE>/<semanticDescriptor>> to be the IRI for that GRAPH in the Semantics Repository.

As I am not able to find any reference regarding same in TS-0034-Semantics-Support, TS-0001/0004 documents.

Follow-up Question:

If oneM2M doesn't recommend anything for graph_uri in Semantic Repository, How is an Originator bound to use the IRI/URI in its Semantic Query (SELECT, CONSTRUCT, ASK, DESCRIBE) or SPARQL UPDATE (INSERT/DELETE) ??

As every CSE then can have it's own way of giving a graph_uri to its GRAPHs in Semantic Repository, if it's not standardized.

Siddharth Trikha
  • 2,648
  • 8
  • 57
  • 101

1 Answers1

0

Did you have a look at TS-0004? There is a detailed description of each resource type and the operations for each of them. The <semanticDescriptor> is described in section 7.4.34 "Resource Type <semanticDescriptor>".

The <semanticDescriptor> has an attribute descriptorRepresentation that indicates the type used for the serialization of the descriptor attribute in the same resource. The type of this attribute is defined in TS-0004, section 6.3.4.2.48 "m2m:semanticFormat".

References in oneM2M are usually of type xs:anyURI. You can use any of the addressing schemes defined in TS-0001, section 9.3 "Resource Addressing", to reference another resource in the same or in another CSE.

Andreas Kraft
  • 3,754
  • 1
  • 30
  • 39
  • My question was in context of Semantics, as a Semantics Repository (RDF Database) is collection of GRAPHS, so in our case probably each Semantic Descriptor would be represented as a single Graph. In this context, does oneM2M recommend using structuredResourceId to be the IRI for that Graph in the Semantics Repository ?? Because only then can an Originator use that in it's SPARQL query like `INSERT DATA { GRAPH ///> { saref:WASH_LG_123 msm:hasOperation saref:WashingOperation_123 }` – Siddharth Trikha May 28 '20 at 09:44
  • Thank you for the clarification. Does the IRI have the protocol element(http:) as part of the identifier? Usually in oneM2M the oneM2M-specific identifiers don't have a protocol element. – Andreas Kraft May 28 '20 at 14:57
  • Yes, AFAIK. IRI are just like URI but with an extended character set. Yes oneM2M identifiers don't have protocol. Will that make a difference? Or are you saying that oneM2M recommends using structured-resource-id in naming GRAPHs in Semantic Repo using IRI's ? – Siddharth Trikha May 28 '20 at 15:41
  • If you want to reference (semantic) resources inside a oneM2M ecosystem (even across CSE's) then you use the oneM2M identifier format. Those can be structured or unstructured, and be SP-Relative, CSE-Absolute etc. But when you want to reference non-oneM2M resources (e.g. not on a CSE) then than you can use URI's as well, but with schema and authority parts to indicate the protocol and address how and where they can be accessed. – Andreas Kraft May 28 '20 at 20:48
  • Having said that, SPARQL queries can have reference to GRAPHs and if every CSE has it's own way of referring to them, an AE won't be able to use it properly. Or am I missing something ? – Siddharth Trikha May 29 '20 at 10:17
  • You are right. Actually, just last week during the oneM2M technical plenary #45 a new work item was established (named "WI-0101 - Advanced Semantic Discovery")- It will address the interoperability of semantic discovery and interoperability. You can access the current work item program descriptions here: http://ftp.onem2m.org/Others/WPM-pages/Work-Programme.htm – Andreas Kraft May 29 '20 at 11:15
  • Yes, the Advanced Semantic Discovery will aim at discovering resources across CSE with routing mechanisms being defined. But even a fundamental management of Triples (Semantic Instance Management as its called in `TR-0007`) would require queries like INSERT/DELETE to use GRAPH IRIs. This example in `TR-0007` : `INSERT DATA { GRAPH ///> { saref:WASH_LG_123 msm:hasOperation saref:WashingOperation_123 }` is pointing that a GRAPH IRI is substituted for id of , but it's not explicit in Specs ?? – Siddharth Trikha May 29 '20 at 11:30
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/214896/discussion-between-andreas-kraft-and-siddharth-trikha). – Andreas Kraft May 29 '20 at 11:32