Giter VIP home page Giter VIP logo

Comments (3)

jason-fox avatar jason-fox commented on August 31, 2024

I'm still getting my head around linked data. Are you saying we need an example of a JSON object with an additional @context element

So If I have a Store response for a response JSON Object like:

{
    "id": "urn:ngsi-ld:Store:001",
    "type": "Store",
    "address": {
        "streetAddress": "Bornholmer Straße 65",
        "addressRegion": "Berlin",
        "addressLocality": "Prenzlauer Berg",
        "postalCode": "10439"
    },
    "location": {
        "type": "Point",
        "coordinates": [
            13.3986,
            52.5547
        ]
    },
    "name": "Bösebrücke Einkauf"
}

Would you be looking for an inline context definition as defined in Example 5

Something like:

{
    "id": "urn:ngsi-ld:Store:001",
    "type": "Store",
    "address": {
        "streetAddress": "Bornholmer Straße 65",
        "addressRegion": "Berlin",
        "addressLocality": "Prenzlauer Berg",
        "postalCode": "10439"
    },
    "location": {
        "type": "Point",
        "coordinates": [
            13.3986,
            52.5547
        ]
    },
    "name": "Bösebrücke Einkauf",
    "@context": {
	    "id" : "@id",
	    "type": "@type",
	    "name": "http://uri.etsi.org/ngsi-ld/name",
	    "address": "http://schema.org/PostalAddress",
	    "location": "http://uri.etsi.org/ngsi-ld/location"
    }
  },
}

Which is referring to name and location from the ngsi-ld draft
and address from schema.org.

And for the Shelf which includes Relationship and Integer we'd need something like:

{
    "id": "urn:ngsi-ld:Shelf:unit001",
    "type": "Shelf",
    "location": {
        "type": "Point",
        "coordinates": [
            13.3986112,
            52.554699
        ]
    },
    "maxCapacity": 50,
    "name": "Corner Unit",
    "refStore": "urn:ngsi-ld:Store:001",
    "@context": {
	    "id" : "@id",
	    "type": "@type",
	    "location": "http://uri.etsi.org/ngsi-ld/location",
	    "name": "http://uri.etsi.org/ngsi-ld/name",
	    "refStore": {
	    	"@id": "http://uri.etsi.org/ngsi-ld/Relationship",
	    	"@type": "@id"
	    },
	    "maxCapacity": {
	    	"@id": "http://schema.org/Integer",
	    	"@type": "@id"
	    },
	    
    }
}

If this is the case it would make more sense to include it in the Entity Relationships tutorial than the Getting Started

from tutorials.getting-started.

jmcanterafonseca avatar jmcanterafonseca commented on August 31, 2024

apart from needing a @context, that could be behind a URI, i.e. probably it is not need to inline the @context,

NGSI-LD labels attribute nodes as "Property" or "Relationship" and that's a representation difference. There are also differences such as labelling location properties as "GeoProperty", the usage of "unitCode", "observedAt", etc.

My proposal would be that each tutorial to have at the end a section, named, representation as NGSI-LD and just encode the entities using that representation format. I agree that in the E-R tutorial it would be more adequate, but I think it would be great to introduce NGSI-LD in each of our tutorials.

from tutorials.getting-started.

jason-fox avatar jason-fox commented on August 31, 2024

Closing as Linked Data concepts are too advanced for a Hello World style getting started.

Separate additional FIWARE 60x tutorials will be added to discuss NGSI Linked Data and linked data concepts. The first one is available here

Partially fixed by: FIWARE/tutorials.Step-by-Step@76b4520

Additional concepts such as Linked Data Relationships will be added when available.

from tutorials.getting-started.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.