Source code for dartfx.cdif.models.profiles.core

# AUTO-GENERATED by dartfx.cdif.codegen — DO NOT EDIT MANUALLY.
"""CDIF Core metadata profile (schema:Dataset)."""

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.models.common import (
    CatalogRecord,
    CdifConcept,
    CdifConceptOrTermOrString,
    CdifProvActivity,
    DataDownload,
    Identifier,
    LanguageTaggedValue,
    LinkRole,
    MonetaryGrant,
    ObjectReference,
    Organization,
    Person,
    Reference,
    Role,
    WebAPI,
)
from dartfx.cdif.namespaces import PROV, SCHEMA
from dartfx.rdf.pydantic import RdfProperty


[docs] class CdifCoreDataset(CdifBaseModel): """ Building block specifies core properties for CDIF schema.org metadata record, applicable to any resource type. """ rdf_type: ClassVar[Any] = [SCHEMA.Dataset] cdif_profile_uri: ClassVar[str | None] = "https://w3id.org/cdif/core/2.0" cdif_required_fields: ClassVar[tuple[str, ...]] = ( "@id", "@type", "@context", "schema:name", "schema:identifier", "schema:dateModified", "schema:subjectOf", ) cdif_any_of_required: ClassVar[tuple[tuple[str, ...], ...]] = ( ( "schema:license", "schema:conditionsOfAccess", ), ( "schema:url", "schema:distribution", ), ) name: Annotated[str | list[str] | None, RdfProperty(SCHEMA.name)] = Field( default=None, alias="schema:name", description=( "A descriptive name of a dataset (e.g., 'Snow depth in Northern Hemisphere'). The name should " "uniquely identify the described resource for human use, in the scope of the metadata catalog " "containing..." ), ) description: Annotated[str | list[str] | None, RdfProperty(SCHEMA.description)] = Field( default=None, alias="schema:description", description=( "A short summary describing a dataset. This text will be indexed by search applications, so the " "more information here, the better." ), ) identifier: Annotated[Identifier | str | list[Identifier | str] | None, RdfProperty(SCHEMA.identifier)] = Field( default=None, alias="schema:identifier", description=( "The primary identifier for the dataset; other identifiers should be listed in the sameAs field. " "Schema.org has three ways of encoding identifiers-- a text description, a URL, or by using the " "schema..." ), ) additional_type: Annotated[ CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None, RdfProperty(SCHEMA.additionalType), ] = Field( default=None, alias="schema:additionalType", description="identifiers for datatypes from other vocabularies (not schema.org) that apply to this metadata.", ) same_as: Annotated[ Identifier | ObjectReference | URIRef | str | list[Identifier | ObjectReference | URIRef | str] | None, RdfProperty(SCHEMA.sameAs), ] = Field( default=None, alias="schema:sameAs", description=( "Other identifiers for the dataset, as IRI references, literal strings, or structured identifiers " "using schema:PropertyValue." ), ) version: Annotated[str | float | list[str | float] | None, RdfProperty(SCHEMA.version)] = Field( default=None, alias="schema:version", description=( "The version number or identifier for this dataset (text or numeric). The values should sort from " "oldest to newest using an alphanumeric sort on version strings" ), ) in_language: Annotated[str | list[str] | None, RdfProperty(SCHEMA.inLanguage)] = Field( default=None, alias="schema:inLanguage", description="the language of the dataset content", ) date_modified: Annotated[str | list[str] | None, RdfProperty(SCHEMA.dateModified)] = Field( default=None, alias="schema:dateModified", description="ISO8601 formatted date (and optional time if relevant) when Dataset was last updated", ) date_published: Annotated[str | list[str] | None, RdfProperty(SCHEMA.datePublished)] = Field( default=None, alias="schema:datePublished", description="ISO8601 formatted date (and optional time if relevant) when Dataset was made public.", ) conditions_of_access: Annotated[ Reference | ObjectReference | URIRef | str | list[Reference | ObjectReference | URIRef | str] | None, RdfProperty(SCHEMA.conditionsOfAccess), ] = Field( default=None, alias="schema:conditionsOfAccess", description=( "text statement of conditions for use and access; if an online resource documents the restrictions " "or a URI is used to identify the conditions, recommend using schema:CreativeWork to provide a " "label..." ), ) license: Annotated[ Reference | ObjectReference | URIRef | str | list[Reference | ObjectReference | URIRef | str] | None, RdfProperty(SCHEMA.license), ] = Field( default=None, alias="schema:license", description=( "legal statement of conditions for use and access; recommend using schema:CreativeWork to provide a " "label (name) for the license, and an identifier. Sources of license identifiers: " "https://opensourc..." ), ) 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 dataset (landing page), typically providing links or " "instructions to get the actual resource content; analogous to dcat:accessURL. If a direct link is " "availabl..." ), ) distribution: Annotated[ DataDownload | WebAPI | list[DataDownload | WebAPI] | None, RdfProperty(SCHEMA.distribution), ] = Field( default=None, alias="schema:distribution", description=( "specifies how to download the data in a specific format or access via a web API. This property " "describes where to get the data and in what format by using the schema:DataDownload type. If user " "must..." ), ) related_link: Annotated[LinkRole | list[LinkRole] | None, RdfProperty(SCHEMA.relatedLink)] = Field( default=None, alias="schema:relatedLink", description="links to related resources; linkRelationship specifies how the resource is related.", ) publishing_principles: Annotated[ Reference | ObjectReference | URIRef | str | list[Reference | ObjectReference | URIRef | str] | None, RdfProperty(SCHEMA.publishingPrinciples), ] = Field( default=None, alias="schema:publishingPrinciples", description=( "FDOF digitalObjectMutability, RDA digitalObjectPolicy, FDOF PersistencyPolicy. Policies related to " "maintenance, update, expected time to live. If an online resource documents the policies or a " "URI..." ), ) keywords: Annotated[ CdifConceptOrTermOrString | list[CdifConceptOrTermOrString] | None, RdfProperty(SCHEMA.keywords), ] = Field( default=None, alias="schema:keywords", description=( "Keywords are an array of strings, an array of schema:DefinedTerms, or some combination of these. " "If you have information about a controlled vocabulary from which keywords come from, use " "schema:Defi..." ), ) creator: Annotated[ ( Person | Organization | ObjectReference | dict[str, Any] | URIRef | str | list[Person | Organization | ObjectReference | dict[str, Any] | URIRef | str] | None ), RdfProperty(SCHEMA.creator), ] = Field( default=None, alias="schema:creator", description=( "author or orginator of intellectual content of dataset. Uset the JSON-LD @list construct to " "preserve author order. Use contributor with the Role property to specify other roles related to " "creation..." ), ) contributor: Annotated[ ( Person | Organization | Role | ObjectReference | URIRef | str | list[Person | Organization | Role | ObjectReference | URIRef | str] | None ), RdfProperty(SCHEMA.contributor), ] = Field( default=None, alias="schema:contributor", description="other parties who played a role in production of dataset", ) publisher: Annotated[ ( Person | Organization | ObjectReference | URIRef | str | list[Person | Organization | ObjectReference | URIRef | str] | None ), RdfProperty(SCHEMA.publisher), ] = Field( default=None, alias="schema:publisher", description="Party who made the dataset publicly available", ) 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 the distribution options for the dataset. If there are multiple distributions " "from different providers, use the provider property on distribution/DataDownload" ), ) funding: Annotated[MonetaryGrant | list[MonetaryGrant] | None, RdfProperty(SCHEMA.funding)] = Field( default=None, alias="schema:funding", ) was_generated_by: Annotated[ CdifProvActivity | list[CdifProvActivity] | None, RdfProperty(PROV.wasGeneratedBy), ] = Field( default=None, alias="prov:wasGeneratedBy", description="Brief information about instruments, software or experimental protocols used", ) was_derived_from: Annotated[ Reference | ObjectReference | URIRef | str | list[Reference | ObjectReference | URIRef | str] | None, RdfProperty(PROV.wasDerivedFrom), ] = Field( default=None, alias="prov:wasDerivedFrom", description="Brief information about sources of data used in aggregate datasets", ) subject_of: Annotated[CatalogRecord | list[CatalogRecord] | None, RdfProperty(SCHEMA.subjectOf)] = Field( default=None, alias="schema:subjectOf", description=( "see https://github.com/Cross-Domain-Interoperability-Framework/Discovery/issues/13 for discussion " "on how to make assertion about the sample registration and metadata distinct from statements " "about..." ), )
CdifCoreDataset.model_rebuild() __all__ = [ "CdifConcept", "CdifConceptOrTermOrString", "CdifCoreDataset", "Identifier", "LanguageTaggedValue", "Organization", "Person", "Reference", ]