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.AutoCloseablebuild a SEDA manifest with JAXB.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringXSI_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 voidclose()voidcloseManifest()voidendDataObjectPackage()voidendDescriptiveMetadata()voidstartDataObjectPackage()voidstartDescriptiveMetadata()voidstartDocument(java.lang.String operationId, ExportType exportType, ExportRequestParameters exportRequestParameters)voidvalidate(ExportType exportType, ExportRequestParameters exportRequestParameters)voidwriteArchivalAgreement(java.lang.String archivalAgreement)ArchiveUnitModelwriteArchiveUnit(ArchiveUnitModel archiveUnitModel, com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> multimap, java.util.Map<java.lang.String,java.lang.String> ogs)ArchiveUnitModelwriteArchiveUnitWithLFC(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)voidwriteCodeListVersions(int tenant)voidwriteComment(java.lang.String comment)voidwriteDate(java.lang.String date)voidwriteFooter(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)voidwriteManagementMetadata(java.lang.String originatingAgency, java.lang.String submissionAgencyIdentifier)voidwriteManagementMetadata(java.lang.String acquisitionInformation, java.lang.String legalStatus, java.lang.String originatingAgency, java.lang.String submissionAgencyIdentifier, java.lang.String archivalProfile)voidwriteMessageIdentifier(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.XMLStreamExceptionjavax.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.XMLStreamExceptionjavax.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.JsonProcessingExceptionjavax.xml.bind.JAXBExceptionInternalServerException
-
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.JAXBExceptionjavax.xml.datatype.DatatypeConfigurationExceptionExportException
-
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.DatatypeConfigurationExceptionjavax.xml.bind.JAXBExceptionExportException
-
close
public void close() throws javax.xml.stream.XMLStreamException- Specified by:
closein 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.JAXBExceptionExportException
-
writeManagementMetadata
public void writeManagementMetadata(java.lang.String originatingAgency, java.lang.String submissionAgencyIdentifier) throws javax.xml.bind.JAXBException, ExportException- Throws:
javax.xml.bind.JAXBExceptionExportException
-
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
-
-