Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

location attribute not expanding like other core context attributes (for example status) #1670

Open
dimitriskranias opened this issue Sep 19, 2024 · 1 comment

Comments

@dimitriskranias
Copy link

Hello everyone,

I face this rather peculiar issue of location attribute not expanding according to the core context, which I am not 100% sure it really is an issue or if it should be working like that (in the NGSI-LD specification and Orion-LD's Quick Start Guide I didn't find something that states that it shouldn't expand). I provide the data point that describes this:

{
  "_id": {
    "id": "urn:Demo3Temp:HydroPlant:002",
    "type": "https://dummyontology/v1.5/HydroPlant",
    "servicePath": "/"
  },
  "attrNames": [
    "location",
    "https://uri.etsi.org/ngsi-ld/status"
  ],
  "attrs": {
    "location": {
      "type": "GeoProperty",
      "creDate": 1726750264.2335553,
      "modDate": 1726750264.2335553,
      "value": {
        "type": "Point",
        "coordinates": [
          -3.8975999999999997,
          37.0154
        ]
      },
      "mdNames": []
    },
    "https://uri=etsi=org/ngsi-ld/status": {
      "type": "Property",
      "creDate": 1726750264.2335553,
      "modDate": 1726750264.2335553,
      "value": "OK",
      "mdNames": []
    }
  },
  "creDate": 1726750264.2335553,
  "modDate": 1726750264.2335553,
  "lastCorrelator": ""
}

As you see the type and status expands correctly using the context I provided via the link header: https://dummyontology/v1.5/orionld-context-v1.5.jsonld; rel="http://www.w3.org/ns/json-ld#context" which includes this:

{
    "@context": [
        "https://dummyontology/v1.5/dummy-context-v1.5.jsonld",
        "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld"
    ]
}

The first is the URL pointing to my custom context and the second is the core context (which as stated in the NGSI-LD Specification is good practice to include in the @context Array).

So is this an omission in the Orion-LD's implementation of NGSI-LD or is it me that i haven't understood something correctly?

@kzangeli
Copy link
Collaborator

Hi,
your observation is correct.
The "location" attribute isn't expanded.
As it is part of the core context, it will always be expanded and compacted the exact same way.

It's a design decision in Orion-LD to not expand this attribute. To save some time ...

You will see the same is valid for "observedAt" and many more names. All of them with a special mention in the ngsi-ld spec and part of the core context.

Don't worry about it. All is good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants