package main import "encoding/json" type MetadataPDF struct { Author string Creator string CreationDate string PDFFormatVersion string } type PDFInfo struct { pdfWordCount int pdfPageTotal int pdfWordByPage int pdfError string pdfMetadata MetadataPDF } type DoctypeXML struct { Sysid string `json:"sysid"` } type ErrorXML struct { Message string `json:"message"` Line string `json:"line"` File string `json:"file"` } type XMLInfo struct { data string isWellFormed bool wellFormedErrors ErrorXML doctype DoctypeXML } type XpathStructure struct { ContentType string `json:"content-type"` PublicationYear string `json:"publicationYear"` Doi int `json:"doi"` Pmid string `json:"pmid"` Issn string `json:"issn"` Eissn string `json:"eissn"` Isbn string `json:"isbn"` Eisbn string `json:"eisbn"` HasAbstract bool `json:"hasAbstract"` Issue int `json:"issue"` Volume int `json:"volume"` PublisherId string `json:"publisherId"` PublisherLoc string `json:"publisherLoc"` HostTitle string `json:"hostTitle"` Title string `json:"title"` NbRefBibs int `json:"nbRefBibs"` NbElementInBody int `json:"nbElementInBody"` NbParagraphInBody int `json:"nbParagraphInBody"` NbSectionInBody int `json:"nbSectionInBody"` CodeLanguage string `json:"codeLanguage"` ArticleType string `json:"article-type"` PubIdType string `json:"pub-id-type"` ContribType string `json:"contrib-type"` Rid string `json:"rid"` Id string `json:"id"` SubjGroupType string `json:"subj-group-type"` Subject string `json:"subject"` // Dynamic field: can include other fields } type DetailledAnalysis struct { isValidAgainstDTD bool validationDTDInfos string validationsErrors []ErrorXML isValidAgainstSchema bool validationXSDInfos string validationSchemaErrors []ErrorXML xpath json.RawMessage } type GeneralInfo struct { corpusName string name string startAt int64 extension string path string mimetype string mimeEncoding string size int64 } type ConfigDetailledAnalyze struct { XML struct { ListDTD []string `json:"dtd"` ListXSD []string `json:"schema"` XPATH []MetadataConfigDetailledAnalyze `json:"metadata"` IgnoreNamespace string `json:"ignoreNamespace"` } `json:"xml"` } type MetadataConfigDetailledAnalyze struct { Name string `json:"name"` Regex string `json:"regex"` Type string `json:"type"` Xpath []string `json:"xpath"` }