API reference

CWL 2 DataCite Transpiler-Mate Plugin.

Plugin

transpiler-mate plugin for CWL 2 DataCite.

CWL2DataCiteOptions

Bases: BaseModel

Options accepted by the CWL 2 DataCite plugin.

Source code in src/cwl2datacite/plugin.py
114
115
116
117
118
119
120
121
122
class CWL2DataCiteOptions(BaseModel):
    """Options accepted by the CWL 2 DataCite plugin."""

    model_config = ConfigDict(extra="forbid")

    output: Annotated[
        Path,
        Field(default=Path("datacite.json"), description="The output file path"),
    ]

cwl2datacite(context, options)

CWL 2 DataCite Transpiler-Mate Plugin.

Source code in src/cwl2datacite/plugin.py
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
@transpiler_plugin(
    name="cwl2datacite",
    description="CWL 2 DataCite Transpiler-Mate Plugin.",
    options_model=CWL2DataCiteOptions,
)
def cwl2datacite(context: TranspilerContext, options: CWL2DataCiteOptions) -> None:
    """CWL 2 DataCite Transpiler-Mate Plugin."""
    metadata_source: SoftwareApplication = context.metadata

    try:
        datacite_attributes: DataCiteAttributes = DataCiteAttributes(
            doi=str(metadata_source.identifier) if metadata_source.identifier else None,
            types=ResourceType(
                resource_type=metadata_source.name,
                resource_type_general=ResourceTypeGeneral.SOFTWARE,
            ),
            identifiers=[
                Identifier(
                    identifier_type="DOI", identifier=str(metadata_source.identifier)
                )
                if metadata_source.identifier
                else Identifier(
                    identifier_type="URN", identifier=f"urn:uuid:{uuid.uuid4()}"
                )
            ],  # supply a fake required identifier if the DOI hasn't been associated yet
            related_identifiers=[
                RelatedIdentifier(
                    related_identifier=str(metadata_source.same_as),
                    related_identifier_type=RelatedIdentifierType.DOI,
                    relation_type=RelationType.IS_IDENTICAL_TO,
                    resource_type_general=ResourceTypeGeneral.SOFTWARE,
                )
            ]
            if metadata_source.same_as
            else [],
            titles=[Title(title=metadata_source.name)],
            descriptions=[
                Description(
                    description=metadata_source.description,
                    description_type=DescriptionType.TECHNICAL_INFO,
                )
            ],
            publisher=Publisher(name=metadata_source.publisher.name),
            publication_year=metadata_source.date_created.year,
            dates=[
                Date(
                    date=date.fromtimestamp(time.time()),
                    date_type=DateType.UPDATED,
                    date_information="New version release",
                )
            ],
            rights_list=[
                Right(
                    rights=metadata_source.license.name
                    or str(
                        metadata_source.license.identifier
                        or metadata_source.license.url
                        or metadata_source.license
                    )
                    if isinstance(metadata_source.license, CreativeWork)
                    else str(metadata_source.license),
                    rights_uri=metadata_source.license.url
                    if isinstance(metadata_source.license, CreativeWork)
                    else None,
                    rights_identifier=str(metadata_source.license.identifier)
                    if isinstance(metadata_source.license, CreativeWork)
                    else None,
                    rights_identifier_scheme="SPDX",
                )
            ]
            if metadata_source.license
            else None,
            creators=list(
                map(
                    _to_creator,
                    metadata_source.author
                    if isinstance(metadata_source.author, list)
                    else [metadata_source.author],
                )
            ),
            contributors=list(
                map(
                    _to_contributor,
                    metadata_source.contributor
                    if isinstance(metadata_source.contributor, list)
                    else [metadata_source.contributor],
                )
            )
            if metadata_source.contributor
            else None,
        )

        datacite_data: Mapping[str, Any] = datacite_attributes.model_dump(
            mode="json", exclude_none=True, by_alias=True
        )

        options.output.parent.mkdir(parents=True, exist_ok=True)
        logger.info(f"Serializing DataCite metadata to {options.output.absolute()}")

        with options.output.open("w") as output_stream:
            json.dump(datacite_data, output_stream, indent=2)

        logger.success(
            f"DataCite metadata successfully serialized to {options.output.absolute()}"
        )
    except Exception as e:
        raise PluginExecutionError(
            f"An error occurred when serializing to {options.output.absolute()}, see nested exception"
        ) from e

DataCite 4.6 models

The plugin's output model is generated from the bundled DataCite Metadata Schema 4.6 definition.

Affiliation

Bases: BaseModel

The organizational or institutional affiliation of the creator.

Source code in src/cwl2datacite/datacite_4_6_models.py
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
class Affiliation(BaseModel):
    """
    The organizational or institutional affiliation of the creator.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    affiliation_identifier: Annotated[
        str | None, Field(alias="affiliationIdentifier")
    ] = None
    """
    Uniquely identifies the organizational affiliation of the creator.
    """
    affiliation_identifier_scheme: Annotated[
        str | None, Field(alias="affiliationIdentifierScheme")
    ] = None
    """
    The name of the affiliation identifier scheme
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the affiliation identifier scheme.
    """

affiliation_identifier = None class-attribute instance-attribute

Uniquely identifies the organizational affiliation of the creator.

affiliation_identifier_scheme = None class-attribute instance-attribute

The name of the affiliation identifier scheme

scheme_uri = None class-attribute instance-attribute

The URI of the affiliation identifier scheme.

AlternateIdentifier

Bases: BaseModel

An identifier other than the primary Identifier applied to the resource being registered.

Source code in src/cwl2datacite/datacite_4_6_models.py
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
class AlternateIdentifier(BaseModel):
    """
    An identifier other than the primary Identifier applied to the resource being registered.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    alternate_identifier: Annotated[str | None, Field(alias="alternateIdentifier")] = (
        None
    )
    """
    An identifier other than the primary Identifier applied to the resource being registered
    """
    alternate_identifier_type: Annotated[
        ResourceTypeGeneral, Field(alias="alternateIdentifierType")
    ]

alternate_identifier = None class-attribute instance-attribute

An identifier other than the primary Identifier applied to the resource being registered

Contributor

Bases: Creator

The institution or person responsible for collecting, managing, distributing, or otherwise contributing to the development of the resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
255
256
257
258
259
260
261
262
263
264
class Contributor(Creator):
    """
    The institution or person responsible for collecting, managing, distributing, or otherwise contributing to the development of the resource.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    contributor_type: Annotated[ContributorType, Field(alias="contributorType")]

ContributorType

Bases: Enum

The type of contributor of the resource

Source code in src/cwl2datacite/datacite_4_6_models.py
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
class ContributorType(Enum):
    """
    The type of contributor of the resource
    """

    CONTACT_PERSON = "ContactPerson"
    DATA_COLLECTOR = "DataCollector"
    DATA_CURATOR = "DataCurator"
    DATA_MANAGER = "DataManager"
    DISTRIBUTOR = "Distributor"
    EDITOR = "Editor"
    HOSTING_INSTITUTION = "HostingInstitution"
    PRODUCER = "Producer"
    PROJECT_LEADER = "ProjectLeader"
    PROJECT_MANAGER = "ProjectManager"
    PROJECT_MEMBER = "ProjectMember"
    REGISTRATION_AGENCY = "RegistrationAgency"
    REGISTRATION_AUTHORITY = "RegistrationAuthority"
    RELATED_PERSON = "RelatedPerson"
    RESEARCHER = "Researcher"
    RESEARCH_GROUP = "ResearchGroup"
    RIGHTS_HOLDER = "RightsHolder"
    SPONSOR = "Sponsor"
    SUPERVISOR = "Supervisor"
    TRANSLATOR = "Translator"
    WORK_PACKAGE_LEADER = "WorkPackageLeader"
    OTHER = "Other"

Creator

Bases: BaseModel

The main researcher involved in producing the data, or the author of the publication.

Source code in src/cwl2datacite/datacite_4_6_models.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
class Creator(BaseModel):
    """
    The main researcher involved in producing the data, or the author of the publication.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    name: str
    """
    The full name of the creator.
    """
    name_type: Annotated[NameType | None, Field(alias="nameType")] = None
    given_name: Annotated[str | None, Field(alias="givenName")] = None
    """
    The personal or first name of the creator.
    """
    family_name: Annotated[str | None, Field(alias="familyName")] = None
    """
    The surname or last name of the creator.
    """
    name_identifiers: Annotated[
        list[NameIdentifier] | None, Field(alias="nameIdentifiers")
    ] = None
    """
    Uniquely identifies an individual or legal entity, according to various schemes.
    """
    affiliation: list[Affiliation] | None = None
    """
    The organizational or institutional affiliations of the creator.
    """

affiliation = None class-attribute instance-attribute

The organizational or institutional affiliations of the creator.

family_name = None class-attribute instance-attribute

The surname or last name of the creator.

given_name = None class-attribute instance-attribute

The personal or first name of the creator.

name instance-attribute

The full name of the creator.

name_identifiers = None class-attribute instance-attribute

Uniquely identifies an individual or legal entity, according to various schemes.

Data

Bases: BaseModel

TODO

Source code in src/cwl2datacite/datacite_4_6_models.py
982
983
984
985
986
987
988
989
990
991
992
993
class Data(BaseModel):
    """
    TODO
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    id: str
    type: str = "dois"
    attributes: DataCiteAttributes | None = None

DataCiteAttributes

Bases: BaseModel

DataCite Metadata Schema

Source code in src/cwl2datacite/datacite_4_6_models.py
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
class DataCiteAttributes(BaseModel):
    """
    DataCite Metadata Schema
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    doi: str | None = None
    """
    The full DOI (prefix + suffix)
    """
    prefix: str | None = None
    """
    The namespace prefix
    """
    suffix: str | None = None
    """
    The suffix portion of the DOI
    """
    event: Event | None = None
    """
    Indicates a state-change action for the DOI
    """
    identifiers: list[Identifier]
    creators: Annotated[list[Creator], Field(min_length=1)]
    """
    The main researchers involved in producing the data, or the authors of the publication, in priority order.
    """
    titles: Annotated[list[Title], Field(min_length=1)]
    """
    Names or titles by which a resource is known. May be the title of a dataset or the name of a piece of software or an instrument.
    """
    publisher: Publisher
    publication_year: Annotated[int | PublicationYear1, Field(alias="publicationYear")]
    """
    The year when the data was or will be made publicly available.
    """
    subjects: list[Subject] | None = None
    """
    Subjects, keywords, classification codes, or key phrases describing the resource.
    """
    contributors: list[Contributor] | None = None
    """
    The institution or person responsible for collecting, managing, distributing, or otherwise contributing to the development of the resource.
    """
    dates: list[Date] | None = None
    """
    Different dates relevant to the work.
    """
    language: str | None = None
    """
    The primary language of the resource
    """
    types: ResourceType
    alternate_identifiers: Annotated[
        list[AlternateIdentifier] | None, Field(alias="alternateIdentifiers")
    ] = None
    """
    An identifier other than the primary Identifier applied to the resource being registered.
    """
    related_identifiers: Annotated[
        list[RelatedIdentifier] | None, Field(alias="relatedIdentifiers")
    ] = None
    """
    Identifiers of related resources.
    """
    sizes: list[str] | None = None
    """
    Size (e.g., bytes, pages, inches, etc.) or duration (extent), e.g., hours, minutes, days, etc., of a resource.
    """
    formats: list[str] | None = None
    """
    Technical format of the resources.
    """
    version: str | None = None
    """
    The version number of the resources.
    """
    rights_list: Annotated[list[Right] | None, Field(alias="rightsList")] = None
    """
    Any rights information for this resource
    """
    descriptions: list[Description] | None = None
    geo_locations: Annotated[list[GeoLocation] | None, Field(alias="geoLocations")] = (
        None
    )
    """
    Spatial regions or named places where the data was gathered or about which the data is focused.
    """
    funding_references: Annotated[
        list[FundingReference] | None, Field(alias="fundingReferences")
    ] = None
    """
    Information about financial support (funding) for the resource being registered.
    """
    related_items: Annotated[list[RelatedItem] | None, Field(alias="relatedItems")] = (
        None
    )
    """
    Informations about a resource related to the one being registered.
    """

alternate_identifiers = None class-attribute instance-attribute

An identifier other than the primary Identifier applied to the resource being registered.

contributors = None class-attribute instance-attribute

The institution or person responsible for collecting, managing, distributing, or otherwise contributing to the development of the resource.

creators instance-attribute

The main researchers involved in producing the data, or the authors of the publication, in priority order.

dates = None class-attribute instance-attribute

Different dates relevant to the work.

doi = None class-attribute instance-attribute

The full DOI (prefix + suffix)

event = None class-attribute instance-attribute

Indicates a state-change action for the DOI

formats = None class-attribute instance-attribute

Technical format of the resources.

funding_references = None class-attribute instance-attribute

Information about financial support (funding) for the resource being registered.

geo_locations = None class-attribute instance-attribute

Spatial regions or named places where the data was gathered or about which the data is focused.

language = None class-attribute instance-attribute

The primary language of the resource

prefix = None class-attribute instance-attribute

The namespace prefix

publication_year instance-attribute

The year when the data was or will be made publicly available.

related_identifiers = None class-attribute instance-attribute

Identifiers of related resources.

related_items = None class-attribute instance-attribute

Informations about a resource related to the one being registered.

rights_list = None class-attribute instance-attribute

Any rights information for this resource

sizes = None class-attribute instance-attribute

Size (e.g., bytes, pages, inches, etc.) or duration (extent), e.g., hours, minutes, days, etc., of a resource.

subjects = None class-attribute instance-attribute

Subjects, keywords, classification codes, or key phrases describing the resource.

suffix = None class-attribute instance-attribute

The suffix portion of the DOI

titles instance-attribute

Names or titles by which a resource is known. May be the title of a dataset or the name of a piece of software or an instrument.

version = None class-attribute instance-attribute

The version number of the resources.

DataCiteMetadata46

Bases: BaseModel

DataCite Metadata Schema

Source code in src/cwl2datacite/datacite_4_6_models.py
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
class DataCiteMetadata46(BaseModel):
    """
    DataCite Metadata Schema
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    data: Data

Date

Bases: BaseModel

Date relevant to the work.

Source code in src/cwl2datacite/datacite_4_6_models.py
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
class Date(BaseModel):
    """
    Date relevant to the work.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    date: date_aliased
    """
    Date relevant to the work.
    """
    date_type: Annotated[DateType, Field(alias="dateType")]
    """
    The type of date
    """
    date_information: Annotated[str | None, Field(alias="dateInformation")] = None
    """
    Specific information about the date, if appropriate.
    """

date instance-attribute

Date relevant to the work.

date_information = None class-attribute instance-attribute

Specific information about the date, if appropriate.

date_type instance-attribute

The type of date

DateType

Bases: Enum

The type of date

Source code in src/cwl2datacite/datacite_4_6_models.py
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
class DateType(Enum):
    """
    The type of date
    """

    ACCEPTED = "Accepted"
    AVAILABLE = "Available"
    COPYRIGHTED = "Copyrighted"
    COLLECTED = "Collected"
    COVERAGE = "Coverage"
    CREATED = "Created"
    ISSUED = "Issued"
    SUBMITTED = "Submitted"
    UPDATED = "Updated"
    VALID = "Valid"
    WITHDRAWN = "Withdrawn"
    OTHER = "Other"

Description

Bases: BaseModel

All additional information that does not fit in any of the other categories.

Source code in src/cwl2datacite/datacite_4_6_models.py
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
class Description(BaseModel):
    """
    All additional information that does not fit in any of the other categories.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    description: str
    """
    All additional information that does not fit in any of the other categories.
    """
    description_type: Annotated[DescriptionType, Field(alias="descriptionType")]
    """
    The type of the Description.
    """

description instance-attribute

All additional information that does not fit in any of the other categories.

description_type instance-attribute

The type of the Description.

DescriptionType

Bases: Enum

The type of the Description.

Source code in src/cwl2datacite/datacite_4_6_models.py
528
529
530
531
532
533
534
535
536
537
538
class DescriptionType(Enum):
    """
    The type of the Description.
    """

    ABSTRACT = "Abstract"
    METHODS = "Methods"
    SERIES_INFORMATION = "SeriesInformation"
    TABLE_OF_CONTENTS = "TableOfContents"
    TECHNICAL_INFO = "TechnicalInfo"
    OTHER = "Other"

Event

Bases: Enum

Indicates a state-change action for the DOI

Source code in src/cwl2datacite/datacite_4_6_models.py
801
802
803
804
805
806
807
808
class Event(Enum):
    """
    Indicates a state-change action for the DOI
    """

    PUBLISH = "publish"
    REGISTER = "register"
    HIDE = "hide"

FunderIdentifierType

Bases: Enum

The type of the funderIdentifier.

Source code in src/cwl2datacite/datacite_4_6_models.py
647
648
649
650
651
652
653
654
655
656
class FunderIdentifierType(Enum):
    """
    The type of the funderIdentifier.
    """

    CROSSREF_FUNDER_ID = "Crossref Funder ID"
    GRID = "GRID"
    ISNI = "ISNI"
    ROR = "ROR"
    OTHER = "Other"

FundingReference

Bases: BaseModel

Information about financial support (funding) for the resource being registered.

Source code in src/cwl2datacite/datacite_4_6_models.py
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
class FundingReference(BaseModel):
    """
    Information about financial support (funding) for the resource being registered.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    funder_name: Annotated[str, Field(alias="funderName")]
    """
    Name of the funding provider.
    """
    funder_identifier: Annotated[str | None, Field(alias="funderIdentifier")] = None
    """
    Uniquely identifies a funding entity, according to various types
    """
    funder_identifier_type: Annotated[
        FunderIdentifierType, Field(alias="funderIdentifierType")
    ]
    """
    The type of the funderIdentifier.
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the funder identifier scheme.
    """
    award_number: Annotated[str | None, Field(alias="awardNumber")] = None
    """
    The code assigned by the funder to a sponsored award (grant).
    """
    award_uri: Annotated[AnyUrl | None, Field(alias="awardURI")] = None
    """
    The URI leading to a page provided by the funder for more information about the award (grant).
    """
    award_title: Annotated[str | None, Field(alias="awardTitle")] = None
    """
    The human readable title or name of the award (grant).
    """

award_number = None class-attribute instance-attribute

The code assigned by the funder to a sponsored award (grant).

award_title = None class-attribute instance-attribute

The human readable title or name of the award (grant).

award_uri = None class-attribute instance-attribute

The URI leading to a page provided by the funder for more information about the award (grant).

funder_identifier = None class-attribute instance-attribute

Uniquely identifies a funding entity, according to various types

funder_identifier_type instance-attribute

The type of the funderIdentifier.

funder_name instance-attribute

Name of the funding provider.

scheme_uri = None class-attribute instance-attribute

The URI of the funder identifier scheme.

GeoLocation

Bases: BaseModel

Spatial region or named place where the data was gathered or about which the data is focused.

Source code in src/cwl2datacite/datacite_4_6_models.py
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
class GeoLocation(BaseModel):
    """
    Spatial region or named place where the data was gathered or about which the data is focused.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    geo_location_point: Annotated[
        GeoLocationPoint | None, Field(alias="geoLocationPoint")
    ] = None
    geo_location_box: Annotated[
        GeoLocationBox | None, Field(alias="geoLocationBox")
    ] = None
    geo_location_place: Annotated[str | None, Field(alias="geoLocationPlace")] = None
    """
    Description of a geographic location.
    """
    geo_location_polygon: Annotated[
        list[GeoLocationPolygon] | None, Field(alias="geoLocationPolygon", min_length=4)
    ] = None

geo_location_place = None class-attribute instance-attribute

Description of a geographic location.

GeoLocationBox

Bases: BaseModel

The spatial limits of a box.

Source code in src/cwl2datacite/datacite_4_6_models.py
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
class GeoLocationBox(BaseModel):
    """
    The spatial limits of a box.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    west_bound_longitude: Annotated[float, Field(alias="westBoundLongitude")]
    """
    Western longitudinal dimension of box.
    """
    east_bound_longitude: Annotated[float, Field(alias="eastBoundLongitude")]
    """
    Eastern longitudinal dimension of box.
    """
    south_bound_latitude: Annotated[float, Field(alias="southBoundLatitude")]
    """
    Southern latitudinal dimension of box.
    """
    north_bound_latitude: Annotated[float, Field(alias="northBoundLatitude")]
    """
    Northern latitudinal dimension of box.
    """

east_bound_longitude instance-attribute

Eastern longitudinal dimension of box.

north_bound_latitude instance-attribute

Northern latitudinal dimension of box.

south_bound_latitude instance-attribute

Southern latitudinal dimension of box.

west_bound_longitude instance-attribute

Western longitudinal dimension of box.

GeoLocationPoint

Bases: BaseModel

A point location in space.

Source code in src/cwl2datacite/datacite_4_6_models.py
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
class GeoLocationPoint(BaseModel):
    """
    A point location in space.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    point_longitude: Annotated[float, Field(alias="pointLongitude")]
    """
    Longitudinal dimension of point.
    """
    point_latitude: Annotated[float, Field(alias="pointLatitude")]
    """
    Latitudinal dimension of point.
    """

point_latitude instance-attribute

Latitudinal dimension of point.

point_longitude instance-attribute

Longitudinal dimension of point.

GeoLocationPolygon

Bases: BaseModel

A drawn polygon area, defined by a set of points and lines connecting the points in a closed chain.

Source code in src/cwl2datacite/datacite_4_6_models.py
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
class GeoLocationPolygon(BaseModel):
    """
    A drawn polygon area, defined by a set of points and lines connecting the points in a closed chain.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    polygon_point: Annotated[GeoLocationPoint | None, Field(alias="polygonPoint")] = (
        None
    )
    in_polygon_point: Annotated[
        GeoLocationPoint | None, Field(alias="inPolygonPoint")
    ] = None

Identifier

Bases: BaseModel

The Identifier is a unique string that identifies a resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
16
17
18
19
20
21
22
23
24
25
26
class Identifier(BaseModel):
    """
    The Identifier is a unique string that identifies a resource.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    identifier_type: Annotated[str, Field(alias="identifierType")] = "DOI"
    identifier: str

NameIdentifier

Bases: BaseModel

Uniquely identifies an individual or legal entity, according to various schemes.

Source code in src/cwl2datacite/datacite_4_6_models.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class NameIdentifier(BaseModel):
    """
    Uniquely identifies an individual or legal entity, according to various schemes.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    name_identifier: Annotated[str | None, Field(alias="nameIdentifier")] = None
    """
    Uniquely identifies an individual or legal entity, according to various schemes.
    """
    name_identifier_scheme: Annotated[str, Field(alias="nameIdentifierScheme")]
    """
    The name of the name identifier scheme.
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the name identifier scheme.
    """

name_identifier = None class-attribute instance-attribute

Uniquely identifies an individual or legal entity, according to various schemes.

name_identifier_scheme instance-attribute

The name of the name identifier scheme.

scheme_uri = None class-attribute instance-attribute

The URI of the name identifier scheme.

NameType

Bases: Enum

The type of name.

Source code in src/cwl2datacite/datacite_4_6_models.py
79
80
81
82
83
84
85
class NameType(Enum):
    """
    The type of name.
    """

    ORGANIZATIONAL = "Organizational"
    PERSONAL = "Personal"

NumberType

Bases: Enum

Type of the related item’s number, e.g., report number or article number.

Source code in src/cwl2datacite/datacite_4_6_models.py
783
784
785
786
787
788
789
790
791
class NumberType(Enum):
    """
    Type of the related item’s number, e.g., report number or article number.
    """

    ARTICLE = "Article"
    CHAPTER = "Chapter"
    REPORT = "Report"
    OTHER = "Other"

PublicationYear1

Bases: RootModel[str]

Source code in src/cwl2datacite/datacite_4_6_models.py
794
795
796
797
798
class PublicationYear1(RootModel[str]):
    root: Annotated[str, Field(pattern="^\\d{4}$")]
    """
    The year when the data was or will be made publicly available.
    """

root instance-attribute

The year when the data was or will be made publicly available.

Publisher

Bases: BaseModel

The name of the entity that holds, archives, publishes, prints, distributes, releases, issues, or produces the resource. This property will be used to formulate the citation, so consider the prominence of the role.

Source code in src/cwl2datacite/datacite_4_6_models.py
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
class Publisher(BaseModel):
    """
    The name of the entity that holds, archives, publishes, prints, distributes, releases, issues, or produces the resource. This property will be used to formulate the citation, so consider the prominence of the role.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    name: str
    """
    The name of the entity that holds, archives, publishes, prints, distributes, releases, issues, or produces the resource. This property will be used to formulate the citation, so consider the prominence of the role.
    """
    publisher_identifier: Annotated[str | None, Field(alias="publisherIdentifier")] = (
        None
    )
    """
    Uniquely identifies the publisher, according to various schemes.
    """
    publisher_identifier_scheme: Annotated[
        str | None, Field(alias="publisherIdentifierScheme")
    ] = None
    """
    The name of the publisher identifier scheme.
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the publisher identifier scheme.
    """
    lang: str | None = None
    """
    The language used by the Publisher.
    """

lang = None class-attribute instance-attribute

The language used by the Publisher.

name instance-attribute

The name of the entity that holds, archives, publishes, prints, distributes, releases, issues, or produces the resource. This property will be used to formulate the citation, so consider the prominence of the role.

publisher_identifier = None class-attribute instance-attribute

Uniquely identifies the publisher, according to various schemes.

publisher_identifier_scheme = None class-attribute instance-attribute

The name of the publisher identifier scheme.

scheme_uri = None class-attribute instance-attribute

The URI of the publisher identifier scheme.

RelatedIdentifier

Bases: BaseModel

Identifier of related resources.

Source code in src/cwl2datacite/datacite_4_6_models.py
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
class RelatedIdentifier(BaseModel):
    """
    Identifier of related resources.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    related_identifier: Annotated[str | None, Field(alias="relatedIdentifier")] = None
    """
    Identifier of related resources.
    """
    related_identifier_type: Annotated[
        RelatedIdentifierType | None, Field(alias="relatedIdentifierType")
    ] = None
    relation_type: Annotated[RelationType | None, Field(alias="relationType")] = None
    related_metadata_scheme: Annotated[
        str | None, Field(alias="relatedMetadataScheme")
    ] = None
    """
    The name of the schemes.
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the name identifier scheme.
    """
    scheme_type: Annotated[str | None, Field(alias="schemeType")] = None
    """
    The type of the relatedMetadataScheme, linked with the schemeURI
    """
    resource_type_general: Annotated[
        ResourceTypeGeneral | None, Field(alias="resourceTypeGeneral")
    ] = None

related_identifier = None class-attribute instance-attribute

Identifier of related resources.

related_metadata_scheme = None class-attribute instance-attribute

The name of the schemes.

scheme_type = None class-attribute instance-attribute

The type of the relatedMetadataScheme, linked with the schemeURI

scheme_uri = None class-attribute instance-attribute

The URI of the name identifier scheme.

RelatedIdentifierType

Bases: Enum

The type of the RelatedIdentifier.

Source code in src/cwl2datacite/datacite_4_6_models.py
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
class RelatedIdentifierType(Enum):
    """
    The type of the RelatedIdentifier.
    """

    ARK = "ARK"
    AR_XIV = "arXiv"
    BIBCODE = "bibcode"
    CSTR = "CSTR"
    DOI = "DOI"
    EAN13 = "EAN13"
    EISSN = "EISSN"
    HANDLE = "Handle"
    IGSN = "IGSN"
    ISBN = "ISBN"
    ISSN = "ISSN"
    ISTC = "ISTC"
    LISSN = "LISSN"
    LSID = "LSID"
    PMID = "PMID"
    PURL = "PURL"
    RRID = "RRID"
    UPC = "UPC"
    URL = "URL"
    URN = "URN"
    W3ID = "w3id"

RelatedItem

Bases: BaseModel

Information about a resource related to the one being registered.

Source code in src/cwl2datacite/datacite_4_6_models.py
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
class RelatedItem(BaseModel):
    """
    Information about a resource related to the one being registered.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    related_item_type: Annotated[ResourceTypeGeneral, Field(alias="relatedItemType")]
    relation_type: Annotated[ResourceTypeGeneral, Field(alias="relationType")]
    related_item_identifier: Annotated[
        RelatedItemIdentifier | None, Field(alias="relatedItemIdentifier")
    ] = None
    creators: list[RelatedItemCreator] | None = None
    """
    The institution or person responsible for creating the related resource.
    """
    titles: Annotated[list[RelatedItemTitle], Field(min_length=1)]
    """
    Title of the related item
    """
    publication_year: Annotated[
        int | PublicationYear1 | None, Field(alias="publicationYear")
    ] = None
    """
    The year when the data was or will be made publicly available.
    """
    volume: str | None = None
    """
    Volume of the related item.
    """
    issue: str | None = None
    """
    Issue number or name of the related item.
    """
    number: str | None = None
    """
    Number of the resource within the related item, e.g., report number or article number.
    """
    number_type: Annotated[NumberType | None, Field(alias="numberType")] = None
    """
    Type of the related item’s number, e.g., report number or article number.
    """
    first_page: Annotated[str | None, Field(alias="firstPage")] = None
    """
    First page of the resource within the related item, e.g., of the chapter, article, or conference paper in proceedings.
    """
    last_page: Annotated[str | None, Field(alias="lastPage")] = None
    """
    Last page of the resource within the related item, e.g., of the chapter, article, or conference paper in proceedings.
    """
    publisher: str | None = None
    """
    The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource.
    """
    edition: str | None = None
    """
    Edition or version of the related item.
    """
    contributors: list[RelatedItemContributor] | None = None
    """
    An institution or person identified as contributing to the development of the resource
    """

contributors = None class-attribute instance-attribute

An institution or person identified as contributing to the development of the resource

creators = None class-attribute instance-attribute

The institution or person responsible for creating the related resource.

edition = None class-attribute instance-attribute

Edition or version of the related item.

first_page = None class-attribute instance-attribute

First page of the resource within the related item, e.g., of the chapter, article, or conference paper in proceedings.

issue = None class-attribute instance-attribute

Issue number or name of the related item.

last_page = None class-attribute instance-attribute

Last page of the resource within the related item, e.g., of the chapter, article, or conference paper in proceedings.

number = None class-attribute instance-attribute

Number of the resource within the related item, e.g., report number or article number.

number_type = None class-attribute instance-attribute

Type of the related item’s number, e.g., report number or article number.

publication_year = None class-attribute instance-attribute

The year when the data was or will be made publicly available.

publisher = None class-attribute instance-attribute

The name of the entity that holds, archives, publishes prints, distributes, releases, issues, or produces the resource.

titles instance-attribute

Title of the related item

volume = None class-attribute instance-attribute

Volume of the related item.

RelatedItemContributor

Bases: RelatedItemCreator

An institution or person identified as contributing to the development of the resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
771
772
773
774
775
776
777
778
779
780
class RelatedItemContributor(RelatedItemCreator):
    """
    An institution or person identified as contributing to the development of the resource.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    contributor_type: Annotated[ContributorType, Field(alias="contributorType")]

RelatedItemCreator

Bases: BaseModel

The institution or person responsible for creating the related resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
class RelatedItemCreator(BaseModel):
    """
    The institution or person responsible for creating the related resource.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    name: str
    """
    The full name of the related item creator
    """
    name_type: Annotated[NameType | None, Field(alias="nameType")] = None
    given_name: Annotated[str | None, Field(alias="givenName")] = None
    """
    The personal or first name of the creator.
    """
    family_name: Annotated[str | None, Field(alias="familyName")] = None
    """
    The surname or last name of the creator.
    """

family_name = None class-attribute instance-attribute

The surname or last name of the creator.

given_name = None class-attribute instance-attribute

The personal or first name of the creator.

name instance-attribute

The full name of the related item creator

RelatedItemIdentifier

Bases: BaseModel

The identifier for the related item.

Source code in src/cwl2datacite/datacite_4_6_models.py
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
class RelatedItemIdentifier(BaseModel):
    """
    The identifier for the related item.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    related_item_identifier_type: Annotated[
        RelatedIdentifierType | None, Field(alias="relatedItemIdentifierType")
    ] = None
    related_metadata_scheme: Annotated[
        str | None, Field(alias="relatedMetadataScheme")
    ] = None
    """
    The name of the schemes.
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the name identifier scheme.
    """
    scheme_type: Annotated[str | None, Field(alias="schemeType")] = None
    """
    The type of the relatedMetadataScheme, linked with the schemeURI
    """

related_metadata_scheme = None class-attribute instance-attribute

The name of the schemes.

scheme_type = None class-attribute instance-attribute

The type of the relatedMetadataScheme, linked with the schemeURI

scheme_uri = None class-attribute instance-attribute

The URI of the name identifier scheme.

RelatedItemTitle

Bases: BaseModel

Title of the related item.

Source code in src/cwl2datacite/datacite_4_6_models.py
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
class RelatedItemTitle(BaseModel):
    """
    Title of the related item.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    title: str
    """
    Title of the related item.
    """
    title_type: Annotated[str | None, Field(alias="titleType")] = None
    """
    Type of the related item title.
    """

title instance-attribute

Title of the related item.

title_type = None class-attribute instance-attribute

Type of the related item title.

RelationType

Bases: Enum

Description of the relationship of the resource being registered (A) and the related resource (B).

Source code in src/cwl2datacite/datacite_4_6_models.py
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
class RelationType(Enum):
    """
    Description of the relationship of the resource being registered (A) and the related resource (B).
    """

    IS_CITED_BY = "IsCitedBy"
    CITES = "Cites"
    IS_SUPPLEMENT_TO = "IsSupplementTo"
    IS_SUPPLEMENTED_BY = "IsSupplementedBy"
    IS_CONTINUED_BY = "IsContinuedBy"
    CONTINUES = "Continues"
    IS_DESCRIBED_BY = "IsDescribedBy"
    DESCRIBES = "Describes"
    HAS_METADATA = "HasMetadata"
    IS_METADATA_FOR = "IsMetadataFor"
    HAS_VERSION = "HasVersion"
    IS_VERSION_OF = "IsVersionOf"
    IS_NEW_VERSION_OF = "IsNewVersionOf"
    IS_PREVIOUS_VERSION_OF = "IsPreviousVersionOf"
    IS_PART_OF = "IsPartOf"
    HAS_PART = "HasPart"
    IS_PUBLISHED_IN = "IsPublishedIn"
    IS_REFERENCED_BY = "IsReferencedBy"
    REFERENCES = "References"
    IS_DOCUMENTED_BY = "IsDocumentedBy"
    DOCUMENTS = "Documents"
    IS_COMPILED_BY = "IsCompiledBy"
    COMPILES = "Compiles"
    IS_VARIANT_FORM_OF = "IsVariantFormOf"
    IS_ORIGINAL_FORM_OF = "IsOriginalFormOf"
    IS_IDENTICAL_TO = "IsIdenticalTo"
    IS_REVIEWED_BY = "IsReviewedBy"
    REVIEWS = "Reviews"
    IS_DERIVED_FROM = "IsDerivedFrom"
    IS_SOURCE_OF = "IsSourceOf"
    IS_REQUIRED_BY = "IsRequiredBy"
    REQUIRES = "Requires"
    IS_OBSOLETED_BY = "IsObsoletedBy"
    OBSOLETES = "Obsoletes"
    IS_COLLECTED_BY = "IsCollectedBy"
    COLLECTS = "Collects"
    IS_TRANSLATION_OF = "IsTranslationOf"
    HAS_TRANSLATION = "HasTranslation"

ResourceType

Bases: BaseModel

A description of the resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
class ResourceType(BaseModel):
    """
    A description of the resource.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    resource_type: Annotated[str, Field(alias="resourceType")]
    """
    A description of the resource.
    """
    resource_type_general: Annotated[
        ResourceTypeGeneral, Field(alias="resourceTypeGeneral")
    ]

resource_type instance-attribute

A description of the resource.

ResourceTypeGeneral

Bases: Enum

The general type of a resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
class ResourceTypeGeneral(Enum):
    """
    The general type of a resource.
    """

    AUDIOVISUAL = "Audiovisual"
    AWARD = "Award"
    BOOK = "Book"
    BOOK_CHAPTER = "BookChapter"
    COLLECTION = "Collection"
    COMPUTATIONAL_NOTEBOOK = "ComputationalNotebook"
    CONFERENCE_PAPER = "ConferencePaper"
    CONFERENCE_PROCEEDING = "ConferenceProceeding"
    DATA_PAPER = "DataPaper"
    DATASET = "Dataset"
    DISSERTATION = "Dissertation"
    EVENT = "Event"
    IMAGE = "Image"
    INTERACTIVE_RESOURCE = "InteractiveResource"
    INSTRUMENT = "Instrument"
    JOURNAL = "Journal"
    JOURNAL_ARTICLE = "JournalArticle"
    MODEL = "Model"
    OUTPUT_MANAGEMENT_PLAN = "OutputManagementPlan"
    PEER_REVIEW = "PeerReview"
    PHYSICAL_OBJECT = "PhysicalObject"
    PREPRINT = "Preprint"
    PROJECT = "Project"
    REPORT = "Report"
    SERVICE = "Service"
    SOFTWARE = "Software"
    SOUND = "Sound"
    STANDARD = "Standard"
    STUDY_REGISTRATION = "StudyRegistration"
    TEXT = "Text"
    WORKFLOW = "Workflow"
    OTHER = "Other"

Right

Bases: BaseModel

Any right information for this resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
class Right(BaseModel):
    """
    Any right information for this resource.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    rights: str
    """
    Any right information for this resource.
    """
    rights_uri: Annotated[AnyUrl | None, Field(alias="rightsURI")] = None
    """
    The URI of the license.
    """
    rights_identifier: Annotated[str | None, Field(alias="rightsIdentifier")] = None
    """
    A short, standardized version of the license name.
    """
    rights_identifier_scheme: Annotated[
        str | None, Field(alias="rightsIdentifierScheme")
    ] = None
    """
    The name of the scheme.
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the rightsIdentifierScheme.
    """

rights instance-attribute

Any right information for this resource.

rights_identifier = None class-attribute instance-attribute

A short, standardized version of the license name.

rights_identifier_scheme = None class-attribute instance-attribute

The name of the scheme.

rights_uri = None class-attribute instance-attribute

The URI of the license.

scheme_uri = None class-attribute instance-attribute

The URI of the rightsIdentifierScheme.

Subject

Bases: BaseModel

Subject, keyword, classification code, or key phrase describing the resource.

Source code in src/cwl2datacite/datacite_4_6_models.py
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
class Subject(BaseModel):
    """
    Subject, keyword, classification code, or key phrase describing the resource.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    subject: str
    """
    Subject, keyword, classification code, or key phrase describing the resource.
    """
    subject_scheme: Annotated[str | None, Field(alias="subjectScheme")] = None
    """
    The name of the subject scheme or classification code or authority if one is used.
    """
    scheme_uri: Annotated[AnyUrl | None, Field(alias="schemeURI")] = None
    """
    The URI of the subject identifier scheme.
    """
    value_uri: Annotated[AnyUrl | None, Field(alias="valueURI")] = None
    """
    The URI of the subject term.
    """
    classification_code: Annotated[str | None, Field(alias="classificationCode")] = None
    """
    The classification code used for the subject term in the subject schemes.
    """
    lang: str | None = None
    """
    The language used in the Subject.
    """

classification_code = None class-attribute instance-attribute

The classification code used for the subject term in the subject schemes.

lang = None class-attribute instance-attribute

The language used in the Subject.

scheme_uri = None class-attribute instance-attribute

The URI of the subject identifier scheme.

subject instance-attribute

Subject, keyword, classification code, or key phrase describing the resource.

subject_scheme = None class-attribute instance-attribute

The name of the subject scheme or classification code or authority if one is used.

value_uri = None class-attribute instance-attribute

The URI of the subject term.

Title

Bases: BaseModel

A name or title by which a resource is known. May be the title of a dataset or the name of a piece of software or an instrument.

Source code in src/cwl2datacite/datacite_4_6_models.py
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
class Title(BaseModel):
    """
    A name or title by which a resource is known. May be the title of a dataset or the name of a piece of software or an instrument.
    """

    model_config = ConfigDict(
        extra="allow",
        populate_by_name=True,
    )
    title: str
    """
    A name or title by which a resource is known
    """
    lang: str | None = None
    """
    The languages of the title.
    """
    title_type: Annotated[TitleType | None, Field(alias="titleType")] = None
    """
    The type of Title (other than the Main Title).
    """

lang = None class-attribute instance-attribute

The languages of the title.

title instance-attribute

A name or title by which a resource is known

title_type = None class-attribute instance-attribute

The type of Title (other than the Main Title).

TitleType

Bases: Enum

The type of Title (other than the Main Title).

Source code in src/cwl2datacite/datacite_4_6_models.py
122
123
124
125
126
127
128
129
130
class TitleType(Enum):
    """
    The type of Title (other than the Main Title).
    """

    ALTERNATIVE_TITLE = "AlternativeTitle"
    SUBTITLE = "Subtitle"
    TRANSLATED_TITLE = "TranslatedTitle"
    OTHER = "Other"