Xml utils
create_contributor(full_name=None, family_name=None, given_name=None, is_org=False, contributor_type=None, affiliations=None, identifiers=None)
ΒΆ
Create a dictionary representation of a contributing entity (either a person or an organisation) for use in an xml_dict.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
full_name |
the full name of the creator, in the format "FamilyName, GivenName"; can be omitted if family_name and given_name are provided |
None
|
|
family_name |
family name of the creator; will be ignored if given_name is None |
None
|
|
given_name |
given name(s) or initials of the creator; will be ignored if family_name is None |
None
|
|
is_org |
sets name type to Organizational if true |
False
|
|
contributor_type |
the contributor type to set |
None
|
|
affiliations |
affiliations of the contributor, either a string or list of strings |
None
|
|
identifiers |
a list of dicts with "identifier", "scheme", and (optionally) "scheme_uri" |
None
|
Returns:
Type | Description |
---|---|
a dict |
Source code in ckanext/doi/lib/xml_utils.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 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 77 78 79 |
|