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

infinite recursion in @reverse properties #653

Closed
eroux opened this issue May 7, 2018 · 1 comment
Closed

infinite recursion in @reverse properties #653

eroux opened this issue May 7, 2018 · 1 comment

Comments

@eroux
Copy link

eroux commented May 7, 2018

It would be nice to have the same possiblity of infinite recursion in the @reverse properties as there are in non-reverse ones (example), currently recursion only works as many times as the frame defines it (example).

Copy/pasting the examples (and removing @contexts):

in the working case, I have

{
  "@graph": [
    {
      "@id": "bdr:O9TAXTBRC201605",
      "@type": "Taxonomy",
      "taxHasSubClass": [
        {
          "@id": "bdr:O9TAXTBRC201605_0001"
        },
        {
          "@id": "bdr:O9TAXTBRC201605_0010"
        }
      ]
    },
    {
      "@id": "bdr:O9TAXTBRC201605_0001",
      "@type": "Taxonomy",
      "taxHasSubClass": {
        "@id": "bdr:O9TAXTBRC201605_0002"
      }
    },
    {
      "@id": "bdr:O9TAXTBRC201605_0002",
      "@type": "Taxonomy"
    },
    {
      "@id": "bdr:O9TAXTBRC201605_0010",
      "@type": "Taxonomy"
    }
  ]
}

and frame

{ 
  "@id" : "bdr:O9TAXTBRC201605",
  "@context" : {
    "children": { "@reverse": "http://purl.bdrc.io/ontology/core/taxSubclassOf" }, 
    "taxSubclassOf" : {
      "@id" : "http://purl.bdrc.io/ontology/core/taxSubclassOf",
      "@type" : "@id"
    },
    "@vocab" : "http://purl.bdrc.io/ontology/core/",
    "bdr" : "http://purl.bdrc.io/resource/"
  }
}

that produces the nice

{
  "@graph": [
    {
      "@id": "bdr:O9TAXTBRC201605",
      "@type": "Taxonomy",
      "taxHasSubClass": [
        {
          "@id": "bdr:O9TAXTBRC201605_0001",
          "@type": "Taxonomy",
          "taxHasSubClass": {
            "@id": "bdr:O9TAXTBRC201605_0002",
            "@type": "Taxonomy"
          }
        },
        {
          "@id": "bdr:O9TAXTBRC201605_0010",
          "@type": "Taxonomy"
        }
      ]
    }
  ]
}

but for the opposite:

{
  "@graph": [
    {
      "@id": "bdr:O9TAXTBRC201605",
      "@type": "Taxonomy"
    },
    {
      "@id": "bdr:O9TAXTBRC201605_0001",
      "@type": "Taxonomy",
      "taxSubclassOf": "bdr:O9TAXTBRC201605"
    },
    {
      "@id": "bdr:O9TAXTBRC201605_0002",
      "@type": "Taxonomy",
      "taxSubclassOf": "bdr:O9TAXTBRC201605_0001"
    },
    {
      "@id": "bdr:O9TAXTBRC201605_0010",
      "@type": "Taxonomy",
      "taxSubclassOf": "bdr:O9TAXTBRC201605"
    }
  ]
}

and the frame

{
  "@id": "bdr:O9TAXTBRC201605",
  "@context": {
    "children": {
      "@reverse": "http://purl.bdrc.io/ontology/core/taxSubclassOf"
    },
    "taxSubclassOf": {
      "@id": "http://purl.bdrc.io/ontology/core/taxSubclassOf",
      "@type": "@id"
    },
    "@vocab": "http://purl.bdrc.io/ontology/core/",
    "bdr": "http://purl.bdrc.io/resource/"
  },
  "children": {}
}

I'm not getting all the recursion, only

{
  "@graph": [
    {
      "@id": "bdr:O9TAXTBRC201605",
      "children": [
        {
          "@id": "bdr:O9TAXTBRC201605_0001",
          "@type": "Taxonomy",
          "taxSubclassOf": "bdr:O9TAXTBRC201605"
        },
        {
          "@id": "bdr:O9TAXTBRC201605_0010",
          "@type": "Taxonomy",
          "taxSubclassOf": "bdr:O9TAXTBRC201605"
        }
      ],
      "@type": "Taxonomy"
    }
  ]
}
@gkellogg
Copy link
Member

Moved to w3c/json-ld-framing#5.

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