public class AnnotationSetSnapshot
extends java.lang.Object
implements java.io.Serializable
IMPORTANT NOTE TO DEVELOPERS!!
Do not forget to synchronize all serialization code and to increment
the FILE_VERSION
in case the number of variables that needs
serialization in this class or in the AnnotationSnapshot
changes.
Modifier and Type | Field and Description |
---|---|
private java.util.List<AnnotationSnapshot> |
annotations |
private int |
annotationSetId |
private long |
created |
static int |
FILE_VERSION
The version number for the file format in use when serializing
this data.
|
private int |
itemId |
private Item |
itemType |
private static long |
serialVersionUID |
Constructor and Description |
---|
AnnotationSetSnapshot()
Creates a new, empty snapshot.
|
Modifier and Type | Method and Description |
---|---|
(package private) java.util.List<AnnotationSnapshot> |
getAnnotations()
Get a list with the all annotations in this snapshot.
|
AnnotationSet |
getAnnotationSet(DbControl dc)
Get the annotation set this is a snapshot of.
|
int |
getAnnotationSetId()
Get the id of the annotation set this is a snapshot of.
|
Annotatable |
getItem(DbControl dc)
Get item the annotations belong to.
|
int |
getItemId()
Get the ID of the item the annotations in this snapshot
belong to.
|
Item |
getItemType()
Get the item type of the item the annotations in this snapshot
belong to.
|
int |
getSize()
Get the number of annotations.
|
java.util.Date |
getSnapshotDate()
Get the date and time this snapshot was created.
|
void |
init(AnnotationSetData set)
Initialise the snapshot with data from the given annotation
set, including values for all primary annotations and information
about inherited annotations and annotation sets.
|
private void |
readObject(java.io.ObjectInputStream in) |
private void |
writeObject(java.io.ObjectOutputStream out) |
private static final long serialVersionUID
public static final int FILE_VERSION
private transient long created
private transient int annotationSetId
private transient int itemId
private transient Item itemType
private transient java.util.List<AnnotationSnapshot> annotations
public AnnotationSetSnapshot()
public void init(AnnotationSetData set)
public java.util.Date getSnapshotDate()
public int getItemId()
public Annotatable getItem(DbControl dc)
dc
- A DbControl to use for database accesspublic Item getItemType()
public int getSize()
java.util.List<AnnotationSnapshot> getAnnotations()
public int getAnnotationSetId()
public AnnotationSet getAnnotationSet(DbControl dc)
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException