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 StringclassToName(Class<? extends Strategy> c) abstract voidclear()Clear al information from the key value storestatic Strategyabstract booleanhasResource(String resource) Are there fingerprints for this resource already stored in the database?abstract booleanabstract voidmonitor(String query, int maxNumberOfReqults, Set<Integer> avoid, QueryResultHandler handler) voidabstract voidPrint some storage statistics.abstract voidquery(String query, int maxNumberOfResults, Set<Integer> avoid, QueryResultHandler handler) abstract StringReturns an internal identifier, probably an integer, for a given filename.abstract doubleStore 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
-