public class ResourceData extends AbstractFeatureBearer
CreoleRegister
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected String |
annotationTypeDisplayed
The full type name of the annotation displayed by this viewer.
|
protected boolean |
autoLoading
Autoloading flag
|
protected String |
className
The class name of the resource
|
protected String |
comment
The comment string
|
protected static boolean |
DEBUG
Debug flag
|
protected static String |
DEFAULT_EXPORTER_ICON |
protected static String |
DEFAULT_LR_ICON |
protected static String |
DEFAULT_OTHER_ICON |
protected static String |
DEFAULT_PR_ICON |
protected int |
guiType
A filed which can have one of the 3 predefined values.
|
protected String |
helpURL
The helpURL string
|
protected String |
icon
Location of an icon for the resource
|
protected List<Resource> |
instantiationStack
The stack of instantiations
|
protected String |
interfaceName
The interface name of the resource
|
protected boolean |
isMainView
Whether or not this viewer will be the default one
|
protected String |
jarFileName
The jar file name of the resource
|
protected URL |
jarFileUrl
The jar file URL of the resource
|
static int |
LARGE_GUI
This type indicates that the resource goes into the large area of GATE GUI
|
protected String |
name
The name of the resource
|
static int |
NULL_GUI
This type indicates that the resource is not a GUI
|
protected ParameterList |
parameterList
The set of parameter lists
|
protected Plugin |
plugin
The plugin defining this resource type
|
protected boolean |
priv
Private flag
|
protected Class<? extends Resource> |
resourceClass
The class of the resource
|
protected String |
resourceDisplayed
The full class name of the resource displayed by this viewer.
|
protected Collection<String> |
sharableProperties |
static int |
SMALL_GUI
This type indicates that the resource goes into the small area of GATE GUI
|
protected boolean |
tool
Tool flag
|
protected List<Resource> |
unmodifiableInstantiationStack
Unmodifiable view of the instantiation stack, returned by
getInstantiations to ensure that the only way to modify the list is
through the add/removeInstantiation methods of this class.
|
protected String |
validityMessage
Status message set by isValid()
|
protected String |
xmlFileName
The xml file name of the resource
|
protected URL |
xmlFileUrl
The xml file URL of the resource
|
features
Constructor and Description |
---|
ResourceData()
Construction
|
Modifier and Type | Method and Description |
---|---|
void |
addInstantiation(Resource resource)
Add an instantiation of the resource to the register of these
|
boolean |
equals(Object other)
Equality: two resource data objects are the same if they have the
same name
|
String |
getAnnotationTypeDisplayed()
A simple accessor for annotationTypeDisplayed field
|
String |
getClassName()
Get method for the resource class name
|
String |
getComment()
Get method for the resource comment
|
int |
getGuiType()
A simple accessor for guiType field
|
String |
getHelpURL()
Get method for the resource helpURL
|
String |
getIcon()
Get method for the resource icon
|
List<Resource> |
getInstantiations()
Get the list of instantiations of resources
|
String |
getInterfaceName()
Get method for the resource interface name
|
String |
getJarFileName()
Get method for the resource jar file name
|
URL |
getJarFileUrl()
Get method for the resource jar file URL
|
String |
getName()
Get method for the resource name
|
ParameterList |
getParameterList()
Get the parameter list
|
Plugin |
getPlugin() |
int |
getReferenceCount() |
Class<? extends Resource> |
getResourceClass()
Get method for the resource class.
|
ClassLoader |
getResourceClassLoader() |
String |
getResourceDisplayed()
A simple accessor for resourceDisplayed field
|
Collection<String> |
getSharableProperties()
Get the collection of property names that should be treated as
sharable state when duplicating resources of this type.
|
String |
getValidityMessage()
Get validity statues message.
|
URL |
getXmlFileUrl()
Get the URL to the creole.xml file that defines this resource
|
protected String |
guessIcon()
Makes the best attempt of guessing an appropriate icon for this resource
type based on whether it is a Language Resource, a Processing Resource, or
something else.
|
int |
hashCode()
Hashing, based on the name field of the object
|
int |
increaseReferenceCount() |
void |
init()
Initialize this ResourceData.
|
boolean |
isAutoLoading()
Is the resource autoloading?
|
boolean |
isMainView()
A simple accessor for isMainView field
|
boolean |
isPrivate()
Is the resource private?
|
boolean |
isTool()
Is the resource a tool?
|
boolean |
isValid()
Is this a valid resource data configuration? If not, leave an
error message that can be returned by getValidityMessage().
|
int |
reduceReferenceCount() |
boolean |
removeInstantiation(Resource resource)
Remove an instantiation of the resource from the register of these.
|
void |
setAnnotationTypeDisplayed(String anAnnotationTypeDisplayed)
A simple mutator for annotationTypeDisplayed field
|
void |
setAutoLoading(boolean autoLoading)
Set method for resource autoloading flag
|
void |
setClassName(String className)
Set method for the resource class name
|
void |
setComment(String comment)
Set method for the resource comment
|
void |
setGuiType(int aGuiType)
A simple mutator for guiType field
|
void |
setHelpURL(String helpURL)
Set method for the resource helpURL
|
void |
setIcon(String icon)
Set method for the resource icon
|
void |
setInterfaceName(String interfaceName)
Set method for the resource interface name
|
void |
setIsMainView(boolean mainView)
A simple mutator for isMainView field
|
void |
setJarFileName(String jarFileName)
Set method for the resource jar file name
|
void |
setJarFileUrl(URL jarFileUrl)
Set method for the resource jar file URL
|
void |
setName(String name)
Set method for the resource name
|
void |
setParameterList(ParameterList parameterList)
Set the parameter list
|
void |
setPlugin(Plugin plugin) |
void |
setPrivate(boolean priv)
Set method for resource private flag
|
void |
setResourceClass(Class<? extends Resource> resourceClass)
Set method for the resource class
|
void |
setResourceDisplayed(String aResourceDisplayed)
A simple mutator for resourceDisplayed field
|
void |
setTool(boolean tool)
Set method for resource tool flag
|
void |
setXmlFileUrl(URL xmlFileUrl)
Set the URL to the creole.xml file that defines this resource
|
String |
toString()
String representation
|
getFeatures, setFeatures
protected static final boolean DEBUG
protected static final String DEFAULT_LR_ICON
protected static final String DEFAULT_PR_ICON
protected static final String DEFAULT_EXPORTER_ICON
protected static final String DEFAULT_OTHER_ICON
protected String name
protected String icon
protected List<Resource> unmodifiableInstantiationStack
protected String className
protected String interfaceName
protected String jarFileName
protected URL jarFileUrl
protected String xmlFileName
protected URL xmlFileUrl
protected Plugin plugin
protected String comment
protected String helpURL
protected ParameterList parameterList
protected boolean autoLoading
protected boolean priv
protected boolean tool
protected String validityMessage
public static final int NULL_GUI
public static final int LARGE_GUI
public static final int SMALL_GUI
protected int guiType
protected boolean isMainView
protected String resourceDisplayed
protected String annotationTypeDisplayed
protected Collection<String> sharableProperties
public int getReferenceCount()
public int reduceReferenceCount()
public int increaseReferenceCount()
public boolean equals(Object other)
public int hashCode()
public void setName(String name)
public String getName()
public void setIcon(String icon)
public String getIcon()
protected String guessIcon()
public List<Resource> getInstantiations()
public void addInstantiation(Resource resource)
public boolean removeInstantiation(Resource resource)
public void setClassName(String className)
public String getClassName()
public void setInterfaceName(String interfaceName)
public String getInterfaceName()
public void setResourceClass(Class<? extends Resource> resourceClass)
public Class<? extends Resource> getResourceClass() throws ClassNotFoundException
ClassNotFoundException
public ClassLoader getResourceClassLoader()
public void setJarFileName(String jarFileName)
public String getJarFileName()
public void setJarFileUrl(URL jarFileUrl)
public URL getJarFileUrl()
public void setXmlFileUrl(URL xmlFileUrl)
public URL getXmlFileUrl()
public Plugin getPlugin()
public void setPlugin(Plugin plugin)
public String getComment()
public void setComment(String comment)
public String getHelpURL()
public void setHelpURL(String helpURL)
public void setParameterList(ParameterList parameterList)
public ParameterList getParameterList()
public void setAutoLoading(boolean autoLoading)
public boolean isAutoLoading()
public void setPrivate(boolean priv)
public boolean isPrivate()
public void setTool(boolean tool)
public boolean isTool()
public boolean isValid()
public String getValidityMessage()
public void setGuiType(int aGuiType)
public int getGuiType()
public void setIsMainView(boolean mainView)
public boolean isMainView()
public void setResourceDisplayed(String aResourceDisplayed)
public String getResourceDisplayed()
public void setAnnotationTypeDisplayed(String anAnnotationTypeDisplayed)
public String getAnnotationTypeDisplayed()
public Collection<String> getSharableProperties()
Copyright © 2024 GATE. All rights reserved.