public class MockDocumentStore extends Object implements DocumentStoreApi
CONTENT_STORE_NAMESPACE_PREFIX, DEFAULT_FILTER_FIELDS| Constructor and Description |
|---|
MockDocumentStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String collection,
String docId)
Deletes the document from the specified collection
|
Iterable<IngestDocument> |
filteredRetrieve(String collection,
Map<String,String> filterVals)
Finds and returns the documents matching the provided equality filters.
|
List<String> |
getCollectionNames()
Get the name of all collections.
|
int |
getCollectionSize(String collection)
Get the number of documents in a collection.
|
IngestDocument |
retrieve(String collection,
String docId) |
void |
store(String namespace,
IngestDocument doc,
List<String> filterFields,
boolean storeContentPointers)
Stores the document in
namespace, creating indexes which allow equality filtering on the list of fields provided. |
IngestDocument |
storeAndUpdate(String namespace,
IngestDocument doc,
List<String> filterFields,
boolean storeContentPointers)
Stores the document in
namespace, creating indexes which allow equality filtering on the list of fields provided. |
public int getCollectionSize(String collection)
public void delete(String collection, String docId) throws AttivioException
delete in interface DocumentStoreApiAttivioExceptionpublic IngestDocument retrieve(String collection, String docId) throws AttivioException
retrieve in interface DocumentStoreApiAttivioExceptionpublic void store(String namespace, IngestDocument doc, List<String> filterFields, boolean storeContentPointers) throws AttivioException
namespace, creating indexes which allow equality filtering on the list of fields provided.
Only the first value any multi-valued fields is available for filtering. The document may be temporarily altered during
invocation. If the document mode is set to PARTIAL, the document will first be retrieved,
updated with any fields from doc, then stored. If the document mode is set to ADD, any
existing version of the document will be replaced.
The input document is always unmodified upon return.
store in interface DocumentStoreApistoreContentPointers - if false, content associated with content pointers will not be stored and upon retrieval the
content may no longer be present.AttivioExceptionpublic IngestDocument storeAndUpdate(String namespace, IngestDocument doc, List<String> filterFields, boolean storeContentPointers) throws AttivioException
namespace, creating indexes which allow equality filtering on the list of fields provided.
Only the first value any multi-valued fields is available for filtering. The document may be temporarily altered during
invocation. If the document mode is set to PARTIAL, the document will first be retrieved,
updated with any fields from doc, then stored. It will then be modified and returned (to support remote API calls).
The returned document will always have its document mode set to ADD if it had been PARTIAL,
regardless of whether or not it had ever been stored.
If the document mode is set to ADD, any existing version of the document will be replaced and the returned document will be the original document.
storeAndUpdate in interface DocumentStoreApistoreContentPointers - if false, content associated with content pointers will not be stored and upon retrieval the
content may not be present.AttivioExceptionpublic Iterable<IngestDocument> filteredRetrieve(String collection, Map<String,String> filterVals) throws AttivioException
filteredRetrieve in interface DocumentStoreApiAttivioExceptionCopyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.