com.aelitis.azureus.core.metasearch.impl.web
Class WebEngine
java.lang.Object
com.aelitis.azureus.core.metasearch.impl.EngineImpl
com.aelitis.azureus.core.metasearch.impl.web.WebEngine
- All Implemented Interfaces:
- Engine
- Direct Known Subclasses:
- JSONEngine, RegexEngine, RSSEngine
public abstract class WebEngine
- extends EngineImpl
Fields inherited from interface com.aelitis.azureus.core.metasearch.Engine |
AUTO_DL_SUPPORTED_NO, AUTO_DL_SUPPORTED_UNKNOWN, AUTO_DL_SUPPORTED_YES, AZ_VERSION, CT_AUDIO, CT_GAME, CT_VIDEO, ENGINE_SOURCE_LOCAL, ENGINE_SOURCE_RSS, ENGINE_SOURCE_STRS, ENGINE_SOURCE_UNKNOWN, ENGINE_SOURCE_VUZE, ENGINE_TYPE_JSON, ENGINE_TYPE_PLUGIN, ENGINE_TYPE_REGEX, ENGINE_TYPE_RSS, ENGINE_TYPE_STRS, FIELD_CATEGORY, FIELD_CDPLINK, FIELD_COMMENTS, FIELD_CONTENT_TYPE, FIELD_DATE, FIELD_DISCARD, FIELD_DOWNLOADBTNLINK, FIELD_DRMKEY, FIELD_HASH, FIELD_IDS, FIELD_NAME, FIELD_NAMES, FIELD_PEERS, FIELD_PLAYLINK, FIELD_PRIVATE, FIELD_RANK, FIELD_SEEDS, FIELD_SIZE, FIELD_SUPERSEEDS, FIELD_TORRENTLINK, FIELD_VOTES, FIELD_VOTES_DOWN, SC_AZID, SC_BATCH_PERIOD, SC_FORCE_FULL, SC_REMOVE_DUP_HASH, SC_SOURCE, SEL_STATE_AUTO_SELECTED, SEL_STATE_DESELECTED, SEL_STATE_FORCE_DESELECTED, SEL_STATE_MANUAL_SELECTED, SEL_STATE_STRINGS, VUZE_FILE_COMPONENT_ENGINE_KEY |
Constructor Summary |
protected |
WebEngine(MetaSearchImpl meta_search,
int type,
long id,
long last_updated,
float rank_bias,
String name,
JSONObject map)
|
|
WebEngine(MetaSearchImpl meta_search,
int type,
long id,
long last_updated,
float rank_bias,
String name,
String searchURLFormat,
String timeZone,
boolean automaticDateParser,
String userDateFormat,
FieldMapping[] mappings,
boolean needs_auth,
String auth_method,
String login_url,
String[] required_cookies)
|
protected |
WebEngine(MetaSearchImpl meta_search,
Map map)
|
Method Summary |
protected void |
exportToBencodedMap(Map map,
boolean generic)
|
protected void |
exportToJSONObject(JSONObject res)
|
protected String |
extractProperty(Object o)
|
String |
getAuthMethod()
|
protected String |
getBasePage()
|
String |
getCookies()
|
protected DateParser |
getDateParser()
|
String |
getDownloadLinkCSS()
|
String |
getIcon()
|
String |
getLoginPageUrl()
|
protected FieldMapping[] |
getMappings()
|
String |
getNameEx()
|
String |
getReferer()
|
String[] |
getRequiredCookies()
|
protected String |
getRootPage()
|
String |
getSearchUrl()
|
String |
getSearchUrl(boolean raw)
|
String |
getString()
|
String |
getString(boolean full)
|
protected WebEngine.pageDetails |
getWebPageContent(SearchParameter[] searchParameters,
Map<String,String> searchContext,
String headers,
boolean only_if_modified)
|
protected WebEngine.pageDetails |
getWebPageContent(SearchParameter[] searchParameters,
Map<String,String> searchContext,
String headers,
boolean only_if_modified,
WebEngine.pageDetailsVerifier verifier)
|
protected void |
init()
|
boolean |
isAuthenticated()
|
boolean |
isNeedsAuth()
|
boolean |
isShareable()
|
boolean |
requiresLogin()
|
void |
setCookies(String cookies)
|
protected void |
setHeaders(ResourceDownloader rd,
String encoded_headers)
|
void |
setLoginPageUrl(String loginPageUrl)
|
protected void |
setNeedsAuth(boolean b)
|
void |
setRequiredCookies(String[] requiredCookies)
|
void |
setSearchUrl(String str)
|
boolean |
supportsContext(String context_key)
|
boolean |
supportsField(int field_id)
|
Methods inherited from class com.aelitis.azureus.core.metasearch.impl.EngineImpl |
addPotentialAssociation, allocateUID, applyRankBias, checkSelectionStateRecorded, configDirty, debugLog, debugStart, delete, exportBEncodedMappings, exportJSONMappings, exportToJSONString, exportToVuzeFile, exportToVuzeFile, exportToVuzeFile, getAutoDownloadSupported, getAZVersion, getDebugFile, getId, getLastUpdateCheck, getLastUpdated, getLocalBoolean, getLocalLong, getLocalString, getMetaSearch, getName, getPreferredWeighting, getRankBias, getSelectionState, getSource, getType, getUID, getUpdateCheckSecs, getUpdateURL, getUserData, getVersion, importBEncodedMappings, importFromBEncodedMap, importFromJSONString, importJSONMappings, isActive, isMine, isPublic, log, log, mapResults, recordSelectionState, reset, sameLogicAs, search, searchAndMap, searchSupport, setDefaultUpdateCheckSecs, setId, setLastUpdateCheck, setLocalBoolean, setLocalLong, setLocalString, setLocalUpdateCheckSecs, setMine, setName, setPreferredDelta, setPublic, setRankBias, setSelectionState, setSource, setUID, setUpdateURL, setUserData, setVersion, vuzeFieldToID, vuzeIDToField |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AM_TRANSPARENT
public static final String AM_TRANSPARENT
- See Also:
- Constant Field Values
AM_PROXY
public static final String AM_PROXY
- See Also:
- Constant Field Values
WebEngine
public WebEngine(MetaSearchImpl meta_search,
int type,
long id,
long last_updated,
float rank_bias,
String name,
String searchURLFormat,
String timeZone,
boolean automaticDateParser,
String userDateFormat,
FieldMapping[] mappings,
boolean needs_auth,
String auth_method,
String login_url,
String[] required_cookies)
WebEngine
protected WebEngine(MetaSearchImpl meta_search,
Map map)
throws IOException
- Throws:
IOException
WebEngine
protected WebEngine(MetaSearchImpl meta_search,
int type,
long id,
long last_updated,
float rank_bias,
String name,
JSONObject map)
throws IOException
- Throws:
IOException
exportToBencodedMap
protected void exportToBencodedMap(Map map,
boolean generic)
throws IOException
- Overrides:
exportToBencodedMap
in class EngineImpl
- Throws:
IOException
exportToJSONObject
protected void exportToJSONObject(JSONObject res)
throws IOException
- Overrides:
exportToJSONObject
in class EngineImpl
- Throws:
IOException
init
protected void init()
getNameEx
public String getNameEx()
getReferer
public String getReferer()
supportsContext
public boolean supportsContext(String context_key)
isShareable
public boolean isShareable()
getWebPageContent
protected WebEngine.pageDetails getWebPageContent(SearchParameter[] searchParameters,
Map<String,String> searchContext,
String headers,
boolean only_if_modified)
throws SearchException
- Throws:
SearchException
getWebPageContent
protected WebEngine.pageDetails getWebPageContent(SearchParameter[] searchParameters,
Map<String,String> searchContext,
String headers,
boolean only_if_modified,
WebEngine.pageDetailsVerifier verifier)
throws SearchException
- Throws:
SearchException
extractProperty
protected String extractProperty(Object o)
setHeaders
protected void setHeaders(ResourceDownloader rd,
String encoded_headers)
getIcon
public String getIcon()
getMappings
protected FieldMapping[] getMappings()
supportsField
public boolean supportsField(int field_id)
getRootPage
protected String getRootPage()
getBasePage
protected String getBasePage()
getDateParser
protected DateParser getDateParser()
getDownloadLinkCSS
public String getDownloadLinkCSS()
requiresLogin
public boolean requiresLogin()
setCookies
public void setCookies(String cookies)
getSearchUrl
public String getSearchUrl(boolean raw)
getSearchUrl
public String getSearchUrl()
setSearchUrl
public void setSearchUrl(String str)
getLoginPageUrl
public String getLoginPageUrl()
setLoginPageUrl
public void setLoginPageUrl(String loginPageUrl)
getRequiredCookies
public String[] getRequiredCookies()
setRequiredCookies
public void setRequiredCookies(String[] requiredCookies)
isNeedsAuth
public boolean isNeedsAuth()
isAuthenticated
public boolean isAuthenticated()
- Specified by:
isAuthenticated
in interface Engine
- Overrides:
isAuthenticated
in class EngineImpl
setNeedsAuth
protected void setNeedsAuth(boolean b)
getAuthMethod
public String getAuthMethod()
getCookies
public String getCookies()
getString
public String getString()
- Specified by:
getString
in interface Engine
- Overrides:
getString
in class EngineImpl
getString
public String getString(boolean full)
- Overrides:
getString
in class EngineImpl