package eu.dnetlib.hope.domains.visual import eu.dnetlib.hope.domains.common.* class LIDOCollection{ String europeanaType String collectionID, collectionPID List titles String langCode List abstractSummaries List descriptions List creationDates, accumulationDates String sizeItems String itemType, itemFormatStm List itemFormats String associatedPub List subjects, owners String repository String useRights, accessRights, europeanaRights LandingPage landingPage List collItemLanguages //for temporal and spatial coverage List typedSubjects //for creators List creators def getXML = { template, oaiHeader, providerName, coll -> //reset the template for the current lido collection object template.reset() template.setAttribute("oaiheader", oaiHeader) def LidoIdentifiers lidoIds= new LidoIdentifiers(source:providerName, localID:coll.collectionID, pid:coll.collectionPID) template.setAttribute("lido", lidoIds) def LidoEvent eventCollecting = new LidoEvent(type:"collecting", eventDisplayDates:coll.accumulationDates); def LidoEvent eventCreation = new LidoEvent(type:"creation", eventDisplayDates:coll.creationDates, eventMaterialsTech:[ new LidoMaterial(type:'material', terms:coll.itemFormats), ], eventActors:creators); def LidoDescriptiveMetadata lidoDescrMD = new LidoDescriptiveMetadata(lang:coll.langCode, repositoryName:coll.repository, creationEvent:eventCreation, collectionEvent:eventCollecting, objectMeasurements:[], sizeInItems:coll.sizeItems, collectionItemLanguages:coll.collItemLanguages, europeanaType:coll.europeanaType, owners:coll.owners, workTypes:[coll.itemType], titles:coll.titles, descriptions:coll.abstractSummaries+[ new LidoDescription(type:'associated publication', langCode:'', value:coll.associatedPub), new LidoDescription(type:'item format statement', langCode:'', value:coll.itemFormatStm) ]+coll.descriptions, typedSubjects:coll.typedSubjects, displaySubjects:coll.subjects) template.setAttribute("lidoDescr", lidoDescrMD) if(!coll.getEuropeanaRights()) coll.setEuropeanaRights("Rights reserved - Free access") def LidoAdminMetadata lidoAdminMD = new LidoAdminMetadata(recordType:'collection', rightsCreditLines:[ new LidoCreditLine(creditLine:coll.useRights), new LidoCreditLine(creditLine:coll.accessRights) ], europeanaRights:coll.europeanaRights, landingPage:coll.landingPage ) template.setAttribute("lidoAdmin", lidoAdminMD) return template.toString() } }