@Test public void testVernacularNames() throws Exception { ExtensionInterpreter interp = new ExtensionInterpreter(); NameUsage u = new NameUsage(); VerbatimNameUsage v = new VerbatimNameUsage(); Map<Term, String> v1 = Maps.newHashMap(); v1.put(DwcTerm.vernacularName, "palmeirinha"); v1.put(DcTerm.language, "PORTUGUES"); v1.put(DwcTerm.locality, "Acre"); Map<Term, String> v2 = Maps.newHashMap(); v2.put(DwcTerm.vernacularName, "ubim"); v2.put(DcTerm.language, "PORTUGUES"); v2.put(DwcTerm.locality, "Acre"); v.getExtensions().put(Extension.VERNACULAR_NAME, Lists.newArrayList(v1, v2)); UsageExtensions ext = interp.interpret(u, v); assertEquals(2, ext.vernacularNames.size()); assertTrue(u.getIssues().isEmpty()); assertEquals("palmeirinha", ext.vernacularNames.get(0).getVernacularName()); assertEquals(Language.PORTUGUESE, ext.vernacularNames.get(0).getLanguage()); assertEquals("Acre", ext.vernacularNames.get(0).getArea()); }
public UsageExtensions interpret(NameUsage u, VerbatimNameUsage v) { UsageExtensions ext = new UsageExtensions(); interpretDescription(u, ext,v); interpretDistribution(u ,ext, v); interpretIdentifier(u, ext, v); interpretMultimedia(u, ext, v); interpretReference(u, ext, v); interpretSpeciesProfiles(u, ext, v); interpretTypes(u, ext, v); interpretVernacularNames(u, ext, v); return ext; }
ExtensionInterpreter { public UsageExtensions interpret(NameUsage u, VerbatimNameUsage v) { UsageExtensions ext = new UsageExtensions(); interpretDescription(u, ext,v); interpretDistribution(u ,ext, v); interpretIdentifier(u, ext, v); interpretMultimedia(u, ext, v); interpretReference(u, ext, v); interpretSpeciesProfiles(u, ext, v); interpretTypes(u, ext, v); interpretVernacularNames(u, ext, v); return ext; } }
ExtensionInterpreter { public UsageExtensions interpret(NameUsage u, VerbatimNameUsage v) { UsageExtensions ext = new UsageExtensions(); interpretDescription(u, ext,v); interpretDistribution(u ,ext, v); interpretIdentifier(u, ext, v); interpretMultimedia(u, ext, v); interpretReference(u, ext, v); interpretSpeciesProfiles(u, ext, v); interpretTypes(u, ext, v); interpretVernacularNames(u, ext, v); return ext; }  }
ExtensionInterpreter { public UsageExtensions interpret(NameUsage u, VerbatimNameUsage v) { UsageExtensions ext = new UsageExtensions(); interpretDescription(u, ext,v); interpretDistribution(u ,ext, v); interpretIdentifier(u, ext, v); interpretMultimedia(u, ext, v); interpretReference(u, ext, v); interpretSpeciesProfiles(u, ext, v); interpretTypes(u, ext, v); interpretVernacularNames(u, ext, v); return ext; }  UsageExtensions interpret(NameUsage u, VerbatimNameUsage v); }
ExtensionInterpreter { public UsageExtensions interpret(NameUsage u, VerbatimNameUsage v) { UsageExtensions ext = new UsageExtensions(); interpretDescription(u, ext,v); interpretDistribution(u ,ext, v); interpretIdentifier(u, ext, v); interpretMultimedia(u, ext, v); interpretReference(u, ext, v); interpretSpeciesProfiles(u, ext, v); interpretTypes(u, ext, v); interpretVernacularNames(u, ext, v); return ext; }  UsageExtensions interpret(NameUsage u, VerbatimNameUsage v);  }