## gate.creole
Class ResourceData

    java.lang.Object
      |
      +--gate.util.AbstractFeatureBearer
            |
            +--gate.creole.ResourceData

All Implemented Interfaces:
  FeatureBearer, Serializable

public class ResourceData
extends AbstractFeatureBearer
implements Serializable

Models an individual CREOLE resource metadata, plus configuration data, plus the instantiations of the resource current within the system. Some metadata elements are used by GATE to load resources, or index the members of the CREOLE register; some are used during resource parameterisation and initialisation. Metadata elements which are used by the CREOLE registration and loading mechanisms are properties of ResourceData implementations and have their own get/set methods. Other metadata elements are made features of the ResourceData. So, for example, if you add an element "FunkyElementThaing" to the metadata of a resource, this will be made a feature of that resource's ResourceData.

See Also:
  `CreoleRegister`, Serialized Form

Field Summary
`static int` `LARGE_GUI` This type indicates that the resource goes into the large area of GATE GUI
`static int` `NULL_GUI` This type indicates that the resource is not a GUI
`static int` `SMALL_GUI` This type indicates that the resource goes into the small area of GATE GUI

Constructor Summary
`ResourceData()` Construction

Method Summary
`void` `addInstantiation(Resource resource)` Add an instantiation of the resource to the register of these
`void` `bumpInstantiation(Resource resource)` Bump an instantiation to the top of the instantiation stack
`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` `getIcon()` Get method for the resource icon
`WeakBumpyStack` `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
`Class` `getResourceClass()` Get method for the resource class.
`String` `getResourceDisplayed()` A simple accessor for resourceDisplayed field
`String` `getValidityMessage()` Get validity statues message.
`String` `getXmlFileName()` Get method for the resource xml file name
`URL` `getXmlFileUrl()` Deprecated. Get method for the resource xml file URL
`int` `hashCode()` Hashing, based on the name field of the object
`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()`.
`void` `makeInstantiationPersistant(Resource resource)` This method makes a certain resource persistant by adding it into a persistantInstantiationList.
`void` `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` `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` `setPrivate(boolean priv)` Set method for resource private flag
`void` `setResourceClass(Class 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` `setXmlFileName(String xmlFileName)` Set method for the resource xml file name
`void` `setXmlFileUrl(URL xmlFileUrl)` Set method for the resource xml file URL
`String` `toString()` String representation

Methods inherited from class gate.util.AbstractFeatureBearer
`getFeatures, setFeatures`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### NULL_GUI

    public static final int NULL_GUI

  This type indicates that the resource is not a GUI

### LARGE_GUI

    public static final int LARGE_GUI

  This type indicates that the resource goes into the large area of GATE GUI

### SMALL_GUI

    public static final int SMALL_GUI

  This type indicates that the resource goes into the small area of GATE GUI

Constructor Detail

### ResourceData

    public ResourceData()

  Construction

Method Detail

### toString

    public String toString()

  String representation
  Overrides:
    `toString` in class `Object`

### equals

    public boolean equals(Object other)

  Equality: two resource data objects are the same if they have the same name
  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Hashing, based on the name field of the object
  Overrides:
    `hashCode` in class `Object`

### setName

    public void setName(String name)

  Set method for the resource name

### getName

    public String getName()

  Get method for the resource name

### setIcon

    public void setIcon(String icon)

  Set method for the resource icon

### getIcon

    public String getIcon()

  Get method for the resource icon

### getInstantiations

    public WeakBumpyStack getInstantiations()

  Get the list of instantiations of resources

### addInstantiation

    public void addInstantiation(Resource resource)

  Add an instantiation of the resource to the register of these

### makeInstantiationPersistant

    public void makeInstantiationPersistant(Resource resource)

  This method makes a certain resource persistant by adding it into a persistantInstantiationList. It is used especially with AUTOINSTANCE tag in creole xml.

### removeInstantiation

    public void removeInstantiation(Resource resource)

  Remove an instantiation of the resource from the register of these

### bumpInstantiation

    public void bumpInstantiation(Resource resource)

  Bump an instantiation to the top of the instantiation stack

### setClassName

    public void setClassName(String className)

  Set method for the resource class name

### getClassName

    public String getClassName()

  Get method for the resource class name

### setInterfaceName

    public void setInterfaceName(String interfaceName)

  Set method for the resource interface name

### getInterfaceName

    public String getInterfaceName()

  Get method for the resource interface name

### setResourceClass

    public void setResourceClass(Class resourceClass)

  Set method for the resource class

### getResourceClass

    public Class getResourceClass()
                           throws ClassNotFoundException

  Get method for the resource class. Asks the GATE class loader to load it, if it is not already present.

### setJarFileName

    public void setJarFileName(String jarFileName)

  Set method for the resource jar file name

### getJarFileName

    public String getJarFileName()

  Get method for the resource jar file name

### setJarFileUrl

    public void setJarFileUrl(URL jarFileUrl)

  Set method for the resource jar file URL

### getJarFileUrl

    public URL getJarFileUrl()

  Get method for the resource jar file URL

### setXmlFileName

    public void setXmlFileName(String xmlFileName)

  Set method for the resource xml file name

### getXmlFileName

    public String getXmlFileName()

  Get method for the resource xml file name

### setXmlFileUrl

    public void setXmlFileUrl(URL xmlFileUrl)

  Set method for the resource xml file URL

### getXmlFileUrl

    public URL getXmlFileUrl()

  Deprecated. Get method for the resource xml file URL

### getComment

    public String getComment()

  Get method for the resource comment

### setComment

    public void setComment(String comment)

  Set method for the resource comment

### setParameterList

    public void setParameterList(ParameterList parameterList)

  Set the parameter list

### getParameterList

    public ParameterList getParameterList()

  Get the parameter list

### setAutoLoading

    public void setAutoLoading(boolean autoLoading)

  Set method for resource autoloading flag

### isAutoLoading

    public boolean isAutoLoading()

  Is the resource autoloading?

### setPrivate

    public void setPrivate(boolean priv)

  Set method for resource private flag

### isPrivate

    public boolean isPrivate()

  Is the resource private?

### setTool

    public void setTool(boolean tool)

  Set method for resource tool flag

### isTool

    public boolean isTool()

  Is the resource a tool?

### isValid

    public boolean isValid()

  Is this a valid resource data configuration? If not, leave an error message that can be returned by `getValidityMessage()`.

### getValidityMessage

    public String getValidityMessage()

  Get validity statues message.

### setGuiType

    public void setGuiType(int aGuiType)

  A simple mutator for guiType field

### getGuiType

    public int getGuiType()

  A simple accessor for guiType field

### setIsMainView

    public void setIsMainView(boolean mainView)

  A simple mutator for isMainView field

### isMainView

    public boolean isMainView()

  A simple accessor for isMainView field

### setResourceDisplayed

    public void setResourceDisplayed(String aResourceDisplayed)

  A simple mutator for resourceDisplayed field

### getResourceDisplayed

    public String getResourceDisplayed()

  A simple accessor for resourceDisplayed field

### setAnnotationTypeDisplayed

    public void setAnnotationTypeDisplayed(String anAnnotationTypeDisplayed)

  A simple mutator for annotationTypeDisplayed field

### getAnnotationTypeDisplayed

    public String getAnnotationTypeDisplayed()

  A simple accessor for annotationTypeDisplayed field