public abstract class AbstractTreebank
extends java.lang.Object
Treebank
implementations. This class
provides all the common methods of basic treebank classes.
Note that it only provides many of the methods defined in the
Treebank
interface but does not
implement the
interface itself! This is because there exist "sub-interfaces"
like DerivedTreebank
and it should be up to the actually
implementing class to decide which particular interface to
implement.
Modifier and Type | Field and Description |
---|---|
protected java.util.List<javax.swing.event.ChangeListener> |
changeListeners |
protected de.ims.icarus.ui.events.EventSource |
eventSource |
protected de.ims.icarus.util.location.Location |
location |
protected java.lang.String |
name |
protected java.util.Map<java.lang.String,java.lang.Object> |
properties |
Constructor and Description |
---|
AbstractTreebank() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener) |
void |
addListener(java.lang.String eventName,
de.ims.icarus.ui.events.EventListener listener) |
void |
destroy() |
protected void |
fireChangeEvent() |
abstract void |
free() |
SentenceData |
get(int index) |
java.lang.String |
getDescription() |
javax.swing.Icon |
getIcon() |
java.lang.String |
getId() |
de.ims.icarus.util.location.Location |
getLocation()
Returns the
Location this Treebank is
loading data from |
java.lang.String |
getName() |
java.lang.Object |
getOwner() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String key) |
boolean |
isDestroyed() |
boolean |
isEditable() |
void |
loadState(TreebankDescriptor descriptor) |
void |
remove(int index,
DataType type) |
void |
removeChangeListener(javax.swing.event.ChangeListener listener) |
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) |
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) |
java.lang.String |
toString() |
protected de.ims.icarus.util.location.Location location
protected de.ims.icarus.ui.events.EventSource eventSource
protected java.util.Map<java.lang.String,java.lang.Object> properties
protected java.lang.String name
protected java.util.List<javax.swing.event.ChangeListener> changeListeners
public java.lang.String toString()
toString
in class java.lang.Object
public void destroy()
Treebank.destroy()
public abstract void free()
public boolean isDestroyed()
public boolean isEditable()
public void setName(java.lang.String name)
Treebank.setName(java.lang.String)
public java.lang.String getName()
Identity.getName()
public java.lang.String getId()
Identity.getId()
public java.lang.Object getOwner()
public java.lang.String getDescription()
public javax.swing.Icon getIcon()
public void saveState(TreebankDescriptor descriptor)
public void loadState(TreebankDescriptor descriptor)
public void 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 usedpublic de.ims.icarus.util.location.Location getLocation()
Location
this Treebank
is
loading data fromsource
of this Treebank
public java.lang.Object getProperty(java.lang.String key)
public void setProperty(java.lang.String key, java.lang.Object value)
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public SentenceData get(int index)
public void addListener(java.lang.String eventName, de.ims.icarus.ui.events.EventListener listener)
EventSource.addListener(java.lang.String, de.ims.icarus.ui.events.EventListener)
public void removeListener(de.ims.icarus.ui.events.EventListener listener)
EventSource.removeEventListener(de.ims.icarus.ui.events.EventListener)
public void removeListener(de.ims.icarus.ui.events.EventListener listener, java.lang.String eventName)
EventSource.removeEventListener(de.ims.icarus.ui.events.EventListener, java.lang.String)
public void set(SentenceData item, int index, DataType type)
public void remove(int index, DataType type)
public void addChangeListener(javax.swing.event.ChangeListener listener)
DataList.addChangeListener(ChangeListener)
public void removeChangeListener(javax.swing.event.ChangeListener listener)
DataList.removeChangeListener(ChangeListener)
protected void fireChangeEvent()