Class ManifestBuilder

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ManifestBuilder
    extends java.lang.Object
    implements java.lang.AutoCloseable
    build a SEDA manifest with JAXB.
    • Constructor Detail

      • ManifestBuilder

        public ManifestBuilder​(java.io.OutputStream outputStream)
                        throws javax.xml.stream.XMLStreamException,
                               javax.xml.bind.JAXBException
        Parameters:
        outputStream -
        Throws:
        javax.xml.stream.XMLStreamException
        javax.xml.bind.JAXBException
    • Method Detail

      • startDocument

        public void startDocument​(java.lang.String operationId,
                                  ExportType exportType,
                                  ExportRequestParameters exportRequestParameters)
                           throws javax.xml.stream.XMLStreamException,
                                  javax.xml.bind.JAXBException
        Throws:
        javax.xml.stream.XMLStreamException
        javax.xml.bind.JAXBException
      • writeGOT

        public java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.JsonNode> writeGOT​(com.fasterxml.jackson.databind.JsonNode og,
                                                                                                      java.lang.String linkedAU,
                                                                                                      java.util.stream.Stream<LogbookLifeCycleObjectGroup> logbookLifeCycleObjectGroupStream)
                                                                                               throws com.fasterxml.jackson.core.JsonProcessingException,
                                                                                                      javax.xml.bind.JAXBException,
                                                                                                      InternalServerException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
        javax.xml.bind.JAXBException
        InternalServerException
      • writeArchiveUnit

        public ArchiveUnitModel writeArchiveUnit​(ArchiveUnitModel archiveUnitModel,
                                                 com.google.common.collect.ListMultimap<java.lang.String,​java.lang.String> multimap,
                                                 java.util.Map<java.lang.String,​java.lang.String> ogs)
                                          throws javax.xml.bind.JAXBException,
                                                 javax.xml.datatype.DatatypeConfigurationException
        Throws:
        javax.xml.bind.JAXBException
        javax.xml.datatype.DatatypeConfigurationException
      • writeArchiveUnitWithLFC

        public ArchiveUnitModel writeArchiveUnitWithLFC​(com.google.common.collect.ListMultimap<java.lang.String,​java.lang.String> multimap,
                                                        java.util.Map<java.lang.String,​java.lang.String> ogs,
                                                        LogbookLifeCycleUnit logbookLFC,
                                                        ArchiveUnitModel archiveUnitModel)
                                                 throws javax.xml.datatype.DatatypeConfigurationException,
                                                        javax.xml.bind.JAXBException
        Throws:
        javax.xml.datatype.DatatypeConfigurationException
        javax.xml.bind.JAXBException
      • close

        public void close()
                   throws javax.xml.stream.XMLStreamException
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        javax.xml.stream.XMLStreamException
      • startDescriptiveMetadata

        public void startDescriptiveMetadata()
                                      throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • startDataObjectPackage

        public void startDataObjectPackage()
                                    throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • endDescriptiveMetadata

        public void endDescriptiveMetadata()
                                    throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • endDataObjectPackage

        public void endDataObjectPackage()
                                  throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • writeComment

        public void writeComment​(java.lang.String comment)
                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • writeDate

        public void writeDate​(java.lang.String date)
                       throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • writeMessageIdentifier

        public void writeMessageIdentifier​(java.lang.String operationId)
                                    throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • writeArchivalAgreement

        public void writeArchivalAgreement​(java.lang.String archivalAgreement)
                                    throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • writeManagementMetadata

        public void writeManagementMetadata​(java.lang.String originatingAgency,
                                            java.lang.String submissionAgencyIdentifier)
                                     throws javax.xml.bind.JAXBException,
                                            ExportException
        Throws:
        javax.xml.bind.JAXBException
        ExportException
      • writeCodeListVersions

        public void writeCodeListVersions​(int tenant)
                                   throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • writeFooter

        public void writeFooter​(ExportType exportType,
                                ExportRequestParameters parameters)
                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • closeManifest

        public void closeManifest()
                           throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException