Package fr.gouv.vitam.common.manifest
Class ManifestBuilder
- java.lang.Object
-
- fr.gouv.vitam.common.manifest.ManifestBuilder
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ManifestBuilder extends java.lang.Object implements java.lang.AutoCloseable
build a SEDA manifest with JAXB.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
XSI_URI
-
Constructor Summary
Constructors Constructor Description ManifestBuilder(java.io.OutputStream outputStream, SupportedSedaVersions supportedSedaVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
closeManifest()
void
endDataObjectPackage()
void
endDescriptiveMetadata()
void
startDataObjectPackage()
void
startDescriptiveMetadata()
void
startDocument(java.lang.String operationId, ExportType exportType, ExportRequestParameters exportRequestParameters)
void
validate(ExportType exportType, ExportRequestParameters exportRequestParameters)
void
writeArchivalAgreement(java.lang.String archivalAgreement)
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)
ArchiveUnitModel
writeArchiveUnitWithLFC(ArchiveUnitModel archiveUnitModel, com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> multimap, java.util.Map<java.lang.String,java.lang.String> ogs, LogbookLifeCycleUnit logbookLFC)
void
writeCodeListVersions(int tenant)
void
writeComment(java.lang.String comment)
void
writeDate(java.lang.String date)
void
writeFooter(ExportType exportType, ExportRequestParameters parameters)
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)
void
writeManagementMetadata(java.lang.String originatingAgency, java.lang.String submissionAgencyIdentifier)
void
writeManagementMetadata(java.lang.String acquisitionInformation, java.lang.String legalStatus, java.lang.String originatingAgency, java.lang.String submissionAgencyIdentifier, java.lang.String archivalProfile)
void
writeMessageIdentifier(java.lang.String operationId)
-
-
-
Field Detail
-
XSI_URI
public static final java.lang.String XSI_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ManifestBuilder
public ManifestBuilder(java.io.OutputStream outputStream, SupportedSedaVersions supportedSedaVersion) throws javax.xml.stream.XMLStreamException, javax.xml.bind.JAXBException
- Parameters:
outputStream
-supportedSedaVersion
-- 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, ExportException
- Throws:
javax.xml.bind.JAXBException
javax.xml.datatype.DatatypeConfigurationException
ExportException
-
writeArchiveUnitWithLFC
public ArchiveUnitModel writeArchiveUnitWithLFC(ArchiveUnitModel archiveUnitModel, com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> multimap, java.util.Map<java.lang.String,java.lang.String> ogs, @Nullable LogbookLifeCycleUnit logbookLFC) throws javax.xml.datatype.DatatypeConfigurationException, javax.xml.bind.JAXBException, ExportException
- Throws:
javax.xml.datatype.DatatypeConfigurationException
javax.xml.bind.JAXBException
ExportException
-
close
public void close() throws javax.xml.stream.XMLStreamException
- Specified by:
close
in interfacejava.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 acquisitionInformation, java.lang.String legalStatus, java.lang.String originatingAgency, java.lang.String submissionAgencyIdentifier, java.lang.String archivalProfile) throws javax.xml.bind.JAXBException, ExportException
- Throws:
javax.xml.bind.JAXBException
ExportException
-
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
-
validate
public void validate(ExportType exportType, ExportRequestParameters exportRequestParameters) throws ExportException
- Throws:
ExportException
-
-