Package be.panako.strategy.olaf
Class OlafStrategy
java.lang.Object
be.panako.strategy.Strategy
be.panako.strategy.olaf.OlafStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear al information from the key value storedouble
boolean
hasResource
(String resource) Are there fingerprints for this resource already stored in the database?boolean
void
load()
void
monitor
(String query, int maxNumberOfReqults, Set<Integer> avoid, QueryResultHandler handler) name()
void
void
Print some storage statistics.void
query
(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler) void
query
(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler, double startTimeOffset, double numberOfSeconds) Returns an internal identifier, probably an integer, for a given filename.double
Store an audio file in the data store.toFingerprints
(String resource) toFingerprints
(String resource, double startTimeOffset, double numberOfSeconds) Methods inherited from class be.panako.strategy.Strategy
classToName, getInstance
-
Constructor Details
-
OlafStrategy
public OlafStrategy()
-
-
Method Details
-
store
Description copied from class:Strategy
Store an audio file in the data store. The name of the resource is used to extract a numerical identifier. The description is arbitrary. -
delete
-
toFingerprints
-
toFingerprints
public List<OlafFingerprint> toFingerprints(String resource, double startTimeOffset, double numberOfSeconds) -
query
public void query(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler) -
query
public void query(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler, double startTimeOffset, double numberOfSeconds) -
monitor
public void monitor(String query, int maxNumberOfReqults, Set<Integer> avoid, QueryResultHandler handler) -
hasResource
Description copied from class:Strategy
Are there fingerprints for this resource already stored in the database?- Specified by:
hasResource
in classStrategy
- Parameters:
resource
- The name of the resource.- Returns:
- True if the resource is already treated. False otherwise.
-
isStorageAvailable
public boolean isStorageAvailable()- Specified by:
isStorageAvailable
in classStrategy
- Returns:
- True if the storage is available, false otherwise.
-
printStorageStatistics
public void printStorageStatistics()Description copied from class:Strategy
Print some storage statistics.- Specified by:
printStorageStatistics
in classStrategy
-
resolve
Description copied from class:Strategy
Returns an internal identifier, probably an integer, for a given filename. -
load
public void load() -
print
-
name
-
clear
public void clear()Description copied from class:Strategy
Clear al information from the key value store
-