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

Create JSON-LD context for BOT #85

Open
GeorgFerdinandSchneider opened this issue Jul 9, 2020 · 10 comments
Open

Create JSON-LD context for BOT #85

GeorgFerdinandSchneider opened this issue Jul 9, 2020 · 10 comments
Assignees

Comments

@GeorgFerdinandSchneider
Copy link
Collaborator

From the discussion in #82 and inputs received at LDAC 2020, it should be valuable to design a JSON LD context for BOT.

@maximelefrancois86
Copy link
Member

Does this work for you ?

{  
   "@context" : {
    "bot" : "https://w3id.org/bot#",
    "Building" : {
      "@id" : "bot:Building"
    },
    "Zone" : {
      "@id" : "bot:Zone"
    },
    "Site" : {
      "@id" : "bot:Site"
    },
    "Storey" : {
      "@id" : "bot:Storey"
    },
    "Space" : {
      "@id" : "bot:Space"
    },
    "containsZone" : {
      "@id" : "bot:containsZone",
      "@type" : "@id"
    },
    "hasBuilding" : {
      "@id" : "bot:hasBuilding",
      "@type" : "@id"
    },
    "isBuildingOf" : {
      "@reverse" : "bot:hasBuilding"
    },
    "hasStorey" : {
      "@id" : "bot:hasStorey",
      "@type" : "@id"
    },
    "isStoreyOf" : {
      "@reverse" : "bot:hasStorey"
    },
    "hasSpace" : {
      "@id" : "bot:hasSpace",
      "@type" : "@id"
    },
    "isSpaceOf" : {
      "@reverse" : "bot:hasSpace"
    },
    "adjacentZone" : {
      "@id" : "bot:adjacentZone",
     "@type" : "@id"
    },
    "intersectsZone" : {
      "@id" : "bot:intersectsZone",
     "@type" : "@id"
    },
    "Element" : {
      "@id" : "bot:Element"
    },
    "hasSubElement" : {
      "@id" : "bot:hasSubElement",
      "@type" : "@id"
    },
    "isSubElementOf" : {
      "@reverse" : "bot:hasSubElement"
    },
    "hasElement" : {
      "@id" : "bot:hasElement",
      "@type" : "@id"
    },
    "isElementOf" : {
      "@reverse" : "bot:hasElement"
    },
    "containsElement" : {
      "@id" : "bot:containsElement",
      "@type" : "@id"
    },
    "isContainedInZone" : {
      "@reverse" : "bot:containsElement"
    },
    "adjacentElement" : {
      "@id" : "bot:adjacentElement",
      "@type" : "@id"
    },
    "isAdjacentToZone" : {
      "@reverse" : "bot:adjacentElement"
    },
    "intersectingElement" : {
      "@id" : "bot:intersectingElement",
      "@type" : "@id"
    },
    "isIntersectingToZone" : {
      "@reverse" : "bot:intersectingElement"
    },
    "intersectingElement" : {
      "@id" : "bot:intersectingElement",
      "@type" : "@id"
    },
    "isIntersectingToZone" : {
      "@reverse" : "bot:intersectingElement"
    },
    "Interface" : {
      "@id" : "bot:Interface"
    },
    "interfaceOf" : {
      "@id" : "bot:interfaceOf",
      "@type" : "@id"
    },
    "hasZeroPoint" : {
      "@id" : "bot:hasZeroPoint",
      "@type" : "@id"
    },
    "hasSimple3DModel" : {
      "@id" : "bot:hasZeroPoint"
    },
    "has3DModel" : {
      "@id" : "bot:hasZeroPoint",
      "@type" : "@id"
    }
  }
}

@MadsHolten
Copy link
Member

@maximelefrancois86
It does. But I think we should include examples like this:

{
    "@context": {
        "bot": "https://w3id.org/bot#",
        "schema": "http://schema.org/",
        "Site" : "bot:Site",
        "Place" : "schema:Place",
        "Building" : "bot:Building",
        "name": {
            "@id": "schema:name",
            "@container": "@language"
        },
        "address": "schema:address"
    },
    "@graph": [
        {
            "@id": "http://dtu.com/locations/LyngbyCampus",
            "@type": ["Place", "Site"],
            "name": {
                "da": "DTU Lyngby Campus",
                "en": "DTU Lyngby Campus"
            },
            "address": "Anker Engelunds Vej 1, 2800 Kongens Lyngby",
            "hasBuilding": "http://dtu.com/locations/LyngbyCampus/Building118"
        },
        {
            "@id": "http://dtu.com/locations/LyngbyCampus/Building118",
            "@type": "Building",
            "name": {
                "da": "Bygning 118",
                "en": "Building 118"
            }
        }
    ]
}

@MadsHolten
Copy link
Member

Or for those who have their own internal keys that they wish to map to bot:

{
    "@context": {
        "@vocab": "https://w3id.org/bot#",
        "site_building": {
            "@id": "hasBuilding",
            "@type": "@id"
        }
    },
    "@id": "http://dtu.com/locations/LyngbyCampus",
    "@type": "Site",
    "site_building": [
        "http://dtu.com/locations/LyngbyCampus/Building117",
        "http://dtu.com/locations/LyngbyCampus/Building118"
    ]
}

@maximelefrancois86
Copy link
Member

Do you know a way to contact katja? she volunteered to participate to the discussion

@maximelefrancois86
Copy link
Member

Actually we can do both ways. We can expose a "standard" jsonld context that people can reuse using its url,

and in an informal section we can explain that anyone can create it's own jsonld context to try to map his keys.

@GeorgFerdinandSchneider
Copy link
Collaborator Author

Great your pushing this forward!

@maximelefrancois86 I understood Katja can support on BOT docs.

@GeorgFerdinandSchneider
Copy link
Collaborator Author

@opyh: Potentially this could be interesting for you!? How would you need BOT linked to JSON for you Work?

@mathib
Copy link
Member

mathib commented Mar 18, 2021

Adding a ref to the application of JSON-LD with:

both prepared by @devonsparks

@mathib mathib changed the title Create JSON LD context for BOT Create JSON-LD context for BOT Mar 23, 2021
@devonsparks
Copy link

Is the above the "official" bot @context? If so, I'd like to update my notes on bot frames to reflect these @reverse terms.

@MadsHolten
Copy link
Member

Hey Devon! It's been a while. Hope you are doing well. I think it makes sense to publish an official context in this repo and perhaps also some SHACL shapes.

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

5 participants