Skip to content

Mixing graph id-s and node id-s in the example No. 155 #261

Closed
@iherman

Description

@iherman

Example 116 has the following structure (referring to named graph indexes:

  "@context": {
    "@version": 1.1,
    "graphMap": {
      "@id": "http://example.org/graphMap",
      "@container": ["@graph", "@id"]
    }
  },
  "graphMap": {
    "http://manu.sporny.org/about#manu": {
      "@id": "http://manu.sporny.org/about#manu",
      ...
    },
    "https://greggkellogg.net/foaf#me": {
      "@id": "https://greggkellogg.net/foaf#me",
      ...
    }
  }

Resulting in TriG graphs of the form:

<http://manu.sporny.org/about#manu> {
  <http://manu.sporny.org/about#manu> a foaf:Person;
     ...
}

Which is, functionally, of course correct. But it somehow gives the impression that the name of the graph and the id of the topmost node are expected to be identical. They are not, these are two different notions. In fact, I would think it is a bad practice to do so. My proposal is to do something like:

  "@context": {
    "@version": 1.1,
    "graphMap": {
      "@id": "http://example.org/graphMap",
      "@container": ["@graph", "@id"]
    }
  },
  "graphMap": {
    "http://manu.sporny.org/about#foafGraph": {
      "@id": "http://manu.sporny.org/about#manu",
      ...
    },
    "https://greggkellogg.net/foaf#foafGraph": {
      "@id": "https://greggkellogg.net/foaf#me",
      ...
    }
  }

instead.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions