public class AnnieExtractor extends AbstractGate
| Modifier and Type | Field and Description |
|---|---|
private static gate.CorpusController |
annieController |
private AnnieConfiguration |
configuration |
private static java.lang.String[] |
contentTypes |
static java.lang.String |
DOCUMENT_SI |
static java.lang.String |
ENTITY_SI |
static java.lang.String |
ENTITY_TYPE_SI |
static java.lang.String |
GATE_ANNIE_SI |
static java.lang.String |
SOURCE_SI |
static java.lang.String |
TOPIC_SI |
CONFIG_FILE, GATE_HOME, GATE_PLUGIN_HOMECUSTOM_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_EXTRACTORCLOSE, EXECUTE, INVISIBLE, VISIBLE, WAITRETURN_ERROR, RETURN_INFO| Constructor and Description |
|---|
AnnieExtractor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_extractTopicsFrom(java.io.File file,
TopicMap topicMap) |
boolean |
_extractTopicsFrom(java.io.InputStream in,
TopicMap topicMap) |
boolean |
_extractTopicsFrom(java.lang.String in,
TopicMap tm) |
boolean |
_extractTopicsFrom(java.net.URL url,
TopicMap topicMap) |
boolean |
acceptAnnotationType(java.lang.String annotationType) |
void |
configure(Wandora wandora,
Options options,
java.lang.String prefix)
If the tool is configurable, shows an user interface to configure the tool.
|
void |
doAnnie(java.lang.String in,
TopicMap topicMap) |
void |
doAnnieAnnotation(java.lang.String word,
java.lang.String annotationType,
Topic masterTopic,
TopicMap tm) |
void |
execute(Wandora wandora,
Context context)
Runs the tool.
|
void |
fillDocumentTopic(Topic textTopic,
TopicMap topicMap,
java.lang.String content) |
java.lang.String[] |
getContentTypes()
Returns an array of String containing the content-types this
ContentHandler can process. |
java.lang.String |
getDescription()
AdminToolManager views tool descriptions while user browses available
tools and build user customizable GUI elements such as Tools menu.
|
Topic |
getDocumentType(TopicMap tm) |
Topic |
getEntityMetaType(TopicMap tm) |
Topic |
getEntityTopic(java.lang.String entity,
java.lang.String type,
TopicMap tm) |
Topic |
getEntityType(TopicMap tm) |
Topic |
getEntityTypeTopic(java.lang.String type,
TopicMap tm) |
Topic |
getGATEAnnieClass(TopicMap tm) |
javax.swing.Icon |
getIcon()
All tools may have identifying graphic icon used within tool GUI elements.
|
java.lang.String |
getName()
Tools name represent the tool in UI unless the tool has been given
explicitly another GUI name.
|
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) |
Topic |
getTopicType(TopicMap tm) |
Topic |
getWandoraClass(TopicMap tm) |
void |
initializeAnnie() |
boolean |
isConfigurable()
Whether this tool is configurable.
|
void |
log(java.lang.String msg)
Shortcut to access tool's logger.
|
protected void |
makeSubclassOf(TopicMap tm,
Topic t,
Topic superclass) |
java.lang.String |
solveTitle(java.lang.String content) |
boolean |
useURLCrawler() |
void |
writeOptions(Wandora admin,
Options options,
java.lang.String prefix)
If the tool is configurable, saves all current tool options.
|
acceptBrowserExtractRequest, addCrawlerUrl, browserExtractorConsumesPlainText, buildSI, buildSL, clearMasterSubject, createAssociation, createAssociation, createTopic, createTopic, createTopic, createTopic, createTopic, createTopic, createTopic, croppedFilename, croppedFilename, croppedUrlString, croppedUrlString, doBrowserExtract, dropExtract, dropExtract, dropExtract, extractTopicsFrom, extractTopicsFrom, extractTopicsFrom, extractTopicsFrom, extractTopicsFromText, getBrowserExtractorName, getCrawlerMode, getExtractorType, getForceContent, getForceFiles, getForceUrls, getGUIText, getGUIText, getInterruptsHandled, getMasterSubject, getType, 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, useTempTopicMapaddUndoMarker, addUndoMarker, allowMultipleInvocations, clearAllThreads, clearThreads, clearThreads, clearToolLock, clearToolLock, clearToolLocks, 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, requiresRefresh, run, setContext, setDefaultLogger, setLogTitle, setProgress, setProgressMax, setState, setToolLogger, singleLog, singleLog, singleLog, solveContextTopicMap, solveNameForTopicMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecute, execute, getContext, getToolMenuItem, hlog, initialize, isRunning, log, log, log, requiresRefresh, setContext, setToolLoggerforceStop, getHistory, getState, lockLog, setLogTitle, setProgress, setProgressMax, setStatepublic 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 ENTITY_SI
public static final java.lang.String ENTITY_TYPE_SI
public static final java.lang.String GATE_ANNIE_SI
private AnnieConfiguration configuration
private static gate.CorpusController annieController
private static final java.lang.String[] contentTypes
public java.lang.String getName()
AbstractWandoraToolgetName in interface WandoraToolgetName in class AbstractExtractorpublic java.lang.String getDescription()
AbstractWandoraToolgetDescription in interface WandoraToolgetDescription in class AbstractExtractorpublic javax.swing.Icon getIcon()
AbstractWandoraToolgetIcon should return Icon object of
the tool.getIcon in interface WandoraToolgetIcon in class AbstractExtractorpublic java.lang.String[] getContentTypes()
HandlerContentHandler can process.getContentTypes in interface HandlergetContentTypes in class AbstractExtractorpublic boolean useURLCrawler()
useURLCrawler in class AbstractExtractorpublic boolean isConfigurable()
AbstractWandoraToolisConfigurable in interface WandoraToolisConfigurable in class AbstractWandoraToolpublic void configure(Wandora wandora, Options options, java.lang.String prefix) throws TopicMapException
AbstractWandoraToolconfigure in interface WandoraToolconfigure in class AbstractWandoraToolTopicMapExceptionpublic void writeOptions(Wandora admin, Options options, java.lang.String prefix)
AbstractWandoraToolwriteOptions in interface WandoraToolwriteOptions in class AbstractWandoraToolpublic void execute(Wandora wandora, Context context)
WandoraToolexecute in interface WandoraToolexecute in class AbstractExtractorpublic boolean _extractTopicsFrom(java.net.URL url,
TopicMap topicMap)
throws java.lang.Exception
_extractTopicsFrom in class AbstractExtractorjava.lang.Exceptionpublic boolean _extractTopicsFrom(java.io.File file,
TopicMap topicMap)
throws java.lang.Exception
_extractTopicsFrom in class AbstractExtractorjava.lang.Exceptionpublic boolean _extractTopicsFrom(java.io.InputStream in,
TopicMap topicMap)
throws java.lang.Exception
java.lang.Exceptionpublic boolean _extractTopicsFrom(java.lang.String in,
TopicMap tm)
throws java.lang.Exception
_extractTopicsFrom in class AbstractExtractorjava.lang.Exceptionpublic void initializeAnnie()
throws gate.util.GateException,
java.net.MalformedURLException,
java.io.IOException
gate.util.GateExceptionjava.net.MalformedURLExceptionjava.io.IOExceptionpublic void doAnnie(java.lang.String in,
TopicMap topicMap)
throws gate.util.GateException,
java.net.MalformedURLException,
java.io.IOException,
TopicMapException
gate.util.GateExceptionjava.net.MalformedURLExceptionjava.io.IOExceptionTopicMapExceptionpublic void doAnnieAnnotation(java.lang.String word,
java.lang.String annotationType,
Topic masterTopic,
TopicMap tm)
throws TopicMapException
TopicMapExceptionpublic boolean acceptAnnotationType(java.lang.String annotationType)
public Topic getEntityMetaType(TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getEntityTypeTopic(java.lang.String type, TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getEntityType(TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getEntityTopic(java.lang.String entity, java.lang.String type, TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getGATEAnnieClass(TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getWandoraClass(TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getTopicType(TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getSourceType(TopicMap tm) throws TopicMapException
TopicMapExceptionpublic Topic getDocumentType(TopicMap tm) throws TopicMapException
TopicMapExceptionprotected Topic getOrCreateTopic(TopicMap tm, java.lang.String si) throws TopicMapException
TopicMapExceptionprotected Topic getOrCreateTopic(TopicMap tm, java.lang.String si, java.lang.String bn) throws TopicMapException
TopicMapExceptionprotected void makeSubclassOf(TopicMap tm, Topic t, Topic superclass) throws TopicMapException
TopicMapExceptionpublic java.lang.String solveTitle(java.lang.String content)
public void fillDocumentTopic(Topic textTopic, TopicMap topicMap, java.lang.String content)
public void log(java.lang.String msg)
WandoraToollog in interface WandoraToollog in interface WandoraToolLoggerlog in interface TopicMapLoggerlog in class AbstractWandoraToolmsg - to be logged.Copyright 2004-2015 Wandora Team