Package com.biglybt.core.metasearch
Interface Engine
-
- All Known Implementing Classes:
EngineImpl
,JSONEngine
,PluginEngine
,RegexEngine
,RSSEngine
,WebEngine
public interface Engine
-
-
Field Summary
Fields Modifier and Type Field Description static int
AUTO_DL_SUPPORTED_NO
static int
AUTO_DL_SUPPORTED_UNKNOWN
static int
AUTO_DL_SUPPORTED_YES
static int
AZ_VERSION
AZ_VERSION: 1: Original 2: field value substitution in JSON engine type using ${FIELD_ID} 3: field value substitution in REGEX engine type using ${FIELD_NO} 4: JSON engine now supports [x] in Entry Path, where x is the array index 5: JSON and REGEX support functions in ${FIELD_ID} or ${FIELD_NO}, such as ${1,ucase} ${1,lcase} ${1,urldecode} ${1,replace,fromRegex,toText} ${1,lcase+urldecode}static java.lang.String
CT_AUDIO
static java.lang.String
CT_GAME
static java.lang.String
CT_VIDEO
static int
ENGINE_SOURCE_LOCAL
static int
ENGINE_SOURCE_RSS
static java.lang.String[]
ENGINE_SOURCE_STRS
don't change these as they are externalisedstatic int
ENGINE_SOURCE_UNKNOWN
static int
ENGINE_SOURCE_VUZE
static int
ENGINE_TYPE_JSON
static int
ENGINE_TYPE_PLUGIN
static int
ENGINE_TYPE_REGEX
static int
ENGINE_TYPE_RSS
static java.lang.String[]
ENGINE_TYPE_STRS
static int
FIELD_ASSET_DATE
static int
FIELD_CATEGORY
static int
FIELD_CDPLINK
static int
FIELD_COMMENTS
static int
FIELD_CONTENT_TYPE
static int
FIELD_DATE
static int
FIELD_DISCARD
static int
FIELD_DOWNLOADBTNLINK
static int
FIELD_DRMKEY
static int
FIELD_HASH
static int[]
FIELD_IDS
static int
FIELD_NAME
static java.lang.String[]
FIELD_NAMES
static int
FIELD_PEERS
static int
FIELD_PLAYLINK
static int
FIELD_PRIVATE
static int
FIELD_RANK
static int
FIELD_SEEDS
static int
FIELD_SIZE
static int
FIELD_SUPERSEEDS
static int
FIELD_TORRENTLINK
static int
FIELD_VOTES
static int
FIELD_VOTES_DOWN
static java.lang.String
SC_BATCH_PERIOD
static java.lang.String
SC_FORCE_FULL
static java.lang.String
SC_REMOVE_DUP_HASH
static java.lang.String
SC_SOURCE
static int
SEL_STATE_AUTO_SELECTED
static int
SEL_STATE_DESELECTED
static int
SEL_STATE_FORCE_DESELECTED
static int
SEL_STATE_MANUAL_SELECTED
static java.lang.String[]
SEL_STATE_STRINGS
static java.lang.Object
VUZE_FILE_COMPONENT_ENGINE_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPotentialAssociation(java.lang.String key)
float
applyRankBias(float rank)
void
checkSelectionStateRecorded()
void
delete()
java.util.Map<java.lang.String,java.lang.Object>
exportToBencodedMap()
java.util.Map<java.lang.String,java.lang.Object>
exportToBencodedMap(boolean generic)
java.lang.String
exportToJSONString()
VuzeFile
exportToVuzeFile()
void
exportToVuzeFile(java.io.File target)
int
getAutoDownloadSupported()
int
getAZVersion()
java.lang.String
getDownloadLinkCSS()
java.lang.String
getIcon()
long
getId()
long
getLastUpdated()
java.lang.String
getName()
java.lang.String
getNameEx()
float
getPreferredWeighting()
float
getRankBias()
java.lang.String
getReferer()
int
getSelectionState()
int
getSource()
java.lang.String
getString()
Subscription
getSubscription()
int
getType()
java.lang.String
getUID()
int
getVersion()
boolean
isActive()
boolean
isAnonymous()
boolean
isAuthenticated()
boolean
isMine()
boolean
isPublic()
boolean
isShareable()
void
recordSelectionState()
void
reset()
resets to initial state (e.g.boolean
sameLogicAs(Engine other)
Tests for sameness in terms of function (ignores id, selection state etc)Result[]
search(SearchParameter[] searchParameters, java.util.Map context, int desired_max_matches, int absolute_max_matches, java.lang.String headers, ResultListener listener)
void
setMine(boolean mine)
void
setPreferredDelta(float delta)
void
setRankBias(float bias)
void
setSelectionState(int state)
void
setSource(int source)
boolean
supportsContext(java.lang.String context_key)
boolean
supportsField(int field_id)
-
-
-
Field Detail
-
AZ_VERSION
static final int AZ_VERSION
AZ_VERSION: 1: Original 2: field value substitution in JSON engine type using ${FIELD_ID} 3: field value substitution in REGEX engine type using ${FIELD_NO} 4: JSON engine now supports [x] in Entry Path, where x is the array index 5: JSON and REGEX support functions in ${FIELD_ID} or ${FIELD_NO}, such as ${1,ucase} ${1,lcase} ${1,urldecode} ${1,replace,fromRegex,toText} ${1,lcase+urldecode}- See Also:
- Constant Field Values
-
VUZE_FILE_COMPONENT_ENGINE_KEY
static final java.lang.Object VUZE_FILE_COMPONENT_ENGINE_KEY
-
FIELD_NAME
static final int FIELD_NAME
- See Also:
- Constant Field Values
-
FIELD_DATE
static final int FIELD_DATE
- See Also:
- Constant Field Values
-
FIELD_SIZE
static final int FIELD_SIZE
- See Also:
- Constant Field Values
-
FIELD_PEERS
static final int FIELD_PEERS
- See Also:
- Constant Field Values
-
FIELD_SEEDS
static final int FIELD_SEEDS
- See Also:
- Constant Field Values
-
FIELD_CATEGORY
static final int FIELD_CATEGORY
- See Also:
- Constant Field Values
-
FIELD_COMMENTS
static final int FIELD_COMMENTS
- See Also:
- Constant Field Values
-
FIELD_CONTENT_TYPE
static final int FIELD_CONTENT_TYPE
- See Also:
- Constant Field Values
-
FIELD_DISCARD
static final int FIELD_DISCARD
- See Also:
- Constant Field Values
-
FIELD_VOTES
static final int FIELD_VOTES
- See Also:
- Constant Field Values
-
FIELD_SUPERSEEDS
static final int FIELD_SUPERSEEDS
- See Also:
- Constant Field Values
-
FIELD_PRIVATE
static final int FIELD_PRIVATE
- See Also:
- Constant Field Values
-
FIELD_DRMKEY
static final int FIELD_DRMKEY
- See Also:
- Constant Field Values
-
FIELD_VOTES_DOWN
static final int FIELD_VOTES_DOWN
- See Also:
- Constant Field Values
-
FIELD_TORRENTLINK
static final int FIELD_TORRENTLINK
- See Also:
- Constant Field Values
-
FIELD_CDPLINK
static final int FIELD_CDPLINK
- See Also:
- Constant Field Values
-
FIELD_PLAYLINK
static final int FIELD_PLAYLINK
- See Also:
- Constant Field Values
-
FIELD_DOWNLOADBTNLINK
static final int FIELD_DOWNLOADBTNLINK
- See Also:
- Constant Field Values
-
FIELD_HASH
static final int FIELD_HASH
- See Also:
- Constant Field Values
-
FIELD_RANK
static final int FIELD_RANK
- See Also:
- Constant Field Values
-
FIELD_ASSET_DATE
static final int FIELD_ASSET_DATE
- See Also:
- Constant Field Values
-
FIELD_IDS
static final int[] FIELD_IDS
-
FIELD_NAMES
static final java.lang.String[] FIELD_NAMES
-
ENGINE_TYPE_REGEX
static final int ENGINE_TYPE_REGEX
- See Also:
- Constant Field Values
-
ENGINE_TYPE_JSON
static final int ENGINE_TYPE_JSON
- See Also:
- Constant Field Values
-
ENGINE_TYPE_PLUGIN
static final int ENGINE_TYPE_PLUGIN
- See Also:
- Constant Field Values
-
ENGINE_TYPE_RSS
static final int ENGINE_TYPE_RSS
- See Also:
- Constant Field Values
-
ENGINE_SOURCE_UNKNOWN
static final int ENGINE_SOURCE_UNKNOWN
- See Also:
- Constant Field Values
-
ENGINE_SOURCE_VUZE
static final int ENGINE_SOURCE_VUZE
- See Also:
- Constant Field Values
-
ENGINE_SOURCE_LOCAL
static final int ENGINE_SOURCE_LOCAL
- See Also:
- Constant Field Values
-
ENGINE_SOURCE_RSS
static final int ENGINE_SOURCE_RSS
- See Also:
- Constant Field Values
-
SEL_STATE_DESELECTED
static final int SEL_STATE_DESELECTED
- See Also:
- Constant Field Values
-
SEL_STATE_AUTO_SELECTED
static final int SEL_STATE_AUTO_SELECTED
- See Also:
- Constant Field Values
-
SEL_STATE_MANUAL_SELECTED
static final int SEL_STATE_MANUAL_SELECTED
- See Also:
- Constant Field Values
-
SEL_STATE_FORCE_DESELECTED
static final int SEL_STATE_FORCE_DESELECTED
- See Also:
- Constant Field Values
-
AUTO_DL_SUPPORTED_UNKNOWN
static final int AUTO_DL_SUPPORTED_UNKNOWN
- See Also:
- Constant Field Values
-
AUTO_DL_SUPPORTED_YES
static final int AUTO_DL_SUPPORTED_YES
- See Also:
- Constant Field Values
-
AUTO_DL_SUPPORTED_NO
static final int AUTO_DL_SUPPORTED_NO
- See Also:
- Constant Field Values
-
ENGINE_SOURCE_STRS
static final java.lang.String[] ENGINE_SOURCE_STRS
don't change these as they are externalised
-
SEL_STATE_STRINGS
static final java.lang.String[] SEL_STATE_STRINGS
-
ENGINE_TYPE_STRS
static final java.lang.String[] ENGINE_TYPE_STRS
-
SC_SOURCE
static final java.lang.String SC_SOURCE
- See Also:
- Constant Field Values
-
SC_FORCE_FULL
static final java.lang.String SC_FORCE_FULL
- See Also:
- Constant Field Values
-
SC_BATCH_PERIOD
static final java.lang.String SC_BATCH_PERIOD
- See Also:
- Constant Field Values
-
SC_REMOVE_DUP_HASH
static final java.lang.String SC_REMOVE_DUP_HASH
- See Also:
- Constant Field Values
-
CT_VIDEO
static final java.lang.String CT_VIDEO
- See Also:
- Constant Field Values
-
CT_AUDIO
static final java.lang.String CT_AUDIO
- See Also:
- Constant Field Values
-
CT_GAME
static final java.lang.String CT_GAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
int getType()
-
search
Result[] search(SearchParameter[] searchParameters, java.util.Map context, int desired_max_matches, int absolute_max_matches, java.lang.String headers, ResultListener listener) throws SearchException
- Throws:
SearchException
-
getName
java.lang.String getName()
-
getNameEx
java.lang.String getNameEx()
-
getId
long getId()
-
getUID
java.lang.String getUID()
-
getVersion
int getVersion()
-
getLastUpdated
long getLastUpdated()
-
getIcon
java.lang.String getIcon()
-
getDownloadLinkCSS
java.lang.String getDownloadLinkCSS()
-
isActive
boolean isActive()
-
isMine
boolean isMine()
-
isPublic
boolean isPublic()
-
setMine
void setMine(boolean mine)
-
getSelectionState
int getSelectionState()
-
setSelectionState
void setSelectionState(int state)
-
recordSelectionState
void recordSelectionState()
-
checkSelectionStateRecorded
void checkSelectionStateRecorded()
-
getSource
int getSource()
-
setSource
void setSource(int source)
-
getReferer
java.lang.String getReferer()
-
getRankBias
float getRankBias()
-
setRankBias
void setRankBias(float bias)
-
setPreferredDelta
void setPreferredDelta(float delta)
-
getPreferredWeighting
float getPreferredWeighting()
-
applyRankBias
float applyRankBias(float rank)
-
supportsField
boolean supportsField(int field_id)
-
supportsContext
boolean supportsContext(java.lang.String context_key)
-
isShareable
boolean isShareable()
-
isAnonymous
boolean isAnonymous()
-
isAuthenticated
boolean isAuthenticated()
-
getAutoDownloadSupported
int getAutoDownloadSupported()
- Returns:
- one of AUTO_DL constants above
-
getAZVersion
int getAZVersion()
-
addPotentialAssociation
void addPotentialAssociation(java.lang.String key)
-
getSubscription
Subscription getSubscription()
-
exportToBencodedMap
java.util.Map<java.lang.String,java.lang.Object> exportToBencodedMap() throws java.io.IOException
- Throws:
java.io.IOException
-
exportToBencodedMap
java.util.Map<java.lang.String,java.lang.Object> exportToBencodedMap(boolean generic) throws java.io.IOException
- Throws:
java.io.IOException
-
exportToJSONString
java.lang.String exportToJSONString() throws java.io.IOException
- Throws:
java.io.IOException
-
exportToVuzeFile
void exportToVuzeFile(java.io.File target) throws java.io.IOException
- Throws:
java.io.IOException
-
exportToVuzeFile
VuzeFile exportToVuzeFile() throws java.io.IOException
- Throws:
java.io.IOException
-
sameLogicAs
boolean sameLogicAs(Engine other)
Tests for sameness in terms of function (ignores id, selection state etc)- Parameters:
other
-- Returns:
-
reset
void reset()
resets to initial state (e.g. if the engine has state pertaining to what has/hasn't been downloaded such as etags then this will be cleared)
-
delete
void delete()
-
getString
java.lang.String getString()
-
-