Skip to content

Commit

Permalink
set matchAgainst true
Browse files Browse the repository at this point in the history
  • Loading branch information
naknomum committed Jan 21, 2025
1 parent 69bab65 commit f6cad3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/ecocean/Annotation.java
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ public static Base createFromApi(JSONObject payload, List<File> files, Shepherd
myShepherd.getPM().makePersistent(ft);
myShepherd.getPM().makePersistent(ann);
/*
believe this is overly complicated, but saving it from manualAnnotation.jsp logic
if (enc != null) {
if (IBEISIA.validForIdentification(ann, context) && iaConf.isValidIAClass(enc.getTaxonomy(myShepherd), iaClass)) {
ann.setMatchAgainst(true);
Expand All @@ -1275,6 +1276,7 @@ public static Base createFromApi(JSONObject payload, List<File> files, Shepherd
// we replace trivial if applicable; otherwise this logic determines if we should
// clone the encounter (based off historic logic in manualAnnotation.jsp)
if (enc != null) {
ann.setMatchAgainst(true);
boolean cloneEncounter = false;
// we would expect at least a trivial annotation, so if annots>=2, we know we need to clone
if ((annots.size() > 1) && (iaClass != null)) {
Expand Down

0 comments on commit f6cad3b

Please sign in to comment.