Collection
- pydantic model Collection[source]
A collection of resources.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "Collection", "description": "A collection of resources.", "type": "object", "properties": { "identifier": { "description": "The collection's identifier", "title": "Identifier", "type": "string" }, "name": { "description": "The name of the collection", "title": "Name", "type": "string" }, "description": { "description": "A description of the collection", "title": "Description", "type": "string" }, "resources": { "description": "A list of prefixes of resources appearing in the collection", "items": { "type": "string" }, "title": "Resources", "type": "array" }, "authors": { "description": "A list of authors/contributors to the collection", "items": { "$ref": "#/$defs/Author" }, "title": "Authors", "type": "array" }, "context": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The JSON-LD context's name", "title": "Context" }, "references": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "URL references", "title": "References" } }, "$defs": { "Author": { "description": "Metadata for an author.", "properties": { "name": { "description": "The full name of the researcher", "title": "Name", "type": "string" }, "orcid": { "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.", "pattern": "^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$", "title": "Open Researcher and Contributor Identifier", "type": "string" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The email address specific to the researcher.", "title": "Email address" }, "github": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.", "title": "GitHub handle" } }, "required": [ "name", "orcid" ], "title": "Author", "type": "object" } }, "required": [ "identifier", "name", "description", "resources", "authors" ] }
- Fields:
- add_triples(graph: rdflib.Graph) rdflib.Graph [source]
Add triples to an RDF graph for this collection.
- Parameters:
graph – An RDF graph
- Returns:
The RDF node representing this collection using a Bioregistry IRI.