|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CreoleRegister
The CREOLE register records the set of resources that are currently known to the system. Each member of the register is a ResourceData object, indexed by the class name of the resource.
The register is accessible from the static method gate.Gate.getCreoleRegister ; there is only one per application of the GATE framework.
Clients use the register by adding URLs (using the
addDirectory method)
pointing to CREOLE directories. A CREOLE directory is a URL at
which resides a file called creole.xml
describing
the resources present, and one or more Jar files implementing
those resources. E.g., the CREOLE resources at
gate.ac.uk are registered by Gate.init()
by registering the directory URL
http://gate.ac.uk/creole/, under
which lives a file called creole.xml.
To register resources clients use the registerDirectories
methods. When resources have been registered they can be accessed via
their ResourceData
objects. So a typical use of the register
is to: add the set of URLs containing CREOLE directories; register
all resources found at those URLs; browse the set of registered
resources.
In all cases, where a resource or a directory is added which is
already present in the register, the new silently overwrites the old.
The CreoleRegister notifies all registered listeners of all
CreoleEvent
s that occur in the system regardless of
whether they were initially fired by the Factory
, the
DataStoreRegister
or the CreoleRegister
itself.
Gate
,
ResourceData
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry |
Method Summary | |
---|---|
void |
addCreoleListener(CreoleListener l)
Registers a CreoleListener with this CreoleRegister. |
void |
addDirectory(URL directoryUrl)
Add a CREOLE directory URL. |
File |
createCreoleDirectoryFile(File directoryFile,
Set jarFileNames)
This is a utility method for creating CREOLE directory files (typically called creole.xml ) from a list of Jar
files that contain resources. |
List |
getAllInstances(String type)
Gets all the instantiations of a given type and all its derivate types; It doesn't return instances that have the hidden attribute set to "true" |
List |
getAnnotationVRs()
Returns a list of strings representing class names for annotation VRs that are able to display/edit all types of annotations. |
List |
getAnnotationVRs(String annotationType)
Returns a list of strings representing class names for annotation VRs that are able to display/edit a given annotation type The default VR will be the first in the returned list. |
Set |
getControllerTypes()
Get the list of types of VR in the register. |
Set |
getDirectories()
Get the list of CREOLE directory URLs. |
List |
getLargeVRsForResource(String resourceClassName)
Returns a list of strings representing class names for large VRs valid for a given type of language/processing resource. |
List |
getLrInstances()
Get a list of all instantiations of LR in the register. |
List |
getLrInstances(String resourceTypeName)
Get a list of instantiations of a type of LR in the register. |
Set |
getLrTypes()
Get the list of types of LR in the register. |
List |
getPrInstances()
Get a list of all instantiations of PR in the register. |
List |
getPrInstances(String resourceTypeName)
Get a list of instantiations of a type of PR in the register. |
Set |
getPrTypes()
Get the list of types of PR in the register. |
List |
getPublicControllerTypes()
Get a list of all non-private types of Controller in the register. |
List |
getPublicLrInstances()
Get a list of all non-private instantiations of LR in the register. |
List |
getPublicLrTypes()
Get a list of all non-private types of LR in the register. |
List |
getPublicPrInstances()
Get a list of all non-private instantiations of PR in the register. |
List |
getPublicPrTypes()
Get a list of all non-private types of PR in the register. |
List |
getPublicVrInstances()
Get a list of all non-private instantiations of VR in the register. |
List |
getPublicVrTypes()
Get a list of all non-private types of VR in the register. |
List |
getSmallVRsForResource(String resourceClassName)
Returns a list of strings representing class names for small VRs valid for a given type of language/processing resource The default VR will be the first in the returned list. |
List |
getVREnabledAnnotationTypes()
Returns a list of strings representing annotations types for which there are custom viewers/editor registered. |
List |
getVrInstances()
Get a list of all instantiations of VR in the register. |
List |
getVrInstances(String resourceTypeName)
Get a list of instantiations of a type of VR in the register. |
Set |
getVrTypes()
Get the list of types of VR in the register. |
void |
registerBuiltins()
Register resources that are built in to the GATE distribution. |
void |
registerDirectories()
Register all the CREOLE directories that we know of. |
void |
registerDirectories(URL directoryUrl)
Register a single CREOLE directory. |
void |
removeCreoleListener(CreoleListener l)
Removes a CreoleListener previously registered with this
CreoleRegister. |
void |
removeDirectory(URL directory)
Removes a CREOLE directory from the set of loaded directories. |
void |
setResourceName(Resource res,
String newName)
Renames an existing resource. |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from interface gate.event.CreoleListener |
---|
datastoreClosed, datastoreCreated, datastoreOpened, resourceLoaded, resourceRenamed, resourceUnloaded |
Method Detail |
---|
void addDirectory(URL directoryUrl)
Set getDirectories()
void registerDirectories() throws GateException
creole.xml
files
at the URLs are parsed, and CreoleData
objects added
to the register.
GateException
void registerDirectories(URL directoryUrl) throws GateException
creole.xml
file at the URL is parsed, and CreoleData
objects added
to the register. If the directory URL has not yet been added it
is now added.
GateException
void removeDirectory(URL directory)
directory
- void registerBuiltins() throws GateException
GateException
File createCreoleDirectoryFile(File directoryFile, Set jarFileNames)
creole.xml
) from a list of Jar
files that contain resources. The method concatenates the
resource.xml
files that the Jars contain.
If Java allowed class methods in interfaces this would be static.
Set getLrTypes()
Set getPrTypes()
Set getVrTypes()
Set getControllerTypes()
List getLrInstances()
List getPrInstances()
List getVrInstances()
List getLrInstances(String resourceTypeName)
List getPrInstances(String resourceTypeName)
List getVrInstances(String resourceTypeName)
List getPublicLrInstances()
List getPublicPrInstances()
List getPublicVrInstances()
List getPublicLrTypes()
List getPublicPrTypes()
List getPublicVrTypes()
List getPublicControllerTypes()
List getAllInstances(String type) throws GateException
GateException
List getLargeVRsForResource(String resourceClassName)
List getSmallVRsForResource(String resourceClassName)
List getAnnotationVRs()
List getAnnotationVRs(String annotationType)
List getVREnabledAnnotationTypes()
void setResourceName(Resource res, String newName)
void addCreoleListener(CreoleListener l)
CreoleListener
with this CreoleRegister.
The register will fire events every time a resource is added to or removed
from the system and when a datastore is created, opened or closed.
void removeCreoleListener(CreoleListener l)
CreoleListener
previously registered with this
CreoleRegister.
addCreoleListener(CreoleListener)
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |