// XXX return if part status has been assigned
private static void assignMatchStati(NfoLyzeResult result, Repository repository) {
Map<NfoField, MatchResult> m = result.getMatches();
MatchResult mr;
if((mr = m.get(NfoField.ARTIST)) != null) { // get the artist's match result, if set, proceed!
SimilarScanResult<Artist> f = repository.findSimilarArtist(mr.getMatch());
mr.setSimilarScanResult(f); // ... attach similar matches to the match itself
assignMatchStatus(mr, f); // ... assign stati
if (f != null) { // XXX compose alternatives & show on UI !
System.out.println("*********" + f);
}
}
if((mr = m.get(NfoField.GENRE)) != null) { // get the genre's match result, if set, proceed!
SimilarScanResult<Genre> f = repository.findSimilarGenre(mr.getMatch());
mr.setSimilarScanResult(f); // ... attach similar matches to the match itself
assignMatchStatus(mr, f);
if (f != null) { // XXX compose alternatives & show on UI !
System.out.println("GENRE: *********" + f);
}
}
if((mr = m.get(NfoField.RECORD_LABEL)) != null) { // get the label's match result, if set, proceed!
SimilarScanResult<Label> f = repository.findSimilarLabel(mr.getMatch());
mr.setSimilarScanResult(f); // ... attach similar matches to the match itself
assignMatchStatus(mr, f);
if (f != null) { // XXX compose alternatives & show on UI !
System.out.println("LABEL: *********" + f);
}