{
    "description": "An article or thesis or book or...",
    "title": "Publication",
    "required": [
        "title"
    ],
    "type": "object",
    "properties": {
        "funding_info": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "grant_number": {
                        "type": "string",
                        "title": "Grant number"
                    },
                    "agency": {
                        "type": "string",
                        "title": "Agency"
                    },
                    "project_number": {
                        "type": "string",
                        "title": "Project number"
                    }
                },
                "title": "Grant information"
            },
            "type": "array",
            "description": "Information related to funding. FIXME: Do we care about this? So far only 349 records were tagged and all for a single EU project.",
            "title": "Funding information"
        },
        "isbn": {
            "_uniqueItems": true,
            "items": {
                "required": [
                    "value"
                ],
                "type": "object",
                "properties": {
                    "medium": {
                        "enum": [
                            "Print",
                            "Online",
                            "ebook",
                            "hardcover",
                            "paperback"
                        ],
                        "type": "string",
                        "description": "FIXME: this really need to be an enum and cleaned up. What is Print?!",
                        "title": "Medium"
                    },
                    "value": {
                        "title": "code",
                        "type": "string",
                        "_format": "isbn"
                    }
                },
                "title": "ISBN code"
            },
            "type": "array",
            "description": "ISBN codes identifying the given book",
            "title": "ISBN codes"
        },
        "superseding": {
            "_uniqueItems": true,
            "items": {
                "type": "integer"
            },
            "type": "array"
        },
        "report_number": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "source": {
                        "type": "string"
                    },
                    "primary": {
                        "type": "boolean"
                    },
                    "value": {
                        "type": "string"
                    }
                }
            },
            "type": "array"
        },
        "public_notes": {
            "_uniqueItems": true,
            "items": {
                "required": [
                    "value"
                ],
                "type": "object",
                "properties": {
                    "source": {
                        "type": "string"
                    },
                    "value": {
                        "type": "string"
                    }
                }
            },
            "type": "array"
        },
        "abstract": {
            "_uniqueItems": true,
            "items": {
                "required": [
                    "source",
                    "value"
                ],
                "type": "object",
                "properties": {
                    "source": {
                        "enum": [
                            "AIP",
                            "APS",
                            "Annual Reviews",
                            "Astronomical Society of the Pacific",
                            "Author",
                            "Bulgarian Academy of Sciences",
                            "CERN",
                            "CERN/SLAC",
                            "Cambridge University Press",
                            "Canadian Center of Science and Education",
                            "DESY",
                            "DESY/SLAC",
                            "EDP Sciences",
                            "ELSEVIER",
                            "Education and Upbringing",
                            "Elsevier",
                            "European Astronomical Society",
                            "HEPDATA",
                            "HINDAWI",
                            "IEEE",
                            "INDICO",
                            "INSPIRE",
                            "IOP",
                            "IOS Press",
                            "IPAP",
                            "Indian National Science Academy",
                            "International Press",
                            "International Society for Optics and Photonics",
                            "Internet Academy",
                            "JACoW",
                            "Kharkov Institute of Physics and Technology",
                            "MDPI",
                            "MPI Grav. Phys., Potsdam",
                            "NRC Research Press",
                            "National Academy of Sciences of Armenia",
                            "Niscair",
                            "Oxford Journals",
                            "Oxford University Press",
                            "Physical Society of Japan",
                            "Polish Physical Society",
                            "Publisher",
                            "Royal Society",
                            "SIGMA",
                            "Springer",
                            "Tomsk State Pedagogical University",
                            "T\u00dcB\u0130TAK",
                            "WILEY",
                            "WS",
                            "WSP",
                            "World Scientific"
                        ],
                        "type": "string",
                        "description": "FIXME: is there an enumerable list of sources?"
                    },
                    "value": {
                        "type": "string"
                    }
                }
            },
            "type": "array"
        },
        "spires_sysnos": {
            "_uniqueItems": true,
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "preprint_date": {
            "type": "string",
            "_format": "date"
        },
        "imprint": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "_format": "date"
                    },
                    "publisher": {
                        "type": "string",
                        "description": "FIXME: an enum?"
                    },
                    "place": {
                        "type": "string"
                    }
                }
            },
            "type": "array"
        },
        "titles": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "source": {
                        "type": "string"
                    },
                    "subtitle": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    }
                }
            },
            "type": "array"
        },
        "thesis_supervisor": {
            "_uniqueItems": true,
            "items": {
                "required": [
                    "full_name"
                ],
                "type": "object",
                "properties": {
                    "affiliation": {
                        "type": "object",
                        "properties": {
                            "curated_relation": {
                                "type": "boolean"
                            },
                            "recid": {
                                "type": "integer"
                            },
                            "value": {
                                "type": "string"
                            }
                        }
                    },
                    "recid": {
                        "type": "integer"
                    },
                    "full_name": {
                        "type": "string"
                    },
                    "curated_relation": {
                        "type": "boolean"
                    }
                }
            },
            "type": "array"
        },
        "thesis": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "_format": "date"
                    },
                    "curated_relation": {
                        "type": "boolean"
                    },
                    "university": {
                        "type": "string",
                        "description": "FIXME: shall we match these with the insitution database? I guess so."
                    },
                    "recid": {
                        "type": "integer",
                        "description": "Record ID of the matched insitution."
                    },
                    "degree_type": {
                        "enum": [
                            "PhD",
                            "Master",
                            "Bachelor",
                            "Diploma",
                            "Habilitation",
                            "Laurea",
                            "Thesis"
                        ],
                        "type": "string",
                        "description": "FIXME: this enum must be reviewed"
                    }
                }
            },
            "type": "array"
        },
        "hidden_note": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "source": {
                        "enum": [
                            "SPIRES-HIDDEN",
                            "CERN",
                            "submitter"
                        ],
                        "type": "string",
                        "description": "FIXME: What's the semantic of this source?"
                    },
                    "cern_reference": {
                        "type": "string",
                        "description": "FIXME: Do we know what this is? do we care?"
                    },
                    "value": {
                        "type": "string"
                    }
                }
            },
            "type": "array",
            "description": "FIXME: what about 595__d??"
        },
        "publication_info": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "journal_title": {
                        "type": "string"
                    },
                    "pubinfo_freetext": {
                        "type": "string"
                    },
                    "journal_volume": {
                        "type": "string"
                    },
                    "conference_paper_info": {
                        "type": "string",
                        "description": "FIXME: This is currently the CNUM"
                    },
                    "recid": {
                        "type": "integer",
                        "description": "Record ID of the conference"
                    },
                    "year": {
                        "minimum": 1000,
                        "type": "integer",
                        "maximum": 2050
                    },
                    "curated_relation": {
                        "type": "boolean"
                    },
                    "journal_issue": {
                        "type": "string"
                    },
                    "page_range": {
                        "type": "string",
                        "description": "FIXME: for ejournals this could be the page index, but there is no realiable way to know whether something is a page index or a first page, does it?"
                    }
                }
            },
            "type": "array",
            "description": "FIXME: Shall we split conference information away? FIXME: shall we move the DOI and ISBN next to where it belongs? So that we can also align erratum and friends?"
        },
        "reference": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "publisher": {
                        "type": "string"
                    },
                    "doi": {
                        "pattern": "10\\.\\d+(\\.\\d+)?/.+",
                        "type": "string"
                    },
                    "isbn": {
                        "type": "string",
                        "_format": "isbn"
                    },
                    "texkey": {
                        "type": "string"
                    },
                    "report_number": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "_format": "url"
                    },
                    "collaboration": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "misc": {
                        "type": "string"
                    },
                    "editors": {
                        "type": "string"
                    },
                    "number": {
                        "type": "integer"
                    },
                    "curated_relation": {
                        "type": "boolean"
                    },
                    "maintitle": {
                        "type": "string"
                    },
                    "recid": {
                        "type": "integer"
                    },
                    "raw_reference": {
                        "type": "string"
                    },
                    "year": {
                        "type": "integer"
                    },
                    "authors": {
                        "type": "string"
                    },
                    "journal_pubnote": {
                        "pattern": ".*,.*,.*",
                        "type": "string"
                    }
                }
            },
            "type": "array"
        },
        "copyright": {
            "type": "object",
            "properties": {
                "url": {
                    "type": "string",
                    "_format": "url"
                },
                "material": {
                    "enum": [
                        "Article"
                    ],
                    "type": "string"
                },
                "holder": {
                    "enum": [
                        "American Physical Society",
                        "World Scientific Publishing Company",
                        "authors",
                        "CERN"
                    ],
                    "type": "string",
                    "description": "Copyright holder. FIXME: should we restrict this to an enum, or not?"
                },
                "statement": {
                    "type": "string",
                    "description": "FIXME: What's that? there are all sorts of usages on production!"
                },
                "year": {
                    "type": "integer"
                }
            }
        },
        "subject_terms": {
            "_uniqueItems": true,
            "items": {
                "required": [
                    "term"
                ],
                "type": "object",
                "properties": {
                    "source": {
                        "enum": [
                            "automatically added based on DCC, PPF, DK",
                            "submitter",
                            "INSPIRE"
                        ],
                        "type": "string"
                    },
                    "term": {
                        "type": "string"
                    },
                    "scheme": {
                        "enum": [
                            "INSPIRE",
                            "arXiv",
                            "APS",
                            "PoS",
                            "Elsevier"
                        ],
                        "type": "string"
                    }
                }
            },
            "type": "array"
        },
        "thesaurus_terms": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "scheme": {
                        "enum": [
                            "INSPIRE",
                            "JACoW"
                        ],
                        "type": "string"
                    },
                    "keyword": {
                        "type": "string"
                    },
                    "energy_range": {
                        "minimum": 0,
                        "type": "integer",
                        "description": "FIXME: What... is... that!?",
                        "maximum": 9
                    }
                }
            },
            "type": "array"
        },
        "experiment": {
            "required": [
                "value"
            ],
            "type": "object",
            "properties": {
                "curated_relation": {
                    "default": false,
                    "type": "boolean",
                    "description": "Was the experiment actually proofchecked by a cataloguer?"
                },
                "recid": {
                    "type": "integer",
                    "description": "Record ID of the corresponding experiment."
                },
                "value": {
                    "type": "string",
                    "description": "Raw string. Do we actually need it at all? Can it be taken from the record ID? NOTE: I am not adding accelerator field. Do we have papers on accelerators but not on experiments? Can we always derive the accelerator from the experiment?"
                }
            }
        },
        "arxiv_eprints": {
            "_uniqueItems": true,
            "items": {
                "properties": {
                    "value": {
                        "type": "string",
                        "pattern": "\\d{4}.\\d{4,5}|\\w+-\\+/\\d+"
                    },
                    "categories": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array"
                    }
                }
            },
            "type": "array"
        },
        "title_variation": {
            "_uniqueItems": true,
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "core": {
            "type": "boolean",
            "description": "Whether this document is CORE and hence need special curation. NOTE: set this explicitly to false, in order to have real noncore."
        },
        "book_series": {
            "type": "object",
            "properties": {
                "volume": {
                    "type": "string",
                    "description": "Specific volume number"
                },
                "title": {
                    "type": "string",
                    "description": "Title of the book series"
                }
            }
        },
        "collaboration": {
            "_uniqueItems": true,
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "authors": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "other_ids": {
                        "items": {
                            "type": "object",
                            "properties": {
                                "source": {
                                    "type": "string",
                                    "title": "Source of ID"
                                },
                                "value": {
                                    "type": "string",
                                    "title": "ID"
                                }
                            },
                            "title": "ID"
                        },
                        "type": "array",
                        "description": "Just in case...",
                        "title": "Other IDs"
                    },
                    "name": {
                        "title": "Author name",
                        "type": "string",
                        "description": "author name as it appears in the paper",
                        "_format": ".+, .+"
                    },
                    "affiliations": {
                        "_uniqueItems": true,
                        "items": {
                            "type": "object",
                            "properties": {
                                "curated_relation": {
                                    "type": "boolean",
                                    "description": "Did a cataloguer proof-checked the recid?",
                                    "title": "The affiliation is curated?"
                                },
                                "recid": {
                                    "type": "integer",
                                    "description": "Record ID in the Institution collection",
                                    "title": "Record ID of institution"
                                },
                                "value": {
                                    "type": "string",
                                    "description": "The affiliation as it appears on the paper",
                                    "title": "Name of institution"
                                }
                            },
                            "title": "Affiliation"
                        },
                        "type": "array",
                        "title": "Affiliations"
                    },
                    "inspire_id": {
                        "pattern": "INSPIRE-\\d+",
                        "type": "string",
                        "description": "Legacy INSPIRE ID when available",
                        "title": "INSPIRE ID"
                    },
                    "inspire_bai": {
                        "pattern": "(\\w+\\.)+\\d+",
                        "type": "string",
                        "description": "INSPIRE BAI when available",
                        "title": "INSPIRE BibAuthorID"
                    },
                    "curated_relation": {
                        "default": false,
                        "type": "boolean",
                        "description": "Was this signature actually claimed or proof-checked by cataloguer?",
                        "title": "The relation is curated?"
                    },
                    "recid": {
                        "type": "integer",
                        "description": "Record ID of the person in HepNames",
                        "title": "Record ID of the person"
                    },
                    "orcid": {
                        "pattern": "\\d{4}-\\d{4}-\\d{4}-\\d{4}",
                        "title": "ORCID ID",
                        "type": "string",
                        "description": "ORCID Id when available",
                        "_format": "orcid"
                    },
                    "role": {
                        "enum": [
                            "",
                            "ed."
                        ],
                        "type": "string",
                        "description": "Role of the author within the paper. So far only Editor was captured.",
                        "title": "Role of the person"
                    },
                    "email": {
                        "title": "Email",
                        "type": "string",
                        "_format": "email"
                    }
                },
                "title": "Author"
            },
            "type": "array",
            "description": "List with all the authors",
            "title": "Authors"
        },
        "classification_number": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "value": {
                        "type": "string",
                        "description": "PACS or PDG codes. FIXME: What about better separating these into a PACS field and a PDG field?",
                        "title": "Number"
                    },
                    "standard": {
                        "enum": [
                            "PACS",
                            "PDG"
                        ],
                        "type": "string",
                        "title": "Standard"
                    }
                },
                "title": "Classification number"
            },
            "type": "array",
            "title": "Classification numbers"
        },
        "dois": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "source": {
                        "type": "string",
                        "description": "Issuing of DOI. FIXME: should we have an enum",
                        "title": "DOI registrant"
                    },
                    "qualifying_information": {
                        "enum": [
                            "Erratum",
                            "Addendum",
                            "ebook",
                            "Corrigendum"
                        ],
                        "type": "string",
                        "title": "Qualifying information"
                    },
                    "value": {
                        "pattern": "10\\.\\d+(\\.\\d+)?/.+",
                        "type": "string",
                        "title": "DOI"
                    }
                },
                "title": "DOI"
            },
            "type": "array",
            "title": "DOIs"
        },
        "document_type": {
            "minItems": 1,
            "items": {
                "enum": [
                    "Published",
                    "arXiv",
                    "ConferencePaper",
                    "Thesis",
                    "Review",
                    "Lectures",
                    "Note",
                    "Proceedings",
                    "Introductory",
                    "Book",
                    "BookChapter",
                    "Report"
                ],
                "type": "string"
            },
            "_uniqueItems": true,
            "type": "array",
            "title": "Document type"
        },
        "citeable": {
            "type": "boolean",
            "description": "Whether this document can be cited. FIXME: can this be derived from other properties?",
            "title": "Citeable?"
        },
        "license": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "imposing": {
                        "type": "string",
                        "description": "FIXME: what is this!?",
                        "title": "Imposing"
                    },
                    "url": {
                        "title": "URL of the license",
                        "type": "string",
                        "_format": "url"
                    },
                    "material": {
                        "type": "string",
                        "title": "Material referred by the license"
                    },
                    "license": {
                        "type": "string",
                        "title": "License name"
                    }
                },
                "title": "License"
            },
            "type": "array",
            "title": "License information"
        },
        "language": {
            "type": "string",
            "description": "FIXME: we shall provide the ISO enum",
            "title": "Language"
        },
        "url": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "doc_string": {
                        "type": "string",
                        "description": "FIXME: What is this!?",
                        "title": "Doc String"
                    },
                    "url": {
                        "title": "URL",
                        "type": "string",
                        "_format": "url"
                    },
                    "material_type": {
                        "type": "string",
                        "title": "Type of material"
                    },
                    "description": {
                        "type": "string",
                        "title": "Description"
                    },
                    "size": {
                        "type": "integer",
                        "title": "Size"
                    }
                },
                "title": "URL"
            },
            "type": "array",
            "title": "URLs"
        },
        "number_of_pages": {
            "type": "integer",
            "title": "Number of pages"
        },
        "title_translation": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "subtitle": {
                        "type": "string",
                        "title": "Subtitle"
                    },
                    "value": {
                        "type": "string",
                        "title": "Title"
                    }
                },
                "title": "Title translation"
            },
            "type": "array",
            "title": "Title translations"
        },
        "corporate_author": {
            "_uniqueItems": true,
            "items": {
                "type": "string",
                "title": "Corporate author"
            },
            "type": "array",
            "title": "Corporate authors"
        },
        "external_system_number": {
            "_uniqueItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "institute": {
                        "type": "string",
                        "title": "Institute"
                    },
                    "obsolete": {
                        "type": "boolean",
                        "title": "Obsolete?"
                    },
                    "value": {
                        "type": "string",
                        "title": "Number"
                    }
                },
                "title": "External system number"
            },
            "type": "array",
            "title": "External system numbers"
        }
    }
}