Skip to content

Commit

Permalink
Merge pull request #613 from plantbreeding/LzLang-patch-1
Browse files Browse the repository at this point in the history
One-dimensionalization of data models
  • Loading branch information
LzLang authored Oct 15, 2024
2 parents ad8d942 + 22a9de9 commit e60eaaf
Show file tree
Hide file tree
Showing 48 changed files with 1,902 additions and 1,162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$defs": {
"ExternalReference": {
"properties": {
"referenceId": {
"externalReferenceDbId": {
"description": "The external reference ID. Could be a simple string or a URI.",
"type": [
"null",
Expand Down
36 changes: 35 additions & 1 deletion Specification/BrAPI-Schema/BrAPI-Common/GeoJSON.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
"type": "object",
"description": "One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system.\n\nCopied from RFC 7946 Section 3.1.1\n\nA position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or\neasting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.",
"properties": {
"geoJSONDbId": {
"description": "Unique identifier for the geometry",
"type": [
"null",
"string"
]
},
"geometry": {
"description": "A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed.",
"$ref": "GeoJSONGeometry.json#/$defs/GeoJSONGeometry"
Expand All @@ -14,8 +21,35 @@
"default": "Feature",
"example": "Feature",
"description": "The literal string \"Feature\""
},
"image": {
"description": "Geometry associated with an image",
"$ref": "../BrAPI-Phenotyping/Image.json#/$defs/Image",
"relationshipType": "many-to-one",
"referencedAttribute": "imageLocation"
},
"observation": {
"description": "Geometry associated with an image",
"$ref": "../BrAPI-Phenotyping/Observation.json#/$defs/Observation",
"relationshipType": "many-to-one",
"referencedAttribute": "geoCoordinates"
},
"observationUnit": {
"description": "Geometry associated with an image",
"$ref": "../BrAPI-Phenotyping/ObservationUnit.json#/$defs/ObservationUnitPosition",
"relationshipType": "many-to-one",
"referencedAttribute": "geoCoordinates"
},
"germplasmOrigin": {
"description": "Geometry associated with an image",
"$ref": "../BrAPI-Germplasm/Germplasm.json#/$defs/GermplasmOrigin",
"relationshipType": "many-to-one",
"referencedAttribute": "coordinates"
}
}
},
"required": [
"geoJSONDbId"
]
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/GeoJSON.json",
Expand Down
34 changes: 34 additions & 0 deletions Specification/BrAPI-Schema/BrAPI-Common/SourceGermplasm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$defs": {
"SourceGermplasm": {
"properties": {
"germplasmName": {
"description": "The human readable name of a `Germplasm`",
"type": [
"null",
"string"
]
},
"reference": {
"description": "Germplasm associated with a reference",
"$ref": "../BrAPI-Genotyping/Reference.json#/$defs/Reference",
"relationshipType": "many-to-one",
"referencedAttribute": "sourceGermplasm"
},
"referenceSet": {
"description": "Germplasm associated with a reference",
"$ref": "../BrAPI-Genotyping/ReferenceSet.json#/$defs/ReferenceSet",
"relationshipType": "many-to-one",
"referencedAttribute": "sourceGermplasm"
}
},
"title": "sourceGermplasm",
"type": "object",
"brapi-metadata": {
"primaryModel": false
}
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/SourceGermplasm.json",
"$schema": "http://json-schema.org/draft/2020-12/schema"
}
51 changes: 51 additions & 0 deletions Specification/BrAPI-Schema/BrAPI-Common/Species.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$defs": {
"Species": {
"properties": {
"speciesDbId": {
"description": "An ontology term describing an attribute.",
"type": [
"null",
"string"
]
},
"term": {
"description": "Ontology term - the label of the ontology term the termId is pointing to.",
"type": [
"null",
"string"
]
},
"termURI": {
"description": "Ontology term identifier - the CURIE for an ontology term. It differs from the standard GA4GH schema's :ref:`id ` in that it is a CURIE pointing to an information resource outside of the scope of the schema or its resource implementation.",
"type": [
"null",
"string"
]
},
"reference": {
"description": "Species associated with a reference",
"$ref": "../BrAPI-Genotyping/Reference.json#/$defs/Reference",
"relationshipType": "many-to-one",
"referencedAttribute": "species"
},
"referenceSet": {
"description": "Species associated with a referenceSet",
"$ref": "../BrAPI-Genotyping/ReferenceSet.json#/$defs/ReferenceSet",
"relationshipType": "many-to-one",
"referencedAttribute": "species"
}
},
"required": [
"specieDbId"
],
"title": "OntologyTerm",
"type": "object",
"brapi-metadata": {
"primaryModel": false
}
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/Species.json",
"$schema": "http://json-schema.org/draft/2020-12/schema"
}
2 changes: 1 addition & 1 deletion Specification/BrAPI-Schema/BrAPI-Common/TraitDataType.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"example": "Numerical"
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/Components/Common/AdditionalInfo.json",
"$id": "https://brapi.org/Specification/BrAPI-Schema/Components/Common/TraitDataType.json",
"$schema": "http://json-schema.org/draft/2020-12/schema"
}
18 changes: 16 additions & 2 deletions Specification/BrAPI-Schema/BrAPI-Common/Variable.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
"$defs": {
"Variable": {
"properties": {
"variableDbId": {
"description": "Unique identifier for the Variable",
"type": [
"null",
"string"
]
},
"additionalInfo": {
"description": "A free space containing any additional information related to a particular object. A data source may provide any JSON object, unrestricted by the BrAPI specification.",
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo"
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo",
"relationshipType": "one-to-one"
},
"commonCropName": {
"description": "Crop name (examples: \"Maize\", \"Wheat\")",
Expand Down Expand Up @@ -40,8 +48,10 @@
},
"externalReferences": {
"description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.",
"relationshipType": "one-to-many",
"items": {
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference"
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference",
"description": "ExternalReferences"
},
"title": "ExternalReferences",
"type": [
Expand Down Expand Up @@ -72,14 +82,17 @@
},
"method": {
"description": "A description of the way an Observation should be collected. \n<br>For example, an ObservationVariable might be defined with a Trait of \"plant height\", a Scale of \"meters\", and a Method of \"tape measure\". This variable would be distinct from a variable with the Method \"estimation\" or \"drone image processing\". ",
"relationshipType": "one-to-one",
"$ref": "../BrAPI-Phenotyping/Method.json#/$defs/Method"
},
"ontologyReference": {
"description": "MIAPPE V1.1\n\n(DM-85) Variable accession number - Accession number of the variable in the Crop Ontology\n\n(DM-87) Trait accession number - Accession number of the trait in a suitable controlled vocabulary (Crop Ontology, Trait Ontology).\n\n(DM-89) Method accession number - Accession number of the method in a suitable controlled vocabulary (Crop Ontology, Trait Ontology).\n\n(DM-93) Scale accession number - Accession number of the scale in a suitable controlled vocabulary (Crop Ontology).",
"relationshipType": "one-to-one",
"$ref": "../BrAPI-Phenotyping/OntologyReference.json#/$defs/OntologyReference"
},
"scale": {
"description": "A Scale describes the units and acceptable values for an ObservationVariable. \n<br>For example, an ObservationVariable might be defined with a Trait of \"plant height\", a Scale of \"meters\", and a Method of \"tape measure\". This variable would be distinct from a variable with the Scale \"inches\" or \"pixels\".",
"relationshipType": "one-to-one",
"$ref": "../BrAPI-Phenotyping/Scale.json#/$defs/Scale"
},
"scientist": {
Expand Down Expand Up @@ -116,6 +129,7 @@
},
"trait": {
"description": "A Trait describes what property is being observed. \n<br>For example, an ObservationVariable might be defined with a Trait of \"plant height\", a Scale of \"meters\", and a Method of \"tape measure\". This variable would be distinct from a variable with the Trait \"Leaf length\" or \"Flower height\". ",
"relationshipType": "one-to-one",
"$ref": "../BrAPI-Phenotyping/Trait.json#/$defs/Trait"
}
},
Expand Down
7 changes: 5 additions & 2 deletions Specification/BrAPI-Schema/BrAPI-Core/List.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"properties": {
"additionalInfo": {
"description": "A free space containing any additional information related to a particular object. A data source may provide any JSON object, unrestricted by the BrAPI specification.",
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo"
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo",
"relationshipType": "one-to-one"
},
"data": {
"description": "The array of DbIds of the BrAPI objects contained in a List",
Expand Down Expand Up @@ -35,8 +36,10 @@
},
"externalReferences": {
"description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.",
"relationshipType": "one-to-many",
"items": {
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference"
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference",
"description": "ExternalReferences"
},
"title": "ExternalReferences",
"type": [
Expand Down
8 changes: 6 additions & 2 deletions Specification/BrAPI-Schema/BrAPI-Core/Location.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"additionalInfo": {
"description": "A free space containing any additional information related to a particular object. A data source may provide any JSON object, unrestricted by the BrAPI specification.",
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo"
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo",
"relationshipType": "one-to-one"
},
"coordinateDescription": {
"description": "Describes the precision and landmarks of the coordinate values used for a Location. (ex. the site, the nearest town, a 10 kilometers radius circle, +/- 20 meters, etc)",
Expand All @@ -29,6 +30,7 @@
},
"coordinates": {
"description": "One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system.\n\nCopied from RFC 7946 Section 3.1.1\n\nA position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or\neasting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.",
"relationshipType": "one-to-one",
"$ref": "../BrAPI-Common/GeoJSON.json#/$defs/GeoJSON"
},
"countryCode": {
Expand Down Expand Up @@ -69,8 +71,10 @@
},
"externalReferences": {
"description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.",
"relationshipType": "one-to-many",
"items": {
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference"
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference",
"description": "ExternalReferences"
},
"title": "ExternalReferences",
"type": [
Expand Down
7 changes: 5 additions & 2 deletions Specification/BrAPI-Schema/BrAPI-Core/Person.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"properties": {
"additionalInfo": {
"description": "A free space containing any additional information related to a particular object. A data source may provide any JSON object, unrestricted by the BrAPI specification.",
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo"
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo",
"relationshipType": "one-to-one"
},
"description": {
"description": "description of this person",
Expand All @@ -22,8 +23,10 @@
},
"externalReferences": {
"description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.",
"relationshipType": "one-to-many",
"items": {
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference"
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference",
"description": "ExternalReferences"
},
"title": "ExternalReferences",
"type": [
Expand Down
7 changes: 5 additions & 2 deletions Specification/BrAPI-Schema/BrAPI-Core/Program.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"additionalInfo": {
"description": "A free space containing any additional information related to a particular object. A data source may provide any JSON object, unrestricted by the BrAPI specification.",
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo"
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo",
"relationshipType": "one-to-one"
},
"commonCropName": {
"description": "Common name for the crop which this program is for",
Expand All @@ -30,8 +31,10 @@
},
"externalReferences": {
"description": "An array of external reference ids. These are references to this piece of data in an external system. Could be a simple string or a URI.",
"relationshipType": "one-to-many",
"items": {
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference"
"$ref": "../BrAPI-Common/ExternalReference.json#/$defs/ExternalReference",
"description": "ExternalReferences"
},
"title": "ExternalReferences",
"type": [
Expand Down
Loading

0 comments on commit e60eaaf

Please sign in to comment.