|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DSAnnotationContextManager
This defines the contract for a manager of contexts for the annotation, labelling and classification of the items
of a DSItemList.
For each item list, there can be one or more DSAnnotationContexts. Additionally, there
is a default context associated with each data set.
| Method Summary | ||
|---|---|---|
|
copyContexts(DSItemList<T> from,
DSItemList<T> to)
Copies all context from one item list to another. |
|
|
createContext(DSItemList<T> itemList,
java.lang.String name)
Creates a new context, replacing an existing context if one exists for the same item list and name. |
|
|
getAllContexts(DSItemList<T> itemList)
Retrieves an array of all contexts for the given item list. |
|
|
getContext(DSItemList<T> itemList,
int index)
Retrieves a context by index. |
|
|
getContext(DSItemList<T> itemList,
java.lang.String name)
Gets a context by name for the given item list. |
|
|
getCurrentContext(DSItemList<T> itemList)
Retrieves the currently-selected context for the given item list. |
|
|
getNumberOfContexts(DSItemList<T> itemList)
Gets the count of contexts for the given item list. |
|
boolean |
hasContext(DSItemList itemList,
java.lang.String name)
Checks for the existence of a named context for an item list. |
|
boolean |
removeContext(DSItemList itemList,
java.lang.String name)
Removes a context by item list and name. |
|
boolean |
renameContext(DSItemList itemList,
java.lang.String oldName,
java.lang.String newName)
Renames the specified context. |
|
|
setCurrentContext(DSItemList<T> itemList,
DSAnnotationContext<T> context)
Sets the currently-selected context. |
|
| Method Detail |
|---|
<T extends DSNamed> DSAnnotationContext<T>[] getAllContexts(DSItemList<T> itemList)
itemList - the item list for which to retrieve contexts.
<T extends DSNamed> DSAnnotationContext<T> getContext(DSItemList<T> itemList,
java.lang.String name)
itemList - the item list.name - the name of the context.
boolean hasContext(DSItemList itemList,
java.lang.String name)
itemList - the item list to search.name - the name to search.
<T extends DSNamed> DSAnnotationContext<T> createContext(DSItemList<T> itemList,
java.lang.String name)
itemList - the item list against which the new context should be created.name - the name of the context to create.
<T extends DSNamed> int getNumberOfContexts(DSItemList<T> itemList)
itemList - the item list for which to count contexts.
<T extends DSNamed> DSAnnotationContext<T> getContext(DSItemList<T> itemList,
int index)
itemList - the item list for which to retrieve the context.index - the index in to the list of contexts.
boolean removeContext(DSItemList itemList,
java.lang.String name)
itemList - the item list for which to remove a context.name - the name of the context to remove.
boolean renameContext(DSItemList itemList,
java.lang.String oldName,
java.lang.String newName)
itemList - the item list for which to rename a context.oldName - the old name of the context.newName - the new name of the context.
java.lang.IllegalArgumentException - if a context already exists for the specified item list and new name.<T extends DSNamed> DSAnnotationContext<T> getCurrentContext(DSItemList<T> itemList)
itemList - the item list for which to select the current context.
<T extends DSNamed> void setCurrentContext(DSItemList<T> itemList,
DSAnnotationContext<T> context)
itemList - the item list for which to set the current context.context - the context to select.
<T extends DSNamed> void copyContexts(DSItemList<T> from,
DSItemList<T> to)
from - the source item list.to - the target item list.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||