Package fr.gouv.vitam.common.manifest
Class ManifestBuilder
java.lang.Object
fr.gouv.vitam.common.manifest.ManifestBuilder
- All Implemented Interfaces:
AutoCloseable
build a SEDA manifest with JAXB.
-
Constructor Summary
ConstructorDescriptionManifestBuilder
(OutputStream outputStream, SupportedSedaVersions supportedSedaVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
void
void
void
void
void
startDocument
(String operationId, ExportType exportType, ExportRequestParameters exportRequestParameters) void
validate
(ExportType exportType, ExportRequestParameters exportRequestParameters) void
writeArchivalAgreement
(String archivalAgreement) writeArchiveUnit
(ArchiveUnitModel archiveUnitModel, com.google.common.collect.ListMultimap<String, String> multimap, Map<String, String> ogs) writeArchiveUnitWithLFC
(ArchiveUnitModel archiveUnitModel, com.google.common.collect.ListMultimap<String, String> multimap, Map<String, String> ogs, LogbookLifeCycleUnit logbookLFC) void
writeCodeListVersions
(int tenant) void
writeComment
(String comment) void
void
writeFooter
(ExportType exportType, ExportRequestParameters parameters) writeGOT
(com.fasterxml.jackson.databind.JsonNode og, String linkedAU, Stream<LogbookLifeCycleObjectGroup> logbookLifeCycleObjectGroupStream, FolderResolver folderResolver, FilenameResolver filenameResolver) void
writeManagementMetadata
(String originatingAgency, String submissionAgencyIdentifier) void
writeManagementMetadata
(String acquisitionInformation, String legalStatus, String originatingAgency, String submissionAgencyIdentifier, String archivalProfile) void
writeMessageIdentifier
(String operationId)
-
Constructor Details
-
ManifestBuilder
public ManifestBuilder(OutputStream outputStream, SupportedSedaVersions supportedSedaVersion) throws XMLStreamException, javax.xml.bind.JAXBException - Parameters:
outputStream
-supportedSedaVersion
-- Throws:
XMLStreamException
javax.xml.bind.JAXBException
-
-
Method Details
-
startDocument
public void startDocument(String operationId, ExportType exportType, ExportRequestParameters exportRequestParameters) throws XMLStreamException, javax.xml.bind.JAXBException - Throws:
XMLStreamException
javax.xml.bind.JAXBException
-
writeGOT
public Map<String,com.fasterxml.jackson.databind.JsonNode> writeGOT(com.fasterxml.jackson.databind.JsonNode og, String linkedAU, Stream<LogbookLifeCycleObjectGroup> logbookLifeCycleObjectGroupStream, FolderResolver folderResolver, FilenameResolver filenameResolver) 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<String, String> multimap, Map<String, throws javax.xml.bind.JAXBException, DatatypeConfigurationException, ExportExceptionString> ogs) - Throws:
javax.xml.bind.JAXBException
DatatypeConfigurationException
ExportException
-
writeArchiveUnitWithLFC
public ArchiveUnitModel writeArchiveUnitWithLFC(ArchiveUnitModel archiveUnitModel, com.google.common.collect.ListMultimap<String, String> multimap, Map<String, throws DatatypeConfigurationException, javax.xml.bind.JAXBException, ExportExceptionString> ogs, @Nullable LogbookLifeCycleUnit logbookLFC) - Throws:
DatatypeConfigurationException
javax.xml.bind.JAXBException
ExportException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
XMLStreamException
-
startDescriptiveMetadata
- Throws:
XMLStreamException
-
startDataObjectPackage
- Throws:
XMLStreamException
-
endDescriptiveMetadata
- Throws:
XMLStreamException
-
endDataObjectPackage
- Throws:
XMLStreamException
-
writeComment
- Throws:
XMLStreamException
-
writeDate
- Throws:
XMLStreamException
-
writeMessageIdentifier
- Throws:
XMLStreamException
-
writeArchivalAgreement
- Throws:
XMLStreamException
-
writeManagementMetadata
public void writeManagementMetadata(String acquisitionInformation, String legalStatus, String originatingAgency, String submissionAgencyIdentifier, String archivalProfile) throws javax.xml.bind.JAXBException, ExportException - Throws:
javax.xml.bind.JAXBException
ExportException
-
writeManagementMetadata
public void writeManagementMetadata(String originatingAgency, 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
-
closeManifest
- Throws:
XMLStreamException
-
validate
public void validate(ExportType exportType, ExportRequestParameters exportRequestParameters) throws ExportException - Throws:
ExportException
-