|
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.Annotator
public class Annotator
Use this class whenever you want to add or list annotations of an Annotatable item.
| Constructor Summary | |
|---|---|
Annotator(ItemFactory factory)
Make sure the factory has a connected DbControl |
|
| Method Summary | |
|---|---|
void |
addAddedParamAnnotation(Annotatable item,
String value,
String atName,
Type atType,
String addedParamType,
String addedParamName,
String addedParamValue)
Stores variable values as addedParam annotation. |
void |
addAnnotation(Annotatable item,
String atName,
Type atType,
Object value)
Add an annotation. |
AnnotationType |
createAddedParamAnnotationType(Annotatable item,
String atName,
Type atType,
String addedParamType,
String addedParamName,
String addedParamValue)
Creates added parameter annotation type for storing variable values as annotations. |
AnnotationType |
createAnnotationType(Annotatable item,
String name,
Type type)
|
AnnotationType |
createAnnotationType(String atName,
Type atType,
Item atItem)
Creates annotation type for storing variable values as annotations. |
AnnotationType |
getAddedParamAnnotationType(String atName,
Type atType,
Item atItem,
String addedParamType,
String addedParamName,
String addedParamValue)
Fetches annotation type for storing variable values as annotations. |
Annotation |
getAnnotation(Annotatable item,
AnnotationType annotationType)
Get the Annotation object of the specified annotation type. |
AnnotationSet |
getAnnotationSet(Annotatable item)
Get existing AnnotationSet or create a new one, and save it to the database. |
AnnotationType |
getAnnotationType(Annotatable item,
String name,
Type type)
|
AnnotationType |
getAnnotationType(String atName,
Type atType,
Item atItem)
Fetches annotation type for storing variable values as annotations. |
Item |
getType(Annotatable item)
|
boolean |
isAnnotated(Annotatable item)
|
void |
removeAnnotations(Annotatable item)
Removes the entire AnnotationSet of the item |
void |
setDc(DbControl dc)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Annotator(ItemFactory factory)
factory -
InvalidUseOfNullException - if the Dbcontrol of the ItemFactory is
null or closed| Method Detail |
|---|
public Annotation getAnnotation(Annotatable item,
AnnotationType annotationType)
throws PermissionDeniedException,
InvalidDataException,
BaseException
Annotation object of the specified annotation type. If
the annotation set doesn't contain an annotation of the specified type a
new object is created. Remember to save the returned annotation using the
same DbControl as in your ItemFactory.
annotationType - The annotation type
Annotation object, either existing one or a new
one
PermissionDeniedException - If a new annotation must be created and
the logged in user doesn't have write permission
InvalidDataException - If a new annotation must be created and the
annotation type isn't valid for this type of item
BaseException - If there is another error
public boolean isAnnotated(Annotatable item)
throws BaseException
item -
BaseException
public void removeAnnotations(Annotatable item)
throws PermissionDeniedException,
BaseException
item -
PermissionDeniedException
BaseException
public AnnotationSet getAnnotationSet(Annotatable item)
throws PermissionDeniedException,
BaseException
item -
PermissionDeniedException
BaseExceptionpublic Item getType(Annotatable item)
item -
public void addAnnotation(Annotatable item,
String atName,
Type atType,
Object value)
throws PermissionDeniedException,
InvalidDataException,
BaseException
atName - String the name of the annotationTypeatType - Type the type of the annotationTypevalue - Object the annotation value as a String
PermissionDeniedException
InvalidDataException
BaseException
public AnnotationType createAnnotationType(Annotatable item,
String name,
Type type)
item - name - type -
public AnnotationType createAnnotationType(String atName,
Type atType,
Item atItem)
atName - String the name of annotationTypeatType - Type the type of the annotationTypeatItem - Item the Item the annotationType should be enabled for
public AnnotationType createAddedParamAnnotationType(Annotatable item,
String atName,
Type atType,
String addedParamType,
String addedParamName,
String addedParamValue)
atName - String the name of the AnnotationTypeatType - Type the type of the AnnotationTypeaddedParamType - String the annotation added parameter type as a
StringaddedParamName - String the annotation added parameter name as a
StringaddedParamValue - String the annotation added parameter value as a
String
public void addAddedParamAnnotation(Annotatable item,
String value,
String atName,
Type atType,
String addedParamType,
String addedParamName,
String addedParamValue)
value - String the value to store in the annotationatName - String the name of the AnnotationType.atType - Type the type of the AnnotationTypeaddedParamType - String the annotation added parameter value as a
StringaddedParamName - String the annotation added parameter name as a
StringaddedParamValue - String the annotation value as a String
public AnnotationType getAddedParamAnnotationType(String atName,
Type atType,
Item atItem,
String addedParamType,
String addedParamName,
String addedParamValue)
atName - String the name of annotationTypeatType - Type the type of the annotationTypeatItem - Item the Item the annotationType should be enabled for
public AnnotationType getAnnotationType(Annotatable item,
String name,
Type type)
public AnnotationType getAnnotationType(String atName,
Type atType,
Item atItem)
atName - String the name of annotationTypeatType - Type the type of the annotationTypeatItem - Item the Item the annotationType should be enabled for
public void setDc(DbControl dc)
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||