Skip to content

Commit

Permalink
Added a new creation time attribute for the annotations class
Browse files Browse the repository at this point in the history
  • Loading branch information
tzulueta committed Aug 3, 2023
1 parent 015e5db commit 4ed1d8f
Show file tree
Hide file tree
Showing 14 changed files with 240 additions and 176 deletions.
4 changes: 3 additions & 1 deletion examples/Annotations_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ file_metadata:
source_image_id:
transformations:
spatial_information:
annotation_creation_time:
- annotation_id:
annotation_type:
-
-
source_image_id:
transformations:
spatial_information:
spatial_information:
annotation_creation_time:
11 changes: 9 additions & 2 deletions project/bia_faim_models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Auto generated from bia_faim_models.yaml by pythongen.py version: 0.9.0
# Generation date: 2023-07-17T15:22:23
# Generation date: 2023-08-03T15:23:17
# Schema: bia-faim-models
#
# id: https://w3id.org/BioImage-Archive/bia-faim-models
Expand Down Expand Up @@ -419,6 +419,7 @@ class FileLevelMetadata(YAMLRoot):
source_image_id: str = None
transformations: Optional[str] = None
spatial_information: Optional[str] = None
annotation_creation_time: Optional[Union[str, XSDDateTime]] = None

def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self._is_empty(self.annotation_id):
Expand All @@ -443,6 +444,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.spatial_information is not None and not isinstance(self.spatial_information, str):
self.spatial_information = str(self.spatial_information)

if self.annotation_creation_time is not None and not isinstance(self.annotation_creation_time, XSDDateTime):
self.annotation_creation_time = XSDDateTime(self.annotation_creation_time)

super().__post_init__(**kwargs)


Expand Down Expand Up @@ -575,7 +579,7 @@ class AnnotationType(EnumDefinitionImpl):
description="""graphical representations of the morphology, connectivity, or spatial arrangement of biological structures in an image. Graphs, such as skeletons or connectivity diagrams, typically consist of nodes and edges, where nodes represent individual elements or regions and edges represent the connections or interactions between them""")
point_annotations = PermissibleValue(
text="point_annotations",
description="X, Y, and Z coordinates of a point of interest in an image (for example an object's centroid).")
description="""X, Y, and Z coordinates of a point of interest in an image (for example an object's centroid or landmarks).""")
segmentation_mask = PermissibleValue(
text="segmentation_mask",
description="""an image, the same size as the source image, with the value of each pixel representing some biological identity or background region""")
Expand Down Expand Up @@ -715,6 +719,9 @@ class slots:
slots.transformations = Slot(uri=BIA_FAIM_MODELS.transformations, name="transformations", curie=BIA_FAIM_MODELS.curie('transformations'),
model_uri=BIA_FAIM_MODELS.transformations, domain=None, range=Optional[str])

slots.annotation_creation_time = Slot(uri=PAV.authoredOn, name="annotation_creation_time", curie=PAV.curie('authoredOn'),
model_uri=BIA_FAIM_MODELS.annotation_creation_time, domain=None, range=Optional[Union[str, XSDDateTime]])

slots.version = Slot(uri=PAV.version, name="version", curie=PAV.curie('version'),
model_uri=BIA_FAIM_MODELS.version, domain=None, range=float)

Expand Down
Binary file modified project/excel/bia_faim_models.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions project/graphql/bia_faim_models.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type FileLevelMetadata
sourceImageId: String!
transformations: String
spatialInformation: String
annotationCreationTime: Datetime
}

interface FileLevelMetadataCollection
Expand Down
6 changes: 5 additions & 1 deletion project/jsonld/bia_faim_models.context.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"comments": {
"description": "Auto generated by LinkML jsonld context generator",
"generation_date": "2023-07-17T15:22:09",
"generation_date": "2023-08-03T15:23:03",
"source": "bia_faim_models.yaml"
},
"@context": {
Expand All @@ -23,6 +23,10 @@
"ai_models_trained": {
"@type": "@id"
},
"annotation_creation_time": {
"@type": "xsd:dateTime",
"@id": "pav:authoredOn"
},
"annotation_id": "@id",
"annotation_type": {
"@context": {
Expand Down
37 changes: 32 additions & 5 deletions project/jsonld/bia_faim_models.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
},
{
"text": "point_annotations",
"description": "X, Y, and Z coordinates of a point of interest in an image (for example an object's centroid).",
"description": "X, Y, and Z coordinates of a point of interest in an image (for example an object's centroid or landmarks).",
"todos": [
"map this to an ontology"
]
Expand Down Expand Up @@ -1275,6 +1275,32 @@
"range": "string",
"@type": "SlotDefinition"
},
{
"name": "annotation_creation_time",
"definition_uri": "https://w3id.org/BioImage-Archive/bia-faim-models/annotation_creation_time",
"description": "Date and time when the annotation was created",
"examples": [
{
"value": "2021-04-11 11:00:15-05:00",
"@type": "Example"
},
{
"value": "2017-01-23 18:22:04+00:00",
"@type": "Example"
}
],
"from_schema": "https://w3id.org/BioImage-Archive/bia-faim-models",
"mappings": [
"http://purl.org/pav/authoredOn"
],
"slot_uri": "http://purl.org/pav/authoredOn",
"owner": "FileLevelMetadata",
"domain_of": [
"FileLevelMetadata"
],
"range": "datetime",
"@type": "SlotDefinition"
},
{
"name": "version",
"definition_uri": "https://w3id.org/BioImage-Archive/bia-faim-models/version",
Expand Down Expand Up @@ -1670,7 +1696,8 @@
"annotation_type",
"source_image_id",
"transformations",
"spatial_information"
"spatial_information",
"annotation_creation_time"
],
"slot_usage": {},
"class_uri": "https://w3id.org/BioImage-Archive/bia-faim-models/FileLevelMetadata",
Expand Down Expand Up @@ -1740,9 +1767,9 @@
],
"metamodel_version": "1.7.0",
"source_file": "bia_faim_models.yaml",
"source_file_date": "2023-07-17T15:21:27",
"source_file_size": 20392,
"generation_date": "2023-07-17T15:22:10",
"source_file_date": "2023-08-03T15:13:21",
"source_file_size": 20678,
"generation_date": "2023-08-03T15:23:04",
"@type": "SchemaDefinition",
"@context": [
"project//jsonld/bia_faim_models.context.jsonld",
Expand Down
5 changes: 5 additions & 0 deletions project/jsonschema/bia_faim_models.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
"additionalProperties": false,
"description": "metadata atributes that must be detailed at the file level",
"properties": {
"annotation_creation_time": {
"description": "Date and time when the annotation was created",
"format": "date-time",
"type": "string"
},
"annotation_id": {
"description": "The identifier for the annotation",
"type": "string"
Expand Down
Loading

0 comments on commit 4ed1d8f

Please sign in to comment.