Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Merge requests
!1788
Resolve "remove validators"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "remove validators"
2101-remove-validators
into
development
Overview
0
Commits
6
Pipelines
3
Changes
65
Merged
Piotr Gawron
requested to merge
2101-remove-validators
into
development
5 months ago
Overview
0
Commits
6
Pipelines
3
Changes
65
Expand
Closes
#2101 (closed)
0
0
Merge request reports
Compare
development
version 1
a993b93b
5 months ago
development (base)
and
latest version
latest version
35a760f8
6 commits,
5 months ago
version 1
a993b93b
5 commits,
5 months ago
65 files
+
12256
−
3237
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
65
Search (e.g. *.vue) (Ctrl+P)
annotation/src/main/java/lcsb/mapviewer/annotation/services/ImproperAnnotations.java deleted
100644 → 0
+
0
−
84
Options
package
lcsb.mapviewer.annotation.services
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.apache.logging.log4j.Marker
;
import
lcsb.mapviewer.common.exception.InvalidArgumentException
;
import
lcsb.mapviewer.model.LogMarker
;
import
lcsb.mapviewer.model.ProjectLogEntryType
;
import
lcsb.mapviewer.model.map.BioEntity
;
import
lcsb.mapviewer.model.map.MiriamData
;
/**
* Class describing improper annotation. All elements are annotated in the
* source file, but sometimes those annotations are wrong. The aim of this class
* is to describe such annotation.
*
* @author Piotr Gawron
*
*/
public
class
ImproperAnnotations
implements
ProblematicAnnotation
{
/**
* {@link BioEntity} improperly annotated.
*/
private
BioEntity
bioEntity
;
/**
* Wrong miriam data.
*/
private
List
<
MiriamData
>
wrongAnnotations
=
new
ArrayList
<>();
/**
* Constructor that initializes the data with {@link #bioEntity bioEntity} and
* list of improper {@link MiriamData}.
*
* @param list
* list of improper {@link MiriamData}
* @param bioEntity
* bio entity
*/
public
ImproperAnnotations
(
final
BioEntity
bioEntity
,
final
List
<
MiriamData
>
list
)
{
if
(
list
.
size
()
==
0
)
{
throw
new
InvalidArgumentException
(
"List of improper annotations cannot be null"
);
}
this
.
bioEntity
=
bioEntity
;
wrongAnnotations
.
addAll
(
list
);
}
/**
* Constructor that initializes the data with {@link #bioEntity bio entity} and
* improper {@link MiriamData}.
*
* @param miriamData
* invalid {@link MiriamData}
* @param bioEntity
* annotated object
*/
public
ImproperAnnotations
(
final
BioEntity
bioEntity
,
final
MiriamData
miriamData
)
{
this
.
bioEntity
=
bioEntity
;
wrongAnnotations
.
add
(
miriamData
);
}
@Override
public
String
getMessage
()
{
StringBuilder
result
=
new
StringBuilder
(
"Invalid annotations found: "
);
for
(
final
MiriamData
miriamData
:
wrongAnnotations
)
{
result
.
append
(
miriamData
.
getDataType
().
getCommonName
()
+
"("
+
miriamData
.
getResource
()
+
"), "
);
}
return
result
.
toString
();
}
@Override
public
String
toString
()
{
return
getMessage
();
}
@Override
public
Marker
getLogMarker
()
{
return
new
LogMarker
(
ProjectLogEntryType
.
INVALID_ANNOTATION
,
bioEntity
);
}
}
Loading