MFSY on gh-pages
Updated schema links to point t… (compare)
MFSY on docs
Updated schema links to point t… (compare)
MFSY on master
Update README.md (compare)
MFSY on master
Update README.md (compare)
MFSY on gh-pages
Fixed broken link (compare)
MFSY on fixed_typo
Fixed typo (compare)
MFSY on docs
Fixed broken links towards sche… (compare)
MFSY on master
Added property shapes for softw… (compare)
The new structure of neuroshapes is up on the master branch. A v0 branch is available to work with the previous structure for the next two weeks (Feb 20).
All current PRs will be merged in the v0 branch and then the schemas will be automatically tranformed to the new format and structure by Feb 20.
I'm having problems with qualifiedValueShape
in neurosciencegraph/simulation/modelvalidation
. As far as I can see, this should satisfy the shapes:
{
"@context": [
"https://nexus-int.humanbrainproject.org/v0/contexts/neurosciencegraph/core/data/v0.3.1",
"https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0",
{
"name": "schema:name",
"description": "schema:description",
"nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
"prov": "http://www.w3.org/ns/prov#",
"schema": "http://schema.org/",
"generated": "prov:generated",
"used": "prov:used",
"startedAtTime": "prov:startedAtTime",
"wasAssociatedWith": "prov:wasAssociatedWith",
"referenceData": "nsg:referenceData"
}
],
"@type": [
"prov:Activity",
"nsg:ModelValidation"
],
"startedAtTime": "2018-09-21T14:24:21.144231+00:00",
"used": [
{
"@id": "https://nexus-int.humanbrainproject.org/v0/data/neuralactivity/simulation/memodel/v0.1.2/f692971c-1e57-41bc-a5fc-c81e16ddb64f",
"@type": [
"prov:Entity",
"nsg:MEModel",
"nsg:ModelInstance"
]
},
{
"@id": "https://nexus-int.humanbrainproject.org/v0/data/neuralactivity/core/collection/v0.1.0/d9dc5f65-a9a5-48a5-afc5-0117019080a7",
"@type": [
"nsg:Collection",
"prov:Entity"
]
}
],
"generated": {
"@type": [
"prov:Entity",
"nsg:ValidationResult"
],
"@id": "https://nexus-int.humanbrainproject.org/v0/data/neuralactivity/simulation/validationresult/v0.1.1/fef2918a-eb6a-4dfd-8b1e-1d8f2fb87de3"
}
}
but I get:
{
"violations": [
"Error: Violation Error(<http://www.w3.org/ns/shacl#qualifiedShapeError>). Node(_:693e0c1c70a1cef366718f295425f749) qualified shape error. Expected _:693e0c1c70a1cef366718f295425f749 to satisfy qualifiedValueShape. Value = 0, min: 1, max: 1 Node: _:693e0c1c70a1cef366718f295425f749, Constraint: _:48c9925111f99d48ed96ff972985b045, path: PredicatePath(<http://www.w3.org/ns/prov#used>)",
"Error: Violation Error(<http://www.w3.org/ns/shacl#ShapesFailed>). Node(_:693e0c1c70a1cef366718f295425f749) Failed property shapes Node: _:693e0c1c70a1cef366718f295425f749, Constraint: _:74a3c68a4e7632ce6c2c5545457d19d5, path: PredicatePath(<>)",
"Error: Violation Error(<http://www.w3.org/ns/shacl#qualifiedShapeError>). Node(_:693e0c1c70a1cef366718f295425f749) qualified shape error. Expected _:693e0c1c70a1cef366718f295425f749 to satisfy qualifiedValueShape. Value = 0, min: 1, max: 1 Node: _:693e0c1c70a1cef366718f295425f749, Constraint: _:3e1e131689b30d72d1fbed3429e5f091, path: PredicatePath(<http://www.w3.org/ns/prov#used>)"
],
"code": "ShapeConstraintViolations",
"@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/error/v0.1.0"
}
Any idea what's wrong?
Hello. I try to implement this hierarchical schema SoftwareFeatureCategory:
{
"@context": [
"https://nexus-int.humanbrainproject.org/v0/contexts/neurosciencegraph/core/schema/v0.1.0",
{
"this": "https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/software/softwarefeaturecategory/v0.1.1/shapes/"
},
"https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
],
"@id": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
"@type": "nxv:Schema",
"imports": [
"https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0"
],
"shapes": [
{
"@id": "this:SoftwareFeatureCategoryShape",
"@type": "sh:NodeShape",
"and": [
{
"comment": "The following properties are provided by EntityShape: schema:name, schema:description, nsg:providerId, schema:citation, schema:license, schema:dateCreated, prov:wasRevisionOf, prov:wasDerivedFrom, prov:wasAttributedTo, schema:image, schema:distribution, schema:identifier",
"node": "https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0/shapes/EntityShape"
},
{
"property": [
{
"comment": "reference to nsg:SoftwareFeature, nsg:SoftwareFeatureCategory or external feature (e.g. https://www.wikidata.org/wiki/Q192869)",
"description": "reference to a specific feature of this featurecategory.",
"name": "Feature Instances",
"nodeKind": "sh:IRI",
"path": "schema:feature"
}
]
}
],
"label": "This shape represents a softwarefeaturecategory a softwarefeature can belong to",
"nodekind": "sh:BlankNodeOrIRI",
"targetClass": "nsg:SoftwareFeatureCategory"
}
],
"nxv:rev": 2,
"nxv:published": true,
"nxv:deprecated": false,
"links": {
"@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
"self": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1"
}
}
where schema:feature could be an external link, another schema or again a SoftwareFeatureCategory.
Now, if i try to add a SFCategory to another SFCategorys schema:feature i get the following error:
{
"violations": [
"Error: Violation Error(<http://www.w3.org/ns/shacl#ShapesFailed>). Node(<https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>) Failed property shapes Node: <https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>, Constraint: <https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0/shapes/EntityShape>, path: PredicatePath(<>)",
"Error: Violation Error(<http://www.w3.org/ns/shacl#minCountError>). Node(<https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>) MinCount violation. Expected 1, obtained: 0 Node: <https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>, Constraint: _:2ff36fbb92c2e9f5db34379bd3a87561, path: PredicatePath(<http://schema.org/name>)"
],
"code": "ShapeConstraintViolations",
"@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/error/v0.1.0"
}
Is a hierarchical structure not supported in v0?
Thanks for your help!
Hi @FeldNico ,
The violation is due to http:schema.org/name not being present as required by teh entity schema which is extended by this:SoftwareFeatureCategoryShape:
https://nexus-int.humanbrainproject.org/v0/schemas/neurosciencegraph/commons/entity/v1.0.0/shapes/EntityShape
The part of the violation message that shows that:
MinCount violation. Expected 1, obtained: 0 Node: <https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747>, Constraint: _:2ff36fbb92c2e9f5db34379bd3a87561, path: PredicatePath(<http://schema.org/name>)”
{
"@context": [
{
"nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
"prov": "http://www.w3.org/ns/prov#",
"schema": "http://schema.org/"
},
"https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
],
"@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1",
"@type": [
"prov:Entity",
"nsg:SoftwareFeatureCategory"
],
"schema:name": "Output",
"nxv:rev": 1,
"nxv:deprecated": false,
"links": {
"@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
"incoming": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1/incoming",
"outgoing": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1/outgoing",
"schema": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
"self": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b19e709f-9434-44f5-9cfc-f4371503def1"
}
}
{
"@context": [
{
"nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
"prov": "http://www.w3.org/ns/prov#",
"schema": "http://schema.org/"
},
"https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
],
"@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975",
"@type": [
"prov:Entity",
"nsg:SoftwareFeatureCategory"
],
"schema:feature": [
{
"@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeature/v0.1.1/f70f86be-ea3f-4de8-aa65-9d2edefbd34d",
"@type": [
"prov:Entity",
"nsg:SoftwareFeature"
]
}
],
"schema:name": "Data Formats",
"nxv:rev": 2,
"nxv:deprecated": false,
"links": {
"@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
"incoming": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975/incoming",
"outgoing": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975/outgoing",
"schema": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
"self": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/b0326700-1a9f-4e52-bad3-13f1bd84d975"
}
}
Is that "schema:name" not sufficient?{
"@context": [
{
"nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/",
"prov": "http://www.w3.org/ns/prov#",
"schema": "http://schema.org/"
},
"https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/resource/v0.3.0"
],
"@id": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747",
"@type": [
"prov:Entity",
"nsg:SoftwareFeatureCategory"
],
"schema:name": "Input",
"nxv:rev": 1,
"nxv:deprecated": false,
"links": {
"@context": "https://nexus-int.humanbrainproject.org/v0/contexts/nexus/core/links/v0.2.0",
"incoming": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747/incoming",
"outgoing": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747/outgoing",
"schema": "https://nexus-int.humanbrainproject.org/v0/schemas/softwarecatalog/software/softwarefeaturecategory/v0.1.1",
"self": "https://nexus-int.humanbrainproject.org/v0/data/softwarecatalog/software/softwarefeaturecategory/v0.1.1/913c4fa1-1cd3-42f1-92b9-f46334573747"
}
}
So I think the issue is still due to http:schema.org/name not being present for the value of schema:feature which I guess is of type nsg: SoftwareFeatureCategory. The schema target entities of type nsg: SoftwareFeatureCategory within the provided payload and expects them to have http:schema.org/name value.
Try to add a value for the property http:schema.org/name for the entity in schema:feature.