Synonym
- class Synonym(*, val: str | None = None, pred: str = 'hasExactSynonym', synonymType: str = 'oboInOwl:SynonymType', xrefs: List[str] = None, predicate: Reference | None = None, synonym_type: Reference | None = None, references: List[Reference] | None = None, standardized: bool = False)[source]
Bases:
BaseModel
,StandardizeMixin
Represents a synonym inside an object meta.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Attributes Summary
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
Methods Summary
from_parsed
(name, predicate[, synonym_type, ...])Construct a synonym object from pre-standardized content.
Standardize the synoynm.
Attributes Documentation
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'predicate': FieldInfo(annotation=Union[Reference, NoneType], required=False, json_schema_extra={'example': Reference(prefix='', identifier='hasExactSynonym')}), 'predicate_raw': FieldInfo(annotation=str, required=False, default='hasExactSynonym', alias='pred', alias_priority=2), 'references': FieldInfo(annotation=Union[List[curies.api.Reference], NoneType], required=False), 'standardized': FieldInfo(annotation=bool, required=False, default=False, exclude=True), 'synonym_type': FieldInfo(annotation=Union[Reference, NoneType], required=False, json_schema_extra={'example': Reference(prefix='OMO', identifier='0003000')}), 'synonym_type_raw': FieldInfo(annotation=str, required=False, default='oboInOwl:SynonymType', alias='synonymType', alias_priority=2, json_schema_extra={'example': 'OMO:0003000'}), 'value': FieldInfo(annotation=Union[str, NoneType], required=False, alias='val', alias_priority=2), 'xrefs_raw': FieldInfo(annotation=List[str], required=False, default_factory=list, alias='xrefs', alias_priority=2, description='A list of CURIEs/IRIs for provenance for the synonym')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
Methods Documentation