diff --git a/build.sbt b/build.sbt index aac1e6f7..d26b7258 100644 --- a/build.sbt +++ b/build.sbt @@ -126,6 +126,7 @@ lazy val simulation = project ) + lazy val root = project .in(file(".")) .settings(name := "nsg-schemas", moduleName := "nsg-schemas") diff --git a/modules/commons/src/main/resources/contexts/neurosciencegraph/core/data/v1.0.6.json b/modules/commons/src/main/resources/contexts/neurosciencegraph/core/data/v1.0.6.json new file mode 100644 index 00000000..75926752 --- /dev/null +++ b/modules/commons/src/main/resources/contexts/neurosciencegraph/core/data/v1.0.6.json @@ -0,0 +1,629 @@ +{ + "@context": [ + "{{base}}/contexts/nexus/core/provo20130430/v1.0.0", + "{{base}}/contexts/nexus/core/schemaorg/v3.3.0", + "{{base}}/contexts/nexus/core/standards/v0.1.0", + { + "@vocab": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/", + "nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/", + "schema": "http://schema.org/", + "oa": "http://www.w3.org/ns/oa#", + "brainRegion": { + "@id": "nsg:brainRegion", + "@type": "@id" + }, + "geometry": { + "@id": "nsg:geometry" + }, + "location": { + "@id": "nsg:location" + }, + "geometryParameter": { + "@id": "nsg:geometryParameter" + }, + "spatialReferenceSystem": { + "@id": "nsg:spatialReferenceSystem" + }, + "hadProtocol": { + "@id": "nsg:hadProtocol" + }, + "atlasVersion": { + "@id": "nsg:atlasVersion" + }, + "sweep": { + "@id": "nsg:sweep" + }, + "channel": { + "@id": "nsg:channel" + }, + "putativeMType": { + "@id": "nsg:putativeMType" + }, + "projectName": { + "@id": "nsg:projectName" + }, + "waveNumberRange": { + "@id": "nsg:waveNumberRange" + }, + "spatialCellName": { + "@id": "nsg:spatialCellName" + }, + "reconstructionRequested": { + "@id": "nsg:reconstructionRequested" + }, + "reconstructable": { + "@id": "nsg:reconstructable" + }, + "labeledCell": { + "@id": "nsg:labeledCell" + }, + "objectiveMagnification": { + "@id": "nsg:objectiveMagnification" + }, + "objectiveType": { + "@id": "nsg:objectiveType" + }, + "brainLocationCoordinates": { + "@id": "nsg:brainLocationCoordinates" + }, + "sliceLocationCoordinates": { + "@id": "nsg:sliceLocationCoordinates" + }, + "valueX": { + "@id": "nsg:valueX" + }, + "valueY": { + "@id": "nsg:valueY" + }, + "valueZ ": { + "@id": "nsg:valueZ" + }, + "species": { + "@id": "nsg:species" + }, + "strain": { + "@id": "nsg:strain" + }, + "transgenic": { + "@id": "nsg:transgenic" + }, + "sex": { + "@id": "nsg:sex" + }, + "age": { + "@id": "nsg:age" + }, + "dateOfSurgery": { + "@id": "nsg:dateOfSurgery" + }, + "diseaseModel": { + "@id": "nsg:diseaseModel" + }, + "disease": { + "@id": "nsg:disease" + }, + "treatment": { + "@id": "nsg:treatment" + }, + "period": { + "@id": "nsg:period" + }, + "2DContour": { + "@id": "nsg:2DContour" + }, + "3DContour": { + "@id": "nsg:3DContour" + }, + "1Point": { + "@id": "nsg:1Point" + }, + "3Point": { + "@id": "nsg:3Point" + }, + "brainLocation": { + "@id": "nsg:brainLocation" + }, + "fixationMethod": { + "@id": "nsg:fixationMethod" + }, + "stain": { + "@id": "nsg:stain" + }, + "mountingMedia": { + "@id": "nsg:mountingMedia" + }, + "annotationAngle": { + "@id": "nsg:annotationAngle" + }, + "annotatorComment": { + "@id": "nsg:annotatorComment" + }, + "axonProjection": { + "@id": "nsg:axonProjection" + }, + "distanceToBoundary": { + "@id": "nsg:distanceToBoundary" + }, + "mType": { + "@id": "nsg:mType" + }, + "mSubType": { + "@id": "nsg:mSubType" + }, + "subRegion": { + "@id": "nsg:subRegion" + }, + "positionInLayer": { + "@id": "nsg:positionInLayer" + }, + "longitudinalAxis": { + "@id": "nsg:longitudinalAxis" + }, + "layer": { + "@id": "nsg:layer" + }, + "integrity": { + "@id": "nsg:integrity" + }, + "somaType": { + "@id": "nsg:somaType" + }, + "apicalDendrite": { + "@id": "nsg:apicalDendrite" + }, + "basalDendrite": { + "@id": "nsg:basalDendrite" + }, + "axon": { + "@id": "nsg:axon" + }, + "soma": { + "@id": "nsg:soma" + }, + "orientationOfReconstruction": { + "@id": "nsg:orientationOfReconstruction" + }, + "reconstructionCompressionCorrected": { + "@id": "nsg:reconstructionCompressionCorrected" + }, + "reconstructionCompleted": { + "@id": "nsg:reconstructionCompleted" + }, + "reconstructionCorrected": { + "@id": "nsg:reconstructionCorrected" + }, + "reconstructionComment": { + "@id": "nsg:reconstructionComment" + }, + "clusterReconstructionRequested": { + "@id": "nsg:clusterReconstructionRequested" + }, + "reconstructionRequester": { + "@id": "nsg:reconstructionRequester" + }, + "reconstructionSentDate": { + "@id": "nsg:reconstructionSentDate" + }, + "reconstructionDate": { + "@id": "nsg:reconstructionDate" + }, + "reconstructionLocation": { + "@id": "nsg:reconstructionLocation" + }, + "comment": { + "@id": "nsg:comment" + }, + "stimulus": { + "@id": "nsg:stimulus" + }, + "stimulusType": { + "@id": "nsg:stimulusType" + }, + "providerExperimentId": { + "@id": "nsg:providerExperimentId" + }, + "providerExperimentName": { + "@id": "nsg:providerExperimentName" + }, + "eCode": { + "@id": "nsg:eCode" + }, + "weight": { + "@id": "schema:weight" + }, + "birthDate": { + "@id": "schema:birthDate" + }, + "deathDate": { + "@id": "schema:deathDate" + }, + "dataUnit": { + "@id": "nsg:dataUnit" + }, + "modelScript": { + "@id": "nsg:modelScript", + "@type": "@id" + }, + "providerId": { + "@id": "nsg:providerId" + }, + "boundingBox": { + "@id": "nsg:boundingBox" + }, + "orientation": { + "@id": "nsg:orientation" + }, + "parcellationVolume": { + "@id": "nsg:parcellationVolume", + "@type": "@id" + }, + "origin": { + "@id": "nsg:origin" + }, + "releaseDate": { + "@id": "nsg:releaseDate" + }, + "radius": { + "@id": "nsg:radius" + }, + "parcellationOntology": { + "@id": "nsg:parcellationOntology", + "@type": "@id" + }, + "center": { + "@id": "nsg:center" + }, + "valueZ": { + "@id": "nsg:valueZ" + }, + "modelOf": { + "@id": "nsg:modelOf", + "@type": "@id" + }, + "subCellularMechanism": { + "@id": "nsg:subCellularMechanism", + "@type": "@id" + }, + "distribution": { + "@id": "schema:distribution" + }, + "cellPlacement": { + "@id": "nsg:cellPlacement", + "@type": "@id" + }, + "memodelRelease": { + "@id": "nsg:memodelRelease", + "@type": "@id" + }, + "synapseRelease": { + "@id": "nsg:synapseRelease", + "@type": "@id" + }, + "nodeCollection": { + "@id": "nsg:nodeCollection", + "@type": "@id" + }, + "eType": { + "@id": "nsg:eType", + "@type": "@id" + }, + "putativeEtype": { + "@id": "nsg:putativeEtype", + "@type": "@id" + }, + "pipetteNumber": { + "@id": "nsg:pipetteNumber" + }, + "startMembranePotential": { + "@id": "nsg:startMembranePotential" + }, + "endMembranePotential": { + "@id": "nsg:endMembranePotential" + }, + "sealResistance": { + "@id": "nsg:sealResistance" + }, + "pipetteResistance": { + "@id": "nsg:pipetteResistance" + }, + "liquidJunctionPotential": { + "@id": "nsg:liquidJunctionPotential" + }, + "labelingCompound": { + "@id": "nsg:labelingCompound" + }, + "repetition": { + "@id": "nsg:repetition" + }, + "targetHoldingPotential": { + "@id": "nsg:targetHoldingPotential" + }, + "measuredHoldingPotential": { + "@id": "nsg:measuredHoldingPotential" + }, + "inputResistance": { + "@id": "nsg:inputResistance" + }, + "seriesResistance": { + "@id": "nsg:seriesResistance" + }, + "compensationCurrent": { + "@id": "nsg:compensationCurrent" + }, + "digitalToAnalogConverter": { + "@id": "nsg:digitalToAnalogConverter" + }, + "numberOfRepetition": { + "@id": "nsg:numberOfRepetition" + }, + "retrievalDate": { + "@id": "nsg:retrievalDate" + }, + "timeStep": { + "@id": "nsg:timeStep" + }, + "slicingPlane": { + "@id": "nsg:slicingPlane" + }, + "slicingAngle": { + "@id": "nsg:slicingAngle" + }, + "cuttingThickness": { + "@id": "nsg:cuttingThickness" + }, + "hemisphere": { + "@id": "nsg:hemisphere" + }, + "solution": { + "@id": "nsg:solution" + }, + "materials": { + "@id": "nsg:materials", + "@type": "@id" + }, + "vendor": { + "@id": "nsg:vendor", + "@type": "@id" + }, + "steps": { + "@id": "nsg:steps" + }, + "warning": { + "@id": "nsg:warning" + }, + "reagentName": { + "@id": "nsg:reagentName" + }, + "reagentLinearFormula": { + "@id": "nsg:reagentLinearFormula" + }, + "reagentVendor": { + "@id": "nsg:reagentVendor", + "@type": "@id" + }, + "score": { + "@id": "nsg:score" + }, + "normalizedScore": { + "@id": "nsg:normalizedScore" + }, + "edgePopulation": { + "@id": "nsg:edgePopulation" + }, + "target": { + "@id": "nsg:target" + }, + "downloadURL": { + "@id": "schema:downloadURL", + "@type": "@id" + }, + "accessURL": { + "@id": "schema:accessURL", + "@type": "@id" + }, + "mediaType": { + "@id": "schema:mediaType" + }, + "description": { + "@id": "schema:description" + }, + "hasPart": { + "@id": "dcterms:hasPart" + }, + "value": { + "@id": "schema:value" + }, + "label": { + "@id": "rdfs:label" + }, + "unitCode": { + "@id": "schema:unitCode" + }, + "unitText": { + "@id": "schema:unitText" + }, + "upperPoint": { + "@id": "nsg:upperPoint" + }, + "lowerPoint": { + "@id": "nsg:lowerPoint" + }, + "imageVolume": { + "@id": "nsg:imageVolume" + }, + "voxelType": { + "@id": "nsg:voxelType" + }, + "volumeDimension": { + "@id": "nsg:volumeDimension" + }, + "imageOrigin": { + "@id": "nsg:imageOrigin" + }, + "imageDirection": { + "@id": "nsg:imageDirection" + }, + "secondRow": { + "@id": "nsg:secondRow" + }, + "thirdRow": { + "@id": "nsg:thirdRow" + }, + "voxelResolution": { + "@id": "nsg:voxelResolution" + }, + "voxelResolutionValue": { + "@id": "nsg:voxelResolutionValue" + }, + "boundingbox": { + "@id": "nsg:boundingbox" + }, + "isRegisteredIn": { + "@id": "nsg:isRegisteredIn" + }, + "sliceDirection": { + "@id": "nsg:sliceDirection" + }, + "sliceWidth": { + "@id": "nsg:sliceWidth" + }, + "sliceHeight": { + "@id": "nsg:sliceHeight" + }, + "numberOfSlices": { + "@id": "nsg:numberOfSlices" + }, + "sliceResolution": { + "@id": "nsg:sliceResolution" + }, + "sliceInterval": { + "@id": "nsg:sliceInterval" + }, + "widthResolution": { + "@id": "nsg:widthResolution" + }, + "heightResolution": { + "@id": "nsg:heightResolution" + }, + "sliceIntervalValue": { + "@id": "nsg:sliceIntervalValue" + }, + "emodelIndex": { + "@id": "nsg:emodelIndex" + }, + "morphologyIndex": { + "@id": "nsg:morphologyIndex" + }, + "eModel": { + "@id": "nsg:eModel" + }, + "emodelRelease": { + "@id": "nsg:emodelRelease" + }, + "morphologyRelease": { + "@id": "nsg:morphologyRelease" + }, + "memodelIndex": { + "@id": "nsg:memodelIndex" + }, + "circuitCellProperties": { + "@id": "nsg:circuitCellProperties" + }, + "property": { + "@id": "nsg:property" + }, + "edgeCollection": { + "@id": "nsg:edgeCollection" + }, + "morphology": { + "@id": "nsg:morphology" + }, + "mainModelScript": { + "@id": "nsg:mainModelScript" + }, + "name": { + "@id": "schema:name" + }, + "version": { + "@id": "schema:version" + }, + "isPartOf": { + "@id": "dcterms:isPartOf", + "@type": "@id" + }, + "view2d": { + "@id": "nsg:view2d" + }, + "view3d": { + "@id": "nsg:view3d" + }, + "wasDerivedFrom": { + "@id": "prov:wasDerivedFrom" + }, + "experimentalCellList": { + "@id": "nsg:experimentalCellList" + }, + "masterListConfiguration": { + "@id": "nsg:masterListConfiguration" + }, + "experimentalTraceLocation": { + "@id": "nsg:experimentalTraceLocation" + }, + "stimuliToExperimentMap": { + "@id": "nsg:stimuliToExperimentMap" + }, + "featureExtractionConfiguration": { + "@id": "nsg:featureExtractionConfiguration" + }, + "configurationUsed": { + "@id": "nsg:configurationUsed" + }, + "features": { + "@id": "nsg:features" + }, + "hypampThreshold": { + "@id": "nsg:hypampThreshold" + }, + "storageType": { + "@type": "@id", + "@id": "nsg:storageType" + }, + "gpfs": { + "@id": "http://bbp.epfl.ch/neurosciencegraph/taxonomies/storagetypes/gpfs" + }, + "cellLine": { + "@id": "nsg:cellLine" + }, + "ionChannelGene": { + "@id": "nsg:ionChannelGene" + }, + "atlasSpatialReferenceSystem": { + "@id": "nsg:atlasSpatialReferenceSystem" + }, + "repository": { + "@id": "nsg:repository" + }, + "image": { + "@id": "schema:image" + }, + "mTypeAnnotation": { + "@id": "nsg:mTypeAnnotation" + }, + "oa:hasBody": { + "@type": "@id" + }, + "oa:hasTarget": { + "@type": "@id" + }, + "oa:hasSource": { + "@type": "@id" + }, + "oa:hasSelector": { + "@type": "@id" + }, + "dcterms:conformsTo": { + "@type": "@id" + } + } + ] +} diff --git a/modules/commons/src/main/resources/contexts/neurosciencegraph/core/schema/v0.2.0.json b/modules/commons/src/main/resources/contexts/neurosciencegraph/core/schema/v0.2.0.json new file mode 100644 index 00000000..34bc58c1 --- /dev/null +++ b/modules/commons/src/main/resources/contexts/neurosciencegraph/core/schema/v0.2.0.json @@ -0,0 +1,9 @@ +{ + "@context": [ + "{{base}}/contexts/nexus/core/schema/v0.2.0", + { + "nsg": "https://bbp-nexus.epfl.ch/vocabs/bbp/neurosciencegraph/core/v0.1.0/", + "oa": "http://www.w3.org/ns/oa#" + } + ] +} diff --git a/modules/commons/src/main/resources/schemas/neurosciencegraph/commons/annotation/v0.2.0.json b/modules/commons/src/main/resources/schemas/neurosciencegraph/commons/annotation/v0.2.0.json new file mode 100644 index 00000000..19d0261d --- /dev/null +++ b/modules/commons/src/main/resources/schemas/neurosciencegraph/commons/annotation/v0.2.0.json @@ -0,0 +1,186 @@ +{ + "@context": [ + "{{base}}/contexts/neurosciencegraph/core/schema/v0.2.0", + { + "this": "{{base}}/schemas/neurosciencegraph/commons/annotation/v0.2.0/shapes/" + } + ], + "imports": [ + "{{base}}/schemas/neurosciencegraph/commons/entity/v1.0.0", + "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0" + ], + "@type": "nxv:Schema", + "shapes": [ + { + "@id": "this:AnnotationShape", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI", + "seeAlso":"https://www.w3.org/TR/annotation-model/#introduction", + "editorialNote":"The higher level vocabulary (hasTarget, hasBody, hasSource,hasSelector, Annotation) are mapped to the nsg namespace (instead of using oa namespace) for consistency and ease of use purpose. The selector", + "and": [ + { + "node": "{{base}}/schemas/neurosciencegraph/commons/entity/v1.0.0/shapes/EntityShape" + }, + { + "property": [ + { + "path": "nsg:hasTarget", + "name": "Target", + "description": "The target of an Annotation: the entity being annotated.", + "node": "this:TargetShape", + "minCount": 1 + }, + { + "path": "nsg:hasBody", + "name": "Body", + "description": "The entity or value that the target entity is being annotated with.", + "node": "this:BodyShape" + } + ] + } + ] + }, + { + "@id": "this:TargetShape", + "label":"The target of an annotation is always an external resource.", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI" + }, + { + "@id": "this:BodyShape", + "label":"The body of an annotation can be an external or internal resource.", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI" + }, + { + "@id": "this:SelectorTargetShape", + "@type": "sh:NodeShape", + "and": [ + { + "node": "this:TargetShape" + }, + { + "property": [ + { + "path": "nsg:hasSource", + "name": "Source", + "description": "The relationship between a Specific Resource and the resource that it is a more specific representation of.", + "minCount": 1, + "maxCount": 1 + }, + { + "path": "nsg:hasSelector", + "name": "Selector", + "description": "The relationship between a Specific Resource and a Selector.", + "node": "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0/shapes/SelectorShape" + } + ] + } + ] + }, + { + "@id": "this:TextPositionTargetShape", + "@type": "sh:NodeShape", + "class":"nsg:TextPositionTarget", + "and": [ + { + "node": "this:SelectorTargetShape" + }, + { + "property": [ + { + "path": "nsg:hasSelector", + "node": "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0/shapes/TextPositionSelectorShape", + "minCount": 1, + "maxCount": 1 + } + ] + } + ] + }, + { + "@id": "this:FigureTargetShape", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI", + "and": [ + { + "node": "this:SelectorTargetShape" + }, + { + "property": [ + { + "path": "nsg:hasSelector", + "class": "nsg:FigureSelector", + "node": "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0/shapes/DocumentIndexSelectorShape", + "minCount": 1, + "maxCount": 1 + } + ] + } + ] + }, + { + "@id": "this:EquationTargetShape", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI", + "and": [ + { + "node": "this:SelectorTargetShape" + }, + { + "property": [ + { + "path": "nsg:hasSelector", + "class": "nsg:EquationSelector", + "node": "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0/shapes/DocumentIndexSelectorShape", + "minCount": 1, + "maxCount": 1 + } + ] + } + ] + }, + { + "@id": "this:TableTargetShape", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI", + "and": [ + { + "node": "this:SelectorTargetShape" + }, + { + "property": [ + { + "path": "nsg:hasSelector", + "class": "nsg:TableSelector", + "node": "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0/shapes/TableSelectorShape", + "minCount": 1, + "maxCount": 1 + } + ] + } + ] + }, + { + "@id": "this:AreaTargetShape", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI", + "and": [ + { + "node": "this:SelectorTargetShape" + }, + { + "property": [ + { + "path": "nsg:hasSelector", + "node": "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0/shapes/DocumentAreaSelectorShape", + "minCount": 1, + "maxCount": 1 + } + ] + } + ] + } + + ] +} \ No newline at end of file diff --git a/modules/commons/src/main/resources/schemas/neurosciencegraph/commons/annotationselector/v0.2.0.json b/modules/commons/src/main/resources/schemas/neurosciencegraph/commons/annotationselector/v0.2.0.json new file mode 100644 index 00000000..a8dfbd04 --- /dev/null +++ b/modules/commons/src/main/resources/schemas/neurosciencegraph/commons/annotationselector/v0.2.0.json @@ -0,0 +1,156 @@ +{ + "@context": [ + "{{base}}/contexts/neurosciencegraph/core/schema/v0.2.0", + { + "this": "{{base}}/schemas/neurosciencegraph/commons/annotationselector/v0.2.0/shapes/" + } + ], + "@type": "nxv:Schema", + "shapes": [ + { + "@id": "this:SelectorShape", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI", + "seeAlso": "https://www.w3.org/TR/annotation-model/#selectors" + }, + { + "@id": "this:TextPositionSelectorShape", + "@type": "sh:NodeShape", + "class": "oa:TextPositionSelector", + "and": [ + { + "node": "this:SelectorShape" + }, + { + "property": [ + { + "path": "oa:start", + "name": "Start offset", + "description": "The starting position of the segment of text. The first character in the full text is character position 0, and the character is included within the segment.", + "datatype": "xsd:integer", + "minInclusive": 0, + "lessThan": "oa:end", + "minCount": 1, + "maxCount": 1 + }, + { + "path": "oa:end", + "name": "End offset", + "description": "The end position of the segment of text. The character is not included within the segment.", + "datatype": "xsd:integer", + "minInclusive": 0, + "minCount": 1, + "maxCount": 1 + }, + { + "path": "schema:value", + "name": "Value", + "description": "The selected segment of text.", + "datatype": "xsd:string", + "maxCount": 1 + } + ] + } + ] + }, + { + "@id": "this:DocumentIndexSelectorShape", + "@type": "sh:NodeShape", + "class": "nsg:DocumentIndexSelector", + "and": [ + { + "node": "this:SelectorShape" + }, + { + "property": [ + { + "path": "nsg:index", + "name": "Index", + "description": "The index of a document media (figure) or item (equation, table,...) (e.g. '1', '2.a', 'III').", + "datatype": "xsd:string", + "minCount": 1, + "maxCount": 1 + } + ] + } + ] + }, + { + "@id": "this:TableSelectorShape", + "@type": "sh:NodeShape", + "class": "nsg:TableSelector", + "seeAlso":"https://www.w3.org/TR/csv2rdf/", + "and": [ + { + "node": "this:DocumentIndexSelectorShape" + }, + { + "property": [ + { + "path": "nsg:row", + "name": "Row number", + "description": "The number of the row of a table (e.g. '1', '1, 3')." + }, + { + "path": "nsg:column", + "name": "Column index", + "description": "The index(es) in the table of the columns(s) (e.g. '1', '1, 3')." + } + ] + } + ] + }, + { + "@id": "this:FragmentSelectorShape", + "@type": "sh:NodeShape", + "class": "oa:FragmentSelector", + "nodeKind": "sh:BlankNodeOrIRI", + "and": [ + { + "node": "this:SelectorShape" + }, + { + "property": [ + { + "path": "schema:value", + "name": "Fragment value", + "description": "The contents of the fragment component of an IRI that describes the Segment.", + "minCount": 1, + "maxCount": 1 + }, + { + "path": "nsg:conformsTo", + "name": "Fragment specification", + "description": "Specification of the fragment syntax.", + "nodeKind": "sh:IRI", + "seeAlso": "https://www.w3.org/TR/annotation-model/#fragment-selector", + "minCount": 1, + "maxCount": 1 + } + ] + } + ] + }, + { + "@id": "this:DocumentAreaSelectorShape", + "@type": "sh:NodeShape", + "nodeKind": "sh:BlankNodeOrIRI", + "class": "nsg:PDFAreaSelector", + "and": [ + { + "node": "this:FragmentSelectorShape" + }, + { + "property": [ + { + "path": "nsg:conformsTo", + "name": "Specification", + "comment": "Used format is page=&viewrect=,,,. , and are measured from the top left corner of the page.", + "hasValue": "http://tools.ietf.org/rfc/rfc3778" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/modules/core/src/main/resources/schemas/neurosciencegraph/core/annotation/v0.2.0.json b/modules/core/src/main/resources/schemas/neurosciencegraph/core/annotation/v0.2.0.json new file mode 100644 index 00000000..f1f3d41d --- /dev/null +++ b/modules/core/src/main/resources/schemas/neurosciencegraph/core/annotation/v0.2.0.json @@ -0,0 +1,20 @@ +{ + "@context": [ + "{{base}}/contexts/neurosciencegraph/core/schema/v0.2.0", + { + "@base": "{{base}}/schemas/neurosciencegraph/core/annotation/v0.2.0/shapes/" + } + ], + "imports": [ + "{{base}}/schemas/neurosciencegraph/commons/annotation/v0.2.0" + ], + "@type": "nxv:Schema", + "shapes": [ + { + "@id": "AnnotationShape", + "@type": "sh:NodeShape", + "targetClass": "nsg:Annotation", + "node": "{{base}}/schemas/neurosciencegraph/commons/annotation/v0.2.0/shapes/AnnotationShape" + } + ] +} \ No newline at end of file diff --git a/modules/core/src/test/resources/data/neurosciencegraph/core/annotation/v0.2.0/all-fields.json b/modules/core/src/test/resources/data/neurosciencegraph/core/annotation/v0.2.0/all-fields.json new file mode 100644 index 00000000..b9240e47 --- /dev/null +++ b/modules/core/src/test/resources/data/neurosciencegraph/core/annotation/v0.2.0/all-fields.json @@ -0,0 +1,25 @@ +{ + "@context": "{{base}}/contexts/neurosciencegraph/core/data/v1.0.6", + "@id": "{{base}}/schemas/neurosciencegraph/core/entity/v1.0.0/057622e3-5ea6-499a-a434-e38ba70ac83b", + "@type": "nsg:Annotation", + "schema:name": "Annotation example with all fields", + "prov:wasAttributedTo":{ + "@id": "{{base}}/schemas/neurosciencegraph/core/person/v0.1.0/03b67cb6-db1a-4acd-a628-8dd3e5f3ee12", + "@type": "nsg:Person" + }, + "nsg:providerId": "db201d2e-e185-11e6-a0b3-c869cd917532", + "nsg:hasBody": { + "@id": "{{base}}/schemas/neurosciencegraph/core/entity/v1.0.0/027622e3-5ea6-499a-a434-e38ba70ac82c", + "@type": "prov:Entity" + }, + "nsg:hasTarget": { + "@type": "nsg:TextPositionTarget", + "nsg:hasSelector": { + "@type": "oa:TextPositionSelector", + "schema:value": "while 10–90 % EPSP rise times were below 1 ms in all 22 pairs. ", + "oa:end": 15430, + "oa:start": 15367 + }, + "nsg:hasSource": "https://www.ncbi.nlm.nih.gov/pubmed/14984412" + } +} \ No newline at end of file diff --git a/modules/core/src/test/resources/invalid/neurosciencegraph/core/annotation/v0.2.0/missing_target.json b/modules/core/src/test/resources/invalid/neurosciencegraph/core/annotation/v0.2.0/missing_target.json new file mode 100644 index 00000000..76fb1ee4 --- /dev/null +++ b/modules/core/src/test/resources/invalid/neurosciencegraph/core/annotation/v0.2.0/missing_target.json @@ -0,0 +1,15 @@ +{ + "@context": "{{base}}/contexts/neurosciencegraph/core/data/v1.0.6", + "@id": "{{base}}/schemas/neurosciencegraph/core/entity/v1.0.0/057622e3-5ea6-499a-a434-e38ba70ac83b", + "@type": "nsg:Annotation", + "schema:name": "Annotation example with all fields", + "prov:wasAttributedTo":{ + "@id": "{{base}}/schemas/neurosciencegraph/core/person/v0.1.0/03b67cb6-db1a-4acd-a628-8dd3e5f3ee12", + "@type": "nsg:Person" + }, + "nsg:providerId": "db201d2e-e185-11e6-a0b3-c869cd917532", + "nsg:hasBody": { + "@id": "{{base}}/schemas/neurosciencegraph/core/entity/v1.0.0/027622e3-5ea6-499a-a434-e38ba70ac82c", + "@type": "prov:Entity" + } +} \ No newline at end of file