Package be.panako.strategy
Class Strategy
java.lang.Object
be.panako.strategy.Strategy
- Direct Known Subclasses:
OlafStrategy
,PanakoStrategy
,PitchClassHistogramStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
classToName
(Class<? extends Strategy> c) abstract void
clear()
Clear al information from the key value storestatic Strategy
abstract boolean
hasResource
(String resource) Are there fingerprints for this resource already stored in the database?abstract boolean
abstract void
monitor
(String query, int maxNumberOfReqults, Set<Integer> avoid, QueryResultHandler handler) void
abstract void
Print some storage statistics.abstract void
query
(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler) abstract String
Returns an internal identifier, probably an integer, for a given filename.abstract double
Store an audio file in the data store.
-
Constructor Details
-
Strategy
public Strategy()
-
-
Method Details
-
store
Store an audio file in the data store. The name of the resource is used to extract a numerical identifier. The description is arbitrary.- Parameters:
resource
- The audio resource.description
- An arbitrary description.- Returns:
- The number of seconds of processed audio.
-
query
public abstract void query(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler) -
monitor
public abstract void monitor(String query, int maxNumberOfReqults, Set<Integer> avoid, QueryResultHandler handler) -
hasResource
Are there fingerprints for this resource already stored in the database?- Parameters:
resource
- The name of the resource.- Returns:
- True if the resource is already treated. False otherwise.
-
isStorageAvailable
public abstract boolean isStorageAvailable()- Returns:
- True if the storage is available, false otherwise.
-
printStorageStatistics
public abstract void printStorageStatistics()Print some storage statistics. -
getInstance
-
classToName
-
resolve
Returns an internal identifier, probably an integer, for a given filename.- Parameters:
filename
- the name of the file to resolve.- Returns:
- An internal identifier, probably an integer, for a given filename.
-
print
-
clear
public abstract void clear()Clear al information from the key value store
-