|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--anvil.annot.AnvilAnnotationNode | +--anvil.annot.AnnotationContainer
Abstract class for annotation containers (e.g. tracks or sets), i.e. parts of an annotation that contain elements.
Field Summary | |
protected java.util.AbstractCollection |
elements
track elements sorted in some total order |
protected java.util.List |
index2el
this is for loading (AnvilReader) |
Fields inherited from class anvil.annot.AnvilAnnotationNode |
annotation, name, open, parent, spec, visible |
Constructor Summary | |
AnnotationContainer(Annotation annot,
GroupNode parent,
NodeSpec spec)
|
Method Summary | |
boolean |
addElement(AnnotationElement el)
Add new element to this track. |
void |
elementChanged()
Called by annotation elements when they change. |
Annotation |
getAnnotation()
|
java.util.List |
getAttributeNames()
|
ValueType |
getAttributeType(java.lang.String attrName)
Returns the value type of an attribute or null. |
java.util.AbstractCollection |
getElementCollection()
|
int |
getNumOfElements()
|
java.util.List |
getReciprocalLinkAttributes()
Returns names of all reciprocal attributes. |
ContainerSpec |
getSpec()
|
protected void |
indexElements()
Sets the index slots in all elements to position in the set. |
boolean |
isEmpty()
|
abstract void |
print()
|
int |
query(java.util.List positives,
java.util.List negatives,
java.util.AbstractCollection result)
Queries container for elements that match AV pairs in positives and do not have AV pairs that occur in
negatives . |
abstract boolean |
removeElement(AnnotationElement el)
Removes element from this container, including all links pointing from other elements to this one, also removing all dependent elements. |
int |
replaceAttributeValue(java.lang.String attr,
java.lang.String oldValue,
java.lang.String newValue)
|
void |
setName(java.lang.String n)
Sets name of container. |
void |
unlinkElement(AnnotationElement el)
This method is called before an element is removed. |
protected void |
writeAnvilFile(kipp.io.MyBufferedWriter f)
Writes contents of |
Methods inherited from class anvil.annot.AnvilAnnotationNode |
getFirstHidden, getName, getParent, getShortName, isOpen, isVisible, setOpen, setVisible |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List index2el
protected java.util.AbstractCollection elements
Constructor Detail |
public AnnotationContainer(Annotation annot, GroupNode parent, NodeSpec spec)
Method Detail |
public java.util.List getReciprocalLinkAttributes()
public boolean addElement(AnnotationElement el)
public void elementChanged()
public Annotation getAnnotation()
public ValueType getAttributeType(java.lang.String attrName) throws NoSuchAttributeException
NoSuchAttributeException
public java.util.List getAttributeNames()
public java.util.AbstractCollection getElementCollection()
public int getNumOfElements()
public ContainerSpec getSpec()
protected void indexElements()
public boolean isEmpty()
public abstract void print()
public int query(java.util.List positives, java.util.List negatives, java.util.AbstractCollection result)
positives
and do not have AV pairs that occur in
negatives
. Found elements are appended to the result
list. Since the good/nogood lists are CONSTRAINTS, empty lists
mean that all elements are valid.
positives
- List of QueryProposition
elements.
List may be empty (acts like "*"). If one AV matches element is OK.negatives
- same as above. If one AV matches element is out.result
- list with container elements; NEW HITS ARE ADDED HERE!
public int replaceAttributeValue(java.lang.String attr, java.lang.String oldValue, java.lang.String newValue) throws NoSuchAttributeException, WrongValueTypeException
NoSuchAttributeException
WrongValueTypeException
public abstract boolean removeElement(AnnotationElement el)
public void unlinkElement(AnnotationElement el)
public void setName(java.lang.String n)
protected void writeAnvilFile(kipp.io.MyBufferedWriter f) throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |