|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.BasicItem<AnnotationData>
org.proteios.core.Annotation
public class Annotation
This class represents an annotation. Annotations are user-defined properties
that can be attached to Annotatable items. They can be very useful in
the filtering and analysis process.
An annotation must have an AnnotationType, which controls the type
of and how many values that can be attached to an annotation.
| Field Summary | |
|---|---|
static Item |
TYPE
The type of item represented by this class. |
| Method Summary | |
|---|---|
AnnotationSet |
getAnnotationSet()
Get the annotation set this annotation belongs to. |
AnnotationType |
getAnnotationType()
Get the annotation type of this annotation. |
Item |
getType()
Get the type of item represented by the object. |
List<?> |
getValues()
Get the values this annotation contains. |
int |
getValuesVersion()
Get the version number of the item keeping the values. |
boolean |
isUsed()
Always return FALSE. |
void |
setAnnotationSet(AnnotationSet set)
|
void |
setValue(Object value)
Set the value of the annotation, replacing any previous values. |
void |
setValues(List<?> values)
Set the values of the annotation, replacing any previous values. |
| Methods inherited from class org.proteios.core.BasicItem |
|---|
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Item TYPE
Item.ANNOTATION,
getType()| Method Detail |
|---|
public Item getType()
IdentifiableItem enumeration.
public boolean isUsed()
throws BaseException
isUsed in class BasicItem<AnnotationData>BaseException
public AnnotationSet getAnnotationSet()
throws PermissionDeniedException,
BaseException
AnnotationSet
PermissionDeniedException - If the logged in user doesn't have read
permission for the annotation set (should never happen)
BaseExceptionpublic void setAnnotationSet(AnnotationSet set)
public AnnotationType getAnnotationType()
throws PermissionDeniedException,
BaseException
AnnotationType
PermissionDeniedException - If the logged in user doesn't have read
permission for the annotation type
BaseException
public List<?> getValues()
throws BaseException
Type
appropriate for the given annotation type, ie. Integer object for an
integer annotation type. All objects in the list are of the same type.
BaseException - If there is an errorAnnotationType.getValueType()public int getValuesVersion()
public void setValue(Object value)
throws PermissionDeniedException,
InvalidDataException,
BaseException
value - The new value
PermissionDeniedException - If the logged in user doesn't have
write permission for the annotation or read permission for the
annotation type
InvalidDataException - If the value isn't a valid value for the
annotation type, see
AnnotationType.validateAnnotationValue(Object)
BaseException - If there is another error
public void setValues(List<?> values)
throws PermissionDeniedException,
InvalidDataException,
BaseException
values - A list containing the new values
PermissionDeniedException - If the logged in user doesn't have
write permission for the annotation or read permission for the
annotation type
InvalidDataException - If the number of values are too many
according to the AnnotationType.getMultiplicity() setting
any of the values isn't a valid value for the annotation type,
see AnnotationType.validateAnnotationValue(Object)
BaseException - If there is another error
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||