Package org.opensextant.annotations
Interface DeepEyeStore
public interface DeepEyeStore
DeepEyeStore is an abstraction of a data store that stores records and
annotations.
For example, we built annotation stores implementing DeepEyeStore using
MongoDB, Postgres, Elasticsearch and SQLite backends.
- Author:
- ubaldino
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Collection<Annotation> aList) add a list of entity annotations.void
add
(Annotation A) add a single Annotation.void
Add new record.void
connect()
void
findRecord
(String id) find a single record.given the shell of a annot, find similar records.given the shell of a record, find similar records.void
Suggested Save operation: check if exists, update if it does, otherwise insert.void
update
(Annotation A) Update an existing annotation.void
The implementation of a record updatevoid
Update only the state of a record
-
Method Details
-
connect
- Throws:
DeepEyeException
-
disconnect
void disconnect() -
add
Add new record.- Throws:
DeepEyeException
-
update
The implementation of a record update- Parameters:
R
- record to update- Throws:
DeepEyeException
- on failure to update Record
-
save
Suggested Save operation: check if exists, update if it does, otherwise insert. This is typically adjustable behavior.- Parameters:
R
-- Throws:
DeepEyeException
- on failure to save Record, because system was down, lack of privileges, or inability to overwrite existing.
-
updateState
Update only the state of a record- Throws:
DeepEyeException
-
findRecord
find a single record. Avoid the overhead of a cursor for "findOne" query. Where you know you are looking for one or none.- Parameters:
id
-- Returns:
- Deepeye Record object
- Throws:
DeepEyeException
-
add
add a single Annotation.- Throws:
DeepEyeException
-
add
add a list of entity annotations.- Parameters:
aList
-- Throws:
DeepEyeException
-
update
Update an existing annotation. This does nothing if the annotation does not exist in the database.- Throws:
DeepEyeException
-
findSimilar
given the shell of a record, find similar records.- Throws:
DeepEyeException
-
findSimilar
given the shell of a annot, find similar records.
-