Package net.sf.basedb.plugins
Class AnnotationFlatFileImporter.NewAnnotations
java.lang.Object
net.sf.basedb.plugins.AnnotationFlatFileImporter.NewAnnotations
- Enclosing class:
- AnnotationFlatFileImporter
Internal cache for storing annotation values from the file
for a single item. The items are not annotated until the entire
file has been parsed.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Annotatable
private int
private int
private int
private int
private int
private final Map<AnnotationType,
List<AnnotationFlatFileImporter.AnnotationValue>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
addValue
(AnnotationType at, Object value, Unit unit, boolean limitToMultiplicty) Add an annotation value.(package private) int
The total numer of annotation values that has been added to this cache.(package private) int
Number of annotations that was couldn't be set by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method because of an error (too many values).(package private) int
Number of annotations that was removed by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method.(package private) int
Number of annotations that was replaced by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method.(package private) int
Number of annotations that was set (=added or replaced) by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method.(package private) void
setNewAnnotations
(AnnotationFlatFileImporter importer, AnnotationBatcher batcher, boolean addToUnlimited, boolean replaceExisting, boolean failIfTooManyValues, boolean removeAnnotations) Annotate the item with the annotation values from the file.
-
Field Details
-
item
-
values
-
numAnnotations
private int numAnnotations -
numSet
private int numSet -
numError
private int numError -
numReplaced
private int numReplaced -
numRemoved
private int numRemoved
-
-
Constructor Details
-
NewAnnotations
NewAnnotations(Annotatable item) Create a new cache for the specified item.
-
-
Method Details
-
addValue
Add an annotation value. The value should have been checked for error before calling this method. -
getNumAnnotations
int getNumAnnotations()The total numer of annotation values that has been added to this cache. -
setNewAnnotations
void setNewAnnotations(AnnotationFlatFileImporter importer, AnnotationBatcher batcher, boolean addToUnlimited, boolean replaceExisting, boolean failIfTooManyValues, boolean removeAnnotations) Annotate the item with the annotation values from the file.- Parameters:
addToUnlimited
- TRUE to append to annotation types with multiplicity==0, FALSE to replacereplaceExisting
- TRUE to replace existing annotation values, FALSE to skipfailIfTooManyValues
- FALSE to skip annotations with more values than the multiplicity settings allows, TRUE to throw an exception
-
getNumSet
int getNumSet()Number of annotations that was set (=added or replaced) by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method. -
getNumReplaced
int getNumReplaced()Number of annotations that was replaced by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method. -
getNumRemoved
int getNumRemoved()Number of annotations that was removed by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method.- Since:
- 2.8
-
getNumError
int getNumError()Number of annotations that was couldn't be set by the call to thesetNewAnnotations(AnnotationFlatFileImporter, AnnotationBatcher, boolean, boolean, boolean, boolean)
method because of an error (too many values).
-