diff --git a/b2share/modules/schemas/root_schemas/dtr_test extended.json b/b2share/modules/schemas/root_schemas/dtr_test extended.json new file mode 100644 index 000000000..1d723fbbf --- /dev/null +++ b/b2share/modules/schemas/root_schemas/dtr_test extended.json @@ -0,0 +1,1228 @@ +{ + "Identifier": "testing/4160ad49bc7861b2cfd3", + "name": "B2SHARE-Schema", + "description": "Schema for B2SHARE", + "provenance": { + "creationDate": "2024-02-28T12:36:37.462Z", + "lastModificationDate": "2024-03-04T12:07:35.834Z" + }, + "Schema": { + "Type": "Object", + "addProps": true, + "Properties": [ + { + "Name": "Creators", + "Description": "The full name of the creators. The personal name format should be: family, given (e.g.: Smith, John)", + "Type": { + "Identifier": "testing/029d528885a0b07166cd", + "name": "Creator", + "description": "The full name of the creators (family name and given name)", + "provenance": { + "creationDate": "2024-02-28T08:57:11.420Z", + "lastModificationDate": "2024-02-28T12:07:05.559Z" + }, + "ExpectedUse": "The personal name format should be: family, given (e.g.: Smith, John).", + "Schema": { + "Type": "String", + "Properties": [ + { + "Property": "Cardinality", + "Value": "1" + } + ] + } + }, + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Titles", + "Description": "The titles(s) of the uploaded resource, or a name by which the resource is known", + "Type": { + "Identifier": "testing/0c802e9677eb9a8d70e3", + "name": "Title_Object", + "description": "The titles(s) of the uploaded resource, or a name by which the resource is known", + "provenance": { + "creationDate": "2024-02-28T14:20:33.748Z", + "lastModificationDate": "2024-02-28T14:24:09.138Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Title description", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Title Type", + "Type": { + "Identifier": "testing/a116f7255e19431f1fbf", + "name": "Title", + "description": "The titles(s) of the uploaded resource, or a name by which the resource is known", + "provenance": { + "creationDate": "2024-02-28T12:11:56.516Z", + "lastModificationDate": "2024-02-28T12:12:14.392Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "Title", + "Alternative Title", + "Subtitle", + "TranslatedTitle", + "Other" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Publication_Date", + "Description": "The date when the data was or will be made publicly available", + "Type": { + "Identifier": "testing/4867835f437df26002f7", + "name": "Publication_Date", + "description": "The date when the data was or will be made publicly available", + "provenance": { + "creationDate": "2024-02-28T09:15:39.927Z", + "lastModificationDate": "2024-02-28T09:15:39.927Z" + }, + "ExpectedUse": "(e.g. 2018-07-13)", + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Date", + "Type": { + "Identifier": "testing/eb9a4bc1c0c153e4e4b0", + "name": "Date", + "description": "A String conforming to the date format.", + "provenance": { + "creationDate": "2024-02-28T09:13:09.933Z", + "lastModificationDate": "2024-02-28T09:13:09.933Z" + }, + "Schema": { + "Type": "String", + "Properties": [ + { + "Property": "format", + "Value": "date" + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1" + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "Community", + "Description": "The community to which the record has been submitted", + "Type": { + "Identifier": "testing/b308b0b5cbd43a24fed8", + "name": "Community_Identifier", + "description": "The community UUID", + "provenance": { + "creationDate": "2024-02-28T08:55:46.476Z", + "lastModificationDate": "2024-02-28T08:55:46.476Z" + }, + "Schema": { + "Type": "String", + "Properties": [ + { + "Property": "pattern", + "Value": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}" + }, + { + "Property": "Cardinality", + "Value": "1" + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Publication_State", + "Description": "State of the publication workflow", + "Type": { + "Identifier": "testing/2a9ef4513b3c35b7a0a3", + "name": "Publication_State", + "description": "State of the publication workflow!", + "versioning": { + "version": "1", + "previousVersion": "testing/2a9ef4513b3c35b7a0a3" + }, + "provenance": { + "creationDate": "2024-02-28T11:33:29.120Z", + "lastModificationDate": "2024-02-29T11:32:56.675Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "draft", + "submitted", + "published" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "_pid", + "Description": "Array of persistent identifiers pointing to this record", + "Type": { + "Identifier": "testing/54fd55750b19c2cf22cb", + "name": "PID-B2SHARE", + "description": "B2share Persistent IDentifiers", + "provenance": { + "creationDate": "2024-02-28T12:05:06.693Z", + "lastModificationDate": "2024-02-28T12:05:06.693Z" + }, + "Schema": { + "Type": "String", + "Properties": [ + { + "Property": "pattern", + "Value": "([A-Za-z]+([0-9]+[A-Za-z]+)+)" + }, + { + "Property": "Cardinality", + "Value": "1" + } + ] + } + }, + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "doi", + "Description": "Record Digital Object Identifier", + "Type": { + "Identifier": "testing/48ba02e08f1185e3f854", + "name": "doi_identifier", + "description": "DOI is an acronym for digital object identifier, meaning a digital identifier of an object. A DOI name is an identifier (not a location) of an entity on digital networks. It provides a system for persistent and actionable identification and interoperable exchange of managed information on digital networks. A DOI name can be assigned to any entity \u2014 physical, digital or abstract \u2014 primarily for sharing with an interested user community or managing as intellectual property. The DOI system is designed for interoperability; that is to use, or work with, existing identifier and metadata schemes. DOI names may also be expressed as URLs (URIs).", + "provenance": { + "creationDate": "2024-02-28T11:57:20.463Z", + "lastModificationDate": "2024-02-28T11:57:20.463Z" + }, + "ExpectedUse": "To be used to validate if a given identifier is of type doi", + "Schema": { + "Type": "String", + "PropRelations": "OR", + "Properties": [ + { + "Property": "pattern", + "Value": "^(d|D)(o|O)(i|I):10\\\\.\\\\d+\\\\/.+$" + }, + { + "Property": "pattern", + "Value": "10\\\\.\\\\d+\\\\/.+$" + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Alternate Identifiers", + "Description": "The alternative identifiers for this resource such as a URN, URI or an ISBN number", + "Type": { + "Identifier": "testing/5ef8102e5e7ec4824333", + "name": "Alternate_Identifier", + "description": "The alternative identifiers for this resource such as a URN, URI or an ISBN number", + "provenance": { + "creationDate": "2024-02-28T15:10:54.160Z", + "lastModificationDate": "2024-02-28T15:10:54.160Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Alternate Identifier", + "Description": "Value of the identifier", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1" + } + }, + { + "Name": "Alternate Identifier Type", + "Description": "The type of the alternate identifier", + "Type": { + "Identifier": "testing/7830b92fbbe9eb255f60", + "name": "Identifier_Type", + "description": "A collection of identifier types as enum", + "provenance": { + "creationDate": "2024-02-28T15:06:56.613Z", + "lastModificationDate": "2024-02-28T15:06:56.613Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "ARK", + "arXiv", + "bibcode", + "DOI", + "EAN13", + "EISSN", + "Handle", + "ISBN", + "ISSN", + "ISTC", + "LISSN", + "LSID", + "ORCID", + "PMID", + "PURL", + "UPC", + "URL", + "URN", + "w3id", + "RAiD" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - n", + "extractProperties": true + } + }, + { + "Name": "Related identifiers", + "Title": "Related identifiers", + "Description": "The identifiers of other resources related to the resource such as a URN, URI or an ISBN number.", + "Type": { + "Identifier": "testing/d72482f16d18ff46f8f4", + "name": "related_identifiers", + "description": "The identifiers of other resources related to the resource such as a URN, URI or an ISBN number.", + "provenance": { + "creationDate": "2024-03-04T11:19:00.139Z", + "lastModificationDate": "2024-03-04T11:19:00.139Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "related_identifier", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "resource_type_general", + "Title": "Resource type", + "Description": "The type of the resource.", + "Type": { + "Identifier": "testing/a00985b98dac27bd32f8", + "name": "resourceType", + "description": "A collection of recsource type as enum", + "provenance": { + "creationDate": "2024-03-04T09:11:44.128Z", + "lastModificationDate": "2024-03-04T09:11:44.128Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "Audiovisual", + "Book", + "BookChapter", + "Collection", + "ComputationalNotebook", + "ConferencePaper", + "ConferenceProceeding", + "DataPaper", + "Dataset", + "Dissertation", + "Event", + "Image", + "InteractiveResource", + "Journal", + "JournalArticle", + "Model", + "OutputManagementPlan", + "PeerReview", + "PhysicalObject", + "Preprint", + "Report", + "Service", + "Software", + "Sound", + "Standard", + "Text", + "Workflow", + "Other" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "related_identifier_type", + "Title": "Type", + "Description": "The type of the related identifier.", + "Type": { + "Identifier": "testing/015dc79a77940fb65aa4", + "name": "identifierType", + "description": "The type of the identifier", + "provenance": { + "creationDate": "2024-03-04T10:09:34.788Z", + "lastModificationDate": "2024-03-04T10:09:34.788Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "ARK", + "arXiv", + "bibcode", + "DOI", + "EAN13", + "EISSN", + "Handle", + "ISBN", + "ISSN", + "ISTC", + "LISSN", + "LSID", + "ORCID", + "PMID", + "PURL", + "UPC", + "URL", + "URN", + "w3id" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "relation_type", + "Title": "Relation", + "Description": "The relation type of the described reference.", + "Type": { + "Identifier": "testing/ad551d89f82cc2606790", + "name": "relation_type", + "description": "The relation type of the described reference.", + "provenance": { + "creationDate": "2024-03-04T11:16:48.993Z", + "lastModificationDate": "2024-03-04T11:16:48.993Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "IsCitedBy", + "Cites", + "IsSupplementTo", + "IsPublishedIn", + "IsSupplementedBy", + "IsContinuedBy", + "Continues", + "HasMetadata", + "IsMetadataFor", + "IsNewVersionOf", + "IsPreviousVersionOf", + "IsPartOf", + "HasPart", + "IsReferencedBy", + "References", + "IsDocumentedBy", + "Documents", + "isCompiledBy", + "Compiles", + "IsVariantFormOf", + "IsOriginalFormOf", + "IsIdenticalTo", + "IsReviewedBy", + "Reviews", + "IsDerivedFrom", + "IsSourceOf", + "Describes", + "IsDescribedBy", + "HasVersion", + "IsVersionOf", + "Requires", + "IsRequiredBy", + "Obsoletes", + "IsObsoletedBy" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - n", + "extractProperties": true + } + }, + { + "Name": "Descriptions", + "Description": "The more elaborate description of the resource. Focus on a content description that makes it easy for others to find, and to interpret its relevance.", + "Type": { + "Identifier": "testing/c0375e268cdabc613c2c", + "name": "descriptions", + "description": "\"The more elaborate description of the resource. Focus on a content description that makes it easy for others to find, and to interpret its relevance.", + "provenance": { + "creationDate": "2024-03-04T11:23:59.019Z", + "lastModificationDate": "2024-03-04T11:23:59.019Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Description", + "Description": "description of the resource", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Description Type", + "Title": "Type", + "Description": "The type of the description.", + "Type": { + "Identifier": "testing/9b955a8019f16d940419", + "name": "description_type", + "description": "The type of the description.", + "provenance": { + "creationDate": "2024-03-04T11:21:25.182Z", + "lastModificationDate": "2024-03-04T11:21:25.182Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "Abstract", + "Methods", + "SeriesInformation", + "TableOfContents", + "TechnicalInfo", + "Other" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "version", + "Title": "Version", + "Description": "The version of the resource.", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "contact_email", + "Title": "Contact email", + "Description": "The contact email information for this resource.", + "Type": { + "Identifier": "testing/a88b7dcd1a9e3e17770b", + "name": "email", + "description": "email format", + "provenance": { + "creationDate": "2024-03-04T11:27:24.961Z", + "lastModificationDate": "2024-03-04T11:27:24.961Z" + }, + "Schema": { + "Type": "String", + "Properties": [ + { + "Property": "pattern", + "Value": "^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$" + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "Open Access", + "Description": "Indicate whether the record's files are publicly accessible or not. In case of restricted access the uploaded files will only be accessible by the record's owner and the community administrators. Please note that the record's metadata is always publicly accessible", + "Type": { + "Identifier": "testing/b76ff4906f33c2dd97dd", + "name": "Boolean", + "description": "Basic boolean datatype", + "provenance": { + "creationDate": "2024-02-28T12:54:22.989Z", + "lastModificationDate": "2024-02-28T12:54:22.989Z" + }, + "Schema": { + "Type": "Boolean" + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "License", + "Title": "License", + "Description": "The license under which this data set is available to the users (e.g. GPL, Apache v2 or Commercial). Please use the License Selector for help and additional information.", + "Type": { + "Identifier": "testing/3229609e15436ec51bcf", + "name": "License", + "description": "The license under which this data set is available to the users (e.g. GPL, Apache v2 or Commercial). Please use the License Selector for help and additional information.", + "provenance": { + "creationDate": "2024-03-04T11:59:40.623Z", + "lastModificationDate": "2024-03-04T11:59:40.623Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "license", + "Title": "License", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "License URI", + "Description": "The URI pointing to the description of the license", + "Type": { + "Identifier": "testing/002d07c990a81dff6533", + "name": "license_uri", + "description": "The URI pointing to the description of the license", + "provenance": { + "creationDate": "2024-03-04T11:57:49.479Z", + "lastModificationDate": "2024-03-04T11:57:49.479Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "License URI", + "Title": "License URI", + "Type": "test/cb371c93c5aa0e62198e", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "license_identifier", + "Title": "Identifier", + "Description": "The unique identifier of the license, according to various identifier schemes.", + "Type": { + "Identifier": "testing/2b9c4b1f6d2cdbdcb4a3", + "name": "license_identifier", + "description": "The unique identifier of the license, according to various identifier schemes.", + "provenance": { + "creationDate": "2024-03-04T11:56:48.355Z", + "lastModificationDate": "2024-03-04T11:56:48.355Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Publisher", + "Description": "The entity responsible for making the resource available, either a person, an organization, or a service.", + "Type": { + "Identifier": "testing/61d70d6e8feec4a24094", + "name": "Publisher", + "description": "The entity responsible for making the resource available, either a person, an organization, or a service.", + "provenance": { + "creationDate": "2024-03-04T09:04:50.733Z", + "lastModificationDate": "2024-03-04T09:04:50.733Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Publisher", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "0 - 1" + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1" + } + }, + { + "Name": "Affiliation", + "Description": "Info about the affiliation", + "Type": { + "Identifier": "testing/f601974c56eef3d7a40a", + "name": "affiliation", + "description": "Info about the affiliation", + "provenance": { + "creationDate": "2024-03-04T09:20:07.486Z", + "lastModificationDate": "2024-03-04T09:20:07.486Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Affiliation Name", + "Description": "The name of the affiliation", + "Type": { + "Identifier": "testing/0a266ecb9defdbfb5088", + "name": "affiliation_name", + "description": "The name of the affiliation.", + "provenance": { + "creationDate": "2024-03-04T09:17:29.366Z", + "lastModificationDate": "2024-03-04T09:17:29.366Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "1" + } + }, + { + "Name": "Affiliation Identifier", + "Description": "The unique identifier of the affiliation", + "Type": { + "Identifier": "testing/9c87b5a46c221dab8f7c", + "name": "affiliation_identifier", + "description": "The unique identifier of the affiliation.", + "provenance": { + "creationDate": "2024-03-04T09:17:56.138Z", + "lastModificationDate": "2024-03-04T09:17:56.138Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "0 - 1" + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1" + } + }, + { + "Name": "Person", + "Description": "Person object, could be a person or an organization", + "Type": { + "Identifier": "testing/8c41ae88467fe5bbad09", + "name": "Person", + "description": "Person object, could be a person or an organization", + "provenance": { + "creationDate": "2024-03-04T09:29:23.109Z", + "lastModificationDate": "2024-03-04T09:29:23.109Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Given name", + "Type": { + "Identifier": "testing/ab19585506d14c74e3df", + "name": "given_name", + "description": "The first names given to this entity.", + "provenance": { + "creationDate": "2024-03-04T09:22:36.646Z", + "lastModificationDate": "2024-03-04T09:22:36.646Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "Family Name", + "Type": { + "Identifier": "testing/cb945a35616939076926", + "name": "family_name", + "description": "The family names given to this entity.", + "provenance": { + "creationDate": "2024-03-04T09:22:49.885Z", + "lastModificationDate": "2024-03-04T09:22:49.885Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "Affiliations", + "Type": { + "Identifier": "testing/f601974c56eef3d7a40a", + "name": "affiliation", + "description": "Info about the affiliation", + "provenance": { + "creationDate": "2024-03-04T09:20:07.486Z", + "lastModificationDate": "2024-03-04T09:20:07.486Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Affiliation Name", + "Description": "The name of the affiliation", + "Type": { + "Identifier": "testing/0a266ecb9defdbfb5088", + "name": "affiliation_name", + "description": "The name of the affiliation.", + "provenance": { + "creationDate": "2024-03-04T09:17:29.366Z", + "lastModificationDate": "2024-03-04T09:17:29.366Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "1" + } + }, + { + "Name": "Affiliation Identifier", + "Description": "The unique identifier of the affiliation", + "Type": { + "Identifier": "testing/9c87b5a46c221dab8f7c", + "name": "affiliation_identifier", + "description": "The unique identifier of the affiliation.", + "provenance": { + "creationDate": "2024-03-04T09:17:56.138Z", + "lastModificationDate": "2024-03-04T09:17:56.138Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "0 - 1" + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - n", + "extractProperties": true + } + }, + { + "Name": "Name Type", + "Type": { + "Identifier": "testing/7e7decb6615dcf273716", + "name": "name_type", + "description": "The type of name described.", + "provenance": { + "creationDate": "2024-03-04T09:23:24.075Z", + "lastModificationDate": "2024-03-04T09:23:24.075Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "Personal", + "Organizational" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "Name Identifiers", + "Type": { + "Identifier": "testing/33a37512006c777750ad", + "name": "name_identifiers", + "description": "The identifiers that point to any information about this creator.", + "provenance": { + "creationDate": "2024-03-04T09:25:58.608Z", + "lastModificationDate": "2024-03-04T09:25:58.608Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Name identifiers", + "Description": "The identifiers that point to any information about this creator", + "Type": { + "Identifier": "testing/45ed2476d08239120522", + "name": "nameIdentifier", + "description": "The unique identifier of the entity, according to various identifier schemes", + "provenance": { + "creationDate": "2024-03-04T09:16:46.736Z", + "lastModificationDate": "2024-03-04T09:16:46.736Z" + }, + "Schema": { + "Type": "String", + "Properties": [ + { + "Property": "Cardinality", + "Value": "1" + } + ] + } + }, + "Properties": { + "Cardinality": "1" + } + }, + { + "Name": "Schema", + "Description": "The scheme used for the identifier.", + "Type": { + "Identifier": "testing/9a9e56edb7dc61cd92ec", + "name": "scheme", + "description": "The scheme used for the identifier.", + "provenance": { + "creationDate": "2024-03-04T09:24:11.935Z", + "lastModificationDate": "2024-03-04T09:24:11.935Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "1" + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - n" + } + } + ] + } + }, + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Resource type", + "Title": "Resource type", + "Type": "resource_types", + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Instruments", + "Description": "The scientific instruments the data was generated or captured on.", + "Type": { + "Identifier": "testing/46c5d55712cb30bbaaa9", + "name": "Instruments", + "description": "The scientific instruments the data was generated or captured on.", + "provenance": { + "creationDate": "2024-03-04T10:10:08.633Z", + "lastModificationDate": "2024-03-04T10:10:08.633Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "Instrument_name", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "instrument_identifier", + "Description": "The unique identifier of the instrument.", + "Type": { + "Identifier": "testing/ae44e000c21d8029fd56", + "name": "instrument_identifier", + "description": "The unique identifier of the instrument.", + "provenance": { + "creationDate": "2024-03-04T10:05:20.185Z", + "lastModificationDate": "2024-03-04T10:05:20.185Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "instrument_identifier_type", + "Description": "The type of the unique identifier of the instrument.", + "Type": { + "Identifier": "testing/015dc79a77940fb65aa4", + "name": "identifierType", + "description": "The type of the identifier", + "provenance": { + "creationDate": "2024-03-04T10:09:34.788Z", + "lastModificationDate": "2024-03-04T10:09:34.788Z" + }, + "Schema": { + "Type": "Enum", + "Properties": [ + { + "Property": "String Enum", + "Value": [ + "ARK", + "arXiv", + "bibcode", + "DOI", + "EAN13", + "EISSN", + "Handle", + "ISBN", + "ISSN", + "ISTC", + "LISSN", + "LSID", + "ORCID", + "PMID", + "PURL", + "UPC", + "URL", + "URN", + "w3id" + ] + } + ] + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "0 - n", + "extractProperties": true + } + }, + { + "Name": "Disciplines", + "Description": "The scientific disciplines linked with the resource.", + "Type": { + "Identifier": "testing/7497c705e58596241ccd", + "name": "disciplines", + "description": "The scientific disciplines linked with the resource.", + "provenance": { + "creationDate": "2024-03-04T10:17:19.490Z", + "lastModificationDate": "2024-03-04T10:17:19.490Z" + }, + "Schema": { + "Type": "Object", + "Properties": [ + { + "Name": "discipline_name", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Identifier", + "Description": "The unique identifier of the discipline, according to various identifier schemes", + "Type": { + "Identifier": "testing/f90a2c793c039d5e966b", + "name": "discipline_identifier", + "description": "The unique identifier of the discipline, according to various identifier schemes.", + "provenance": { + "creationDate": "2024-03-04T10:15:17.717Z", + "lastModificationDate": "2024-03-04T10:15:17.717Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "classification_code", + "Description": "The corresponding classification code of the discipline, according to various identifier schemes.", + "Type": { + "Identifier": "testing/ab7416842fbdc5ab3547", + "name": "classification_code", + "description": "The corresponding classification code of the discipline, according to various identifier schemes.", + "provenance": { + "creationDate": "2024-03-04T10:15:32.712Z", + "lastModificationDate": "2024-03-04T10:15:32.712Z" + }, + "Schema": { + "Type": "String" + } + }, + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + } + ] + } + }, + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + } + ] + } +} diff --git a/b2share/modules/schemas/root_schemas/dtr_test.json b/b2share/modules/schemas/root_schemas/dtr_test.json new file mode 100644 index 000000000..256c773f0 --- /dev/null +++ b/b2share/modules/schemas/root_schemas/dtr_test.json @@ -0,0 +1,197 @@ +{ + "Identifier": "testing/4160ad49bc7861b2cfd3", + "name": "B2SHARE-Schema", + "description": "Schema for B2SHARE", + "provenance": { + "creationDate": "2024-02-28T12:36:37.462Z", + "lastModificationDate": "2024-03-04T12:07:35.834Z" + }, + "Schema": { + "Type": "Object", + "addProps": true, + "Properties": [ + { + "Name": "Creators", + "Description": "The full name of the creators. The personal name format should be: family, given (e.g.: Smith, John)", + "Type": "testing/029d528885a0b07166cd", + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Titles", + "Description": "The titles(s) of the uploaded resource, or a name by which the resource is known", + "Type": "testing/0c802e9677eb9a8d70e3", + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Publication_Date", + "Description": "The date when the data was or will be made publicly available", + "Type": "testing/4867835f437df26002f7", + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "Community", + "Description": "The community to which the record has been submitted", + "Type": "testing/b308b0b5cbd43a24fed8", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Publication_State", + "Description": "State of the publication workflow", + "Type": "testing/2a9ef4513b3c35b7a0a3", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "_pid", + "Description": "Array of persistent identifiers pointing to this record", + "Type": "testing/54fd55750b19c2cf22cb", + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "doi", + "Description": "Record Digital Object Identifier", + "Type": "testing/48ba02e08f1185e3f854", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Alternate Identifiers", + "Description": "The alternative identifiers for this resource such as a URN, URI or an ISBN number", + "Type": "testing/5ef8102e5e7ec4824333", + "Properties": { + "Cardinality": "0 - n", + "extractProperties": true + } + }, + { + "Name": "Related identifiers", + "Title": "Related identifiers", + "Description": "The identifiers of other resources related to the resource such as a URN, URI or an ISBN number.", + "Type": "testing/d72482f16d18ff46f8f4", + "Properties": { + "Cardinality": "0 - n", + "extractProperties": true + } + }, + { + "Name": "Descriptions", + "Description": "The more elaborate description of the resource. Focus on a content description that makes it easy for others to find, and to interpret its relevance.", + "Type": "testing/c0375e268cdabc613c2c", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "version", + "Title": "Version", + "Description": "The version of the resource.", + "Type": "test/3df63b7acb0522da685d", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "contact_email", + "Title": "Contact email", + "Description": "The contact email information for this resource.", + "Type": "testing/a88b7dcd1a9e3e17770b", + "Properties": { + "Cardinality": "0 - 1", + "extractProperties": true + } + }, + { + "Name": "Open Access", + "Description": "Indicate whether the record's files are publicly accessible or not. In case of restricted access the uploaded files will only be accessible by the record's owner and the community administrators. Please note that the record's metadata is always publicly accessible", + "Type": "testing/b76ff4906f33c2dd97dd", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "License", + "Title": "License", + "Description": "The license under which this data set is available to the users (e.g. GPL, Apache v2 or Commercial). Please use the License Selector for help and additional information.", + "Type": "testing/3229609e15436ec51bcf", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + }, + { + "Name": "Publisher", + "Description": "The entity responsible for making the resource available, either a person, an organization, or a service.", + "Type": "testing/61d70d6e8feec4a24094", + "Properties": { + "Cardinality": "0 - 1" + } + }, + { + "Name": "Affiliation", + "Description": "Info about the affiliation", + "Type": "testing/f601974c56eef3d7a40a", + "Properties": { + "Cardinality": "0 - 1" + } + }, + { + "Name": "Person", + "Description": "Person object, could be a person or an organization", + "Type": "testing/8c41ae88467fe5bbad09", + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Resource type", + "Title": "Resource type", + "Type": "resource_types", + "Properties": { + "Cardinality": "1 - n", + "extractProperties": true + } + }, + { + "Name": "Instruments", + "Description": "The scientific instruments the data was generated or captured on.", + "Type": "testing/46c5d55712cb30bbaaa9", + "Properties": { + "Cardinality": "0 - n", + "extractProperties": true + } + }, + { + "Name": "Disciplines", + "Description": "The scientific disciplines linked with the resource.", + "Type": "testing/7497c705e58596241ccd", + "Properties": { + "Cardinality": "1", + "extractProperties": true + } + } + ] + } +} diff --git a/b2share/modules/schemas/root_schemas/resolve_schema.py b/b2share/modules/schemas/root_schemas/resolve_schema.py new file mode 100644 index 000000000..490507e09 --- /dev/null +++ b/b2share/modules/schemas/root_schemas/resolve_schema.py @@ -0,0 +1,26 @@ +import requests +import json +import os + +# Step 1: Fetch the JSON file from the HTTPS link +url = "https://dtr-playground.pidconsortium.eu/objects/testing/4160ad49bc7861b2cfd3" +response = requests.get(url) +data = response.json() + +def fetch_type_info(data): + if data.get("Schema", None) is not None: + if data["Schema"].get("Properties", None) is not None: + for item in data["Schema"]["Properties"]: + if item.get("Type", None) is not None: + link=item.get("Type") + if "testing/" in item.get("Type"): + print("\"{}\": \"{}\"".format(item.get("Name"),"https://dtr-playground.pidconsortium.eu/#objects/"+item.get("Type"))) + content_response = requests.get("https://dtr-playground.pidconsortium.eu/objects/"+link) + item['Type']=fetch_type_info(content_response.json()) + return data + +# Step 2: Iterate over each link in the JSON file and curl the content +fetch_type_info(data) + +with open(os.path.join(os.getcwd(), "b2share/modules/schemas/root_schemas", "dtr_test extended.json"), "w") as json_file: + json.dump(data, json_file, indent=4) diff --git a/b2share/modules/schemas/root_schemas/root_schema_v3_fc4e.json b/b2share/modules/schemas/root_schemas/root_schema_v3_fc4e.json new file mode 100644 index 000000000..2b9eecdc7 --- /dev/null +++ b/b2share/modules/schemas/root_schemas/root_schema_v3_fc4e.json @@ -0,0 +1,704 @@ +{ + "version": -3, + "json_schema": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "definitions": { + "nonEmptyString": { + "type": "string", + "minLength": 1 + }, + "schemeUri": { + "title": "Scheme URI", + "description": "The URI pointing to the scheme.", + "type": "string", + "format": "uri" + }, + "identifierType": { + "type": "string", + "description": "The type of the identifier.", + "enum": ["ARK", "arXiv", "bibcode", "DOI", "EAN13", "EISSN", "Handle", "ISBN", "ISSN", "ISTC", "LISSN", "LSID", "ORCID", "PMID", "PURL", "UPC", "URL", "URN", "w3id", "RAiD"] + }, + "resourceType": { + "type": "string", + "enum": ["Audiovisual", "Book", "BookChapter", "Collection", "ComputationalNotebook", "ConferencePaper", "ConferenceProceeding", "DataPaper", "Dataset", "Dissertation", "Event", "Image", "InteractiveResource", "Journal", "JournalArticle", "Model", "OutputManagementPlan", "PeerReview", "PhysicalObject", "Preprint", "Report", "Service", "Software", "Sound", "Standard", "Text", "Workflow", "Other"] + }, + "funderIdentifierType": { + "type": "string", + "enum": ["ISNI", "GRID", "ROR", "Crossref Funder ID", "Other"] + }, + "scheme": { + "scheme": { + "title": "Scheme", + "description": "The scheme used for the identifier.", + "type": "string" + } + }, + "schemeWithUri": { + "$ref": "#/definitions/scheme", + "scheme_uri": { + "$ref": "#/definitions/schemeUri" + } + }, + "nameIdentifier": { + "name_identifier": { + "description": "The unique identifier of the entity, according to various identifier schemes.", + "$ref": "#/definitions/nonEmptyString" + }, + "$ref": "#/definitions/schemeWithUri" + }, + "affiliation": { + "affiliation_name": { + "description": "The name of the affiliation.", + "$ref": "#/definitions/nonEmptyString" + }, + "affiliation_identifier": { + "title": "Identifier", + "type": "string", + "description": "The unique identifier of the affiliation." + }, + "$ref": "#/definitions/scheme" + }, + "person": { + "given_name": { + "title": "Given name", + "description": "The first names given to this entity.", + "type": "string" + }, + "family_name": { + "title": "Family name", + "description": "The family names given to this entity.", + "type": "string" + }, + "affiliations": { + "type": "array", + "title": "Affiliations", + "description": "The organisations or entities this entity is affiliated with.", + "items": { + "type": "object", + "properties": { + "$ref": "#/definitions/affiliation" + }, + "required": ["affiliation_name"] + }, + "uniqueItems": true + }, + "name_type": { + "title": "Name type", + "description": "The type of name described.", + "type": "string", + "enum": ["Personal", "Organizational"] + }, + "name_identifiers": { + "title": "Name identifiers", + "description": "The identifiers that point to any information about this creator.", + "type": "array", + "items": { + "type": "object", + "properties": { + "$ref": "#/definitions/nameIdentifier" + }, + "required": ["name_identifier", "scheme"] + }, + "uniqueItems": true + } + }, + "spatialCoveragePlace": { + "type": "string", + "description": "The name of a place or location." + }, + "spatialCoveragePoint": { + "type": "object", + "properties": { + "point_longitude": { + "title": "Longitude", + "description": "The longitude of the point.", + "$ref": "#/definitions/longitude" + }, + "point_latitude": { + "title": "Latitude", + "description": "The latitude of the point.", + "$ref": "#/definitions/latitude" + } + }, + "required": ["point_longitude", "point_latitude"] + }, + "spatialCoverageBox": { + "type": "object", + "properties": { + "westbound_longitude": { + "title": "Westbound longitude", + "description": "The westbound longitude of the enclosing box.", + "$ref": "#/definitions/longitude" + }, + "eastbound_longitude": { + "title": "Eastbound longitude", + "description": "The eastbound longitude of the enclosing box.", + "$ref": "#/definitions/longitude" + }, + "northbound_latitude": { + "title": "Northbound latitude", + "description": "The northbound latitude of the enclosing box.", + "$ref": "#/definitions/latitude" + }, + "southbound_latitude": { + "title": "Southbound latitude", + "description": "The southbound latitude of the enclosing box.", + "$ref": "#/definitions/latitude" + } + }, + "required": ["westbound_longitude", "eastbound_longitude", "northbound_latitude", "southbound_latitude"] + }, + "temporalCoverageStartEndDate": { + "type": "object", + "properties": { + "start_date": { + "title": "Start date", + "description": "The start date and time of the range covered by the resource.", + "type": "string", + "format": "date-time" + }, + "end_date": { + "title": "End date", + "description": "The end date and time of the range covered by the resource.", + "type": "string", + "format": "date-time" + } + } + }, + "temporalCoverageSpan": { + "type": "string", + "description": "The name of the span covered by the data in the resource." + }, + "longitude": { + "type": "number", + "minimum": -180, + "maximum": 180, + "format": "coordinate" + }, + "latitude": { + "type": "number", + "minimum": -90, + "maximum": 90, + "format": "coordinate" + } + }, + "properties": { + "$schema": { "type": "string" }, + "creators": { + "title": "Creators", + "description": "The full name of the creators. The personal name format should be: family, given (e.g.: Smith, John).", + "type": "array", + "items": { + "type": "object", + "properties": { + "creator_name": { + "$ref": "#/definitions/nonEmptyString" + }, + "$ref": "#/definitions/person" + }, + "required": ["creator_name"] + }, + "uniqueItems": true + }, + "titles": { + "title": "Titles", + "description": "The titles(s) of the uploaded resource, or a name by which the resource is known.", + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "$ref": "#/definitions/nonEmptyString" + }, + "type": { + "title": "Type", + "enum": ["Alternative Title", "Subtitle", "TranslatedTitle", "Other"], + "description": "The type of the title." + } + }, + "additionalProperties": false, + "required": ["title"] + }, + "minItems": 1, + "uniqueItems": true + }, + "publisher": { + "title": "Publisher", + "description": "The entity responsible for making the resource available, either a person, an organization, or a service.", + "type": "string" + }, + "publication_date" : { + "title" : "Publication date", + "description" : "The date when the data was or will be made publicly available (e.g. 2018-07-13)", + "type": "string", + "format": "date" + }, + "resource_types": { + "title": "Resource type", + "description": "The type(s) of the resource.", + "type": "array", + "items": { + "type": "object", + "properties": { + "resource_type_general": { + "$ref": "#/definitions/resourceType", + "title": "Type" + }, + "resource_type_description": { + "title": "Description", + "description": "An optional description of the resource type.", + "type": "string" + } + }, + "additionalProperties": false, + "required": ["resource_type_general"] + }, + "minItems": 1, + "uniqueItems": true + }, + "instruments": { + "title": "Instruments", + "description": "The scientific instruments the data was generated or captured on.", + "type": "array", + "items": { + "type": "object", + "properties": { + "instrument_name": { + "type": "string" + }, + "instrument_identifier": { + "title": "Identifier", + "description": "The unique identifier of the instrument.", + "type": "string" + }, + "instrument_identifier_type": { + "title": "Type", + "description": "The type of the unique identifier of the instrument.", + "$ref": "#/definitions/identifierType" + } + }, + "required": ["instrument_name"] + }, + "uniqueItems": true + }, + "disciplines": { + "title": "Disciplines", + "description": "The scientific disciplines linked with the resource.", + "type": "array", + "items": { + "type": "object", + "properties": { + "discipline_name": { + "type": "string" + }, + "discipline_identifier": { + "title": "Identifier", + "description": "The unique identifier of the discipline, according to various identifier schemes.", + "type": "string" + }, + "classification_code": { + "title": "Code", + "description": "The corresponding classification code of the discipline, according to various identifier schemes.", + "type": "string" + }, + "$ref": "#/definitions/schemeWithUri" + }, + "required": ["discipline_name", "discipline_identifier"] + }, + "uniqueItems": true + }, + "keywords": { + "title": "Keywords", + "description": "The keywords or key phrases describing the resource.", + "type": "array", + "items": { + "type": "object", + "properties": { + "keyword": { + "$ref": "#/definitions/nonEmptyString" + }, + "classification_code": { + "title": "Code", + "description": "The corresponding classification code of the keyword, according to various identifier schemes.", + "type": "string" + }, + "$ref": "#/definitions/schemeWithUri" + }, + "required": ["keyword"] + }, + "uniqueItems": true + }, + "contributors": { + "title": "Contributors", + "description": "The list of all other contributors. Please mention all persons that were relevant in the creation of the resource.", + "type": "array", + "items": { + "type": "object", + "properties": { + "contributor_name": { + "type": "string" + }, + "$ref": "#/definitions/person", + "contributor_type": { + "title": "Contributor type", + "description": "The type of the contributor.", + "enum": ["ContactPerson", "DataCollector", "DataCurator", "DataManager", "Distributor", "Editor", "HostingInstitution", "Producer", "ProjectLeader", "ProjectManager", "ProjectMember", "RegistrationAgency", "RegistrationAuthority", "RelatedPerson", "Researcher", "ResearchGroup", "RightsHolder", "Sponsor", "Supervisor", "WorkPackageLeader", "Other"] + } + }, + "additionalProperties": false, + "required": ["contributor_name", "contributor_type"] + }, + "uniqueItems": true + }, + "languages": { + "title": "Languages", + "description": "The language(s) of the contents of the resource. Allowed values should be taken from ISO 639-1 and 639-3 language codes or IETF BCP 47. Examples: en, de or deu, eng or de-AT, en-US.", + "type": "array", + "items": { + "type": "object", + "properties": { + "language_name": { + "type": "string" + }, + "language_identifier": { + "title": "Identifier", + "type": "string", + "description": "The identifier for the language, according to various identifier schemes." + }, + "$ref": "#/definitions/schemeWithUri" + }, + "required": ["language_name", "language_identifier"] + }, + "uniqueItems": true + }, + "alternate_identifiers": { + "title": "Alternate identifier", + "description": "The alternative identifiers for this resource such as a URN, URI or an ISBN number.", + "type": "array", + "items": { + "type": "object", + "properties": { + "alternate_identifier": { + "type": "string" + }, + "alternate_identifier_type": { + "title": "Type", + "description": "The type of the alternate identifier.", + "$ref": "#/definitions/identifierType" + } + }, + "additionalProperties": false, + "required": ["alternate_identifier", "alternate_identifier_type"] + }, + "uniqueItems": true + }, + "related_identifiers": { + "title": "Related identifiers", + "description": "The identifiers of other resources related to the resource such as a URN, URI or an ISBN number.", + "type": "array", + "items": { + "type": "object", + "properties": { + "related_identifier": { + "type": "string" + }, + "resource_type_general": { + "title": "Resource type", + "description": "The type of the resource.", + "$ref": "#/definitions/resourceType" + }, + "related_identifier_type": { + "title": "Type", + "description": "The type of the related identifier.", + "$ref": "#/definitions/identifierType" + }, + "relation_type": { + "title": "Relation", + "description": "The relation type of the described reference.", + "enum": ["IsCitedBy", "Cites", "IsSupplementTo", "IsPublishedIn", "IsSupplementedBy", "IsContinuedBy", "Continues", "HasMetadata", "IsMetadataFor", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "isCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "Describes", "IsDescribedBy", "HasVersion", "IsVersionOf", "Requires", "IsRequiredBy", "Obsoletes", "IsObsoletedBy"] + }, + "$ref": "#/definitions/schemeWithUri" + }, + "required": ["related_identifier", "related_identifier_type", "relation_type"] + }, + "uniqueItems": true + }, + "descriptions": { + "title": "Descriptions", + "description": "The more elaborate description of the resource. Focus on a content description that makes it easy for others to find, and to interpret its relevance.", + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "description_type": { + "title": "Type", + "description": "The type of the description.", + "enum": ["Abstract", "Methods", "SeriesInformation", "TableOfContents", "TechnicalInfo", "Other"] + } + }, + "additionalProperties": false, + "required": ["description", "description_type"] + }, + "uniqueItems": true + }, + "version": { + "title": "Version", + "description": "The version of the resource.", + "type": "string" + }, + "contact_email": { + "title": "Contact email", + "description": "The contact email information for this resource.", + "type": "string", + "format": "email" + }, + "open_access": { + "title": "Open access", + "description": "Indicate whether the record's files are publicly accessible or not. In case of restricted access the uploaded files will only be accessible by the record's owner and the community administrators. Please note that the record's metadata is always publicly accessible. ", + "type": "boolean" + }, + "embargo_date": { + "title": "Embargo date", + "description": "The date marking the end of the embargo period. The record will be marked as open access on the specified date at midnight. Please note that the record metadata is always publicly accessible, and only the data files can have private access.", + "type": "string", + "format": "date-time" + }, + "license": { + "title": "License", + "description": "The license under which this data set is available to the users (e.g. GPL, Apache v2 or Commercial). Please use the License Selector for help and additional information.", + "type": "object", + "properties": { + "license": { + "type": "string" + }, + "license_uri": { + "title": "License URI", + "description": "The URI pointing to the description of the license.", + "type": "string", + "format": "uri" + }, + "license_identifier": { + "title": "Identifier", + "description": "The unique identifier of the license, according to various identifier schemes.", + "type": "string" + }, + "$ref": "#/definitions/schemeWithUri" + }, + "additionalProperties": false, + "required": ["license"] + }, + "dates": { + "title": "Dates", + "description": "The dates related to the resource", + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "title": "Date", + "type": "string", + "format": "date" + }, + "date_type": { + "title": "Date type", + "description": "The type of the date.", + "type": "string", + "enum": ["Accepted", "Available", "Collected", "Copyrighted", "Created", "Issued", "Other", "Submitted", "Updated", "Valid", "Withdrawn"] + }, + "date_information": { + "title": "Date information", + "description": "The additional information about the date.", + "type": "string" + } + }, + "required": ["date", "date_type"], + "additionalProperties": false + }, + "uniqueItems": true + }, + "sizes": { + "title": "Sizes", + "description": "The unstructured size information about the resource", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "formats": { + "title": "Formats", + "description": "The technical formats of the resource.", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "spatial_coverages": { + "title": "Spatial coverages", + "description": "The spatial coverages of the contents of the resource.", + "type": "array", + "items": { + "type": "object", + "properties": { + "place": { + "title": "Place", + "description": "Spatial region or named place where the data was gathered or about which the data is focused.", + "$ref": "#/definitions/spatialCoveragePlace" + }, + "point": { + "title": "Point", + "$ref": "#/definitions/spatialCoveragePoint", + "description": "A point contains a single latitude-longitude pair." + }, + "box": { + "title": "Boxes", + "description": "A bounding box defined by two points.", + "$ref": "#/definitions/spatialCoverageBox" + }, + "polygons": { + "title": "Polygons", + "description": "One or more drawn polygon areas, defined by a set of points and lines connecting the points in a closed chain.", + "type": "array", + "items": { + "type": "object", + "properties": { + "polygon": { + "type": "array", + "title": "Polygon", + "description": "A drawn polygon area, defined by a set of points and lines connecting the points in a closed chain.", + "items": { + "$ref": "#/definitions/spatialCoveragePoint" + }, + "uniqueItems": true + }, + "inpoint": { + "title": "Internal point", + "description": "A point inside the polygon", + "$ref": "#/definitions/spatialCoveragePoint" + } + } + }, + "uniqueItems": true + } + } + }, + "uniqueItems": true + }, + "temporal_coverages": { + "title": "Temporal coverages", + "description": "The temporal coverage of the contents of the resource.", + "type": "object", + "properties": { + "ranges": { + "title": "Ranges", + "description": "The temporal ranges of the contents of the resource.", + "type": "array", + "items": { + "$ref": "#/definitions/temporalCoverageStartEndDate" + }, + "uniqueItems": true + }, + "spans": { + "title": "Spans", + "description": "The named spans of the contents of the resource.", + "type": "array", + "items": { + "$ref": "#/definitions/temporalCoverageSpan" + }, + "uniqueItems": true + } + }, + "uniqueItems": true + }, + "funding_references": { + "title": "Funding references", + "description": "The information about financial support (funding) for the resource being registered.", + "type": "array", + "items": { + "type": "object", + "properties": { + "funder_name": { + "title": "Funder name", + "description": "The full name of the funder.", + "$ref": "#/definitions/nonEmptyString" + }, + "funder_identifier": { + "type": "string", + "description": "The unique identifier of the funder." + }, + "funder_identifier_type": { + "title": "Type", + "description": "The type of the identifier of the funder.", + "$ref": "#/definitions/funderIdentifierType" + }, + "scheme_uri": { + "$ref": "#/definitions/schemeUri" + }, + "award_title": { + "title": "Award title", + "description": "The title of the award.", + "type": "string" + }, + "award_number": { + "title": "Award number", + "type": "string", + "description": "The corresponding number of the award." + }, + "award_uri": { + "title": "Award URI", + "description": "The URI pointing to the award.", + "type": "string", + "format": "uri" + } + }, + "required": ["funder_name"] + }, + "uniqueItems": true + }, + + "community": { + "title": "Community", + "description": "The community to which the record has been submitted.", + "type": "string" + }, + + "community_specific": { + "type": "object" + }, + + "publication_state": { + "title": "Publication State", + "description": "State of the publication workflow.", + "type": "string", + "enum": [ "draft", "submitted", "published"] + }, + + "_pid": { + "title": "Persistent Identifiers", + "description": "Array of persistent identifiers pointing to this record." + }, + "_deposit": { + "type": "object" + }, + "_oai": { + "type": "object" + }, + "_files": { + "type": "array" + } + }, + "required": ["community", "titles", "open_access", "publication_state", "community_specific"], + "additionalProperties": false, + "b2share": { + "presentation": { + "major": [ "community", "titles", "descriptions", "creators", "open_access", "embargo_date", "license", "disciplines", "keywords", "contact_email" ], + "minor": [ "contributors", "instruments", "resource_types", "alternate_identifiers", "related_identifiers", "version", "publisher", "languages", "spatial_coverages", "temporal_coverages", "funding_references"] + } + } + } +}