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 SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionIndex(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 SummaryModifier and TypeMethodDescriptionstatic LonggetBarcodeTemplateId(String name) static StringlonggetCount()getFile()static LonggetOcrTemplateId(String name) static Stringvoidmarshall()Writes the index file to index.xmlvoidWrites the index filevoidsetArchive(Archive archive) voidReads the index from a filevoidunmarshall(byte[] indexContent, IndexHandler dataHandler) Reads the index from a stream and sets the archive attributes and each archive's version valuesvoidunmarshall(IndexHandler dataHandler) Reads the index from a filevoidunmarshall(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
- 
Indexpublic Index(byte[] indexContent, IndexHandler handler) throws ParserConfigurationException, SAXException, IOException Constructor used on the ArchiveVerifier class. This method unmarshalls the index file stream- Parameters:
- indexContent- the bytes of the index file
- handler- the handler to be used to process the file
- Throws:
- IOException- I/O error
- SAXException- XML error
- ParserConfigurationException- XML error
 
- 
Indexpublic Index(File file, IndexHandler handler) throws IOException, ParserConfigurationException, SAXException Constructor used on the ArchiveVerifier class. This method unmarshalls the index file- Parameters:
- file- the index.xml file
- handler- the handler to be used to process the file
- Throws:
- SAXException- XML error
- ParserConfigurationException- XML error
- IOException- I/O error
 
- 
Indexpublic Index(byte[] indexContent, IndexImportHandler handler) throws ParserConfigurationException, SAXException, IOException 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 file
- handler- the handler to be used to process the file
- Throws:
- IOException- I/O error
- SAXException- XML error
- ParserConfigurationException- XML error
 
 
- 
- 
Method Details- 
getFile
- 
marshallWrites the index file to index.xml- Throws:
- IOException- Raised on disk errors
- com.logicaldoc.core.PersistenceException- error at data layer
 
- 
marshallWrites the index file- Parameters:
- writer- The writer to write to
- Throws:
- IOException- Raised on disk errors
- com.logicaldoc.core.PersistenceException- error at data layer
 
- 
getBarcodeTemplateName
- 
getOcrTemplateName
- 
getBarcodeTemplateIdpublic static Long getBarcodeTemplateId(String name) throws com.logicaldoc.core.PersistenceException - Throws:
- com.logicaldoc.core.PersistenceException
 
- 
getOcrTemplateId- Throws:
- com.logicaldoc.core.PersistenceException
 
- 
unmarshallReads the index from a file- Throws:
- IOException- I/O exception
- ParserConfigurationException- XML error
- SAXException- XML error
 
- 
unmarshallpublic void unmarshall(IndexHandler dataHandler) throws IOException, ParserConfigurationException, SAXException Reads the index from a file- Parameters:
- dataHandler- the handler to be used to process the file
- Throws:
- IOException- I/O exception
- ParserConfigurationException- XML error
- SAXException
 
- 
unmarshallpublic void unmarshall(byte[] indexContent, IndexHandler dataHandler) throws ParserConfigurationException, SAXException, IOException Reads the index from a stream and sets the archive attributes and each archive's version values- Parameters:
- indexContent- content of the index file
- dataHandler- the handler to be used to process the file
- Throws:
- ParserConfigurationException- XML error
- IOException- I/O error
- SAXException- XML error
 
- 
unmarshallpublic void unmarshall(InputStream is, IndexHandler dataHandler) throws ParserConfigurationException, SAXException, IOException 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 content
- dataHandler- the handler to be used to process the file
- Throws:
- ParserConfigurationException- XML error
- SAXException- XML error
- IOException- I/O error
 
- 
getArchive
- 
setArchive
- 
getCountpublic long getCount()
- 
getSizedisplay
- 
getProgramVersion
- 
getArchiveVersion
 
-