|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.annotation.Annotations
public class Annotations
This class contains various utility methods for annotations.
Constructor Summary | |
---|---|
Annotations()
|
Method Summary | |
---|---|
static void |
clearModified(Document document)
Resets the "modified"-indicator for all annotations of the given document. |
static void |
clearModified(Page page)
Resets the "modified"-indicator for all annotations of the given page. |
static Collection<Annotation> |
get(Page page)
Returns a list all annotations of given page. |
static List<AnnotationCustomizer> |
getAnnotationCustomizers()
|
static AnnotationPageSegment |
getAnnotationPageSegment(Page page)
Returns the annotation page segment of given page. |
static AnnotationPageSegment |
getAnnotationPageSegment(Page page,
boolean create)
Returns the annotation page segment of given page. |
static AnnotationProfile |
getAnnotationProfile(Document doc,
Page page)
This is a convenience method to retrieve an applicable AnnotationProfile . |
static boolean |
isAnnotated(Document document)
Returns whether the given document is annotated. |
static boolean |
isAnnotated(Page page)
Returns whether the given page is annotated. |
static boolean |
isModified(Document document)
Returns whether the annotations of given document are modified. |
static boolean |
isModified(Page page)
Returns whether the annotations of given page are modified. |
static void |
runCustomizers(Annotation a,
AnnotationPageSegment ps,
Collection<AnnotationCustomizer> customizers)
This method executes all AnnotationCustomizer implementations with the given annotation
object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Annotations()
Method Detail |
---|
public static Collection<Annotation> get(Page page)
page
- the page the annotations should be retrieved
IllegalArgumentException
- if page is null
public static AnnotationProfile getAnnotationProfile(Document doc, Page page)
AnnotationProfile
.
First of all the page will be examined whether it already provides an annotation profile. If so, it will be returned. Otherwise the document will be checked whether the document provide a profile. If so it will be returned. If not, the annotation default profile will be returned.
AnnotationProfile.get(Page)
,
AnnotationProfile.get(Document)
and
AnnotationProfile.getDefaultProfile()
public static AnnotationPageSegment getAnnotationPageSegment(Page page)
null
will be returned.
page
- the page the annotation page segement should be retrieved
null
if not available.
IllegalArgumentException
- if page is null
public static AnnotationPageSegment getAnnotationPageSegment(Page page, boolean create)
create
decides whether an annotation page segment for
given page should be created or not.
page
- the page the annotation page segment should be retrievedcreate
- whether an annotation page segment should be created
create
is true
, a new one will be created and returned. Otherwise
null
will be returned.
IllegalArgumentException
- if page is null
public static boolean isAnnotated(Document document)
document
- the document the annotation lookup should be done for
true
if at least one page of the document has annotations
IllegalArgumentException
- if document is null
public static boolean isAnnotated(Page page)
page
- the page the annotation lookup should be done for
true
if at least one annotation is contained in the page
IllegalArgumentException
- if page is null
public static boolean isModified(Document document)
document
- the document the annotation lookup should be done for
true
if at least one page contains modified annotations
IllegalArgumentException
- if document is null
public static boolean isModified(Page page)
page
- the page the annotation lookup should be done for
true
if the page contains at least one modified annotation
IllegalArgumentException
- if page is null
public static void clearModified(Document document)
This method should not be used for FileNet based annotation formats (IS, P8). In that case the annotations should be reloaded from the archive to obtain changes made by the archive / developer during the saving process. Make sure to remove the annotations from the whole document before reloading.
document
- the document holding the annotations on which the operation shall be performed
IllegalArgumentException
- if document is null
public static void clearModified(Page page)
This method should not be used for FileNet based annotation formats (IS, P8). In that case the annotations should be reloaded from the archive to obtain changes made by the archive / developer during the saving process. Make sure to remove the annotations from the whole document before reloading.
page
- the page holding the annotations on which the operation shall be performed
IllegalArgumentException
- if page is null
public static List<AnnotationCustomizer> getAnnotationCustomizers()
public static void runCustomizers(Annotation a, AnnotationPageSegment ps, Collection<AnnotationCustomizer> customizers)
AnnotationCustomizer
implementations with the given annotation
object.
a
- Annotation
objectps
- AnnotationPageSegment
instance (may be null
)customizers
- Collection containing AnnotationCustomizer
implementations
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2017 levigo holding gmbh. All rights reserved. |