|
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<AnnotationSetData>
org.proteios.core.AnnotationSet
public class AnnotationSet
An annotation set is the container for all annotations on an item. An item can have one annotation of each annotation type that is defined for it.
An item can also inherit annotation from it's parents. It is possible to inherit all annotations or only specific ones. In the first case this means that if the parent gets new annotations those are automatically inherited. In the second case the inherticane is lost if the annotation is deleted. If a new annotation of the same annotation type is creted later, it is NOT automatically inherited again.
AnnotationType,
Annotation| Field Summary | |
|---|---|
static Item |
TYPE
The type of item represented by this class. |
| Method Summary | |
|---|---|
boolean |
contentEquals(AnnotationSet as)
Compare the AnnotationSet with another. |
ItemQuery<Annotation> |
getAnnotations()
Get a query that reurns all direct annotations in this annotation set. |
ItemQuery<Annotation> |
getInheritedAnnotations()
Get a query that returns all inherited annotations in this annotation set. |
ItemQuery<AnnotationSet> |
getInheritedAnnotationSets()
Get a query that returns all inherited annotation sets in this annotation set. |
ItemQuery<AnnotationSet> |
getInheritingAnnotationSets()
Get a query that returns all annotation sets inheriting from this annotation set. |
Annotatable |
getItem()
Get the item this annotation set belongs to. |
Item |
getItemType()
Get the Item type of the item this annotation set belongs to. |
Item |
getType()
Get the type of item represented by the object. |
boolean |
hasAnnotation(AnnotationType annotationType)
Check if the annotation set contains an annotation of the specified type. |
void |
inheritAnnotation(Annotation annotation)
Inherit an annotation. |
void |
inheritAnnotationSet(AnnotationSet annotationSet)
Inherit an annotation set. |
boolean |
isInherited(Annotation annotation)
Check if an annotation is inherited or not by this annotation set. |
boolean |
isInherited(AnnotationSet annotationSet)
Check if an annotation set is inherited or not by this annotation set. |
boolean |
isUsed()
Always return TRUE. |
void |
removeAnnotation(AnnotationType annotationType)
Delete the annotation of the specified annotation type. |
void |
removeInheritedAnnotation(Annotation annotation)
Remove an inherited an annotation. |
void |
removeInheritedAnnotationSet(AnnotationSet annotationSet)
Remove an inherited an annotation set. |
| 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.ANNOTATIONSET,
getType()| Method Detail |
|---|
public Item getType()
IdentifiableItem enumeration.
public boolean isUsed()
throws BaseException
isUsed in class BasicItem<AnnotationSetData>BaseException
public Annotatable getItem()
throws PermissionDeniedException,
BaseException
Annotatable item
PermissionDeniedException - If the logged in user doesn't have read
permission to the item
BaseException - If there is another errorpublic Item getItemType()
Item type of the item this annotation set belongs to.
public boolean hasAnnotation(AnnotationType annotationType)
annotationType - An AnnotationType object
public void removeAnnotation(AnnotationType annotationType)
throws PermissionDeniedException,
InvalidDataException,
BaseException
annotationType - The type of the annotation to delete
PermissionDeniedException - If the logged in user doesn't have
write permission
InvalidDataException - If the annotation type is null
BaseException - If there is another errorpublic ItemQuery<Annotation> getAnnotations()
ItemQuery object
public void inheritAnnotation(Annotation annotation)
throws PermissionDeniedException,
InvalidDataException
annotation - The annotation to inherit
PermissionDeniedException - If the logged in user doesn't have
write permission for this annotation set or use permission for
the annotation
InvalidDataException - If the annotation is null
public void removeInheritedAnnotation(Annotation annotation)
throws PermissionDeniedException,
InvalidDataException
annotation - The annotation to remove
PermissionDeniedException - If the logged in user doesn't have
write permission for this annotation set
InvalidDataException - If the annotation is null
public boolean isInherited(Annotation annotation)
throws InvalidDataException
annotation - The annotation to check
InvalidDataException - If the annotation is null
public ItemQuery<Annotation> getInheritedAnnotations()
throws BaseException
ItemQuery object
BaseException
public void inheritAnnotationSet(AnnotationSet annotationSet)
throws PermissionDeniedException,
InvalidDataException
annotationSet - The annotation set to inherit
PermissionDeniedException - If the logged in user doesn't have
write permission for this annotation set or use permission for
the annotation set to inherit
InvalidDataException - If the annotation set is null
public void removeInheritedAnnotationSet(AnnotationSet annotationSet)
throws PermissionDeniedException,
InvalidDataException
annotationSet - The annotation set to remove
PermissionDeniedException - If the logged in user doesn't have
write permission for this annotation set
InvalidDataException - If the annotation set is null
public boolean isInherited(AnnotationSet annotationSet)
throws InvalidDataException
annotationSet - The annotation set to check
InvalidDataException - If the annotation set is nullpublic ItemQuery<AnnotationSet> getInheritedAnnotationSets()
ItemQuery object
BaseException - If there is an errorpublic ItemQuery<AnnotationSet> getInheritingAnnotationSets()
ItemQuery objectpublic boolean contentEquals(AnnotationSet as)
as - The AnnotationSet to compare with
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||