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

Can you confirm if the transposition is accurate? #1

Open
lemoustachiste opened this issue Oct 5, 2023 · 0 comments
Open

Can you confirm if the transposition is accurate? #1

lemoustachiste opened this issue Oct 5, 2023 · 0 comments

Comments

@lemoustachiste
Copy link

Hi there,

Thanks for the library.

I am trying to convert a quite complex EU language model (https://publications.europa.eu/resource/authority/snb/model/ap/edc-generic-full), but I think the final output does not map correctly the various fields.

Take for instance this object of the SHACL model:

{
      "@id": "http://data.europa.eu/snb/model/ap/edc-generic-full/AccreditationShapeCV",
      "@type": "http://www.w3.org/ns/shacl#NodeShape",
      "http://www.w3.org/ns/shacl#targetClass": {
        "@id": "http://data.europa.eu/snb/model/elm/Accreditation"
      },
      "http://www.w3.org/ns/shacl#property": [
        {
          "http://www.w3.org/ns/shacl#node": {
            "@id": "http://data.europa.eu/snb/model/ap/edc-generic-full/AccreditationTypeRestriction"
          },
          "http://www.w3.org/ns/shacl#nodeKind": {
            "@id": "http://www.w3.org/ns/shacl#IRI"
          },
          "http://www.w3.org/ns/shacl#name": {
            "@value": "type",
            "@language": "en"
          },
          "http://www.w3.org/ns/shacl#path": {
            "@id": "http://purl.org/dc/terms/type"
          },
          "http://www.w3.org/ns/shacl#minCount": 1,
          "http://www.w3.org/ns/shacl#maxCount": 1,
          "http://www.w3.org/ns/shacl#severity": {
            "@id": "http://www.w3.org/ns/shacl#Violation"
          }
        },
        {
          "http://www.w3.org/ns/shacl#node": {
            "@id": "http://data.europa.eu/snb/model/ap/edc-generic-full/ThematicAreaRestriction"
          },
          "http://www.w3.org/ns/shacl#nodeKind": {
            "@id": "http://www.w3.org/ns/shacl#IRI"
          },
          "http://www.w3.org/ns/shacl#name": {
            "@value": "accredited for thematic area",
            "@language": "en"
          },
          "http://www.w3.org/ns/shacl#path": {
            "@id": "http://data.europa.eu/snb/model/elm/limitField"
          },
          "http://www.w3.org/ns/shacl#severity": {
            "@id": "http://www.w3.org/ns/shacl#Violation"
          }
        },
        {
          "http://www.w3.org/ns/shacl#node": {
            "@id": "http://data.europa.eu/snb/model/ap/edc-generic-full/EQFLevelRestriction"
          },
          "http://www.w3.org/ns/shacl#nodeKind": {
            "@id": "http://www.w3.org/ns/shacl#IRI"
          },
          "http://www.w3.org/ns/shacl#name": {
            "@value": "accredited for EQF level",
            "@language": "en"
          },
          "http://www.w3.org/ns/shacl#path": {
            "@id": "http://data.europa.eu/snb/model/elm/limitEQFLevel"
          },
          "http://www.w3.org/ns/shacl#severity": {
            "@id": "http://www.w3.org/ns/shacl#Violation"
          }
        },
        {
          "http://www.w3.org/ns/shacl#node": {
            "@id": "http://data.europa.eu/snb/model/ap/edc-generic-full/JurisdictionRestriction"
          },
          "http://www.w3.org/ns/shacl#nodeKind": {
            "@id": "http://www.w3.org/ns/shacl#IRI"
          },
          "http://www.w3.org/ns/shacl#name": {
            "@value": "accredited in jurisdiction",
            "@language": "en"
          },
          "http://www.w3.org/ns/shacl#path": {
            "@id": "http://data.europa.eu/snb/model/elm/limitJurisdiction"
          },
          "http://www.w3.org/ns/shacl#severity": {
            "@id": "http://www.w3.org/ns/shacl#Violation"
          }
        }
      ]
    }

This is the output from this library:

"AccreditationShapeCV": {
      "type": "object",
      "properties": {
        "http://purl.org/dc/terms/type": {
          "type": "object",
          "properties": {}
        },
        "http://data.europa.eu/snb/model/elm/limitField": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {}
          }
        },
        "http://data.europa.eu/snb/model/elm/limitEQFLevel": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {}
          }
        },
        "http://data.europa.eu/snb/model/elm/limitJurisdiction": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {}
          }
        }
      },
      "required": [
        "http://purl.org/dc/terms/type"
      ]
    }

It's my first time experiencing SHACL and I have limited knowledge of JSON Schemas, but it feels like it's not necessarily an accurate transposition? Could you have a look at the 2 objects and confirm that they are indeed what they are supposed to be?

Thanks for your help

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

1 participant