@Test public void testEmonocotTerm() { assertEquals(findTerm("http: }
public static Term findTerm(String termName) { String normTermName; if (termName == null || StringUtils.isBlank(normTermName = normaliseTerm(termName))) { return null; } Term term = findTermInEnum(normTermName, DwcTerm.values(), new String[] {DwcTerm.PREFIX, DwcTerm.NS}); if (term == null) { term = findTermInEnum(normTermName, DcTerm.values(), new String[] {DcTerm.PREFIX + ":", "http: } if (term == null) { term = findTermInEnum(normTermName, GbifTerm.values(), new String[] {GbifTerm.PREFIX, GbifTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, AcTerm.values(), new String[] {AcTerm.PREFIX, AcTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, ExtendedAcTerm.values(), new String[] {AcTerm.PREFIX, ExtendedAcTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Wgs84Term.values(), new String[] {Wgs84Term.PREFIX, Wgs84Term.NS}); } if (term == null) { term = findTermInEnum(normTermName, EmonocotTerm.values(), new String[] {EmonocotTerm.PREFIX, EmonocotTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, WCSPTerm.values(), new String[] {WCSPTerm.PREFIX, WCSPTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, SkosTerm.values(), new String[] {SkosTerm.PREFIX, SkosTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, ExifTerm.values(), new String[] {ExifTerm.PREFIX, ExifTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Iptc4xmpTerm.values(), new String[] {Iptc4xmpTerm.PREFIX, Iptc4xmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpRightsTerm.values(), new String[] {XmpRightsTerm.PREFIX, XmpRightsTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpTerm.values(), new String[] {XmpTerm.PREFIX, XmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, unkownTerms); } if (term == null) { term = UnknownTerm.build(termName); unkownTerms.add(term); } return term; }
TermFactory { public static Term findTerm(String termName) { String normTermName; if (termName == null || StringUtils.isBlank(normTermName = normaliseTerm(termName))) { return null; } Term term = findTermInEnum(normTermName, DwcTerm.values(), new String[] {DwcTerm.PREFIX, DwcTerm.NS}); if (term == null) { term = findTermInEnum(normTermName, DcTerm.values(), new String[] {DcTerm.PREFIX + ":", "http: } if (term == null) { term = findTermInEnum(normTermName, GbifTerm.values(), new String[] {GbifTerm.PREFIX, GbifTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, AcTerm.values(), new String[] {AcTerm.PREFIX, AcTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, ExtendedAcTerm.values(), new String[] {AcTerm.PREFIX, ExtendedAcTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Wgs84Term.values(), new String[] {Wgs84Term.PREFIX, Wgs84Term.NS}); } if (term == null) { term = findTermInEnum(normTermName, EmonocotTerm.values(), new String[] {EmonocotTerm.PREFIX, EmonocotTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, WCSPTerm.values(), new String[] {WCSPTerm.PREFIX, WCSPTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, SkosTerm.values(), new String[] {SkosTerm.PREFIX, SkosTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, ExifTerm.values(), new String[] {ExifTerm.PREFIX, ExifTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Iptc4xmpTerm.values(), new String[] {Iptc4xmpTerm.PREFIX, Iptc4xmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpRightsTerm.values(), new String[] {XmpRightsTerm.PREFIX, XmpRightsTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpTerm.values(), new String[] {XmpTerm.PREFIX, XmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, unkownTerms); } if (term == null) { term = UnknownTerm.build(termName); unkownTerms.add(term); } return term; } }
TermFactory { public static Term findTerm(String termName) { String normTermName; if (termName == null || StringUtils.isBlank(normTermName = normaliseTerm(termName))) { return null; } Term term = findTermInEnum(normTermName, DwcTerm.values(), new String[] {DwcTerm.PREFIX, DwcTerm.NS}); if (term == null) { term = findTermInEnum(normTermName, DcTerm.values(), new String[] {DcTerm.PREFIX + ":", "http: } if (term == null) { term = findTermInEnum(normTermName, GbifTerm.values(), new String[] {GbifTerm.PREFIX, GbifTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, AcTerm.values(), new String[] {AcTerm.PREFIX, AcTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, ExtendedAcTerm.values(), new String[] {AcTerm.PREFIX, ExtendedAcTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Wgs84Term.values(), new String[] {Wgs84Term.PREFIX, Wgs84Term.NS}); } if (term == null) { term = findTermInEnum(normTermName, EmonocotTerm.values(), new String[] {EmonocotTerm.PREFIX, EmonocotTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, WCSPTerm.values(), new String[] {WCSPTerm.PREFIX, WCSPTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, SkosTerm.values(), new String[] {SkosTerm.PREFIX, SkosTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, ExifTerm.values(), new String[] {ExifTerm.PREFIX, ExifTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Iptc4xmpTerm.values(), new String[] {Iptc4xmpTerm.PREFIX, Iptc4xmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpRightsTerm.values(), new String[] {XmpRightsTerm.PREFIX, XmpRightsTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpTerm.values(), new String[] {XmpTerm.PREFIX, XmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, unkownTerms); } if (term == null) { term = UnknownTerm.build(termName); unkownTerms.add(term); } return term; }  }
TermFactory { public static Term findTerm(String termName) { String normTermName; if (termName == null || StringUtils.isBlank(normTermName = normaliseTerm(termName))) { return null; } Term term = findTermInEnum(normTermName, DwcTerm.values(), new String[] {DwcTerm.PREFIX, DwcTerm.NS}); if (term == null) { term = findTermInEnum(normTermName, DcTerm.values(), new String[] {DcTerm.PREFIX + ":", "http: } if (term == null) { term = findTermInEnum(normTermName, GbifTerm.values(), new String[] {GbifTerm.PREFIX, GbifTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, AcTerm.values(), new String[] {AcTerm.PREFIX, AcTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, ExtendedAcTerm.values(), new String[] {AcTerm.PREFIX, ExtendedAcTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Wgs84Term.values(), new String[] {Wgs84Term.PREFIX, Wgs84Term.NS}); } if (term == null) { term = findTermInEnum(normTermName, EmonocotTerm.values(), new String[] {EmonocotTerm.PREFIX, EmonocotTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, WCSPTerm.values(), new String[] {WCSPTerm.PREFIX, WCSPTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, SkosTerm.values(), new String[] {SkosTerm.PREFIX, SkosTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, ExifTerm.values(), new String[] {ExifTerm.PREFIX, ExifTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Iptc4xmpTerm.values(), new String[] {Iptc4xmpTerm.PREFIX, Iptc4xmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpRightsTerm.values(), new String[] {XmpRightsTerm.PREFIX, XmpRightsTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpTerm.values(), new String[] {XmpTerm.PREFIX, XmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, unkownTerms); } if (term == null) { term = UnknownTerm.build(termName); unkownTerms.add(term); } return term; }  static String normaliseTerm(String term); void clear(); static Term findTerm(String termName); }
TermFactory { public static Term findTerm(String termName) { String normTermName; if (termName == null || StringUtils.isBlank(normTermName = normaliseTerm(termName))) { return null; } Term term = findTermInEnum(normTermName, DwcTerm.values(), new String[] {DwcTerm.PREFIX, DwcTerm.NS}); if (term == null) { term = findTermInEnum(normTermName, DcTerm.values(), new String[] {DcTerm.PREFIX + ":", "http: } if (term == null) { term = findTermInEnum(normTermName, GbifTerm.values(), new String[] {GbifTerm.PREFIX, GbifTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, AcTerm.values(), new String[] {AcTerm.PREFIX, AcTerm.NS}); } if (term ==null) { term = findTermInEnum(normTermName, ExtendedAcTerm.values(), new String[] {AcTerm.PREFIX, ExtendedAcTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Wgs84Term.values(), new String[] {Wgs84Term.PREFIX, Wgs84Term.NS}); } if (term == null) { term = findTermInEnum(normTermName, EmonocotTerm.values(), new String[] {EmonocotTerm.PREFIX, EmonocotTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, WCSPTerm.values(), new String[] {WCSPTerm.PREFIX, WCSPTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, SkosTerm.values(), new String[] {SkosTerm.PREFIX, SkosTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, ExifTerm.values(), new String[] {ExifTerm.PREFIX, ExifTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, Iptc4xmpTerm.values(), new String[] {Iptc4xmpTerm.PREFIX, Iptc4xmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpRightsTerm.values(), new String[] {XmpRightsTerm.PREFIX, XmpRightsTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, XmpTerm.values(), new String[] {XmpTerm.PREFIX, XmpTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, IucnTerm.values(), new String[] {IucnTerm.PREFIX, IucnTerm.NS}); } if (term == null) { term = findTermInEnum(normTermName, unkownTerms); } if (term == null) { term = UnknownTerm.build(termName); unkownTerms.add(term); } return term; }  static String normaliseTerm(String term); void clear(); static Term findTerm(String termName);  }