@Test public void testEolMedia() throws Exception { ExtensionInterpreter interp = new ExtensionInterpreter(); NameUsage u = new NameUsage(); VerbatimNameUsage v = new VerbatimNameUsage(); Map<Term, String> doc1 = Maps.newHashMap(); doc1.put(DcTerm.type, "http: doc1.put(DcTerm.format, "image/jpeg"); doc1.put(DcTerm.language, "en"); doc1.put(DcTerm.identifier, "1013-sp1-Image-1"); doc1.put(DwcTerm.taxonID, "1013-sp1"); doc1.put(AcTerm.accessURI, "http: doc1.put(AcTerm.furtherInformationURL, "http: Map<Term, String> doc2 = Maps.newHashMap(); doc2.put(DcTerm.type, "http: doc2.put(DcTerm.format, "text/html"); doc2.put(DcTerm.language, "en"); doc2.put(DcTerm.identifier, "1013-sp1-text-3"); doc2.put(DwcTerm.taxonID, "1013-sp1"); doc2.put(DcTerm.description, "Eupolybothrus cavernicolus is so far known only from the caves Miljacka"); doc2.put(DcTerm.title, "Description of the type locality"); doc2.put(AcTerm.furtherInformationURL, "http: doc2.put(XmpRightsTerm.UsageTerms, "http: v.getExtensions().put(Extension.EOL_MEDIA, Lists.newArrayList(doc1, doc2)); UsageExtensions ext = interp.interpret(u, v); assertEquals(1, ext.media.size()); assertEquals(URI.create("http: assertEquals(URI.create("http: assertEquals(1, ext.descriptions.size()); assertEquals("Description of the type locality", ext.descriptions.get(0).getType()); assertEquals("http: assertEquals("Eupolybothrus cavernicolus is so far known only from the caves Miljacka", ext.descriptions.get(0).getDescription()); }
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);  }