public abstract class AbstractUClassifier extends AbstractExtractor
Modifier and Type | Class and Description |
---|---|
class |
AbstractUClassifier.UClassifyParser |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
API_URL |
private static java.lang.String |
apikey |
private java.lang.String[] |
contentTypes |
protected java.lang.String |
defaultEncoding |
static java.lang.String |
DOCUMENT_SI |
private java.lang.String |
REQUEST_TEMPLATE |
static java.lang.String |
SOURCE_SI |
static java.lang.String |
TOPIC_SI |
static java.lang.String |
UCLASSIFY_CLASS_SI |
static java.lang.String |
UCLASSIFY_CLASS_TYPE_SI |
static java.lang.String |
UCLASSIFY_CLASSIFIER_SI |
static java.lang.String |
UCLASSIFY_CLASSIFIER_TYPE_SI |
static java.lang.String |
UCLASSIFY_PROBABILITY_SI |
static java.lang.String |
UCLASSIFY_PROBABILITY_TYPE_SI |
static java.lang.String |
UCLASSIFY_SI |
CUSTOM_EXTRACTOR, DONE_FAILED, DONE_MANY, DONE_ONE, EXACTLY_GIVEN_URLS, FILE_EXTRACTOR, FILE_PATTERN, GIVEN_URLS_AND_ALL_CRAWLED_DOCUMENTS, GIVEN_URLS_AND_CRAWLED_DOCUMENTS_IN_URL_DOMAIN, GIVEN_URLS_AND_LINKED_DOCUMENTS, GIVEN_URLS_AND_URL_BELOW, INFO_WAIT_WHILE_WORKING, LOG_TITLE, POINT_START_URL_TEXT, RAW_EXTRACTOR, SELECT_DIALOG_TITLE, STRING_EXTRACTOR_NOT_SUPPORTED_MESSAGE, URL_EXTRACTOR
CLOSE, EXECUTE, INVISIBLE, VISIBLE, WAIT
RETURN_ERROR, RETURN_INFO
Constructor and Description |
---|
AbstractUClassifier() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
_extractTopicsFrom(java.io.InputStream in,
TopicMap topicMap) |
java.lang.String |
doBrowserExtract(BrowserExtractRequest request,
Wandora wandora) |
java.lang.String |
encode(java.lang.String str) |
void |
fillDocumentTopic(Topic textTopic,
TopicMap topicMap,
java.lang.String content) |
void |
forgetAuthorization() |
java.lang.String[] |
getContentTypes()
Returns an array of String containing the content-types this
ContentHandler can process. |
Topic |
getDocumentType(TopicMap tm) |
protected java.lang.String |
getFileContents(java.io.File file) |
javax.swing.Icon |
getIcon()
All tools may have identifying graphic icon used within tool GUI elements.
|
protected Topic |
getOrCreateTopic(TopicMap tm,
java.lang.String si) |
protected Topic |
getOrCreateTopic(TopicMap tm,
java.lang.String si,
java.lang.String bn) |
Topic |
getSourceType(TopicMap tm) |
protected java.lang.String |
getStringFromDocument(org.w3c.dom.Document doc) |
Topic |
getTopicType(TopicMap tm) |
WandoraToolType |
getType()
Tool type is used to categorize tools.
|
Topic |
getUClassifierTopic(java.lang.String uclassifier,
TopicMap tm) |
Topic |
getUClassifierType(TopicMap tm) |
Topic |
getUClassifyClass(TopicMap tm) |
Topic |
getUClassTopic(java.lang.String uclass,
TopicMap tm) |
Topic |
getUClassType(TopicMap tm) |
Topic |
getUProbabilityTopic(java.lang.String uprobability,
TopicMap tm) |
Topic |
getUProbabilityType(TopicMap tm) |
Topic |
getWandoraClass(TopicMap tm) |
boolean |
isConfigurable()
Whether this tool is configurable.
|
protected void |
makeSubclassOf(TopicMap tm,
Topic t,
Topic superclass) |
static java.lang.String |
sendRequest(java.net.URL url,
java.lang.String data,
java.lang.String ctype,
java.lang.String method) |
java.lang.String |
solveAPIKey() |
java.lang.String |
solveAPIKey(Wandora wandora) |
java.lang.String |
solveTitle(java.lang.String content) |
java.lang.String |
uClassify(java.lang.String data,
java.lang.String classifier,
java.lang.String classifierOwner,
double thresholdProbability,
TopicMap tm) |
boolean |
useURLCrawler() |
_extractTopicsFrom, _extractTopicsFrom, _extractTopicsFrom, acceptBrowserExtractRequest, addCrawlerUrl, browserExtractorConsumesPlainText, buildSI, buildSL, clearMasterSubject, createAssociation, createAssociation, createTopic, createTopic, createTopic, createTopic, createTopic, createTopic, createTopic, croppedFilename, croppedFilename, croppedUrlString, croppedUrlString, dropExtract, dropExtract, dropExtract, execute, extractTopicsFrom, extractTopicsFrom, extractTopicsFrom, extractTopicsFrom, extractTopicsFromText, getBrowserExtractorName, getCrawlerMode, getDescription, getExtractorType, getForceContent, getForceFiles, getForceUrls, getGUIText, getGUIText, getInterruptsHandled, getMasterSubject, getName, getWandora, handle, handleContent, handleCustomType, handleFiles, handleForcedContent, handleInterrupt, handleStringContent, handleUrls, initializeCustomType, instantDropHandle, makeSubclassOfWandoraClass, runInOwnThread, setData, setDisplayName, setForceContent, setForceFiles, setForceUrls, setMasterSubject, setMasterSubject, setTopicMap, setupCrawler, setWandora, takeNap, urlEncode, useTempTopicMap
addUndoMarker, addUndoMarker, allowMultipleInvocations, clearAllThreads, clearThreads, clearThreads, clearToolLock, clearToolLock, clearToolLocks, configure, execute, execute, forceStop, forceStop, getContext, getCurrentLogger, getDefaultLogger, getHistory, getLastLogger, getState, getThreads, getThreads, getToolMenuItem, getToolMenuItem, getTopicName, hlog, initialize, interruptAllThreads, interruptThreads, interruptThreads, isRunning, isRunning, lockLog, log, log, log, log, requiresRefresh, run, setContext, setDefaultLogger, setLogTitle, setProgress, setProgressMax, setState, setToolLogger, singleLog, singleLog, singleLog, solveContextTopicMap, solveNameForTopicMap, writeOptions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure, execute, execute, getContext, getToolMenuItem, hlog, initialize, isRunning, log, log, log, log, requiresRefresh, setContext, setToolLogger, writeOptions
forceStop, getHistory, getState, lockLog, setLogTitle, setProgress, setProgressMax, setState
private java.lang.String REQUEST_TEMPLATE
protected static final java.lang.String API_URL
protected java.lang.String defaultEncoding
public static final java.lang.String SOURCE_SI
public static final java.lang.String DOCUMENT_SI
public static final java.lang.String TOPIC_SI
public static final java.lang.String UCLASSIFY_SI
public static final java.lang.String UCLASSIFY_CLASSIFIER_SI
public static final java.lang.String UCLASSIFY_CLASSIFIER_TYPE_SI
public static final java.lang.String UCLASSIFY_CLASS_SI
public static final java.lang.String UCLASSIFY_CLASS_TYPE_SI
public static final java.lang.String UCLASSIFY_PROBABILITY_SI
public static final java.lang.String UCLASSIFY_PROBABILITY_TYPE_SI
private final java.lang.String[] contentTypes
private static java.lang.String apikey
public javax.swing.Icon getIcon()
AbstractWandoraTool
getIcon
should return Icon
object of
the tool.getIcon
in interface WandoraTool
getIcon
in class AbstractExtractor
public WandoraToolType getType()
AbstractWandoraTool
Tool type is used to categorize tools. Tool type has no real effect today, it is merely an informative property of a tool.
getType
in interface WandoraTool
getType
in class AbstractExtractor
public java.lang.String[] getContentTypes()
Handler
ContentHandler
can process.getContentTypes
in interface Handler
getContentTypes
in class AbstractExtractor
public boolean useURLCrawler()
useURLCrawler
in class AbstractExtractor
public boolean isConfigurable()
AbstractWandoraTool
isConfigurable
in interface WandoraTool
isConfigurable
in class AbstractWandoraTool
public java.lang.String doBrowserExtract(BrowserExtractRequest request, Wandora wandora) throws TopicMapException
doBrowserExtract
in interface BrowserPluginExtractor
doBrowserExtract
in class AbstractExtractor
TopicMapException
public abstract boolean _extractTopicsFrom(java.io.InputStream in, TopicMap topicMap) throws java.lang.Exception
java.lang.Exception
public java.lang.String solveTitle(java.lang.String content)
public void fillDocumentTopic(Topic textTopic, TopicMap topicMap, java.lang.String content)
public Topic getUClassifierType(TopicMap tm) throws TopicMapException
TopicMapException
public Topic getUClassifierTopic(java.lang.String uclassifier, TopicMap tm) throws TopicMapException
TopicMapException
public Topic getUClassType(TopicMap tm) throws TopicMapException
TopicMapException
public Topic getUClassTopic(java.lang.String uclass, TopicMap tm) throws TopicMapException
TopicMapException
public Topic getUProbabilityType(TopicMap tm) throws TopicMapException
TopicMapException
public Topic getUProbabilityTopic(java.lang.String uprobability, TopicMap tm) throws TopicMapException
TopicMapException
public Topic getUClassifyClass(TopicMap tm) throws TopicMapException
TopicMapException
public Topic getWandoraClass(TopicMap tm) throws TopicMapException
TopicMapException
public Topic getTopicType(TopicMap tm) throws TopicMapException
TopicMapException
public Topic getSourceType(TopicMap tm) throws TopicMapException
TopicMapException
public Topic getDocumentType(TopicMap tm) throws TopicMapException
TopicMapException
protected Topic getOrCreateTopic(TopicMap tm, java.lang.String si) throws TopicMapException
TopicMapException
protected Topic getOrCreateTopic(TopicMap tm, java.lang.String si, java.lang.String bn) throws TopicMapException
TopicMapException
protected void makeSubclassOf(TopicMap tm, Topic t, Topic superclass) throws TopicMapException
TopicMapException
public java.lang.String encode(java.lang.String str)
protected java.lang.String getStringFromDocument(org.w3c.dom.Document doc)
protected java.lang.String getFileContents(java.io.File file) throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public java.lang.String uClassify(java.lang.String data, java.lang.String classifier, java.lang.String classifierOwner, double thresholdProbability, TopicMap tm)
public static java.lang.String sendRequest(java.net.URL url, java.lang.String data, java.lang.String ctype, java.lang.String method) throws java.io.IOException
java.io.IOException
public java.lang.String solveAPIKey(Wandora wandora)
public java.lang.String solveAPIKey()
public void forgetAuthorization()
Copyright 2004-2015 Wandora Team