public abstract class Plugin extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Plugin.Component |
static class |
Plugin.Directory |
static interface |
Plugin.DownloadListener |
static class |
Plugin.Maven |
protected static class |
Plugin.ResourceInfoVisitor
ClassVisitor that uses information from a CreoleResource annotation on the
visited class (if such exists) to fill in the name and comment in the
corresponding ResourceInfo.
|
Modifier and Type | Field and Description |
---|---|
protected URL |
baseURL
This is the URL against which all relative URLs in the CREOLE metadata are
resolved
|
protected String |
description |
protected Vector<Plugin.DownloadListener> |
downloadListeners |
protected static org.slf4j.Logger |
log |
protected String |
minGateVersion |
protected String |
name |
protected Set<Plugin> |
requiredPlugins
The set of other plugins that must be loaded prior to the loading of this
plugin
|
protected List<Gate.ResourceInfo> |
resourceInfoList
The list of
Gate.ResourceInfo objects within this plugin |
protected boolean |
valid
Is the plugin valid (i.e.
|
protected String |
version |
Constructor and Description |
---|
Plugin() |
Modifier and Type | Method and Description |
---|---|
void |
addDownloadListener(Plugin.DownloadListener listener) |
void |
copyResources(File dir) |
boolean |
equals(Object obj) |
protected void |
fillInResInfos(List<Gate.ResourceInfo> incompleteResInfos,
List<String> allJars) |
protected void |
fireDownloadFailed(String name,
Throwable cause) |
protected void |
fireDownloadProgressed(String name,
long totalBytes,
long transferredBytes) |
protected void |
fireDownloadStarted(String name) |
protected void |
fireDownloadSucceeded(String name) |
URI |
getBaseURI() |
URL |
getBaseURL() |
abstract org.jdom.Document |
getCreoleXML()
Returns a fully expanded creole.xml file that can be used for loading the
plugin into GATE
|
String |
getDescription() |
org.jdom.Document |
getMetadataXML()
Returns a creole.xml file which is only guaranteed to contain information
about the resources within the plugin and not dependency requirements.
|
String |
getMinimumGateVersion() |
String |
getName() |
static Plugin |
getPlugin(Class<?> clazz)
Given a class return the Plugin instance from which it was loaded.
|
Set<Plugin> |
getRequiredPlugins() |
List<Gate.ResourceInfo> |
getResourceInfoList() |
String |
getVersion()
Get the version of this plugin.
|
int |
hashCode() |
boolean |
hasResources() |
boolean |
isValid() |
protected void |
parseCreole() |
void |
removeDownloadListener(Plugin.DownloadListener listener) |
protected void |
scanJar(URL jarUrl,
Map<String,Gate.ResourceInfo> resInfos) |
String |
toString() |
protected transient Vector<Plugin.DownloadListener> downloadListeners
protected static final org.slf4j.Logger log
protected transient boolean valid
protected transient URL baseURL
protected transient String name
protected transient String description
protected transient String version
protected transient String minGateVersion
protected transient List<Gate.ResourceInfo> resourceInfoList
Gate.ResourceInfo
objects within this pluginpublic void addDownloadListener(Plugin.DownloadListener listener)
public void removeDownloadListener(Plugin.DownloadListener listener)
protected void fireDownloadStarted(String name)
protected void fireDownloadSucceeded(String name)
protected void fireDownloadProgressed(String name, long totalBytes, long transferredBytes)
public abstract org.jdom.Document getCreoleXML() throws Exception
Exception
public org.jdom.Document getMetadataXML() throws Exception
Exception
public String getName()
public String getDescription()
public String getVersion()
public String getMinimumGateVersion()
public List<Gate.ResourceInfo> getResourceInfoList()
public URL getBaseURL()
public URI getBaseURI() throws URISyntaxException
URISyntaxException
public boolean isValid()
public void copyResources(File dir) throws IOException, URISyntaxException
IOException
URISyntaxException
public boolean hasResources()
public static Plugin getPlugin(Class<?> clazz) throws IOException
IOException
protected void parseCreole()
protected void scanJar(URL jarUrl, Map<String,Gate.ResourceInfo> resInfos) throws IOException
IOException
protected void fillInResInfos(List<Gate.ResourceInfo> incompleteResInfos, List<String> allJars) throws IOException
IOException
Copyright © 2024 GATE. All rights reserved.