Package com.kodexa.client.store
Class AbstractFileSystemDocumentStore
- java.lang.Object
-
- com.kodexa.client.store.AbstractFileSystemDocumentStore
-
- All Implemented Interfaces:
Connector
,Sink
,DocumentStore
,Iterator<Document>
- Direct Known Subclasses:
JsonDocumentStore
,MsgPackDocumentStore
public abstract class AbstractFileSystemDocumentStore extends Object implements Sink, Connector, DocumentStore
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
forceInitialize
protected List<String>
index
protected File
indexFile
protected static com.fasterxml.jackson.databind.ObjectMapper
OBJECT_MAPPER
protected String
path
protected File
storeFolder
-
Constructor Summary
Constructors Constructor Description AbstractFileSystemDocumentStore(String path, boolean forceInitialize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getCount()
abstract Document
getDocument(int position)
protected abstract String
getExtension()
protected File
getFile(String uuid)
String
getName()
InputStream
getSource(Document document)
boolean
hasNext()
Document
next()
void
readIndex()
void
resetConnector()
void
saveIndex()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Field Detail
-
OBJECT_MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
-
forceInitialize
protected final boolean forceInitialize
-
storeFolder
protected final File storeFolder
-
-
Constructor Detail
-
AbstractFileSystemDocumentStore
public AbstractFileSystemDocumentStore(String path, boolean forceInitialize)
-
-
Method Detail
-
getExtension
protected abstract String getExtension()
-
readIndex
public void readIndex()
-
saveIndex
public void saveIndex()
-
getSource
public InputStream getSource(Document document)
-
resetConnector
public void resetConnector()
-
getDocument
public abstract Document getDocument(int position)
-
-