# AUTO-GENERATED by dartfx.cdif.codegen — DO NOT EDIT MANUALLY.
"""Shared CDIF building-block Pydantic + RDF models generated from CDIF JSON Schemas."""
from __future__ import annotations
from typing import Annotated, Any, ClassVar
from pydantic import Field
from rdflib import URIRef
from dartfx.cdif.models._base import CdifBaseModel
from dartfx.cdif.namespaces import CDI, CDIF, CSVW, DCAT, DCTERMS, DQV, GEOSPARQL, PROV, SCHEMA, SKOS, SPDX, TIME
from dartfx.rdf.pydantic import RdfProperty
[docs]
class AdditionalProperty(CdifBaseModel):
"""PropertyValue values required to define a soft-typed property with a value."""
rdf_type: ClassVar[Any] = [SCHEMA.PropertyValue]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"schema:name",
"schema:value",
)
property_id: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.propertyID),
] = Field(
default=None,
alias="schema:propertyID",
description=(
"identifier or name for the property concept quantified by the values in this variable slot. "
"Multiple values can specify the property at different levels of granularity."
),
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
value: Annotated[
(
ObjectReference
| URIRef
| str
| int
| float
| bool
| list[ObjectReference | URIRef | str | int | float | bool]
| None
),
RdfProperty(SCHEMA.value),
] = Field(
default=None,
alias="schema:value",
)
unit_code: Annotated[DefinedTerm | str | list[DefinedTerm | str] | None, RdfProperty(SCHEMA.unitCode)] = Field(
default=None,
alias="schema:unitCode",
)
unit_text: Annotated[str | list[str] | None, RdfProperty(SCHEMA.unitText)] = Field(
default=None,
alias="schema:unitText",
)
[docs]
class AdditionalPropertySpecification(CdifBaseModel):
"""
A parameter specification (an overridable default) declared on a procedure / plan instrument, typed
schema:PropertyValueSpecification; the default sits in schema:defaultValue. Contrast with AdditionalProperty
(schema:PropertyValue), the concrete-value form carried by an analysis-event instrument. Until 2026-10-09 this
declared only '@type' and schema:name, so the description named schema:defaultValue as the point of the shape
while the schema did not declare it. The object is open, so nothing failed -- 203 entries in geochemBuildingBlocks
carried a default that no schema described, and a placement path ending in schema:defaultValue could not be told
from a misspelling. A domain profile adds its own keys here (geochemBuildingBlocks carries ada:dataType and
ada:fieldScope on every one of these entries). Those stay out of this block: it is a generic schema.org shape with
several consumers, and only the schema.org properties are its to declare.
"""
rdf_type: ClassVar[Any] = [SCHEMA.PropertyValueSpecification]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="Human-readable label for the parameter.",
)
value_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.valueName)] = Field(
default=None,
alias="schema:valueName",
description="Machine-readable name for the parameter, for serialization and for binding a form control to it.",
)
default_value: Annotated[Any | list[Any] | None, RdfProperty(SCHEMA.defaultValue)] = Field(
default=None,
alias="schema:defaultValue",
description=(
"The overridable default this specification carries -- the value that applies unless the analysis "
"overrides it. Left untyped: a default may be a string, a number or a boolean, and which one is a "
"pro..."
),
)
value: Annotated[Any | list[Any] | None, RdfProperty(SCHEMA.value)] = Field(
default=None,
alias="schema:value",
description=(
"A value fixed by the procedure, where the parameter is NOT overridable. Both keys are declared "
"because both occur: measured across the geochemBuildingBlocks corpus on 2026-10-09, of 369 "
"PropertyVal..."
),
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="Guidance text for the parameter, e.g. shown beside a form control.",
)
[docs]
class AgentInRole(CdifBaseModel):
"""
For more granularity on how a person contributed to a Dataset, use schema:Role. The schema.org documentation does
not state that the Role type is an expected data type of author, creator and contributor, but that is addressed in
this blog post (http://blog.schema.org/2014/06/introducing-role.html). see https://github.com/ESIPFed/science-on-
schema.org/blob/develop/guides/Dataset.md#roles-of-people. The Role holds the agent under the property it sits
under, as schema.org's Role pattern and validator.schema.org require -- schema:contributor inside a contributor
Role, schema:agent inside an activity's agent Role, schema:participant inside a participant Role. At least one is
required.
"""
rdf_type: ClassVar[Any] = [SCHEMA.Role]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:roleName",
)
role_name: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.roleName),
] = Field(
default=None,
alias="schema:roleName",
)
contributor: Annotated[RoleFiller | list[RoleFiller] | None, RdfProperty(SCHEMA.contributor)] = Field(
default=None,
alias="schema:contributor",
)
agent: Annotated[RoleFiller | list[RoleFiller] | None, RdfProperty(SCHEMA.agent)] = Field(
default=None,
alias="schema:agent",
)
participant: Annotated[RoleFiller | list[RoleFiller] | None, RdfProperty(SCHEMA.participant)] = Field(
default=None,
alias="schema:participant",
)
[docs]
class AttributeComponent(CdifBaseModel):
"""
Role given to a represented variable in the context of a data structure to qualify observations or provide other
types of supplementary information.
"""
rdf_type: ClassVar[Any] = [CDI.AttributeComponent]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
is_defined_by_variable: Annotated[
(
RepresentedVariable
| CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[RepresentedVariable | CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDefinedBy_Variable),
] = Field(
default=None,
alias="cdif:isDefinedBy_Variable",
description=(
"The variable this component is a role of -- a RepresentedVariable or an InstanceVariable, inline "
"or by @id reference. See the note above $defs."
),
)
semantic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.semantic),
] = Field(
default=None,
alias="cdif:semantic",
description="Qualifies the purpose or use expressed as a paired external controlled vocabulary.",
)
qualifies: Annotated[
(
IdentifierComponent
| MeasureComponent
| DimensionComponent
| VariableValueComponent
| VariableDescriptorComponent
| ObjectReference
| URIRef
| str
| list[
IdentifierComponent
| MeasureComponent
| DimensionComponent
| VariableValueComponent
| VariableDescriptorComponent
| ObjectReference
| URIRef
| str
]
| None
),
RdfProperty(CDIF.qualifies),
] = Field(
default=None,
alias="cdif:qualifies",
description=(
"The data structure components whose observations this attribute qualifies. Any component except "
"another AttributeComponent, inline or by @id reference."
),
)
[docs]
class CategoryStatistics(CdifBaseModel):
"""Statistics for a specific Category of an instance variable within a data set."""
rdf_type: ClassVar[Any] = [CDI.CategoryStatistics]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdi:for",
"cdi:statistic",
)
for_value: Annotated[
Category | ObjectReference | URIRef | str | list[Category | ObjectReference | URIRef | str] | None,
RdfProperty(CDI["for"]),
] = Field(
default=None,
alias="cdi:for",
description="The Category this CategoryStatistics is for (inline Category node or an @id-reference).",
)
type_of_statistic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.typeOfStatistic),
] = Field(
default=None,
alias="cdif:typeOfStatistic",
description="Controlled-vocabulary entry naming the kind of statistic.",
)
statistic: Annotated[dict[str, Any] | list[dict[str, Any]] | None, RdfProperty(CDI.statistic)] = Field(
default=None,
alias="cdi:statistic",
description="Per-category Statistic value objects.",
)
has_weight: Annotated[
(
CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.hasWeight),
] = Field(
default=None,
alias="cdi:hasWeight",
description=(
"The InstanceVariable whose values were used as weights (inline cdifInstanceVariable node or an "
"@id-reference)."
),
)
[docs]
class CdifCodelistConcept(CdifBaseModel):
"""
A SKOS Concept constrained for CDIF codelist use. Must have a resolvable @id, skos:inScheme, skos:notation, and
skos:prefLabel. Becasue JSON-LD is an open-world implementation, any other skos properties may be included.
"""
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@id",
"skos:inScheme",
"skos:prefLabel",
"skos:notation",
)
in_scheme: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.inScheme),
] = Field(
default=None,
alias="skos:inScheme",
description="The concept scheme this concept belongs to. Required for CDIF codelist concepts.",
)
pref_label: Annotated[str | list[str] | None, RdfProperty(SKOS.prefLabel)] = Field(
default=None,
alias="skos:prefLabel",
description=(
"Preferred lexical label for this concept. A single string, a single language-tagged value, or an "
"array of language-tagged values. Each language should appear at most once. **Uniqueness rule.** "
"Each..."
),
)
notation: Annotated[str | list[str] | None, RdfProperty(SKOS.notation)] = Field(
default=None,
alias="skos:notation",
description="Classification code for this concept within a scheme.",
)
definition: Annotated[str | list[str] | None, RdfProperty(SKOS.definition)] = Field(
default=None,
alias="skos:definition",
description="Formal definition of this concept. Optional for CDIF codelist concepts. A plain string.",
)
narrower: Annotated[
(
CdifCodelistConcept
| ObjectReference
| URIRef
| str
| list[CdifCodelistConcept | ObjectReference | URIRef | str]
| None
),
RdfProperty(SKOS.narrower),
] = Field(
default=None,
alias="skos:narrower",
description=(
"Narrower (child) concepts. If present, each inline concept must also declare skos:broader pointing "
"back to the parent concept. Both skos:narrower and skos:broader must be explicit in CDIF "
"codelists."
),
)
broader: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.broader),
] = Field(
default=None,
alias="skos:broader",
description=(
"Broader (parent) concepts. Required on any concept that appears as a skos:narrower value of "
"another concept. CDIF requires both directions to be explicit for hierarchy traversal."
),
)
[docs]
class CdifInstanceVariable(CdifBaseModel):
"""CDIF Instance Variable"""
rdf_type: ClassVar[Any] = [CDI.InstanceVariable]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
physical_data_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.physicalDataType),
] = Field(
default=None,
alias="cdif:physicalDataType",
description="identifier or name for the data type concept.",
)
role: Annotated[str | list[str] | None, RdfProperty(CDIF.role)] = Field(
default=None,
alias="cdif:role",
description=(
"Specifies the role this variable plays in a data structure. UnitIdentifier names the unit a row "
"describes; Measure holds observed/derived values; Attribute qualifies an observation; Dimension "
"addre..."
),
)
simple_unit_of_measure: Annotated[str | list[str] | None, RdfProperty(CDIF.simpleUnitOfMeasure)] = Field(
default=None,
alias="cdif:simpleUnitOfMeasure",
description=(
"The unit in which the data values are measured (kg, pound, euro), expressed as a simple string, in "
"cases where no additional information is available (in the legacy system) or needed (as in the "
"cas..."
),
)
uses: Annotated[CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None, RdfProperty(CDIF.uses)] = Field(
default=None,
alias="cdif:uses",
description=(
"Essentially the same as schema:propertyID. References the concept(s) this variable measures or "
"represents -- and nothing else. A RepresentedVariable is NOT a legal value: that link is "
"cdif:isDefine..."
),
)
is_defined_by_represented_variable: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.isDefinedBy_RepresentedVariable),
] = Field(
default=None,
alias="cdif:isDefinedBy_RepresentedVariable",
description=(
"The RepresentedVariable this InstanceVariable instantiates. A reference only (@id, nothing else): "
"the point of the link is that the represented-variable-level properties are defined once on the "
"Rep..."
),
)
function: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.function),
] = Field(
default=None,
alias="cdif:function",
description=(
"Immutable characteristic of the variable such as geographic designator, weight, temporal "
"designation, etc. (InstanceVariable.function)."
),
)
platform_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.platformType),
] = Field(
default=None,
alias="cdif:platformType",
description=(
"The application or technical system context in which the variable has been realized - typically a "
"statistical processing package or processing environment (InstanceVariable.platformType)."
),
)
source: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.source),
] = Field(
default=None,
alias="cdif:source",
description="Reference capturing provenance information for this InstanceVariable (InstanceVariable.source).",
)
is_described_by_statistics_collection: Annotated[
(
StatisticsCollection
| ObjectReference
| URIRef
| str
| list[StatisticsCollection | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDescribedBy_StatisticsCollection),
] = Field(
default=None,
alias="cdif:isDescribedBy_StatisticsCollection",
description=(
"The StatisticsCollection holding summary / category statistics for this InstanceVariable (direct "
"JSON mapping of the DDI-CDI `InstanceVariable.isDescribedBy → StatisticsCollection` association). "
"cd..."
),
)
described_unit_of_measure: Annotated[
(
DefinedTerm
| Concept
| ObjectReference
| URIRef
| str
| list[DefinedTerm | Concept | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.describedUnitOfMeasure),
] = Field(
default=None,
alias="cdif:describedUnitOfMeasure",
description=(
"The unit in which the data values are measured, expressed as a controlled-vocabulary entry "
"(RepresentedVariable.describedUnitOfMeasure). For a plain-string unit, use "
"cdif:simpleUnitOfMeasure instead."
),
)
qualifies: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.qualifies),
] = Field(
default=None,
alias="cdif:qualifies",
description="reference to an instance variable defined for this dataset",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="string label associated with the variable in the dataset serialization",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
alternate_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.alternateName)] = Field(
default=None,
alias="schema:alternateName",
)
measurement_technique: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.measurementTechnique),
] = Field(
default=None,
alias="schema:measurementTechnique",
description="Text description or URI specifying how values for the variable were obtained.",
)
property_id: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.propertyID),
] = Field(
default=None,
alias="schema:propertyID",
description="identifier or name for the property concept",
)
unit_text: Annotated[str | list[str] | None, RdfProperty(SCHEMA.unitText)] = Field(
default=None,
alias="schema:unitText",
description="unit of measurement as text",
)
unit_code: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.unitCode),
] = Field(
default=None,
alias="schema:unitCode",
description="URI or code identifying the unit of measure",
)
min_value: Annotated[int | float | list[int | float] | None, RdfProperty(SCHEMA.minValue)] = Field(
default=None,
alias="schema:minValue",
description="minimum numeric value in the dataset",
)
max_value: Annotated[int | float | list[int | float] | None, RdfProperty(SCHEMA.maxValue)] = Field(
default=None,
alias="schema:maxValue",
description="maximum numeric value in the dataset",
)
url: Annotated[Reference | URIRef | str | list[Reference | URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
)
[docs]
class CdifKey(CdifBaseModel):
"""
Profile of ddi-cdi Key/PrimaryKey: a CDIF Key is the role of an ordered set of cdi:InstanceVariables (referenced
via cdifInstanceVariable) that uniquely identify a data instance. Each variable's position in the key is recorded
with an explicit cdi:ComponentPosition wrapper carrying cdi:indexes (the variable) and cdi:value (the integer
position), matching the canonical DDI-CDI PrimaryKey structure in ddicdiDataStructure.
"""
rdf_type: ClassVar[Any] = [CDIF.Key]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:isComposedOf",
)
is_composed_of: Annotated[
ComponentPosition | list[ComponentPosition] | None,
RdfProperty(CDIF.isComposedOf),
] = Field(
default=None,
alias="cdif:isComposedOf",
description=(
"Ordered list of cdi:ComponentPosition wrappers. Each wrapper carries cdi:indexes (an @id-reference "
"to a cdi:InstanceVariable declared elsewhere in the dataset) and cdi:value (the 1-based integer "
"po..."
),
)
[docs]
class CdifPhysicalMapping(CdifBaseModel):
"""
Defines implementation-specific properties for the representation of a variable in a dataset. Aligned with CDIF
2026 schema using DDI-CDI flat per-column mapping structure.
"""
index: Annotated[int | list[int] | None, RdfProperty(CDIF.index)] = Field(
default=None,
alias="cdif:index",
description="Non-negative integer that orders the fields in the data structure (column number).",
)
format_value: Annotated[str | list[str] | None, RdfProperty(CDIF.format)] = Field(
default=None,
alias="cdif:format",
description="A format for number expressed as a string, or date format like YYYY/MM or MM-DD-YY.",
)
physical_data_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.physicalDataType),
] = Field(
default=None,
alias="cdif:physicalDataType",
description="identifier or name for the data type concept.",
)
number_pattern: Annotated[str | list[str] | None, RdfProperty(CDI.numberPattern)] = Field(
default=None,
alias="cdi:numberPattern",
description=(
"Number format pattern for the field (PhysicalMapping.numberPattern). Text-format properties "
"(column width, decimal/digit-group separators, display label) live on cdifTextMapping."
),
)
null_sequence: Annotated[str | list[str] | None, RdfProperty(CDI.nullSequence)] = Field(
default=None,
alias="cdi:nullSequence",
description="The value of this property becomes the null annotation for the described column.",
)
default_value: Annotated[str | list[str] | None, RdfProperty(CDI.defaultValue)] = Field(
default=None,
alias="cdi:defaultValue",
description="A default string indicating the value to substitute for an empty string.",
)
scale: Annotated[int | list[int] | None, RdfProperty(CDI.scale)] = Field(default=None, alias="cdi:scale")
decimal_positions: Annotated[int | list[int] | None, RdfProperty(CDI.decimalPositions)] = Field(
default=None,
alias="cdi:decimalPositions",
)
minimum_length: Annotated[int | list[int] | None, RdfProperty(CDI.minimumLength)] = Field(
default=None,
alias="cdi:minimumLength",
)
maximum_length: Annotated[int | list[int] | None, RdfProperty(CDI.maximumLength)] = Field(
default=None,
alias="cdi:maximumLength",
)
is_required: Annotated[bool | list[bool] | None, RdfProperty(CDI.isRequired)] = Field(
default=None,
alias="cdi:isRequired",
)
formats_instance_variable: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.formats_InstanceVariable),
] = Field(
default=None,
alias="cdif:formats_InstanceVariable",
description="Reference to a variable defined in schema:variableMeasured.",
)
[docs]
class CdifRepresentedVariable(CdifBaseModel):
"""Conceptual variable with a substantive value domain specified."""
rdf_type: ClassVar[Any] = [CDI.RepresentedVariable]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
described_unit_of_measure: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDI.describedUnitOfMeasure),
] = Field(
default=None,
alias="cdi:describedUnitOfMeasure",
description=(
"The unit in which the data values are measured (kg, pound, euro), expressed as a value from a "
"controlled system of entries (i.e., QDT). Supports the provision of an identifier for the entry in "
"the..."
),
)
has_intended_data_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDI.hasIntendedDataType),
] = Field(
default=None,
alias="cdi:hasIntendedDataType",
description=(
"The data type intended to be used by this variable. Supports the optional use of an external "
"controlled vocabulary."
),
)
takes_sentinel_values_from: Annotated[
(
SentinelValueDomain
| ObjectReference
| URIRef
| str
| list[SentinelValueDomain | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.takesSentinelValuesFrom),
] = Field(
default=None,
alias="cdi:takesSentinelValuesFrom",
description=(
"Sentinel (missing / not-applicable) value domain(s) for this RepresentedVariable "
"(RepresentedVariable.takesSentinelValuesFrom)."
),
)
takes_substantive_values_from: Annotated[
(
SubstantiveValueDomain
| ObjectReference
| URIRef
| str
| list[SubstantiveValueDomain | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.takesSubstantiveValuesFrom),
] = Field(
default=None,
alias="cdi:takesSubstantiveValuesFrom",
description=(
"The substantive value domain for this RepresentedVariable - the set of valid, meaningful values "
"(RepresentedVariable.takesSubstantiveValuesFrom)."
),
)
simple_unit_of_measure: Annotated[str | list[str] | None, RdfProperty(CDI.simpleUnitOfMeasure)] = Field(
default=None,
alias="cdi:simpleUnitOfMeasure",
description=(
"The unit in which the data values are measured (kg, pound, euro), expressed as a simple string, in "
"cases where no additional information is available (in the legacy system) or needed (as in the "
"cas..."
),
)
descriptive_text: Annotated[str | list[str] | None, RdfProperty(CDIF.descriptiveText)] = Field(
default=None,
alias="cdif:descriptiveText",
description="A short natural language account of the characteristics of the object.",
)
measures: Annotated[
UnitType | ObjectReference | URIRef | str | list[UnitType | ObjectReference | URIRef | str] | None,
RdfProperty(CDI.measures),
] = Field(
default=None,
alias="cdi:measures",
)
unit_of_measure_kind: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDI.unitOfMeasureKind),
] = Field(
default=None,
alias="cdi:unitOfMeasureKind",
description=(
"Kind of unit of measure, so that it may be prone to translation to equivalent UOMs. Example values "
'include "acceleration," "temperature," "salinity", etc. This description exists at the '
"conceptual..."
),
)
definition: Annotated[str | list[str] | None, RdfProperty(CDIF.definition)] = Field(
default=None,
alias="cdif:definition",
description=(
"Natural language statement conveying the meaning of a concept, differentiating it from other "
"concepts. Supports the use of multiple languages and structured text. 'externalDefinition' can't "
"be used..."
),
)
display_label: Annotated[str | list[str] | None, RdfProperty(CDIF.displayLabel)] = Field(
default=None,
alias="cdif:displayLabel",
description=(
"A human-readable display label for the object. Supports the use of multiple languages. Repeat for "
"labels with different content, for example, labels with differing length limitations."
),
)
external_definition: Annotated[Reference | list[Reference] | None, RdfProperty(CDI.externalDefinition)] = Field(
default=None,
alias="cdi:externalDefinition",
description=(
"A reference to an external definition of a concept (that is, a concept which is described outside "
"the content of the DDI-CDI metadata description). An example is a SKOS concept. The definition "
"prop..."
),
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDI.identifier)] = Field(
default=None,
alias="cdi:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
name: Annotated[str | list[str] | None, RdfProperty(CDIF.name)] = Field(
default=None,
alias="cdif:name",
description=(
"Human understandable name (linguistic signifier, word, phrase, or mnemonic). May follow ISO/IEC "
"11179-5 naming principles, and have context provided to specify usage."
),
)
uses_concept: Annotated[
Concept | ObjectReference | URIRef | str | list[Concept | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.uses_Concept),
] = Field(
default=None,
alias="cdif:uses_Concept",
)
[docs]
class Concept(CdifBaseModel):
rdf_type: ClassVar[Any] = [SKOS.Concept]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"skos:prefLabel",
"skos:definition",
"skos:inScheme",
)
pref_label: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.prefLabel),
] = Field(
default=None,
alias="skos:prefLabel",
description=(
"Preferred lexical label for this concept. A single string, a single language-tagged value, or an "
"array of language-tagged values. Each language should appear at most once."
),
)
alt_label: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.altLabel),
] = Field(
default=None,
alias="skos:altLabel",
description="Alternative lexical labels (acronyms, abbreviations, spelling variants).",
)
hidden_label: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.hiddenLabel),
] = Field(
default=None,
alias="skos:hiddenLabel",
description="Labels accessible to free-text search but not displayed.",
)
notation: Annotated[str | list[str] | None, RdfProperty(SKOS.notation)] = Field(
default=None,
alias="skos:notation",
description=(
"Classification code for this concept within a scheme (a single notation string, consistent with "
"CdifCodelistConcept)."
),
)
definition: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.definition),
] = Field(
default=None,
alias="skos:definition",
description="Formal explanation of the meaning of this concept.",
)
scope_note: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.scopeNote),
] = Field(
default=None,
alias="skos:scopeNote",
description="Note clarifying meaning and/or intended use.",
)
note: Annotated[LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None, RdfProperty(SKOS.note)] = Field(
default=None,
alias="skos:note",
description="General note about this concept.",
)
history_note: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.historyNote),
] = Field(
default=None,
alias="skos:historyNote",
description="Note about past state or use.",
)
change_note: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.changeNote),
] = Field(
default=None,
alias="skos:changeNote",
description="Note documenting a change.",
)
editorial_note: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.editorialNote),
] = Field(
default=None,
alias="skos:editorialNote",
description="Note for editors and maintainers.",
)
example: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.example),
] = Field(
default=None,
alias="skos:example",
description="Example of the use of this concept.",
)
in_scheme: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.inScheme),
] = Field(
default=None,
alias="skos:inScheme",
description="Concept scheme(s) this concept belongs to.",
)
top_concept_of: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.topConceptOf),
] = Field(
default=None,
alias="skos:topConceptOf",
description="Concept scheme(s) for which this is a top concept.",
)
broader: Annotated[
Concept | ObjectReference | URIRef | str | list[Concept | ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.broader),
] = Field(
default=None,
alias="skos:broader",
description="Broader (parent) concepts in the hierarchy. Items are inline concept objects or @id references.",
)
narrower: Annotated[
Concept | ObjectReference | URIRef | str | list[Concept | ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.narrower),
] = Field(
default=None,
alias="skos:narrower",
description="Narrower (child) concepts in the hierarchy. Items are inline concept objects or @id references.",
)
related: Annotated[
Concept | ObjectReference | URIRef | str | list[Concept | ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.related),
] = Field(
default=None,
alias="skos:related",
description=(
"Associative (non-hierarchical) relations. Items are inline concept objects or @id references. "
"Shaped like skos:broader/skos:narrower for consistency within this block. SKOS integrity condition "
"S27..."
),
)
exact_match: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.exactMatch),
] = Field(
default=None,
alias="skos:exactMatch",
description="Concepts in other schemes with equivalent meaning, by @id.",
)
close_match: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.closeMatch),
] = Field(
default=None,
alias="skos:closeMatch",
description=(
"Concepts in other schemes with sufficiently similar meaning to be interchangeable in some "
"applications, by @id."
),
)
broad_match: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.broadMatch),
] = Field(
default=None,
alias="skos:broadMatch",
description="Broader concepts in other schemes, by @id.",
)
narrow_match: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.narrowMatch),
] = Field(
default=None,
alias="skos:narrowMatch",
description="Narrower concepts in other schemes, by @id.",
)
related_match: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.relatedMatch),
] = Field(
default=None,
alias="skos:relatedMatch",
description="Associatively related concepts in other schemes, by @id.",
)
[docs]
class Contributor(CdifBaseModel):
"""
For more granularity on how a person contributed to a Dataset, use schema:Role. The schema.org documentation does
not state that the Role type is an expected data type of author, creator and contributor, but that is addressed in
this blog post (http://blog.schema.org/2014/06/introducing-role.html). see https://github.com/ESIPFed/science-on-
schema.org/blob/develop/guides/Dataset.md#roles-of-people. The Role holds the agent under the property it sits
under, as schema.org's Role pattern and validator.schema.org require -- schema:contributor inside a contributor
Role, schema:agent inside an activity's agent Role, schema:participant inside a participant Role. At least one is
required.
"""
rdf_type: ClassVar[Any] = [SCHEMA.Role]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:roleName",
)
role_name: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.roleName),
] = Field(
default=None,
alias="schema:roleName",
)
contributor: Annotated[RoleFiller | list[RoleFiller] | None, RdfProperty(SCHEMA.contributor)] = Field(
default=None,
alias="schema:contributor",
)
agent: Annotated[RoleFiller | list[RoleFiller] | None, RdfProperty(SCHEMA.agent)] = Field(
default=None,
alias="schema:agent",
)
participant: Annotated[RoleFiller | list[RoleFiller] | None, RdfProperty(SCHEMA.participant)] = Field(
default=None,
alias="schema:participant",
)
[docs]
class DataStructureComponent(CdifBaseModel):
"""
Members common to every data structure component. Composed into each component below with allOf; not a component
type in its own right, and not a branch of this schema's root anyOf.
"""
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
is_defined_by_variable: Annotated[
(
RepresentedVariable
| CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[RepresentedVariable | CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDefinedBy_Variable),
] = Field(
default=None,
alias="cdif:isDefinedBy_Variable",
description=(
"The variable this component is a role of -- a RepresentedVariable or an InstanceVariable, inline "
"or by @id reference. See the note above $defs."
),
)
semantic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.semantic),
] = Field(
default=None,
alias="cdif:semantic",
description="Qualifies the purpose or use expressed as a paired external controlled vocabulary.",
)
[docs]
class DefinedTerm(CdifBaseModel):
"""
schema.org Defined Term schema. **Union-type policy:** In CDIF profile UML models an attribute typed as
schema:DefinedTerm is represented by a single attribute of that class type. The JSON Schema implementation permits
the property value to be EITHER a plain string (interpreted as schema:name or schema:termCode in the default
vocabulary) OR a full schema:DefinedTerm object (with explicit @type, name, identifier, termCode,
inDefinedTermSet). Consumers should accept either form. Note that this differs from the cdif Concept policy: a
Concept (skos:Concept) in CDIF profiles MUST be a controlled-vocabulary entry (object form or @id-reference) —
plain strings are not permitted for Concept-typed values because vocabulary identity cannot be recovered from an
unscoped label.
"""
rdf_type: ClassVar[Any] = [SCHEMA.DefinedTerm]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
cdif_any_of_required: ClassVar[tuple[tuple[str, ...], ...]] = (
(
"schema:name",
"schema:identifier",
"schema:termCode",
),
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="text label for the term that is useful to human user",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
)
in_defined_term_set: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.inDefinedTermSet),
] = Field(
default=None,
alias="schema:inDefinedTermSet",
description=(
"The controlled vocabulary responsible for this keyword, as EITHER a plain URI string identifying "
'the vocabulary, OR an object reference ({"@id": "<uri>"}) to a vocabulary defined elsewhere in the '
"d..."
),
)
term_code: Annotated[str | list[str] | None, RdfProperty(SCHEMA.termCode)] = Field(
default=None,
alias="schema:termCode",
description="A representative code for this keyword in the controlled vocabulary. Analogous to skos:Notation",
)
about: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.about),
] = Field(
default=None,
alias="schema:about",
description=(
"What this term is about, or the part it plays in the record, as EITHER a plain string OR an object "
'reference ({"@id": "<uri>"}). schema.org lists schema:DefinedTerm in the domain of schema:about. '
"I..."
),
)
[docs]
class DimensionComponent(CdifBaseModel):
"""
Role given to a represented variable in the context of a dimensional data structure to identify the universes
associated with data points. The variable acts as a field in the compound identifier (the key structure) to
disambiguate the cells in the multi-dimensional "cube". AG: references to the variables which are the components
of a compound identifier, in which each variable is a single field - an axis - in a coordinate system addressing a
location in a matrix. These variables are often categorical, but also commonly include time. Unlike other
Components, they may be ordered using instances of cdi:ComponentPosition.
"""
rdf_type: ClassVar[Any] = [CDI.DimensionComponent]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:isDefinedBy_Variable",
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
is_defined_by_variable: Annotated[
(
RepresentedVariable
| CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[RepresentedVariable | CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDefinedBy_Variable),
] = Field(
default=None,
alias="cdif:isDefinedBy_Variable",
description=(
"The variable this component is a role of -- a RepresentedVariable or an InstanceVariable, inline "
"or by @id reference. See the note above $defs."
),
)
semantic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.semantic),
] = Field(
default=None,
alias="cdif:semantic",
description="Qualifies the purpose or use expressed as a paired external controlled vocabulary.",
)
categorical_additivity: Annotated[bool | list[bool] | None, RdfProperty(CDIF.categoricalAdditivity)] = Field(
default=None,
alias="cdif:categoricalAdditivity",
description=(
"Indicates whether categories at a specific level can be combined to provide the value for their "
"shared parent category. Value is True if categories can be added together (collapsed) to create "
"highe..."
),
)
[docs]
class ForeignKey(CdifBaseModel):
"""
A set of variables whose values reference a primary key elsewhere. cdif:, not cdi:, throughout: this is a CDIF
simplification, not the DDI-CDI shape. DDI-CDI composes a foreign key from cdi:ForeignKeyComponent nodes, each
with cdi:correspondsTo and cdi:references; this form composes the variables directly, each carrying cdif:position.
The prefix is what makes that divergence visible, and it matches the sibling cdif:Key. Until 2026-09-05 the
definition required 'cdif:isComposedOf' while declaring 'cdi:isComposedOf', so it could only be satisfied by an
undeclared and therefore unconstrained property.
"""
rdf_type: ClassVar[Any] = [CDIF.ForeignKey]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:isComposedOf",
"cdif:references_PrimaryKey",
)
is_composed_of: Annotated[
ComponentPosition | list[ComponentPosition] | None,
RdfProperty(CDIF.isComposedOf),
] = Field(
default=None,
alias="cdif:isComposedOf",
description=(
"Ordered list of cdi:ComponentPosition wrappers, one per key component, matching the sibling "
"cdif:Key. The position sits on the wrapper rather than on the variable, and that is load-bearing: "
"an earl..."
),
)
references_primary_key: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.references_PrimaryKey),
] = Field(
default=None,
alias="cdif:references_PrimaryKey",
description="references a primary key in a different dataset",
)
[docs]
class HowTo(CdifBaseModel):
"""A methodology or protocol described as a HowTo with optional steps"""
rdf_type: ClassVar[Any] = [SCHEMA.HowTo]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="Name of the methodology or protocol",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="Description of the methodology",
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
description="URL to a published methodology or protocol document",
)
is_based_on: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.isBasedOn),
] = Field(
default=None,
alias="schema:isBasedOn",
description=(
"The plan this procedure was based on, when the activity both followed a plan and records the "
"procedure as performed. A reference only, for now."
),
)
step: Annotated[HowToStep | list[HowToStep] | None, RdfProperty(SCHEMA.step)] = Field(
default=None,
alias="schema:step",
description="Ordered steps in this methodology",
)
[docs]
class HowToStep(CdifBaseModel):
"""
A single step in a HowTo methodology. A step typed schema:HowToStep alone carries only its text, position and
documentation link. Typed schema:HowToStep AND schema:Action, it also carries what the step used, acted on and
produced, who performed it, the parameter values it used, and a nested sub-procedure -- the activity's own
properties, so a step and the activity it belongs to are described the same way. Declaring schema:Action is
required once any of those properties is present. A process is therefore free to be a set of HowTo objects, or one
HowTo whose steps are actions with sub-procedures of their own; which parts are direct HowTo objects and which are
steps is the protocol author's decision.
"""
rdf_type: ClassVar[Any] = [SCHEMA.HowToStep]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="Name of this step",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="Description of what this step involves",
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
description="URL to documentation for this step",
)
position: Annotated[int | list[int] | None, RdfProperty(SCHEMA.position)] = Field(
default=None,
alias="schema:position",
description="Ordinal position of this step",
)
additional_type: Annotated[str | list[str] | None, RdfProperty(SCHEMA.additionalType)] = Field(
default=None,
alias="schema:additionalType",
description=(
"Further classification of this step (e.g. bios:LabProcess for a wet-lab step, schema:CreateAction "
"for a step that produces something)."
),
)
agent: Annotated[
(
Person
| Organization
| Contributor
| ObjectReference
| URIRef
| str
| list[Person | Organization | Contributor | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.agent),
] = Field(
default=None,
alias="schema:agent",
description="Agent responsible for carrying out this step",
)
instrument: Annotated[
(
InstrumentProduct
| SoftwareApplication
| ObjectReference
| dict[str, Any]
| URIRef
| str
| list[InstrumentProduct | SoftwareApplication | ObjectReference | dict[str, Any] | URIRef | str]
| None
),
RdfProperty(SCHEMA.instrument),
] = Field(
default=None,
alias="schema:instrument",
description=(
"Instruments, software and reagents this step used, in the same form as the activity's "
"schema:instrument -- either an {@id} reference, or a description in place whose "
"schema:additionalType carries e..."
),
)
object_value: Annotated[ThingValue | list[ThingValue] | None, RdfProperty(SCHEMA.object)] = Field(
default=None,
alias="schema:object",
description=(
"Input entity (or entities) for this step. Supports chaining, where the value references what a "
"prior step produced."
),
)
result: Annotated[ThingValue | list[ThingValue] | None, RdfProperty(SCHEMA.result)] = Field(
default=None,
alias="schema:result",
description="Output entity (or entities) this step produced, which a later step may name as its schema:object.",
)
additional_property: Annotated[
AdditionalProperty | list[AdditionalProperty] | None,
RdfProperty(SCHEMA.additionalProperty),
] = Field(
default=None,
alias="schema:additionalProperty",
description=(
"The parameter values this step used (e.g. beam conditions for an acquisition step, correction "
"settings for a processing step)."
),
)
action_process: Annotated[
HowTo | ObjectReference | URIRef | str | list[HowTo | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.actionProcess),
] = Field(
default=None,
alias="schema:actionProcess",
description=(
"Sub-procedure for this step, a nested schema:HowTo with its own ordered steps. Use it for a step "
"whose internal procedure has several phases. An {@id} reference names a HowTo described elsewhere "
"in..."
),
)
[docs]
class Identifier(CdifBaseModel):
"""
Properties for a schema.org identifier (schema:PropertyValue pattern). **Union-type policy:** In CDIF profile UML
models an attribute typed as schema:Identifier / schema:PropertyValue is represented by a single attribute of that
class type. The JSON Schema implementation permits the property value to be EITHER a plain string (interpreted as
the bare identifier value) OR a full schema:PropertyValue object (with explicit @type, propertyID, value).
Consumers should accept either form.
"""
rdf_type: ClassVar[Any] = [SCHEMA.PropertyValue]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
cdif_any_of_required: ClassVar[tuple[tuple[str, ...], ...]] = (
(
"schema:value",
"schema:url",
),
)
property_id: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.propertyID),
] = Field(
default=None,
alias="schema:propertyID",
description=(
"In this context for the schema:PropertyValue, this field is an identifier for the identifier "
"schema, e.g. DOI, ARK. Get values from https://registry.identifiers.org/registry/ for "
"interoperability...."
),
)
value: Annotated[str | list[str] | None, RdfProperty(SCHEMA.value)] = Field(
default=None,
alias="schema:value",
description="the identifier string. E.g. 10.5066/F7VX0DMQ",
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
description=(
"web-resolveable string for the identifier; host name part is location of a resolver that will "
"return some representation for the given identifier value. E.g. https://doi.org/10.5066/F7VX0DMQ"
),
)
[docs]
class IdentifierComponent(CdifBaseModel):
"""
Role given to a represented variable in the context of a long or wide data structure to identify the units
associated to data points, and in dimensional and key value data structures to provide identifying fields for the
instance values.
"""
rdf_type: ClassVar[Any] = [CDI.IdentifierComponent]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:isDefinedBy_Variable",
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
is_defined_by_variable: Annotated[
(
RepresentedVariable
| CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[RepresentedVariable | CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDefinedBy_Variable),
] = Field(
default=None,
alias="cdif:isDefinedBy_Variable",
description=(
"The variable this component is a role of -- a RepresentedVariable or an InstanceVariable, inline "
"or by @id reference. See the note above $defs."
),
)
semantic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.semantic),
] = Field(
default=None,
alias="cdif:semantic",
description="Qualifies the purpose or use expressed as a paired external controlled vocabulary.",
)
[docs]
class InstrumentComponent(CdifBaseModel):
"""
A sub-component of an instrument system (for example a sensor, or a sensing element within a sensor). Uses the
same structure as the parent instrument and may itself carry schema:hasPart, so component hierarchies nest to any
depth (instrument > sensor > sensing element ...).
"""
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
alternate_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.alternateName)] = Field(
default=None,
alias="schema:alternateName",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
)
additional_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.additionalType),
] = Field(
default=None,
alias="schema:additionalType",
description="Component type classification.",
)
additional_property: Annotated[
(
AdditionalProperty
| AdditionalPropertySpecification
| list[AdditionalProperty | AdditionalPropertySpecification]
| None
),
RdfProperty(SCHEMA.additionalProperty),
] = Field(
default=None,
alias="schema:additionalProperty",
)
manufacturer: Annotated[Organization | list[Organization] | None, RdfProperty(SCHEMA.manufacturer)] = Field(
default=None,
alias="schema:manufacturer",
)
model: Annotated[ProductModel | list[ProductModel] | None, RdfProperty(SCHEMA.model)] = Field(
default=None,
alias="schema:model",
)
has_part: Annotated[
(
InstrumentComponent
| ObjectReference
| URIRef
| str
| list[InstrumentComponent | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.hasPart),
] = Field(
default=None,
alias="schema:hasPart",
description=(
"Nested sub-components, for example the sensing elements within a sensor. Each item is an "
"InstrumentComponent or an @id reference, so component hierarchies nest to any depth (instrument > "
"sensor > s..."
),
)
[docs]
class LanguageTaggedValue(CdifBaseModel):
"""An RDF literal value with a language tag, serialized as a JSON-LD value object."""
value: str | None = Field(default=None, alias="@value", description="The text content.")
language: str | None = Field(default=None, alias="@language", description="BCP 47 language tag (e.g. en, fr, de).")
[docs]
class MeasureComponent(CdifBaseModel):
"""Role given to a represented variable in the context of a data structure to hold the observed/derived values."""
rdf_type: ClassVar[Any] = [CDI.MeasureComponent]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
is_defined_by_variable: Annotated[
(
RepresentedVariable
| CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[RepresentedVariable | CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDefinedBy_Variable),
] = Field(
default=None,
alias="cdif:isDefinedBy_Variable",
description=(
"The variable this component is a role of -- a RepresentedVariable or an InstanceVariable, inline "
"or by @id reference. See the note above $defs."
),
)
semantic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.semantic),
] = Field(
default=None,
alias="cdif:semantic",
description="Qualifies the purpose or use expressed as a paired external controlled vocabulary.",
)
name: Annotated[str | list[str] | None, RdfProperty(CDIF.name)] = Field(
default=None,
alias="cdif:name",
description=(
"Human understandable name (linguistic signifier, word, phrase, or mnemonic). May follow ISO/IEC "
"11179-5 naming principles, and have context provided to specify usage."
),
)
[docs]
class ObjectReference(CdifBaseModel):
"""A reference to a node defined elsewhere, by its @id."""
cdif_forbid_extra: ClassVar[bool] = True
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@id",)
[docs]
class Organization(CdifBaseModel):
rdf_type: ClassVar[Any] = [SCHEMA.Organization]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
cdif_any_of_required: ClassVar[tuple[tuple[str, ...], ...]] = (
(
"schema:name",
"schema:identifier",
),
)
additional_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.additionalType),
] = Field(
default=None,
alias="schema:additionalType",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="string label for organization that is meaningful for human users",
)
alternate_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.alternateName)] = Field(
default=None,
alias="schema:alternateName",
description=(
"other labels by which the organization might be known. A list when there are several; a single "
"label may be a plain string, as JSON-LD framing writes a one-item list."
),
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="additional information about the agent or their relation to the described resource",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description="identifier for organization",
)
same_as: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.sameAs),
] = Field(
default=None,
alias="schema:sameAs",
description="other identifiers for the organization",
)
[docs]
class Person(CdifBaseModel):
"""schema for cdif profile of schema.org/Person"""
rdf_type: ClassVar[Any] = [SCHEMA.Person]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
cdif_any_of_required: ClassVar[tuple[tuple[str, ...], ...]] = (
(
"schema:name",
"schema:identifier",
),
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description=(
"string label for person that is meaningful for human users, should format consistently. Recommend "
"'Family Name, Given name' format."
),
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="additional information about the agent or their relation to the described resource",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description="identifier for person, recommend ORCID",
)
alternate_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.alternateName)] = Field(
default=None,
alias="schema:alternateName",
description=(
"other labels by which the person might be known. A list when there are several; a single label may "
"be a plain string, as JSON-LD framing writes a one-item list."
),
)
affiliation: Annotated[Organization | list[Organization] | None, RdfProperty(SCHEMA.affiliation)] = Field(
default=None,
alias="schema:affiliation",
description="if affiliation is present, value must be a schema:Organization.",
)
contact_point: Annotated[ContactPoint | list[ContactPoint] | None, RdfProperty(SCHEMA.contactPoint)] = Field(
default=None,
alias="schema:contactPoint",
description=(
"An email address or a contact web page (a form, an issue tracker), or both; at least one is "
"required. Schema.org also allows telephone and postal contacts. A URL-only contact is ordinary in "
"DCAT (a..."
),
)
same_as: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.sameAs),
] = Field(
default=None,
alias="schema:sameAs",
description="other identifiers for the person",
)
[docs]
class PrimaryKey(CdifBaseModel):
"""
set of Variables that uniquely identify a data instance, expressed as an ordered list of cdi:ComponentPosition
wrappers (unified with cdifKey's cdi:ComponentPosition model).
"""
rdf_type: ClassVar[Any] = [CDIF.PrimaryKey]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:isComposedOf",
)
is_composed_of: Annotated[
ComponentPosition | list[ComponentPosition] | None,
RdfProperty(CDIF.isComposedOf),
] = Field(
default=None,
alias="cdif:isComposedOf",
description=(
"Ordered list of cdi:ComponentPosition wrappers, one per key component. Each wrapper indexes one "
"representedVariable (cdi:indexes) at its cdi:value position in the key."
),
)
[docs]
class Reference(CdifBaseModel):
"""
Schema for a labeled link, a profile of schema.org/CreativeWork: a resolvable URL with an optional name and
description. Optionally carries the DCAT relation surface (dcat:hadRole, dcterms:relation) for a link that
expresses a typed relationship rather than a plain reference. Those two properties were a separate block,
cdifDataType/cdifReference, which was an allOf of this schema plus exactly those two optional properties and
nothing else -- its dcat:Relationship co-type mandate had already been removed because it made every labeled link
unsatisfiable and broke every schema:license example that followed schema.org's own advice. Since both are
optional, folding them in here changes no document's validity while removing a block and five levels of
$defs/Reference indirection. cdifReference was retired 2026-09-23.
"""
rdf_type: ClassVar[Any] = [SCHEMA.CreativeWork]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
)
had_role: Annotated[
Role | CdifConceptOrTermOrString | list[Role | CdifConceptOrTermOrString] | None,
RdfProperty(DCAT.hadRole),
] = Field(
default=None,
alias="dcat:hadRole",
description=(
"Role of the related resource. Present only on a link that expresses a relationship; a plain "
"labeled link such as a license omits it. DCAT's declared range is dcat:Role (dcat.ttl: rdfs:range "
"dcat:Ro..."
),
)
relation: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(DCTERMS.relation),
] = Field(
default=None,
alias="dcterms:relation",
description=(
"The related resource -- the DCAT canonical pointer to what is being related to, which is distinct "
"from schema:url, the presentation URL of the link itself. An @id reference is the RECOMMENDED "
"form..."
),
)
[docs]
class RoleFiller(CdifBaseModel):
"""The Person or Organization in this role."""
[docs]
class SentinelValueDomain(CdifBaseModel):
"""
Specification of possible sentinel values used by a variable. Sentinel values are special values used to indicate
various invalid conditions for a variable, e.g. below detection, missing value.
"""
rdf_type: ClassVar[Any] = [CDIF.SentinelValueDomain]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
takes_values_from: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.takesValuesFrom),
] = Field(
default=None,
alias="cdif:takesValuesFrom",
)
display_label: Annotated[str | list[str] | None, RdfProperty(CDIF.displayLabel)] = Field(
default=None,
alias="cdif:displayLabel",
description=(
"A human-readable display label for the object. Supports the use of multiple languages. Repeat for "
"labels with different content, for example, labels with differing length limitations."
),
)
recommended_data_type: Annotated[str | list[str] | None, RdfProperty(CDIF.recommendedDataType)] = Field(
default=None,
alias="cdif:recommendedDataType",
description="The data types that are recommended for use with this domain.",
)
is_described_by: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDI.isDescribedBy),
] = Field(
default=None,
alias="cdi:isDescribedBy",
description=(
"A ValueAndConceptDescription giving the formal description (ranges, patterns, classification "
"level, expressions) of the values this domain admits."
),
)
[docs]
class SkosConceptLanguageTaggedValue(CdifBaseModel):
"""An RDF literal value with a language tag, serialized as a JSON-LD value object."""
value: str | None = Field(default=None, alias="@value", description="The text content.")
language: str | None = Field(default=None, alias="@language", description="BCP 47 language tag (e.g. en, fr, de).")
[docs]
class Statistics(CdifBaseModel):
"""
A named bundle of one or more Statistic value objects for an instance variable, optionally weighted, optionally
broken down by Category.
"""
rdf_type: ClassVar[Any] = [CDI.Statistics]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdi:statistic",
)
type_of_statistic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.typeOfStatistic),
] = Field(
default=None,
alias="cdif:typeOfStatistic",
description="Controlled-vocabulary entry naming the kind of statistic — e.g. mean, median, count, sum, stdDev.",
)
statistic: Annotated[dict[str, Any] | list[dict[str, Any]] | None, RdfProperty(CDI.statistic)] = Field(
default=None,
alias="cdi:statistic",
description=(
"Ordered list of Statistic value objects carried by this bundle. Order is significant — consumers "
"MAY rely on array position."
),
)
has_weight: Annotated[
(
CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.hasWeight),
] = Field(
default=None,
alias="cdi:hasWeight",
description=(
"The InstanceVariable whose values were used as weights when computing the Statistic entries "
"(inline cdifInstanceVariable node or an @id-reference)."
),
)
applies_to: Annotated[
(
CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.appliesTo),
] = Field(
default=None,
alias="cdif:appliesTo",
description=(
"CDIF addition (not in canonical DDI-CDI): the InstanceVariable(s) this Statistics bundle "
'summarizes — the per-bundle "what these numbers describe" link. Used **only** when this Statistics '
"bundle si..."
),
)
has_category_statistics: Annotated[
CategoryStatistics | list[CategoryStatistics] | None,
RdfProperty(CDIF.has_CategoryStatistics),
] = Field(
default=None,
alias="cdif:has_CategoryStatistics",
description=(
"CategoryStatistics entries breaking this Statistics bundle down by Category. cdif: namespaced and "
"target-suffixed because the DDI-CDI cdi:has association is polymorphic."
),
)
[docs]
class StatisticsCollection(CdifBaseModel):
"""
Groups one or more Statistics nodes for an instance variable. A typical use is a dataset-level collection holding
row-count / mean / stddev Statistics for each measured variable.
"""
rdf_type: ClassVar[Any] = [CDI.StatisticsCollection]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:has_Statistics",
)
has_weight: Annotated[
(
CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.hasWeight),
] = Field(
default=None,
alias="cdi:hasWeight",
description=(
"The InstanceVariable whose values were used as weights (inline cdifInstanceVariable node or an "
"@id-reference)."
),
)
has_statistics: Annotated[
Statistics | ObjectReference | URIRef | str | list[Statistics | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.has_Statistics),
] = Field(
default=None,
alias="cdif:has_Statistics",
description=(
"Statistics nodes carried by this collection (inline or @id-ref). cdif: namespaced and target- "
"suffixed because the DDI-CDI cdi:has association is polymorphic."
),
)
indexed_by: Annotated[
(
CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.indexedBy),
] = Field(
default=None,
alias="cdif:indexedBy",
description=(
"CDIF addition (not in canonical DDI-CDI): the InstanceVariable(s) the contained Statistics index — "
"the collection-level coordinate space. Marks the collection as per-variable-scoped: a "
"StatisticsCo..."
),
)
[docs]
class SubstantiveValueDomain(CdifBaseModel):
"""
Value domain for a substantive conceptual domain. Typically a description and/or enumeration of allowed values of
interest.
"""
rdf_type: ClassVar[Any] = [CDIF.SubstantiveValueDomain]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
takes_values_from: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.takesValuesFrom),
] = Field(
default=None,
alias="cdif:takesValuesFrom",
)
display_label: Annotated[str | list[str] | None, RdfProperty(CDIF.displayLabel)] = Field(
default=None,
alias="cdif:displayLabel",
description="A human-readable display label for the object.",
)
recommended_data_type: Annotated[str | list[str] | None, RdfProperty(CDIF.recommendedDataType)] = Field(
default=None,
alias="cdif:recommendedDataType",
description="The data types that are recommended for use with this domain.",
)
is_described_by: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDI.isDescribedBy),
] = Field(
default=None,
alias="cdi:isDescribedBy",
description=(
"A ValueAndConceptDescription giving the formal description (ranges, patterns, classification "
"level, expressions) of the values this domain admits."
),
)
[docs]
class ValueAndConceptDescription(CdifBaseModel):
"""Formal description of a set of values."""
rdf_type: ClassVar[Any] = [CDI.ValueAndConceptDescription]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
classification_level: Annotated[str | list[str] | None, RdfProperty(CDI.classificationLevel)] = Field(
default=None,
alias="cdi:classificationLevel",
description=(
"Indicates the type of relationship, nominal, ordinal, interval, ratio, or continuous. Use where "
"appropriate for the representation type."
),
)
description: Annotated[str | list[str] | None, RdfProperty(CDI.description)] = Field(
default=None,
alias="cdi:description",
description="A formal description of the set of values in human-readable language.",
)
format_pattern: Annotated[str | list[str] | None, RdfProperty(CDI.formatPattern)] = Field(
default=None,
alias="cdi:formatPattern",
description=(
"A pattern for a number as described in Unicode Locale Data Markup Language (LDML) "
"(http://www.unicode.org/reports/tr35/tr35.html) Part 3: Numbers "
"(http://www.unicode.org/reports/tr35/tr35-numbers.h..."
),
)
logical_expression: Annotated[str | list[str] | None, RdfProperty(CDI.logicalExpression)] = Field(
default=None,
alias="cdi:logicalExpression",
description=(
'A logical expression where the values of "x" making the expression true are the members of the set '
'of valid values. For example, "(all reals x such that x > 0)" describes the real numbers greater '
"t..."
),
)
maximum_value_exclusive: Annotated[str | list[str] | None, RdfProperty(CDI.maximumValueExclusive)] = Field(
default=None,
alias="cdi:maximumValueExclusive",
description=(
"A string denoting the maximum possible value (excluding this value). From the W3C Recommendation "
'"Metadata Vocabulary for Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 5.11.2: '
'"maxExclusi...'
),
)
maximum_value_inclusive: Annotated[str | list[str] | None, RdfProperty(CDI.maximumValueInclusive)] = Field(
default=None,
alias="cdi:maximumValueInclusive",
description=(
'A string denoting the maximum possible value. From the W3C Recommendation "Metadata Vocabulary for '
'Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 5.11.2: "maximum: An atomic property '
"that..."
),
)
minimum_value_exclusive: Annotated[str | list[str] | None, RdfProperty(CDI.minimumValueExclusive)] = Field(
default=None,
alias="cdi:minimumValueExclusive",
description=(
"A string denoting the minimum possible value (excluding this value). From the W3C Recommendation "
'"Metadata Vocabulary for Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 5.11.2: '
'"minExclusi...'
),
)
minimum_value_inclusive: Annotated[str | list[str] | None, RdfProperty(CDI.minimumValueInclusive)] = Field(
default=None,
alias="cdi:minimumValueInclusive",
description=(
'A string denoting the minimum possible value. From the W3C Recommendation "Metadata Vocabulary for '
'Tabular Data" (https://www.w3.org/TR/tabular-metadata/) 5.11.2: "minimum: An atomic property '
"that..."
),
)
regular_expression: Annotated[str | list[str] | None, RdfProperty(CDI.regularExpression)] = Field(
default=None,
alias="cdi:regularExpression",
description="A regular expression where strings matching the expression belong to the set of valid values.",
)
[docs]
class VariableDescriptorComponent(CdifBaseModel):
"""
Role given to a represented variable in the context of a data structure to provide codes for variable
identification.
"""
rdf_type: ClassVar[Any] = [CDI.VariableDescriptorComponent]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:isDefinedBy_DescriptorVariable",
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
is_defined_by_variable: Annotated[
(
RepresentedVariable
| CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[RepresentedVariable | CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDefinedBy_Variable),
] = Field(
default=None,
alias="cdif:isDefinedBy_Variable",
description=(
"The variable this component is a role of -- a RepresentedVariable or an InstanceVariable, inline "
"or by @id reference. See the note above $defs."
),
)
semantic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.semantic),
] = Field(
default=None,
alias="cdif:semantic",
description="Qualifies the purpose or use expressed as a paired external controlled vocabulary.",
)
is_defined_by_descriptor_variable: Annotated[
DescriptorVariable | list[DescriptorVariable] | None,
RdfProperty(CDIF.isDefinedBy_DescriptorVariable),
] = Field(
default=None,
alias="cdif:isDefinedBy_DescriptorVariable",
description=(
"Variable that provides codes for variable identification in the context of a data structure. "
"Descriptor Variables hold values which reference the logical variables in the data set, indicating "
"which..."
),
)
refers_to: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDI.refersTo),
] = Field(
default=None,
alias="cdi:refersTo",
)
[docs]
class VariableValueComponent(CdifBaseModel):
"""
Role given to a represented variable in the context of a data structure to record values of multiple variables.
"""
rdf_type: ClassVar[Any] = [CDI.VariableValueComponent]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
is_defined_by_variable: Annotated[
(
RepresentedVariable
| CdifInstanceVariable
| ObjectReference
| URIRef
| str
| list[RepresentedVariable | CdifInstanceVariable | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDIF.isDefinedBy_Variable),
] = Field(
default=None,
alias="cdif:isDefinedBy_Variable",
description=(
"The variable this component is a role of -- a RepresentedVariable or an InstanceVariable, inline "
"or by @id reference. See the note above $defs."
),
)
semantic: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.semantic),
] = Field(
default=None,
alias="cdif:semantic",
description="Qualifies the purpose or use expressed as a paired external controlled vocabulary.",
)
[docs]
class CdifConcept(CdifBaseModel):
rdf_type: ClassVar[Any] = [SKOS.Concept]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"skos:prefLabel",
)
pref_label: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.prefLabel),
] = Field(
default=None,
alias="skos:prefLabel",
description=(
"Preferred lexical label for this concept. A single string, a single language-tagged value, or an "
"array of language-tagged values. Each language should appear at most once."
),
)
notation: Annotated[str | list[str] | None, RdfProperty(SKOS.notation)] = Field(
default=None,
alias="skos:notation",
description=(
"Classification code for this concept within a scheme (a single notation string, consistent with "
"CdifCodelistConcept)."
),
)
definition: Annotated[
LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None,
RdfProperty(SKOS.definition),
] = Field(
default=None,
alias="skos:definition",
description="Formal explanation of the meaning of this concept.",
)
note: Annotated[LanguageTaggedValue | str | list[LanguageTaggedValue | str] | None, RdfProperty(SKOS.note)] = Field(
default=None,
alias="skos:note",
description="General note about this concept.",
)
in_scheme: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.inScheme),
] = Field(
default=None,
alias="skos:inScheme",
description="Concept scheme(s) this concept belongs to.",
)
broader: Annotated[
CdifConcept | ObjectReference | URIRef | str | list[CdifConcept | ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.broader),
] = Field(
default=None,
alias="skos:broader",
description="Broader (parent) concepts in the hierarchy. Items are inline concept objects or @id references.",
)
narrower: Annotated[
CdifConcept | ObjectReference | URIRef | str | list[CdifConcept | ObjectReference | URIRef | str] | None,
RdfProperty(SKOS.narrower),
] = Field(
default=None,
alias="skos:narrower",
description="Narrower (child) concepts in the hierarchy. Items are inline concept objects or @id references.",
)
[docs]
class Action(CdifBaseModel):
rdf_type: ClassVar[Any] = [SCHEMA.Action]
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="text label for the action",
)
target: Annotated[EntryPoint | list[EntryPoint] | None, RdfProperty(SCHEMA.target)] = Field(
default=None,
alias="schema:target",
description=(
"specifies the request target location and request syntax. Documentation of the URL end point and "
"syntax to invoke the service. This schema doesn't handle post requests."
),
)
result: Annotated[DataDownload | list[DataDownload] | None, RdfProperty(SCHEMA.result)] = Field(
default=None,
alias="schema:result",
description=(
"specifies the serialization scheme (encoding format, information model) for the expected "
"representation of the data - documentation of the serialization format for the API response. See "
"the actionR..."
),
)
object_value: Annotated[Thing | list[Thing] | None, RdfProperty(SCHEMA.object)] = Field(
default=None,
alias="schema:object",
description=(
"The entity upon which the action is carried out, whose state is kept intact or changed. This is an "
"open ended class for general description of Actions. When schema:Action (or a subclass) is used "
"to..."
),
)
query_input: Annotated[
PropertyValueSpecification | list[PropertyValueSpecification] | None,
RdfProperty(SCHEMA["query-input"]),
] = Field(
default=None,
alias="schema:query-input",
description="set of explanations of the parameters in the URL template for the target.",
)
[docs]
class CatalogRecord(CdifBaseModel):
rdf_type: ClassVar[Any] = [SCHEMA.Dataset]
conforms_to: Annotated[Any | list[Any] | None, RdfProperty(DCTERMS.conformsTo)] = Field(
default=None,
alias="dcterms:conformsTo",
)
date_modified: Annotated[str | list[str] | None, RdfProperty(SCHEMA.dateModified)] = Field(
default=None,
alias="schema:dateModified",
description="Date this metadata record was last modified (ISO 8601).",
)
about: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.about),
] = Field(
default=None,
alias="schema:about",
description="Reference back to the instrument @id.",
)
additional_type: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.additionalType),
] = Field(
default=None,
alias="schema:additionalType",
)
maintainer: Annotated[
Person | Organization | list[Person | Organization] | None,
RdfProperty(SCHEMA.maintainer),
] = Field(
default=None,
alias="schema:maintainer",
description=(
"Identification of the agent that maintains the metadata, with contact information. Should include "
"person name and affiliation, or position name and affiliation, or just organization name. e-mail "
"ad..."
),
)
sd_date_published: Annotated[str | list[str] | None, RdfProperty(SCHEMA.sdDatePublished)] = Field(
default=None,
alias="schema:sdDatePublished",
description="date of most recent update to the metadata content",
)
included_in_data_catalog: Annotated[
DataCatalog | list[DataCatalog] | None,
RdfProperty(SCHEMA.includedInDataCatalog),
] = Field(
default=None,
alias="schema:includedInDataCatalog",
description="identify the source for the origin the metadata record.",
)
[docs]
class Category(CdifBaseModel):
"""
Minimal Category shape used as a CategoryStatistics target. CDIF simplifies the DDI-CDI InternationalString /
LabelForDisplay / ObjectName valued properties to plain strings carried under the cdif: namespace. A full CDIF
treatment of categories lives in cdifEnumerationDomain / SKOS Concept.
"""
rdf_type: ClassVar[Any] = [CDI.Category]
name: Annotated[str | list[str] | None, RdfProperty(CDIF.name)] = Field(
default=None,
alias="cdif:name",
description=(
"Human-understandable name(s). CDIF-simplified from DDI-CDI Category.name (ObjectName) to plain strings."
),
)
descriptive_text: Annotated[str | list[str] | None, RdfProperty(CDIF.descriptiveText)] = Field(
default=None,
alias="cdif:descriptiveText",
description=(
"Short natural-language account of the category. CDIF-simplified from DDI-CDI "
"Category.descriptiveText (InternationalString)."
),
)
definition: Annotated[str | list[str] | None, RdfProperty(CDIF.definition)] = Field(
default=None,
alias="cdif:definition",
description=(
"Natural-language definition of the category. CDIF-simplified from DDI-CDI Category.definition "
"(InternationalString)."
),
)
display_label: Annotated[str | list[str] | None, RdfProperty(CDIF.displayLabel)] = Field(
default=None,
alias="cdif:displayLabel",
description=(
"Human-readable display label(s). CDIF-simplified from DDI-CDI Category.displayLabel (LabelForDisplay)."
),
)
[docs]
class CdifProvActivity(CdifBaseModel):
"""
Extended provenance activity building block for CDIF -- the schema.org implementation. Extends the minimal
prov:Activity (generatedBy) with schema.org Action properties for agents, instruments, inputs and outputs,
methodology and plan, temporal bounds, action chaining, and more. What the activity used is recorded with
schema:instrument (instruments, software, reagents) and schema:object (inputs), not with prov:used.
"""
rdf_type: ClassVar[Any] = [PROV.Activity, SCHEMA.Action]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
used: Annotated[
Entity | ObjectReference | URIRef | str | list[Entity | ObjectReference | URIRef | str] | None,
RdfProperty(PROV.used),
] = Field(
default=None,
alias="prov:used",
description=(
"Entities the activity used. Per PROV-O each value denotes a prov:Entity. An item may be (1) a "
"string URI or free-text reference, (2) an {@id} reference, (3) an inline entity object carrying an "
"@typ..."
),
)
instrument: Annotated[
(
InstrumentProduct
| SoftwareApplication
| ObjectReference
| dict[str, Any]
| URIRef
| str
| list[InstrumentProduct | SoftwareApplication | ObjectReference | dict[str, Any] | URIRef | str]
| None
),
RdfProperty(SCHEMA.instrument),
] = Field(
default=None,
alias="schema:instrument",
description=(
"Instruments, software and reagents the activity used. Each item is either an {@id} reference to a "
"thing described elsewhere, or a description in place whose schema:additionalType carries exactly "
"on..."
),
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="Human-readable name for the activity",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="Text description of what this activity did",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description="Formal identifier for this activity",
)
agent: Annotated[
(
Person
| Organization
| AgentInRole
| ObjectReference
| URIRef
| str
| list[Person | Organization | AgentInRole | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.agent),
] = Field(
default=None,
alias="schema:agent",
description="Primary responsible agent for this activity (maps to PROV wasAssociatedWith)",
)
participant: Annotated[
(
Person
| Organization
| AgentInRole
| ObjectReference
| URIRef
| str
| list[Person | Organization | AgentInRole | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.participant),
] = Field(
default=None,
alias="schema:participant",
description="Other participants in this activity",
)
object_value: Annotated[ThingValue | list[ThingValue] | None, RdfProperty(SCHEMA.object)] = Field(
default=None,
alias="schema:object",
description=(
"Input entity (or entities) for this activity. Per schema.org, the range of schema:object is "
"schema:Thing. Accepts four shapes (1) a string URI, (2) an @id reference object, (3) an inline "
"schema:Thi..."
),
)
result: Annotated[ThingValue | list[ThingValue] | None, RdfProperty(SCHEMA.result)] = Field(
default=None,
alias="schema:result",
description=(
"Output entity (or entities) produced by this activity. Per schema.org, the range is schema:Thing. "
"Accepts: (1) a string URI reference (action chaining shorthand to be referenced as schema:object "
"of..."
),
)
action_status: Annotated[str | list[str] | None, RdfProperty(SCHEMA.actionStatus)] = Field(
default=None,
alias="schema:actionStatus",
description=(
"Status of this activity. Written as the CDIF CURIE (schema:CompletedActionStatus) or the full "
"schema.org IRI (http:// or https://schema.org/CompletedActionStatus); the schema.org validator "
"rejects..."
),
)
start_time: Annotated[str | list[str] | None, RdfProperty(SCHEMA.startTime)] = Field(
default=None,
alias="schema:startTime",
description="ISO8601 date-time when the activity started (maps to PROV startedAtTime)",
)
end_time: Annotated[str | list[str] | None, RdfProperty(SCHEMA.endTime)] = Field(
default=None,
alias="schema:endTime",
description="ISO8601 date-time when the activity ended (maps to PROV endedAtTime)",
)
location: Annotated[
Place | ObjectReference | URIRef | str | list[Place | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.location),
] = Field(
default=None,
alias="schema:location",
description="Where the activity occurred",
)
action_process: Annotated[
HowTo | ObjectReference | URIRef | str | list[HowTo | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.actionProcess),
] = Field(
default=None,
alias="schema:actionProcess",
description=(
"The plan the activity followed, or the procedure as it was performed. The {@id} reference form is "
"the link to the plan (a protocol, method or workflow definition described elsewhere; CDIF defines "
"n..."
),
)
error: Annotated[str | list[str] | None, RdfProperty(SCHEMA.error)] = Field(
default=None,
alias="schema:error",
description="Error description for failed activities",
)
additional_property: Annotated[
AdditionalProperty | list[AdditionalProperty] | None,
RdfProperty(SCHEMA.additionalProperty),
] = Field(
default=None,
alias="schema:additionalProperty",
description=(
"Domain-specific extension properties, typically the parameter values this run used. schema.org "
"does not list Action among this property's domains, so validator.schema.org warns on it; that "
"warning..."
),
)
[docs]
class Checksum(CdifBaseModel):
"""
A string value calculated from the content of the resource representation, used to test if content has been
modified. The checksum is a property of a particular distribution/DataDownload.
"""
rdf_type: ClassVar[Any] = [SPDX.Checksum]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
algorithm: Annotated[str | list[str] | None, RdfProperty(SPDX.algorithm)] = Field(
default=None,
alias="spdx:algorithm",
)
checksum_value: Annotated[str | list[str] | None, RdfProperty(SPDX.checksumValue)] = Field(
default=None,
alias="spdx:checksumValue",
)
[docs]
class ComponentPosition(CdifBaseModel):
"""ComponentPosition wrapper indexing one variable's position in the key."""
rdf_type: ClassVar[Any] = [CDI.ComponentPosition]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdi:indexes",
"cdi:value",
)
indexes: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(CDI.indexes),
] = Field(
default=None,
alias="cdi:indexes",
description=(
"The variable this position indexes -- an @id-reference to one declared elsewhere in the document. "
"At dataset level (cdif:hasPrimaryKey) that is a cdi:InstanceVariable in schema:variableMeasured; "
"at..."
),
)
value: Annotated[int | list[int] | None, RdfProperty(CDI.value)] = Field(
default=None,
alias="cdi:value",
description=(
"1-based position of this variable in the ordered key. Pinned to a minimum of 1 because a key that "
"might be 0- or 1-based has ambiguous ordering, which defeats the purpose of recording a position "
"at..."
),
)
[docs]
class ConceptScheme(CdifBaseModel):
"""
A controlled-vocabulary codelist implemented as a skos:ConceptScheme constrained for CDIF use. The scheme must
have a resolvable @id and identify its top concepts via skos:hasTopConcept; each concept (CdifCodelistConcept)
must have a resolvable @id, skos:inScheme, skos:prefLabel, and skos:notation. Hierarchical concepts must declare
both skos:narrower (for JSON tree traversal) and skos:broader (for upward navigation) where hierarchy exists. CDIF
metadata properties (schema:identifier, schema:dateModified, schema:license or schema:conditionsOfAccess) take
precedence over the equivalent dcterms properties from the base skos:ConceptScheme.
"""
rdf_type: ClassVar[Any] = [SKOS.ConceptScheme]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@id",
"skos:prefLabel",
"schema:identifier",
"schema:dateModified",
"skos:hasTopConcept",
)
identifier: Annotated[
PropertyValue | str | list[PropertyValue | str] | None,
RdfProperty(SCHEMA.identifier),
] = Field(
default=None,
alias="schema:identifier",
description="Primary identifier for the codelist. May be a string URI or a structured PropertyValue.",
)
date_modified: Annotated[str | list[str] | None, RdfProperty(SCHEMA.dateModified)] = Field(
default=None,
alias="schema:dateModified",
description="ISO 8601 date when the codelist was last modified.",
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
description="Web location of a page describing the codelist.",
)
license: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.license),
] = Field(
default=None,
alias="schema:license",
description="License for the codelist.",
)
conditions_of_access: Annotated[str | list[str] | None, RdfProperty(SCHEMA.conditionsOfAccess)] = Field(
default=None,
alias="schema:conditionsOfAccess",
description="Text statement of access conditions for the codelist.",
)
pref_label: Annotated[str | list[str] | None, RdfProperty(SKOS.prefLabel)] = Field(
default=None,
alias="skos:prefLabel",
description=(
"Preferred lexical label for the concept scheme. Required. A single string, a single language- "
"tagged value, or an array of language-tagged values. **Uniqueness rule.** Each language should "
"appear at..."
),
)
definition: Annotated[str | list[str] | None, RdfProperty(SKOS.definition)] = Field(
default=None,
alias="skos:definition",
description="Formal explanation of the meaning or purpose of this concept scheme.",
)
note: Annotated[str | list[str] | None, RdfProperty(SKOS.note)] = Field(
default=None,
alias="skos:note",
description="General note about the concept scheme.",
)
has_top_concept: Annotated[
CdifCodelistConcept | list[CdifCodelistConcept] | None,
RdfProperty(SKOS.hasTopConcept),
] = Field(
default=None,
alias="skos:hasTopConcept",
description="Top-level concepts that have no skos:broader in this scheme. Required for hierarchical codelists.",
)
subject_of: Annotated[CatalogRecord | list[CatalogRecord] | None, RdfProperty(SCHEMA.subjectOf)] = Field(
default=None,
alias="schema:subjectOf",
description=(
"Catalog record describing this codelist as CDIF-conformant metadata. Must declare conformance to "
"the cdifCodelist profile via dcterms:conformsTo and be typed as schema:Dataset with "
"schema:additiona..."
),
)
[docs]
class CreativeWorkRef(CdifBaseModel):
"""schema for a labeled link, a profile of schema.org/CreativeWork"""
rdf_type: ClassVar[Any] = [SCHEMA.CreativeWork]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:url",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
)
[docs]
class DataCatalog(CdifBaseModel):
"""identify the source for the origin the metadata record."""
rdf_type: ClassVar[Any] = [SCHEMA.DataCatalog]
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
description="locator to access a landing page for the collection or catalog",
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description=(
"identifier for the collection or catalog; use identifier_type to provide information on identifier "
"scheme and context for identifier"
),
)
[docs]
class DataDownload(CdifBaseModel):
"""schema to document file-based access to a resoruce via URL, based on schema.org/DataDownload"""
rdf_type: ClassVar[Any] = [SCHEMA.DataDownload]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"schema:contentUrl",
"@type",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="Description of this distribution, e.g. what format, access constraints, etc.",
)
content_url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.contentUrl)] = Field(
default=None,
alias="schema:contentUrl",
)
encoding_format: Annotated[str | list[str] | None, RdfProperty(SCHEMA.encodingFormat)] = Field(
default=None,
alias="schema:encodingFormat",
description=(
"MIME type with extension; should indicate the serialization scheme in sufficient detail that "
"machine can know how to parse."
),
)
content_size: Annotated[str | list[str] | None, RdfProperty(SCHEMA.contentSize)] = Field(
default=None,
alias="schema:contentSize",
description="File size of this distribution, e.g. '2.5 MB' or a byte count. Per schema.org/contentSize.",
)
checksum: Annotated[Checksum | list[Checksum] | None, RdfProperty(SPDX.checksum)] = Field(
default=None,
alias="spdx:checksum",
description=(
"A string value calculated from the content of the resource representation, used to test if content "
"has been modified. The checksum is a property of a particular distribution/DataDownload."
),
)
conforms_to: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(DCTERMS.conformsTo),
] = Field(
default=None,
alias="dcterms:conformsTo",
description=(
"An identifier for a standard or specification that the distribution conforms to. Recommended to "
"enable machine-actionable data access."
),
)
provider: Annotated[
(
Person
| Organization
| ObjectReference
| URIRef
| str
| list[Person | Organization | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.provider),
] = Field(
default=None,
alias="schema:provider",
description=(
"Party who maintains this particular distribution option for the dataset. Use this property if "
"there are multiple distributions from different providers"
),
)
[docs]
class DataStructure(CdifBaseModel):
"""Data organization based on reusable data structure components."""
rdf_type: ClassVar[Any] = [CDI.DataStructure]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
has_foreign_key: Annotated[
ForeignKey | ObjectReference | URIRef | str | list[ForeignKey | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.has_ForeignKey),
] = Field(
default=None,
alias="cdif:has_ForeignKey",
description="Variables whose values identify records in a different dataset.",
)
has_data_structure_component: Annotated[
(
IdentifierComponent
| MeasureComponent
| AttributeComponent
| DimensionComponent
| VariableValueComponent
| VariableDescriptorComponent
| ObjectReference
| URIRef
| str
| list[
IdentifierComponent
| MeasureComponent
| AttributeComponent
| DimensionComponent
| VariableValueComponent
| VariableDescriptorComponent
| ObjectReference
| URIRef
| str
]
| None
),
RdfProperty(CDI.has_DataStructureComponent),
] = Field(
default=None,
alias="cdi:has_DataStructureComponent",
)
has_primary_key: Annotated[CdifKey | list[CdifKey] | None, RdfProperty(CDIF.has_PrimaryKey)] = Field(
default=None,
alias="cdif:has_PrimaryKey",
description="Variables in the structure that uniquely identify a record.",
)
has_foreign_key_alt: Annotated[
ForeignKey | ObjectReference | URIRef | str | list[ForeignKey | ObjectReference | URIRef | str] | None,
RdfProperty(CDI.has_ForeignKey),
] = Field(
default=None,
alias="cdi:has_ForeignKey",
)
has_primary_key_alt: Annotated[PrimaryKey | list[PrimaryKey] | None, RdfProperty(CDI.has_PrimaryKey)] = Field(
default=None,
alias="cdi:has_PrimaryKey",
)
[docs]
class DescriptorValueDomain(CdifBaseModel):
"""
A cdi:DescriptorValueDomain enumerating the codes that can appear in the descriptor column, each paired (via
cdif:isDefinedBy) with the RepresentedVariable that the code names.
"""
rdf_type: ClassVar[Any] = [CDI.DescriptorValueDomain]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:takesValuesFrom",
)
takes_values_from: Annotated[
dict[str, Any] | list[dict[str, Any]] | None,
RdfProperty(CDIF.takesValuesFrom),
] = Field(
default=None,
alias="cdif:takesValuesFrom",
description=(
"Ordered list of descriptor entries. Each entry has a cdif:value (the code as it appears in the "
"descriptor column) and a cdif:isDefinedBy pointer to the RepresentedVariable that the code names."
),
)
[docs]
class DescriptorVariable(CdifBaseModel):
"""
Variable that provides codes for variable identification in the context of a data structure. Descriptor Variables
hold values which reference the logical variables in the data set, indicating which one the associated value in
the corresponding Reference Variable is a measure/value for. Descriptor Variables are presentational variables
found only in Long Data Sets. EA models this as its own association (connector 345) rather than a formal
redefinition of the inherited isDefinedBy (connector 429), but CDIF treats it as a redefinition: the variable a
VariableDescriptorComponent is a role of IS its DescriptorVariable, so the inherited property is disallowed below
rather than left available.
"""
rdf_type: ClassVar[Any] = [CDI.DescriptorVariable]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:hasValuesFrom",
"cdif:name",
)
has_values_from: Annotated[
DescriptorValueDomain | list[DescriptorValueDomain] | None,
RdfProperty(CDIF.hasValuesFrom),
] = Field(
default=None,
alias="cdif:hasValuesFrom",
description=(
"A cdi:DescriptorValueDomain enumerating the codes that can appear in the descriptor column, each "
"paired (via cdif:isDefinedBy) with the RepresentedVariable that the code names."
),
)
name: Annotated[str | list[str] | None, RdfProperty(CDIF.name)] = Field(
default=None,
alias="cdif:name",
description=(
"Human understandable name (linguistic signifier, word, phrase, or mnemonic). May follow ISO/IEC "
"11179-5 naming principles, and have context provided to specify usage."
),
)
[docs]
class DimensionalDataStructure(CdifBaseModel):
"""
Structure of a dimensional data set (organized collection of multidimensional data). It is described by dimension,
measure and attribute components.
"""
rdf_type: ClassVar[Any] = [CDI.DimensionalDataStructure]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdi:has_DataStructureComponent",
)
has_data_structure_component: Annotated[
(
IdentifierComponent
| MeasureComponent
| AttributeComponent
| DimensionComponent
| ObjectReference
| URIRef
| str
| list[
IdentifierComponent
| MeasureComponent
| AttributeComponent
| DimensionComponent
| ObjectReference
| URIRef
| str
]
| None
),
RdfProperty(CDI.has_DataStructureComponent),
] = Field(
default=None,
alias="cdi:has_DataStructureComponent",
)
has_primary_key: Annotated[CdifKey | list[CdifKey] | None, RdfProperty(CDIF.has_PrimaryKey)] = Field(
default=None,
alias="cdif:has_PrimaryKey",
description="Variables in the structure that uniquely identify a record.",
)
has_foreign_key: Annotated[
ForeignKey | ObjectReference | URIRef | str | list[ForeignKey | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.has_ForeignKey),
] = Field(
default=None,
alias="cdif:has_ForeignKey",
description="Variables whose values identify records in a different dataset.",
)
has_primary_key_alt: Annotated[PrimaryKey | list[PrimaryKey] | None, RdfProperty(CDI.has_PrimaryKey)] = Field(
default=None,
alias="cdi:has_PrimaryKey",
)
has_foreign_key_alt: Annotated[
ForeignKey | ObjectReference | URIRef | str | list[ForeignKey | ObjectReference | URIRef | str] | None,
RdfProperty(CDI.has_ForeignKey),
] = Field(
default=None,
alias="cdi:has_ForeignKey",
)
[docs]
class Entity(CdifBaseModel):
"""an inline prov:Entity used by the activity (see prov:used description)"""
rdf_type: ClassVar[Any] = [PROV.Entity]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
[docs]
class EntryPoint(CdifBaseModel):
"""
The entry point being linked to. Deliberately not sealed: real targets also carry schema:httpMethod,
schema:urlTemplate, schema:contentType and domain-specific properties, and JSON-LD is open-world.
"""
rdf_type: ClassVar[Any] = [SCHEMA.EntryPoint]
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
)
encoding_format: Annotated[str | list[str] | None, RdfProperty(SCHEMA.encodingFormat)] = Field(
default=None,
alias="schema:encodingFormat",
description="registered MIME types are expected",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
url_template: Annotated[str | list[str] | None, RdfProperty(SCHEMA.urlTemplate)] = Field(
default=None,
alias="schema:urlTemplate",
description=(
"a templated URL; parameters are enclosed in curly braces ({..}); parameters are not required. If "
"included, parameters MUST be documented in the query-input element. Template should be consitent "
"wit..."
),
)
http_method: Annotated[str | list[str] | None, RdfProperty(SCHEMA.httpMethod)] = Field(
default=None,
alias="schema:httpMethod",
description="only applicable if protocol is http or a protocol that tunnels on http",
)
content_type: Annotated[str | list[str] | None, RdfProperty(SCHEMA.contentType)] = Field(
default=None,
alias="schema:contentType",
description=(
"The supported content type(s) for an EntryPoint response. a MIME type "
"(https://www.iana.org/assignments/media-types/media-types.xhtml) that specifies the content type "
"for messages in resonses from..."
),
)
[docs]
class EnumerationDomain(CdifBaseModel):
"""
A base class acting as an extension point to allow a codification vocabulary to be documented as enumerated value
domain.
"""
rdf_type: ClassVar[Any] = [CDIF.EnumerationDomain]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdif:references",
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for this enumerated (categorical) domain.",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="Human understandable name (liguistic signifier, word, phrase, or mnemonic).",
)
references: Annotated[
ConceptScheme | ObjectReference | URIRef | str | list[ConceptScheme | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.references),
] = Field(
default=None,
alias="cdif:references",
description=(
"CDIF codelist (skos:ConceptScheme) whose concepts define the allowed values of this enumeration domain."
),
)
purpose: Annotated[str | list[str] | None, RdfProperty(CDIF.purpose)] = Field(
default=None,
alias="cdif:purpose",
description="Intent or reason for the object/the description of the object.",
)
[docs]
class Fingerprint(CdifBaseModel):
"""Integrity fingerprint (checksum/hash) of this distribution's bytes (DDI-CDI DataFingerprint)."""
cdif_required_fields: ClassVar[tuple[str, ...]] = ("cdi:value",)
value: Annotated[str | list[str] | None, RdfProperty(CDI.value)] = Field(
default=None,
alias="cdi:value",
description="The fingerprint value (e.g., the hex digest). DataFingerprint.value.",
)
algorithm_specification: Annotated[str | list[str] | None, RdfProperty(CDI.algorithmSpecification)] = Field(
default=None,
alias="cdi:algorithmSpecification",
description=(
"Identifier or name of the algorithm specification (e.g., SHA-256, MD5). "
"DataFingerprint.algorithmSpecification."
),
)
algorithm_version: Annotated[str | list[str] | None, RdfProperty(CDI.algorithmVersion)] = Field(
default=None,
alias="cdi:algorithmVersion",
description="Version of the fingerprint algorithm/specification. DataFingerprint.algorithmVersion.",
)
type_of_fingerprint: Annotated[str | list[str] | None, RdfProperty(CDI.typeOfFingerprint)] = Field(
default=None,
alias="cdi:typeOfFingerprint",
description="The kind of fingerprint (e.g., checksum, hash, digest). DataFingerprint.typeOfFingerprint.",
)
[docs]
class GeoCoordinates(CdifBaseModel):
"""
A point location. Point locations are recommended for data that is associated with specific sample locations,
particularly if these are widely spaced such that an enclosing bounding box would be a misleading representation
of the spatial location. Be aware that some client applications might only index or display bounding box extents
or a single point location.
"""
rdf_type: ClassVar[Any] = [SCHEMA.GeoCoordinates]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:latitude",
"schema:longitude",
)
latitude: Annotated[int | float | list[int | float] | None, RdfProperty(SCHEMA.latitude)] = Field(
default=None,
alias="schema:latitude",
)
longitude: Annotated[int | float | list[int | float] | None, RdfProperty(SCHEMA.longitude)] = Field(
default=None,
alias="schema:longitude",
)
[docs]
class GeoShape(CdifBaseModel):
"""
A schema:GeoShape bounding box. The geometry is described with a set of latitude/longitude pairs (in that
order).The documentation for schema:GeoShape states 'Either whitespace or commas can be used to separate latitude
and longitude; whitespace should be used when writing a list of several such points.'
"""
rdf_type: ClassVar[Any] = [SCHEMA.GeoShape]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:box",
)
box: Annotated[str | list[str] | None, RdfProperty(SCHEMA.box)] = Field(
default=None,
alias="schema:box",
description=(
"A GeoShape box defines an area on the surface of the earth defined by point locations of the "
"southwest corner and northeast corner of the rectangle in latitude-longitude coordinates. A space "
"should..."
),
)
line: Annotated[str | list[str] | None, RdfProperty(SCHEMA.line)] = Field(
default=None,
alias="schema:line",
description=(
"A GeoShape box defines a curvilinear geometry as a string of latitude-longitude coordinates. A "
"space should be used to separate the latitude and longitude values. The coordinate point pairs are "
"als..."
),
)
[docs]
class Instant(CdifBaseModel):
rdf_type: ClassVar[Any] = [TIME.Instant]
in_time_position: Annotated[TimePosition | list[TimePosition] | None, RdfProperty(TIME.inTimePosition)] = Field(
default=None,
alias="time:inTimePosition",
)
[docs]
class InstrumentProduct(CdifBaseModel):
"""
Schema for describing laboratory instruments and instrument systems. Supports ownership, manufacturer, model,
commissioning dates, hierarchical sub-components via schema:hasPart, and domain-specific typing. Instruments may
be standalone devices or complex systems with sub-components.
"""
rdf_type: ClassVar[Any] = [SCHEMA.Product]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
additional_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.additionalType),
] = Field(
default=None,
alias="schema:additionalType",
description=(
"Domain-specific type classifications. Should include a scientific instrument type URI (e.g. "
"wd:Q3099911 for Wikidata scientific instrument)."
),
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="Human-readable name for this instrument.",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="Text description of this instrument, its purpose, and capabilities.",
)
alternate_name: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.alternateName),
] = Field(
default=None,
alias="schema:alternateName",
description="Alternate name(s), e.g. specific make/model designation, common abbreviation.",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description=(
"Formal identifier(s) for this instrument. Use PropertyValue for structured identifiers (e.g. "
"PIDINST, serial number, inventory number)."
),
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
description="Landing page URL for this instrument.",
)
manufacturer: Annotated[Organization | list[Organization] | None, RdfProperty(SCHEMA.manufacturer)] = Field(
default=None,
alias="schema:manufacturer",
description="Organization that manufactured this instrument.",
)
model: Annotated[ProductModel | list[ProductModel] | None, RdfProperty(SCHEMA.model)] = Field(
default=None,
alias="schema:model",
description="Product model information for this instrument.",
)
category: Annotated[DefinedTerm | list[DefinedTerm] | None, RdfProperty(SCHEMA.category)] = Field(
default=None,
alias="schema:category",
description="Instrument type classification(s) from a controlled vocabulary.",
)
owner: Annotated[Organization | list[Organization] | None, RdfProperty(SCHEMA.owner)] = Field(
default=None,
alias="schema:owner",
description="Organization that owns this instrument.",
)
contributor: Annotated[Contributor | list[Contributor] | None, RdfProperty(SCHEMA.contributor)] = Field(
default=None,
alias="schema:contributor",
description=(
"Agents associated with this instrument in specific roles (e.g. operator, custodian, principal "
"investigator). Use schema:owner for the owning organization."
),
)
additional_property: Annotated[
(
AdditionalProperty
| AdditionalPropertySpecification
| list[AdditionalProperty | AdditionalPropertySpecification]
| None
),
RdfProperty(SCHEMA.additionalProperty),
] = Field(
default=None,
alias="schema:additionalProperty",
description=(
"Instrument-specific properties (measured variables, detection limits, calibration information, "
"operating parameters, etc.). On a procedure / plan instrument (e.g. an instrument named directly "
"on an..."
),
)
valid_from: Annotated[str | list[str] | None, RdfProperty(SCHEMA.validFrom)] = Field(
default=None,
alias="schema:validFrom",
description="Date the instrument was commissioned (ISO 8601).",
)
valid_through: Annotated[str | list[str] | None, RdfProperty(SCHEMA.validThrough)] = Field(
default=None,
alias="schema:validThrough",
description="Date the instrument was decommissioned (ISO 8601). Absent if still operational.",
)
has_part: Annotated[
(
InstrumentComponent
| ObjectReference
| URIRef
| str
| list[InstrumentComponent | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.hasPart),
] = Field(
default=None,
alias="schema:hasPart",
description=(
"Sub-components of this instrument system. Each item is either an inline instrument description or "
"an @id reference."
),
)
related_link: Annotated[LinkRole | list[LinkRole] | None, RdfProperty(SCHEMA.relatedLink)] = Field(
default=None,
alias="schema:relatedLink",
description=(
"Links to related resources (manuals, datasheets, calibration records, related instruments), each "
"naming how the target relates to the instrument. Uses the same linkRole block as cdifCore; before "
"20..."
),
)
subject_of: Annotated[CatalogRecord | list[CatalogRecord] | None, RdfProperty(SCHEMA.subjectOf)] = Field(
default=None,
alias="schema:subjectOf",
description="Catalog record metadata-about-metadata for this instrument description.",
)
[docs]
class LinkRole(CdifBaseModel):
"""
A typed link, implemented as a schema.org LinkRole: schema:linkRelationship names how the target relates to the
subject, and schema:target carries the EntryPoint actually being linked to. This is the right shape when the
relationship itself is the point -- "this is the canonical version of", "this is the download endpoint for". Where
the value is simply a work at a URL, such as a license or a terms-of-service document, use
schemaorgProperties/labeledLink instead: a licence is a work, not a role, and wrapping it in a Role forces every
consumer through an indirection to reach the thing itself. Defined here as a block rather than inline in a profile
(where it lived until 2026-09-23) so that more than one consumer can reuse it. While it was inline in cdifCore,
schemaorgProperties/instrument could not reach it and defined schema:relatedLink as a labeled link instead -- the
same property carrying two different shapes depending on which node held it.
"""
rdf_type: ClassVar[Any] = [SCHEMA.LinkRole]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:linkRelationship",
)
link_relationship: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.linkRelationship),
] = Field(
default=None,
alias="schema:linkRelationship",
description=(
"How the target relates to the subject, as a controlled-vocabulary value or a plain string label. "
"Required: a typed link whose relationship is unstated carries no more information than a bare URL, "
"w..."
),
)
target: Annotated[EntryPoint | list[EntryPoint] | None, RdfProperty(SCHEMA.target)] = Field(
default=None,
alias="schema:target",
description=(
"The entry point being linked to. Deliberately not sealed: real targets also carry "
"schema:httpMethod, schema:urlTemplate, schema:contentType and domain-specific properties, and "
"JSON-LD is open-world."
),
)
[docs]
class LongDataStructure(CdifBaseModel):
"""
Structure of a long dataset (organized collection of long data). It is described by identifier, measure,
attribute, variable descriptor and variable value components.
"""
rdf_type: ClassVar[Any] = [CDI.LongDataStructure]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdi:has_DataStructureComponent",
)
has_data_structure_component: Annotated[
Any | list[Any] | None,
RdfProperty(CDI.has_DataStructureComponent),
] = Field(
default=None,
alias="cdi:has_DataStructureComponent",
description=(
"A LongDataStructure must include exactly one IdentifierComponent, exactly one "
"VariableDescriptorComponent, exactly one VariableValueComponent, plus zero or more "
"AttributeComponents."
),
)
has_primary_key: Annotated[CdifKey | list[CdifKey] | None, RdfProperty(CDIF.has_PrimaryKey)] = Field(
default=None,
alias="cdif:has_PrimaryKey",
description="Variables in the structure that uniquely identify a record.",
)
has_primary_key_alt: Annotated[PrimaryKey | list[PrimaryKey] | None, RdfProperty(CDI.has_PrimaryKey)] = Field(
default=None,
alias="cdi:has_PrimaryKey",
)
[docs]
class ManifestPart(CdifBaseModel):
"""
One independently accessible member of a package. Type it for what it is: schema:Dataset for data,
schema:CreativeWork for a codebook, methods document or quality report, schema:MediaObject for a browse image.
Parts under separate stewardship should carry their own schema:provider, schema:conditionsOfAccess and
schema:dateModified, since those are what differ.
"""
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
encoding_format: Annotated[str | list[str] | None, RdfProperty(SCHEMA.encodingFormat)] = Field(
default=None,
alias="schema:encodingFormat",
)
url: Annotated[str | list[str] | None, RdfProperty(SCHEMA.url)] = Field(default=None, alias="schema:url")
about: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.about),
] = Field(
default=None,
alias="schema:about",
description=(
"The part this one is about. Use it on a part that describes another -- a codebook, a data "
"dictionary, a quality report, a metadata sidecar -- so that a consumer can tell WHICH part it "
"documents rat..."
),
)
[docs]
class MonetaryGrant(CdifBaseModel):
"""Funding acknowledgement properties, profile of schema.org/MonetaryGrant"""
rdf_type: ClassVar[Any] = [SCHEMA.MonetaryGrant]
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description="identifier for a particular grant",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="description of the funding or grant",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="title of the grant",
)
funder: Annotated[
(
Person
| Organization
| ObjectReference
| URIRef
| str
| list[Person | Organization | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.funder),
] = Field(
default=None,
alias="schema:funder",
)
[docs]
class PartNode(CdifBaseModel):
"""
A sub-component of an instrument system. Uses the same structure as the parent instrument but without nesting
(single level of hasPart).
"""
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
alternate_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.alternateName)] = Field(
default=None,
alias="schema:alternateName",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
)
additional_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.additionalType),
] = Field(
default=None,
alias="schema:additionalType",
description="Component type classification.",
)
additional_property: Annotated[
(
AdditionalProperty
| AdditionalPropertySpecification
| list[AdditionalProperty | AdditionalPropertySpecification]
| None
),
RdfProperty(SCHEMA.additionalProperty),
] = Field(
default=None,
alias="schema:additionalProperty",
)
manufacturer: Annotated[Organization | list[Organization] | None, RdfProperty(SCHEMA.manufacturer)] = Field(
default=None,
alias="schema:manufacturer",
)
model: Annotated[ProductModel | list[ProductModel] | None, RdfProperty(SCHEMA.model)] = Field(
default=None,
alias="schema:model",
)
has_physical_mapping: Annotated[
dict[str, Any] | list[dict[str, Any]] | None,
RdfProperty(CDIF.hasPhysicalMapping),
] = Field(
default=None,
alias="cdif:hasPhysicalMapping",
description="Links variables to their physical representation in this dataset.",
)
array_base: Annotated[int | list[int] | None, RdfProperty(CDI.arrayBase)] = Field(
default=None,
alias="cdi:arrayBase",
)
comment_prefix: Annotated[str | list[str] | None, RdfProperty(CSVW.commentPrefix)] = Field(
default=None,
alias="csvw:commentPrefix",
description=(
"An atomic property that sets the comment prefix flag to the single provided value, which MUST be a "
"string. The default is '#'."
),
)
delimiter: Annotated[str | list[str] | None, RdfProperty(CSVW.delimiter)] = Field(
default=None,
alias="csvw:delimiter",
description="Sets the delimiter flag to the single provided value, which MUST be a string. The default is ','.",
)
header: Annotated[bool | list[bool] | None, RdfProperty(CSVW.header)] = Field(
default=None,
alias="csvw:header",
description=(
"If true, sets the header row count flag to 1, and if false to 0, unless headerRowCount is "
"provided, in which case the value provided for the header property is ignored. The default is "
"true."
),
)
header_row_count: Annotated[int | list[int] | None, RdfProperty(CSVW.headerRowCount)] = Field(
default=None,
alias="csvw:headerRowCount",
description=(
"A numeric atomic property that sets the header row count flag to the single provided value, which "
"MUST be a non-negative integer."
),
)
is_delimited: Annotated[bool | list[bool] | None, RdfProperty(CDI.isDelimited)] = Field(
default=None,
alias="cdi:isDelimited",
description=(
"Schema constraint is that one of {'isDelimited','isFixedWidth'} must be present with a True value; "
"the other one may be present or omitted, but if present must have a false value."
),
)
is_fixed_width: Annotated[bool | list[bool] | None, RdfProperty(CDI.isFixedWidth)] = Field(
default=None,
alias="cdi:isFixedWidth",
)
line_terminators: Annotated[str | list[str] | None, RdfProperty(CSVW.lineTerminators)] = Field(
default=None,
alias="csvw:lineTerminators",
)
quote_char: Annotated[str | list[str] | None, RdfProperty(CSVW.quoteChar)] = Field(
default=None,
alias="csvw:quoteChar",
description="Same as DDI-CDI quoteCharacter. The string that is used around escaped cells.",
)
skip_blank_rows: Annotated[bool | list[bool] | None, RdfProperty(CSVW.skipBlankRows)] = Field(
default=None,
alias="csvw:skipBlankRows",
)
skip_columns: Annotated[int | list[int] | None, RdfProperty(CSVW.skipColumns)] = Field(
default=None,
alias="csvw:skipColumns",
description="The number of columns to skip at the beginning of each row.",
)
skip_initial_space: Annotated[bool | list[bool] | None, RdfProperty(CSVW.skipInitialSpace)] = Field(
default=None,
alias="csvw:skipInitialSpace",
)
skip_rows: Annotated[int | list[int] | None, RdfProperty(CSVW.skipRows)] = Field(
default=None,
alias="csvw:skipRows",
description="The number of rows to skip at the beginning of the file, before a header row or tabular data.",
)
escape_character: Annotated[str | list[str] | None, RdfProperty(CDI.escapeCharacter)] = Field(
default=None,
alias="cdi:escapeCharacter",
description=(
"The character used to escape special characters in the data. From DDI-CDI "
"PhysicalSegmentLayout.escapeCharacter."
),
)
header_is_case_sensitive: Annotated[bool | list[bool] | None, RdfProperty(CDI.headerIsCaseSensitive)] = Field(
default=None,
alias="cdi:headerIsCaseSensitive",
description=(
"Whether column header names are case-sensitive. From DDI-CDI PhysicalSegmentLayout.headerIsCaseSensitive."
),
)
treat_consecutive_delimiters_as_one: Annotated[
bool | list[bool] | None,
RdfProperty(CDI.treatConsecutiveDelimitersAsOne),
] = Field(
default=None,
alias="cdi:treatConsecutiveDelimitersAsOne",
description=(
"Whether consecutive delimiters should be treated as a single delimiter. From DDI-CDI "
"PhysicalSegmentLayout.treatConsecutiveDelimitersAsOne."
),
)
table_direction: Annotated[str | list[str] | None, RdfProperty(CSVW.tableDirection)] = Field(
default=None,
alias="csvw:tableDirection",
description=(
"Indicates the direction of the table layout (left-to-right or right-to-left). From DDI-CDI "
"PhysicalSegmentLayout.tableDirection."
),
)
text_direction: Annotated[str | list[str] | None, RdfProperty(CSVW.textDirection)] = Field(
default=None,
alias="csvw:textDirection",
description=(
"Indicates whether the text within cells should be displayed as left-to-right, right-to-left, "
"according to content, or inherited from the table direction. From DDI-CDI "
"PhysicalSegmentLayout.textDire..."
),
)
trim: Annotated[str | list[str] | None, RdfProperty(CSVW.trim)] = Field(
default=None,
alias="csvw:trim",
description=(
"Indicates whether to trim whitespace around cells. 'true' corresponds to DDI-CDI 'both' value, "
"'false' corresponds to DDI-CDI 'neither' value."
),
)
count_rows: int | list[int] | None = Field(default=None, alias="countRows")
count_columns: int | list[int] | None = Field(default=None, alias="countColumns")
[docs]
class Place(CdifBaseModel):
"""
Spatial Extent description for CDIF discovery profile. Note required prefix declaration for geoSparql (
http://www.opengis.net/ont/geosparql#) and OGC simple features (sf: http://www.opengis.net/ont/sf#)
"""
rdf_type: ClassVar[Any] = [SCHEMA.Place]
additional_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.additionalType),
] = Field(
default=None,
alias="schema:additionalType",
description=(
"Domain-specific type classifications for this place (e.g. facility type,laboratory classification, "
"feature type)."
),
)
name: Annotated[DefinedTerm | str | list[DefinedTerm | str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="A place name for the location, either as a string or a DefinedTerm from a gazetteer.",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description="Formal identifier for this place (e.g. ROR identifier for a facility).",
)
alternate_name: Annotated[
DefinedTerm | str | list[DefinedTerm | str] | None,
RdfProperty(SCHEMA.alternateName),
] = Field(
default=None,
alias="schema:alternateName",
description="Alternate or abbreviated name(s) for this place.",
)
geo: Annotated[GeoCoordinates | GeoShape | list[GeoCoordinates | GeoShape] | None, RdfProperty(SCHEMA.geo)] = Field(
default=None,
alias="schema:geo",
description="Either a bounding box or a point location.",
)
has_geometry: Annotated[dict[str, Any] | list[dict[str, Any]] | None, RdfProperty(GEOSPARQL.hasGeometry)] = Field(
default=None,
alias="geosparql:hasGeometry",
description=(
"Optional geographic extent using wkt geometry, see Ocean InfoHub "
"(https://book.oceaninfohub.org/thematics/spatial/README.html#simple-geosparql-wkt). Other geometry "
"schemes might be specified in a s..."
),
)
[docs]
class ProductModel(CdifBaseModel):
"""Product model information for this instrument."""
rdf_type: ClassVar[Any] = [SCHEMA.ProductModel]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="Model name or number.",
)
identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field(
default=None,
alias="schema:identifier",
description="Model identifier.",
)
[docs]
class ProperInterval(CdifBaseModel):
"""
a w3c time proper interval with bounds that are named time ordinal eras with identifier, e.g. geologic age. This
is a SOSO schema.org extension
"""
rdf_type: ClassVar[Any] = [TIME.ProperInterval]
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
description="free text description of the temporal interval",
)
interval_started_by: Annotated[
URIRef | str | list[URIRef | str] | None,
RdfProperty(TIME.intervalStartedBy),
] = Field(
default=None,
alias="time:intervalStartedBy",
description=(
"identifier for a named time ordinal era that is older bound of time interval, e.g. 'isc:LowerDevonian'"
),
)
interval_finished_by: Annotated[
URIRef | str | list[URIRef | str] | None,
RdfProperty(TIME.intervalFinishedBy),
] = Field(
default=None,
alias="time:intervalFinishedBy",
description=(
"identifier for a named time ordinal era that is younger bound of time interval, e.g. 'isc:LowerDevonian'"
),
)
has_beginning: Annotated[Instant | list[Instant] | None, RdfProperty(TIME.hasBeginning)] = Field(
default=None,
alias="time:hasBeginning",
)
has_end: Annotated[Instant | list[Instant] | None, RdfProperty(TIME.hasEnd)] = Field(
default=None,
alias="time:hasEnd",
)
[docs]
class PropertyValue(CdifBaseModel):
rdf_type: ClassVar[Any] = [SCHEMA.PropertyValue]
property_id: Annotated[
ObjectReference | URIRef | str | list[ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.propertyID),
] = Field(
default=None,
alias="schema:propertyID",
)
value: Annotated[str | list[str] | None, RdfProperty(SCHEMA.value)] = Field(default=None, alias="schema:value")
url: Annotated[str | list[str] | None, RdfProperty(SCHEMA.url)] = Field(default=None, alias="schema:url")
[docs]
class PropertyValueSpecification(CdifBaseModel):
"""Query input parameter for a web API action, typed as schema:PropertyValueSpecification."""
rdf_type: ClassVar[Any] = [SCHEMA.PropertyValueSpecification]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"schema:valueName",
"schema:description",
)
value_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.valueName)] = Field(
default=None,
alias="schema:valueName",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
value_required: Annotated[bool | list[bool] | None, RdfProperty(SCHEMA.valueRequired)] = Field(
default=None,
alias="schema:valueRequired",
)
value_pattern: Annotated[str | list[str] | None, RdfProperty(SCHEMA.valuePattern)] = Field(
default=None,
alias="schema:valuePattern",
)
[docs]
class QualityMeasurement(CdifBaseModel):
"""definitions for simple quality measure property"""
rdf_type: ClassVar[Any] = [DQV.QualityMeasurement]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"dqv:isMeasurementOf",
"dqv:value",
)
is_measurement_of: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(DQV.isMeasurementOf),
] = Field(
default=None,
alias="dqv:isMeasurementOf",
description="specify the quality measure that is reported, by name, with an ID ref, or as a Defined Term",
)
value: Annotated[
DefinedTerm | str | int | float | list[DefinedTerm | str | int | float] | None,
RdfProperty(DQV.value),
] = Field(
default=None,
alias="dqv:value",
description=(
"the reported result of the quality measure, as a string, a number, or a defined term from a vocabulary"
),
)
[docs]
class QuantitativeValue(CdifBaseModel):
"""File size as a QuantitativeValue."""
rdf_type: ClassVar[Any] = [SCHEMA.QuantitativeValue]
value: Annotated[int | float | list[int | float] | None, RdfProperty(SCHEMA.value)] = Field(
default=None,
alias="schema:value",
description="Numeric size value.",
)
unit_text: Annotated[str | list[str] | None, RdfProperty(SCHEMA.unitText)] = Field(
default=None,
alias="schema:unitText",
description="Unit of measure for size (e.g. 'byte').",
)
[docs]
class RepresentedVariable(CdifBaseModel):
"""Conceptual variable with a substantive value domain specified."""
rdf_type: ClassVar[Any] = [CDI.RepresentedVariable]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
described_unit_of_measure: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.describedUnitOfMeasure),
] = Field(
default=None,
alias="cdif:describedUnitOfMeasure",
description=(
"The unit in which the data values are measured (kg, pound, euro), expressed as a value from a "
"controlled system of entries (i.e., QDT). Supports the provision of an identifier for the entry in "
"the..."
),
)
has_intended_data_type: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.hasIntendedDataType),
] = Field(
default=None,
alias="cdif:hasIntendedDataType",
description=(
"The data type intended to be used by this variable. Supports the optional use of an external "
"controlled vocabulary."
),
)
takes_sentinel_values_from: Annotated[
(
SentinelValueDomain
| ObjectReference
| URIRef
| str
| list[SentinelValueDomain | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.takesSentinelValuesFrom),
] = Field(
default=None,
alias="cdi:takesSentinelValuesFrom",
description=(
"Sentinel (missing / not-applicable) value domain(s) for this RepresentedVariable "
"(RepresentedVariable.takesSentinelValuesFrom)."
),
)
takes_substantive_values_from: Annotated[
(
SubstantiveValueDomain
| ObjectReference
| URIRef
| str
| list[SubstantiveValueDomain | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.takesSubstantiveValuesFrom),
] = Field(
default=None,
alias="cdi:takesSubstantiveValuesFrom",
description=(
"The substantive value domain for this RepresentedVariable - the set of valid, meaningful values "
"(RepresentedVariable.takesSubstantiveValuesFrom)."
),
)
simple_unit_of_measure: Annotated[str | list[str] | None, RdfProperty(CDI.simpleUnitOfMeasure)] = Field(
default=None,
alias="cdi:simpleUnitOfMeasure",
description=(
"The unit in which the data values are measured (kg, pound, euro), expressed as a simple string, in "
"cases where no additional information is available (in the legacy system) or needed (as in the "
"cas..."
),
)
descriptive_text: Annotated[str | list[str] | None, RdfProperty(CDIF.descriptiveText)] = Field(
default=None,
alias="cdif:descriptiveText",
description="A short natural language account of the characteristics of the object.",
)
measures: Annotated[
UnitType | ObjectReference | URIRef | str | list[UnitType | ObjectReference | URIRef | str] | None,
RdfProperty(CDI.measures),
] = Field(
default=None,
alias="cdi:measures",
)
unit_of_measure_kind: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDIF.unitOfMeasureKind),
] = Field(
default=None,
alias="cdif:unitOfMeasureKind",
description=(
"Kind of unit of measure, so that it may be prone to translation to equivalent UOMs. Example values "
'include "acceleration," "temperature," "salinity", etc. This description exists at the '
"conceptual..."
),
)
definition: Annotated[str | list[str] | None, RdfProperty(CDIF.definition)] = Field(
default=None,
alias="cdif:definition",
description=(
"Natural language statement conveying the meaning of a concept, differentiating it from other "
"concepts. Supports the use of multiple languages and structured text. 'externalDefinition' can't "
"be used..."
),
)
display_label: Annotated[str | list[str] | None, RdfProperty(CDIF.displayLabel)] = Field(
default=None,
alias="cdif:displayLabel",
description=(
"A human-readable display label for the object. Supports the use of multiple languages. Repeat for "
"labels with different content, for example, labels with differing length limitations."
),
)
external_definition: Annotated[Reference | list[Reference] | None, RdfProperty(CDIF.externalDefinition)] = Field(
default=None,
alias="cdif:externalDefinition",
description=(
"A reference to an external definition of a concept (that is, a concept which is described outside "
"the content of the DDI-CDI metadata description). An example is a SKOS concept. The definition "
"prop..."
),
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
name: Annotated[str | list[str] | None, RdfProperty(CDIF.name)] = Field(
default=None,
alias="cdif:name",
description=(
"Human understandable name (linguistic signifier, word, phrase, or mnemonic). May follow ISO/IEC "
"11179-5 naming principles, and have context provided to specify usage."
),
)
uses_concept: Annotated[
Concept | ObjectReference | URIRef | str | list[Concept | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.uses_Concept),
] = Field(
default=None,
alias="cdif:uses_Concept",
description="Specifies the concept(s) that this variable expresses or aligns with.",
)
described_unit_of_measure_alt: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDI.describedUnitOfMeasure),
] = Field(
default=None,
alias="cdi:describedUnitOfMeasure",
description=(
"The unit in which the data values are measured (kg, pound, euro), expressed as a value from a "
"controlled system of entries (i.e., QDT). Supports the provision of an identifier for the entry in "
"the..."
),
)
has_intended_data_type_alt: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDI.hasIntendedDataType),
] = Field(
default=None,
alias="cdi:hasIntendedDataType",
description=(
"The data type intended to be used by this variable. Supports the optional use of an external "
"controlled vocabulary."
),
)
unit_of_measure_kind_alt: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(CDI.unitOfMeasureKind),
] = Field(
default=None,
alias="cdi:unitOfMeasureKind",
description=(
"Kind of unit of measure, so that it may be prone to translation to equivalent UOMs. Example values "
'include "acceleration," "temperature," "salinity", etc. This description exists at the '
"conceptual..."
),
)
external_definition_alt: Annotated[Reference | list[Reference] | None, RdfProperty(CDI.externalDefinition)] = Field(
default=None,
alias="cdi:externalDefinition",
description=(
"A reference to an external definition of a concept (that is, a concept which is described outside "
"the content of the DDI-CDI metadata description). An example is a SKOS concept. The definition "
"prop..."
),
)
identifier_alt: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDI.identifier)] = Field(
default=None,
alias="cdi:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
[docs]
class Role(CdifBaseModel):
"""
A dcat:Role -- DCAT's declared range for dcat:hadRole. Defined inline rather than as its own building block
because nothing else in the register needs it yet; dcat:hadRole's domain is owl:unionOf [prov:Attribution,
dcat:Relationship], so promote it to a block if a qualified attribution ever needs the same shape. dcat:Role
rdfs:subClassOf skos:Concept, so the skos:prefLabel / skos:inScheme furniture of a concept is permitted alongside;
it is not required here because DCAT states no cardinality constraints on the class -- dcat.ttl declares no
rdfs:subClassOf and no owl:Restriction on dcat:Relationship, and the "mandatory" wording in the DCAT-3 document is
prose in the spec tables rather than an axiom in the vocabulary.
"""
rdf_type: ClassVar[Any] = [DCAT.Role, SCHEMA.Role]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
role_name: Annotated[
CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None,
RdfProperty(SCHEMA.roleName),
] = Field(
default=None,
alias="schema:roleName",
)
contributor: Annotated[
(
Person
| Organization
| ObjectReference
| URIRef
| str
| list[Person | Organization | ObjectReference | URIRef | str]
| None
),
RdfProperty(SCHEMA.contributor),
] = Field(
default=None,
alias="schema:contributor",
)
[docs]
class SoftwareApplication(CdifBaseModel):
"""Software used by the activity (acquisition, reduction, processing)."""
rdf_type: ClassVar[Any] = [SCHEMA.SoftwareApplication]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(default=None, alias="schema:name")
software_version: Annotated[str | list[str] | None, RdfProperty(SCHEMA.softwareVersion)] = Field(
default=None,
alias="schema:softwareVersion",
)
url: Annotated[URIRef | str | list[URIRef | str] | None, RdfProperty(SCHEMA.url)] = Field(
default=None,
alias="schema:url",
)
[docs]
class Thing(CdifBaseModel):
"""
The entity upon which the action is carried out, whose state is kept intact or changed. This is an open ended
class for general description of Actions. When schema:Action (or a subclass) is used to describe operations for a
WebAPI distribution, the object is implicitly the resource that is the subject of the containing metadata record,
so this property would be superfluous.
"""
rdf_type: ClassVar[Any] = [SCHEMA.Thing]
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
[docs]
class TimePosition(CdifBaseModel):
rdf_type: ClassVar[Any] = [TIME.TimePosition]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"time:hasTRS",
"time:numericPosition",
)
has_trs: Annotated[str | list[str] | None, RdfProperty(TIME.hasTRS)] = Field(
default=None,
alias="time:hasTRS",
description=(
"identifier for a temporal reference system; default is million years before prsent as a decimal number"
),
)
numeric_position: Annotated[int | float | list[int | float] | None, RdfProperty(TIME.numericPosition)] = Field(
default=None,
alias="time:numericPosition",
)
[docs]
class UnitType(CdifBaseModel):
"""Unit type is a type or class of objects of interest (units)."""
rdf_type: ClassVar[Any] = [CDI.UnitType]
cdif_required_fields: ClassVar[tuple[str, ...]] = ("@type",)
descriptive_text: Annotated[str | list[str] | None, RdfProperty(CDIF.descriptiveText)] = Field(
default=None,
alias="cdif:descriptiveText",
description="A short natural language account of the characteristics of the object.",
)
definition: Annotated[str | list[str] | None, RdfProperty(CDIF.definition)] = Field(
default=None,
alias="cdif:definition",
description=(
"Natural language statement conveying the meaning of a concept, differentiating it from other "
"concepts. Supports the use of multiple languages and structured text. 'externalDefinition' can't "
"be used..."
),
)
display_label: Annotated[str | list[str] | None, RdfProperty(CDIF.displayLabel)] = Field(
default=None,
alias="cdif:displayLabel",
description=(
"A human-readable display label for the object. Supports the use of multiple languages. Repeat for "
"labels with different content, for example, labels with differing length limitations."
),
)
external_definition: Annotated[Reference | list[Reference] | None, RdfProperty(CDIF.externalDefinition)] = Field(
default=None,
alias="cdif:externalDefinition",
description=(
"A reference to an external definition of a concept (that is, a concept which is described outside "
"the content of the DDI-CDI metadata description). An example is a SKOS concept. The definition "
"prop..."
),
)
identifier: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDIF.identifier)] = Field(
default=None,
alias="cdif:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
name: Annotated[str | list[str] | None, RdfProperty(CDIF.name)] = Field(
default=None,
alias="cdif:name",
description=(
"Human understandable name (linguistic signifier, word, phrase, or mnemonic). May follow ISO/IEC "
"11179-5 naming principles, and have context provided to specify usage."
),
)
uses_concept: Annotated[
Concept | ObjectReference | URIRef | str | list[Concept | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.uses_Concept),
] = Field(
default=None,
alias="cdif:uses_Concept",
description="Specifies the concept(s) that this variable expresses or aligns with.",
)
external_definition_alt: Annotated[Reference | list[Reference] | None, RdfProperty(CDI.externalDefinition)] = Field(
default=None,
alias="cdi:externalDefinition",
description=(
"A reference to an external definition of a concept (that is, a concept which is described outside "
"the content of the DDI-CDI metadata description). An example is a SKOS concept. The definition "
"prop..."
),
)
identifier_alt: Annotated[Identifier | list[Identifier] | None, RdfProperty(CDI.identifier)] = Field(
default=None,
alias="cdi:identifier",
description="Identifier for objects requiring short- or long-lasting referencing and management.",
)
[docs]
class VariableMeasured(CdifBaseModel):
"""
Schema.org PropertyValue-based variableMeasured. Defines properties for a measured variable in a dataset, typed as
schema:PropertyValue.
"""
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"schema:name",
)
name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field(
default=None,
alias="schema:name",
description="string label associated with the variable in the dataset serialization",
)
description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field(
default=None,
alias="schema:description",
)
alternate_name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.alternateName)] = Field(
default=None,
alias="schema:alternateName",
)
measurement_technique: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.measurementTechnique),
] = Field(
default=None,
alias="schema:measurementTechnique",
description="Text description or URI specifying how values for the variable were obtained.",
)
property_id: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.propertyID),
] = Field(
default=None,
alias="schema:propertyID",
description="identifier or name for the property concept",
)
unit_text: Annotated[str | list[str] | None, RdfProperty(SCHEMA.unitText)] = Field(
default=None,
alias="schema:unitText",
description="unit of measurement as text",
)
unit_code: Annotated[
DefinedTerm | ObjectReference | URIRef | str | list[DefinedTerm | ObjectReference | URIRef | str] | None,
RdfProperty(SCHEMA.unitCode),
] = Field(
default=None,
alias="schema:unitCode",
description="URI or code identifying the unit of measure",
)
min_value: Annotated[int | float | list[int | float] | None, RdfProperty(SCHEMA.minValue)] = Field(
default=None,
alias="schema:minValue",
description="minimum numeric value in the dataset",
)
max_value: Annotated[int | float | list[int | float] | None, RdfProperty(SCHEMA.maxValue)] = Field(
default=None,
alias="schema:maxValue",
description="maximum numeric value in the dataset",
)
url: Annotated[
CreativeWorkRef | URIRef | str | list[CreativeWorkRef | URIRef | str] | None,
RdfProperty(SCHEMA.url),
] = Field(
default=None,
alias="schema:url",
)
[docs]
class WebAPI(CdifBaseModel):
"""
use schema.org Action to document url or url template and parameters to request data through a web accessible
location. At this point, schema is set up for one action-- an HTTP Get that requests data. The url template
parameters (in curly brackets '{}') specify query paramters to filter the source data, request particular output
formats or other aspects of data.
"""
rdf_type: ClassVar[Any] = [SCHEMA.WebAPI]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"schema:serviceType",
"schema:potentialAction",
"schema:termsOfService",
)
service_type: Annotated[str | list[str] | None, RdfProperty(SCHEMA.serviceType)] = Field(
default=None,
alias="schema:serviceType",
description=(
"specify the kind of service. Ideally this should be a resolvable identifier. Currently there is no "
"widely adopted registry for serviceType identifiers, in large part because services might be "
"defin..."
),
)
terms_of_service: Annotated[
Reference | str | list[Reference | str] | None,
RdfProperty(SCHEMA.termsOfService),
] = Field(
default=None,
alias="schema:termsOfService",
description=(
"Description of access privileges required to use the API, e.g. registration, licensing, payments. "
"Note that access constraints applying to all distributions of the resource should be specified in "
"t..."
),
)
documentation: Annotated[Reference | str | list[Reference | str] | None, RdfProperty(SCHEMA.documentation)] = Field(
default=None,
alias="schema:documentation",
description=(
"a document that provides a machine-actionable description of a service instance. Examples include "
"OpenAPI documents, OGC Capabilities documents. Software designed to utilise a particular service "
"ty..."
),
)
potential_action: Annotated[Action | list[Action] | None, RdfProperty(SCHEMA.potentialAction)] = Field(
default=None,
alias="schema:potentialAction",
description="actions that can be invoked via the API",
)
[docs]
class WideDataStructure(CdifBaseModel):
"""
Structure of a wide dataset (organized collection of wide data). It is described by identifier, measure and
attribute components.
"""
rdf_type: ClassVar[Any] = [CDI.WideDataStructure]
cdif_required_fields: ClassVar[tuple[str, ...]] = (
"@type",
"cdi:has_DataStructureComponent",
)
has_data_structure_component: Annotated[
(
IdentifierComponent
| MeasureComponent
| AttributeComponent
| ObjectReference
| URIRef
| str
| list[IdentifierComponent | MeasureComponent | AttributeComponent | ObjectReference | URIRef | str]
| None
),
RdfProperty(CDI.has_DataStructureComponent),
] = Field(
default=None,
alias="cdi:has_DataStructureComponent",
)
has_primary_key: Annotated[CdifKey | list[CdifKey] | None, RdfProperty(CDIF.has_PrimaryKey)] = Field(
default=None,
alias="cdif:has_PrimaryKey",
description="Variables in the structure that uniquely identify a record.",
)
has_foreign_key: Annotated[
ForeignKey | ObjectReference | URIRef | str | list[ForeignKey | ObjectReference | URIRef | str] | None,
RdfProperty(CDIF.has_ForeignKey),
] = Field(
default=None,
alias="cdif:has_ForeignKey",
description="Variables whose values identify records in a different dataset.",
)
has_primary_key_alt: Annotated[PrimaryKey | list[PrimaryKey] | None, RdfProperty(CDI.has_PrimaryKey)] = Field(
default=None,
alias="cdi:has_PrimaryKey",
)
has_foreign_key_alt: Annotated[
ForeignKey | ObjectReference | URIRef | str | list[ForeignKey | ObjectReference | URIRef | str] | None,
RdfProperty(CDI.has_ForeignKey),
] = Field(
default=None,
alias="cdi:has_ForeignKey",
)
[docs]
class WktLiteralValue(CdifBaseModel):
rdf_type: ClassVar[Any] = [GEOSPARQL.wktLiteral]
value: str | list[str] | None = Field(
default=None,
alias="@value",
description="a WKT geometry description string, e.g. 'POINT(-76 -18)'",
)
type IsStructuredByProperty = (
DataStructure | DimensionalDataStructure | LongDataStructure | WideDataStructure | ObjectReference | str | URIRef
)
# A value in a slot whose schema.org range is schema:Thing. Accepts four shapes: (1) a string URI; (2) an {@id}
# reference to a thing described elsewhere; (3) an inline schema:Thing (an object with @type); or (4) an array whose
# items take any of those shapes. Shared by the activity's and a step's schema:object and schema:result, so an input
# or output is written the same way at both levels.
type ThingValue = ObjectReference | dict[str, Any] | str | URIRef
# Shared shape for a CDIF property that carries either a controlled-vocabulary value or a bare string label. Wraps
# cdifConceptOrTerm (SKOS-concept @id-ref, schema:DefinedTerm, or inline cdif:Concept) with a plain-string alternative
# used for legacy or single-word labels not yet bound to a vocabulary.
type CdifConceptOrTermOrString = DefinedTerm | Concept | CdifConcept | ObjectReference | str | URIRef
AdditionalProperty.model_rebuild()
AdditionalPropertySpecification.model_rebuild()
AgentInRole.model_rebuild()
AttributeComponent.model_rebuild()
CategoryStatistics.model_rebuild()
CdifCodelistConcept.model_rebuild()
CdifInstanceVariable.model_rebuild()
CdifKey.model_rebuild()
CdifPhysicalMapping.model_rebuild()
CdifRepresentedVariable.model_rebuild()
Concept.model_rebuild()
Contributor.model_rebuild()
DataStructureComponent.model_rebuild()
DefinedTerm.model_rebuild()
DimensionComponent.model_rebuild()
ForeignKey.model_rebuild()
HowTo.model_rebuild()
HowToStep.model_rebuild()
Identifier.model_rebuild()
IdentifierComponent.model_rebuild()
InstrumentComponent.model_rebuild()
LanguageTaggedValue.model_rebuild()
MeasureComponent.model_rebuild()
ObjectReference.model_rebuild()
Organization.model_rebuild()
Person.model_rebuild()
PrimaryKey.model_rebuild()
Reference.model_rebuild()
RoleFiller.model_rebuild()
SentinelValueDomain.model_rebuild()
SkosConceptLanguageTaggedValue.model_rebuild()
Statistics.model_rebuild()
StatisticsCollection.model_rebuild()
SubstantiveValueDomain.model_rebuild()
ValueAndConceptDescription.model_rebuild()
VariableDescriptorComponent.model_rebuild()
VariableValueComponent.model_rebuild()
CdifConcept.model_rebuild()
Action.model_rebuild()
CatalogRecord.model_rebuild()
Category.model_rebuild()
CdifProvActivity.model_rebuild()
Checksum.model_rebuild()
ComponentPosition.model_rebuild()
ConceptScheme.model_rebuild()
ContactPoint.model_rebuild()
CreativeWorkRef.model_rebuild()
DataCatalog.model_rebuild()
DataDownload.model_rebuild()
DataStructure.model_rebuild()
DescriptorValueDomain.model_rebuild()
DescriptorVariable.model_rebuild()
DimensionalDataStructure.model_rebuild()
Entity.model_rebuild()
EntryPoint.model_rebuild()
EnumerationDomain.model_rebuild()
Fingerprint.model_rebuild()
GeoCoordinates.model_rebuild()
GeoShape.model_rebuild()
Instant.model_rebuild()
InstrumentProduct.model_rebuild()
LinkRole.model_rebuild()
LongDataStructure.model_rebuild()
ManifestPart.model_rebuild()
MonetaryGrant.model_rebuild()
PartNode.model_rebuild()
Place.model_rebuild()
ProductModel.model_rebuild()
ProperInterval.model_rebuild()
PropertyValue.model_rebuild()
PropertyValueSpecification.model_rebuild()
QualityMeasurement.model_rebuild()
QuantitativeValue.model_rebuild()
RepresentedVariable.model_rebuild()
Role.model_rebuild()
SoftwareApplication.model_rebuild()
Thing.model_rebuild()
TimePosition.model_rebuild()
UnitType.model_rebuild()
VariableMeasured.model_rebuild()
WebAPI.model_rebuild()
WideDataStructure.model_rebuild()
WktLiteralValue.model_rebuild()
__all__ = [
"Action",
"AdditionalProperty",
"AdditionalPropertySpecification",
"AgentInRole",
"AttributeComponent",
"CatalogRecord",
"Category",
"CategoryStatistics",
"CdifCodelistConcept",
"CdifConcept",
"CdifConceptOrTermOrString",
"CdifInstanceVariable",
"CdifKey",
"CdifPhysicalMapping",
"CdifProvActivity",
"CdifRepresentedVariable",
"Checksum",
"ComponentPosition",
"Concept",
"ConceptScheme",
"ContactPoint",
"Contributor",
"CreativeWorkRef",
"DataCatalog",
"DataDownload",
"DataStructure",
"DataStructureComponent",
"DefinedTerm",
"DescriptorValueDomain",
"DescriptorVariable",
"DimensionComponent",
"DimensionalDataStructure",
"Entity",
"EntryPoint",
"EnumerationDomain",
"Fingerprint",
"ForeignKey",
"GeoCoordinates",
"GeoShape",
"HowTo",
"HowToStep",
"Identifier",
"IdentifierComponent",
"Instant",
"InstrumentComponent",
"InstrumentProduct",
"IsStructuredByProperty",
"LanguageTaggedValue",
"LinkRole",
"LongDataStructure",
"ManifestPart",
"MeasureComponent",
"MonetaryGrant",
"ObjectReference",
"Organization",
"PartNode",
"Person",
"Place",
"PrimaryKey",
"ProductModel",
"ProperInterval",
"PropertyValue",
"PropertyValueSpecification",
"QualityMeasurement",
"QuantitativeValue",
"Reference",
"RepresentedVariable",
"Role",
"RoleFiller",
"SentinelValueDomain",
"SkosConceptLanguageTaggedValue",
"SoftwareApplication",
"Statistics",
"StatisticsCollection",
"SubstantiveValueDomain",
"Thing",
"ThingValue",
"TimePosition",
"UnitType",
"ValueAndConceptDescription",
"VariableDescriptorComponent",
"VariableMeasured",
"VariableValueComponent",
"WebAPI",
"WideDataStructure",
"WktLiteralValue",
]