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

allow "@type": "@triple" or something similar? #28

Open
pchampin opened this issue Dec 10, 2021 · 4 comments
Open

allow "@type": "@triple" or something similar? #28

pchampin opened this issue Dec 10, 2021 · 4 comments

Comments

@pchampin
Copy link
Collaborator

The rationale is the following (adapted from this message):

{
    "@context": [
      "https://schema.org/",
      {
        "ex": "http://example.com/",
        "ex:captain": { "@type": "@id" }
      }
    ],
    "@type": "Event",
    "ex:realizationOf": { "@id": {
        "@id": "ex:bowls_club",
        "ex:captain": "ex:bob"
    }},
    "startDate": "01-01-2019",
    "endDate": "31-12-2019"
}

Since ex:realizationOf is always expecting a triple, we might want to be able to spare the intermediate "@id".

Of course, declaring ex:realizationOf as "@type": "@id" does not work, because this only affect values of the property that are strings. "@type": "@triple" seems like a natural way to do this, but it has the disadvantage or introducing a new keyword...

@gkellogg
Copy link
Member

Could you spell out either how this would expand, and/or the equivalent Turtle-star? Presuming that blank nodes are used for the subject of the referenced triple, how does this work with compaction?

@pchampin
Copy link
Collaborator Author

In the value compaction algorithm, between 6.1 and 6.2, insert:

  • Otherwise, if the type mapping of active property is set to @triple, and the value associated with the @id entry is an embedded node, set result to that embedded node.

It seems to me that it should do the trick?

@VladimirAlexiev
Copy link

VladimirAlexiev commented Jul 7, 2022

@gkellogg Turtle-star is from https://lists.w3.org/Archives/Public/public-rdf-star/2021Dec/0063.html
(I'm unsure about schema prefix because there's no @vocab):

[a schema:Event;
  ex:realizationOf <<ex:bowls_club ex:captain ex:bob>>;
  schema:startDate "01-01-2019";
  endDate "31-12-2019"]

@gkellogg
Copy link
Member

gkellogg commented Jul 7, 2022

That is, in fact, the same as what my distiller generates:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <http://schema.org/> .

 [
    a schema:Event;
    <http://example.com/realizationOf> <<<http://example.com/bowls_club> <http://example.com/captain> <http://example.com/bob>>>;
    schema:endDate "31-12-2019"^^schema:Date;
    schema:startDate "01-01-2019"^^schema:Date
  ] .

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

3 participants