diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ImproperAnnotations.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ImproperAnnotations.java index ab1810dd4e548f66bcafe189f74b559d73a908fa..4337be731d283e5c341bccb14e0a93a00b2811fd 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ImproperAnnotations.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ImproperAnnotations.java @@ -19,9 +19,9 @@ import lcsb.mapviewer.modelutils.map.ElementUtils; public class ImproperAnnotations implements ProblematicAnnotation { /** - * Object improperly annotated. + * {@link BioEntity} improperly annotated. */ - private BioEntity object; + private BioEntity bioEntity; /** * Wrong miriam data. @@ -29,39 +29,39 @@ public class ImproperAnnotations implements ProblematicAnnotation { private List<MiriamData> wrongAnnotations = new ArrayList<>(); /** - * Constructor that initializes the data with {@link #object bioEntity} - * and list of improper {@link MiriamData}. + * Constructor that initializes the data with {@link #bioEntity bioEntity} and + * list of improper {@link MiriamData}. * * @param list * list of improper {@link MiriamData} - * @param object - * annotated object + * @param bioEntity + * bioentity */ - public ImproperAnnotations(BioEntity object, List<MiriamData> list) { + public ImproperAnnotations(BioEntity bioEntity, List<MiriamData> list) { if (list.size() == 0) { throw new InvalidArgumentException("List of improper annotations cannot be null"); } - this.object = object; + this.bioEntity = bioEntity; wrongAnnotations.addAll(list); } /** - * Constructor that initializes the data with {@link #object annotated object} + * Constructor that initializes the data with {@link #bioEntity bio entity} * and improper {@link MiriamData}. * * @param miriamData * invalid {@link MiriamData} - * @param object + * @param bioEntity * annotated object */ - public ImproperAnnotations(BioEntity object, MiriamData miriamData) { - this.object = object; + public ImproperAnnotations(BioEntity bioEntity, MiriamData miriamData) { + this.bioEntity = bioEntity; wrongAnnotations.add(miriamData); } @Override public String getMessage() { - StringBuilder result = new StringBuilder(new ElementUtils().getElementTag(object)); + StringBuilder result = new StringBuilder(new ElementUtils().getElementTag(bioEntity)); result.append("contains invalid annotations: "); for (MiriamData miriamData : wrongAnnotations) { result.append(miriamData.getDataType().getCommonName() + "(" + miriamData.getResource() + "), "); diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingAnnotation.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingAnnotation.java index 64aa9a4bc144eb9929a04c835a26ed11576d88a4..d981d5a1ba502f44a0d1a137780f5633cc275dbd 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingAnnotation.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingAnnotation.java @@ -13,24 +13,23 @@ import lcsb.mapviewer.modelutils.map.ElementUtils; public class MissingAnnotation implements ProblematicAnnotation { /** - * Object improperly annotated. + * BioEntity improperly annotated. */ - private BioEntity object; + private BioEntity bioEntity; /** - * Constructor that initializes the data with {@link #object annotated object} - * . + * Constructor that initializes the data with {@link #bioEntity bioEntity} . * - * @param object - * annotated object that miss annotation + * @param bioEntity + * bioEntity that misses annotation */ - public MissingAnnotation(BioEntity object) { - this.object = object; + public MissingAnnotation(BioEntity bioEntity) { + this.bioEntity = bioEntity; } @Override public String getMessage() { - return new ElementUtils().getElementTag(object) + "misses annotations."; + return new ElementUtils().getElementTag(bioEntity) + "misses annotations."; } @Override diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingRequiredAnnotations.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingRequiredAnnotations.java index c6a40a2e92f5e24e502ac300aaefd66d7d0acbe6..c2ba975f0ed8d4665764239e5ddbb71ac1d4e9dc 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingRequiredAnnotations.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/MissingRequiredAnnotations.java @@ -12,7 +12,7 @@ import lcsb.mapviewer.modelutils.map.ElementUtils; /** * Defines problem with element annotation when there are some required - * annotations,but none of them can be found in the element. + * annotations, but none of them can be found in the element. * * @author Piotr Gawron * @@ -20,9 +20,9 @@ import lcsb.mapviewer.modelutils.map.ElementUtils; public class MissingRequiredAnnotations implements ProblematicAnnotation { /** - * Object improperly annotated. + * BioEntity improperly annotated. */ - private BioEntity object; + private BioEntity bioEntity; /** * Required miriam type. @@ -30,25 +30,25 @@ public class MissingRequiredAnnotations implements ProblematicAnnotation { private List<MiriamType> requiredMiriamType = new ArrayList<>(); /** - * Constructor that initializes the data with {@link #object annotated object} - * and list of improper {@link MiriamData}. + * Constructor that initializes the data with {@link #bioEntity bioEntity} and + * list of improper {@link MiriamData}. * * @param list * list of missing but required {@link MiriamType} - * @param object - * annotated object + * @param bioEntity + * {@link BioEntity} */ - public MissingRequiredAnnotations(BioEntity object, Collection<MiriamType> list) { + public MissingRequiredAnnotations(BioEntity bioEntity, Collection<MiriamType> list) { if (list.size() == 0) { throw new InvalidArgumentException("List of improper annotations cannot be null"); } - this.object = object; + this.bioEntity = bioEntity; requiredMiriamType.addAll(list); } @Override public String getMessage() { - StringBuilder result = new StringBuilder(new ElementUtils().getElementTag(object)); + StringBuilder result = new StringBuilder(new ElementUtils().getElementTag(bioEntity)); result.append("misses one of the following annotations: "); for (MiriamType type : requiredMiriamType) { result.append(type.getCommonName()); diff --git a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ModelAnnotator.java b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ModelAnnotator.java index 9808ebd014b966acec5a64d4c7f9a14290e65fa0..fb21e1e31b1a74f5dfe67cd9121e222938112d03 100644 --- a/annotation/src/main/java/lcsb/mapviewer/annotation/services/ModelAnnotator.java +++ b/annotation/src/main/java/lcsb/mapviewer/annotation/services/ModelAnnotator.java @@ -428,8 +428,8 @@ public class ModelAnnotator { } /** - * Checks if {@link BioEntity} is properly annotated and if not return - * info about missing annotation. + * Checks if {@link BioEntity} is properly annotated and if not return info + * about missing annotation. * * @param element * object to be checked @@ -604,7 +604,7 @@ public class ModelAnnotator { * miriam types } for {@link BioEntity} class type. * * @return map with informations about required {@link MiriamType miriam types - * * } for {@link BioEntity} class type + * } for {@link BioEntity} class type */ @SuppressWarnings("unchecked") public Map<Class<? extends BioEntity>, Set<MiriamType>> getDefaultRequiredClasses() {