Class RepositoryDocumentFactory
- java.lang.Object
-
- org.apache.manifoldcf.agents.incrementalingest.RepositoryDocumentFactory
-
public class RepositoryDocumentFactory extends java.lang.ObjectThis class accepts a RepositoryDocument in its constructor, and then allows multiple copies to me made, as part of a split in the pipeline. It must be closed in order to release all temporary resources.
-
-
Field Summary
Fields Modifier and Type Field Description protected BinaryInputbinaryTrackerprotected java.util.Map<java.lang.String,CharacterInput[]>metadataReadersprotected RepositoryDocumentoriginal
-
Constructor Summary
Constructors Constructor Description RepositoryDocumentFactory(RepositoryDocument document)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close this object and release its resources.RepositoryDocumentcreateDocument()Create a new RepositoryDocument object from the saved local resources.
-
-
-
Field Detail
-
original
protected final RepositoryDocument original
-
binaryTracker
protected BinaryInput binaryTracker
-
metadataReaders
protected final java.util.Map<java.lang.String,CharacterInput[]> metadataReaders
-
-
Constructor Detail
-
RepositoryDocumentFactory
public RepositoryDocumentFactory(RepositoryDocument document) throws ManifoldCFException, java.io.IOException
Constructor. Pass a RepositoryDocument. This constructor reads all streams and stores them in a temporary local location. If there is an error reading the streams, an IOException will be thrown. Otherwise, a ManifoldCFException will be thrown instead.- Parameters:
document- is the repository document to read.- Throws:
ManifoldCFExceptionjava.io.IOException
-
-
Method Detail
-
createDocument
public RepositoryDocument createDocument() throws ManifoldCFException
Create a new RepositoryDocument object from the saved local resources. As a side effect, this method also releases any resources held on behalf of the previously created RepositoryDocument.- Returns:
- a repository document object.
- Throws:
ManifoldCFException
-
close
public void close() throws ManifoldCFExceptionClose this object and release its resources.- Throws:
ManifoldCFException
-
-