Skip to content

omnipy.components.isa.models.material_attribute_value_schema

ISA model representing a material attribute value in an investigation.

ISA-JSON captures Investigation/Study/Assay metadata as JSON-LD, which these Omnipy models validate.

CLASS DESCRIPTION
FieldType

JSON-LD type labels used for ISA material-attribute values.

IsaMaterialAttributeValueModel

Omnipy model wrapper for ISA material attribute values.

IsaMaterialAttributeValueSchema

Schema for assigned material attribute values.

FieldType

Bases: Enum


              flowchart BT
              omnipy.components.isa.models.material_attribute_value_schema.FieldType[FieldType]

              

              click omnipy.components.isa.models.material_attribute_value_schema.FieldType href "" "omnipy.components.isa.models.material_attribute_value_schema.FieldType"
            

JSON-LD type labels used for ISA material-attribute values.

ATTRIBUTE DESCRIPTION
MaterialAttributeValue

Marks a JSON object as an ISA attribute value.

Source code in src/omnipy/components/isa/models/material_attribute_value_schema.py
class FieldType(Enum):
    """JSON-LD type labels used for ISA material-attribute values.

    Attributes:
        MaterialAttributeValue: Marks a JSON object as an ISA attribute value.
    """

    MaterialAttributeValue = 'MaterialAttributeValue'

MaterialAttributeValue class-attribute instance-attribute

MaterialAttributeValue = 'MaterialAttributeValue'

IsaMaterialAttributeValueModel

Bases: Model[IsaMaterialAttributeValueSchema]


              flowchart BT
              omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueModel[IsaMaterialAttributeValueModel]
              omnipy.data.model.Model[Model]
              omnipy.data._mixins.display.ModelDisplayMixin[ModelDisplayMixin]
              omnipy.data._mixins.display.BaseDisplayMixin[BaseDisplayMixin]
              omnipy.data._data_class_creator.DataClassBase[DataClassBase]

                              omnipy.data.model.Model --> omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueModel
                                omnipy.data._mixins.display.ModelDisplayMixin --> omnipy.data.model.Model
                                omnipy.data._mixins.display.BaseDisplayMixin --> omnipy.data._mixins.display.ModelDisplayMixin
                

                omnipy.data._data_class_creator.DataClassBase --> omnipy.data.model.Model
                
                omnipy.util.pydantic.GenericModel --> omnipy.data.model.Model
                



              click omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueModel href "" "omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueModel"
              click omnipy.data.model.Model href "" "omnipy.data.model.Model"
              click omnipy.data._mixins.display.ModelDisplayMixin href "" "omnipy.data._mixins.display.ModelDisplayMixin"
              click omnipy.data._mixins.display.BaseDisplayMixin href "" "omnipy.data._mixins.display.BaseDisplayMixin"
              click omnipy.data._data_class_creator.DataClassBase href "" "omnipy.data._data_class_creator.DataClassBase"
            

Omnipy model wrapper for ISA material attribute values.

Wraps :class:IsaMaterialAttributeValueSchema for consistent Omnipy model behavior across ISA components.

Source code in src/omnipy/components/isa/models/material_attribute_value_schema.py
class IsaMaterialAttributeValueModel(Model[IsaMaterialAttributeValueSchema]):
    """Omnipy model wrapper for ISA material attribute values.

    Wraps :class:`IsaMaterialAttributeValueSchema` for consistent Omnipy model
    behavior across ISA components.
    """

    ...

IsaMaterialAttributeValueSchema

Bases: pyd.BaseModel


              flowchart BT
              omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueSchema[IsaMaterialAttributeValueSchema]

                              omnipy.util.pydantic.BaseModel --> omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueSchema
                


              click omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueSchema href "" "omnipy.components.isa.models.material_attribute_value_schema.IsaMaterialAttributeValueSchema"
            

Schema for assigned material attribute values.

ATTRIBUTE DESCRIPTION
category

Attribute definition that this value belongs to.

TYPE: material_attribute_schema.IsaMaterialAttributeModel | None

value

Scalar or ontology-backed attribute value.

TYPE: ontology_annotation_schema.IsaOntologyReferenceModel | str | float | None

unit

Unit ontology term when the value is quantitative.

TYPE: ontology_annotation_schema.IsaOntologyReferenceModel | None

comments

Optional comments attached to the value.

TYPE: list[comment_schema.IsaCommentModel] | None

CLASS DESCRIPTION
Config

Validation settings for ISA attribute-value schema parsing.

Source code in src/omnipy/components/isa/models/material_attribute_value_schema.py
class IsaMaterialAttributeValueSchema(pyd.BaseModel):
    """Schema for assigned material attribute values.

    Attributes:
        category: Attribute definition that this value belongs to.
        value: Scalar or ontology-backed attribute value.
        unit: Unit ontology term when the value is quantitative.
        comments: Optional comments attached to the value.
    """
    class Config:
        """Validation settings for ISA attribute-value schema parsing.

        Attributes:
            extra: Rejects undeclared keys from input data.
            use_enum_values: Emits enum members as their value strings.
        """

        extra = pyd.Extra.forbid
        use_enum_values = True

    field_id: Optional[str] = pyd.Field(None, alias='@id')
    field_context: Optional[str] = pyd.Field(None, alias='@context')
    field_type: Optional[FieldType] = pyd.Field(None, alias='@type')
    category: Optional[material_attribute_schema.IsaMaterialAttributeModel] = None
    value: Optional[Union[ontology_annotation_schema.IsaOntologyReferenceModel, str, float]] = None
    unit: Optional[ontology_annotation_schema.IsaOntologyReferenceModel] = None
    comments: Optional[List[comment_schema.IsaCommentModel]] = None

category class-attribute instance-attribute

comments class-attribute instance-attribute

comments: list[comment_schema.IsaCommentModel] | None = None

field_context class-attribute instance-attribute

field_context: str | None = pyd.Field(None, alias='@context')

field_id class-attribute instance-attribute

field_id: str | None = pyd.Field(None, alias='@id')

field_type class-attribute instance-attribute

field_type: FieldType | None = pyd.Field(None, alias='@type')

unit class-attribute instance-attribute

value class-attribute instance-attribute

value: ontology_annotation_schema.IsaOntologyReferenceModel | str | float | None = None

Config

Validation settings for ISA attribute-value schema parsing.

ATTRIBUTE DESCRIPTION
extra

Rejects undeclared keys from input data.

use_enum_values

Emits enum members as their value strings.

Source code in src/omnipy/components/isa/models/material_attribute_value_schema.py
class Config:
    """Validation settings for ISA attribute-value schema parsing.

    Attributes:
        extra: Rejects undeclared keys from input data.
        use_enum_values: Emits enum members as their value strings.
    """

    extra = pyd.Extra.forbid
    use_enum_values = True

extra class-attribute instance-attribute

extra = pyd.Extra.forbid

use_enum_values class-attribute instance-attribute

use_enum_values = True