public interface Treebank extends SentenceDataList, de.ims.icarus.util.id.Identity, de.ims.icarus.io.Loadable
Modifier and Type | Method and Description |
---|---|
void |
addListener(java.lang.String eventName,
de.ims.icarus.ui.events.EventListener listener) |
void |
destroy() |
void |
free()
|
de.ims.icarus.util.location.Location |
getLocation()
Returns the
Location this Treebank is
loading data from |
TreebankMetaData |
getMetaData() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String key) |
boolean |
isDestroyed() |
boolean |
isEditable() |
boolean |
isLoaded() |
void |
load()
Loads this
Treebank . |
void |
loadState(TreebankDescriptor descriptor) |
void |
remove(int index,
DataType type)
Removes from this
Treebank the data stored at the
specified index that is associated with the given
type . |
void |
removeListener(de.ims.icarus.ui.events.EventListener listener) |
void |
removeListener(de.ims.icarus.ui.events.EventListener listener,
java.lang.String eventName) |
void |
saveState(TreebankDescriptor descriptor) |
void |
set(SentenceData item,
int index,
DataType type)
Replaces
|
void |
setLocation(de.ims.icarus.util.location.Location location)
Sets the new
Location to be used for this
Treebank . |
void |
setName(java.lang.String name) |
void |
setProperty(java.lang.String key,
java.lang.Object value) |
get, get, supportsType
addChangeListener, get, getContentType, removeChangeListener, size
boolean isEditable()
void setName(java.lang.String name)
void set(SentenceData item, int index, DataType type)
void remove(int index, DataType type)
Treebank
the data stored at the
specified index
that is associated with the given
type
. The exact behavior in case of the type
argument being null
is implementation specific. The general
advice is to remove all data stored for that index, but implementations
might decide to ignore calls without a valid DataType
parameter.
In addition an implementation can remove all data for that index if
data of some important type was removed. I.e. a typical Treebank
representing parse or other annotation results created by an automated
process would drop an entire index when data of the type
is removed.void destroy()
boolean isDestroyed()
boolean isLoaded()
isLoaded
in interface de.ims.icarus.io.Loadable
void load() throws java.lang.Exception
Treebank
. In a typical synchronous
implementation this method will cover the entire
loading process and return once all data is loaded.
For asynchronous implementations this method returns
immediately and actual loading is done in a background
thread.load
in interface de.ims.icarus.io.Loadable
java.lang.Exception
- if the loading failedvoid setLocation(de.ims.icarus.util.location.Location location)
Location
to be used for this
Treebank
. Subsequent calls to isLoaded()
will return false
at least until the first call
to load()
is performedlocation
- the new Location
to be usedde.ims.icarus.util.location.Location getLocation()
Location
this Treebank
is
loading data fromsource
of this Treebank
void free()
free
in interface de.ims.icarus.io.Loadable
void saveState(TreebankDescriptor descriptor)
void loadState(TreebankDescriptor descriptor)
TreebankMetaData getMetaData()
java.lang.Object getProperty(java.lang.String key)
void setProperty(java.lang.String key, java.lang.Object value)
java.util.Map<java.lang.String,java.lang.Object> getProperties()
void addListener(java.lang.String eventName, de.ims.icarus.ui.events.EventListener listener)
EventSource.addListener(java.lang.String, de.ims.icarus.ui.events.EventListener)
void removeListener(de.ims.icarus.ui.events.EventListener listener)
EventSource.removeEventListener(de.ims.icarus.ui.events.EventListener)
void removeListener(de.ims.icarus.ui.events.EventListener listener, java.lang.String eventName)
EventSource.removeEventListener(de.ims.icarus.ui.events.EventListener, java.lang.String)