Package com.logicaldoc.impex
Class Index
java.lang.Object
com.logicaldoc.impex.Index
This bean is used to write the archive's index file and to read all
informations regarding all documents into the archive.
- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
-
Field Summary
-
Constructor Summary
ConstructorDescriptionIndex
(byte[] indexContent, IndexHandler handler) Constructor used on the ArchiveVerifier class.Index
(byte[] indexContent, IndexImportHandler handler) Constructor used on the ArchiveImporter class.Index
(File file, IndexHandler handler) Constructor used on the ArchiveVerifier class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Long
getBarcodeTemplateId
(String name) long
getCount()
getFile()
static Long
getOcrTemplateId
(String name) static String
getTemplateName
(Long id, boolean barcodeTemplate) void
marshall()
Writes the index file to index.xmlvoid
Writes the index filevoid
setArchive
(Archive archive) void
Reads the index from a filevoid
unmarshall
(byte[] indexContent, IndexHandler dataHandler) Reads the index from a stream and sets the archive attributes and each archive's version valuesvoid
unmarshall
(IndexHandler dataHandler) Reads the index from a filevoid
unmarshall
(InputStream is, IndexHandler dataHandler) Reads the index from a stream and sets the archive attributes and each archive's version values
-
Field Details
-
ARCHIVE_VERSION
- See Also:
-
-
Constructor Details
-
Index
-
Index
-
Index
Constructor used on the ArchiveVerifier class. This method unmarshalls the index file stream- Parameters:
indexContent
- the bytes of the index filehandler
- the handler to be used to process the file
-
Index
Constructor used on the ArchiveVerifier class. This method unmarshalls the index file- Parameters:
file
- the index.xml filehandler
- the handler to be used to process the file
-
Index
Constructor used on the ArchiveImporter class. This method unmarshalls the index file stream and allows to get the archive's documents list- Parameters:
indexContent
- content of the index.xml filehandler
- the handler to be used to process the file
-
-
Method Details
-
getFile
-
marshall
Writes the index file to index.xml- Throws:
IOException
- Raised on disk errorscom.logicaldoc.core.PersistenceException
- error at data layer
-
marshall
Writes the index file- Parameters:
writer
- The writer to write to- Throws:
IOException
- Raised on disk errorscom.logicaldoc.core.PersistenceException
- error at data layer
-
getTemplateName
-
getBarcodeTemplateId
-
getOcrTemplateId
-
unmarshall
public void unmarshall()Reads the index from a file -
unmarshall
Reads the index from a file- Parameters:
dataHandler
- the handler to be used to process the file
-
unmarshall
Reads the index from a stream and sets the archive attributes and each archive's version values- Parameters:
indexContent
- content of the index filedataHandler
- the handler to be used to process the file
-
unmarshall
Reads the index from a stream and sets the archive attributes and each archive's version values- Parameters:
is
- the stream to read the index file contentdataHandler
- the handler to be used to process the file
-
getArchive
-
setArchive
-
getCount
public long getCount() -
getSizedisplay
-
getProgramVersion
-
getArchiveVersion
-