comparison src/Test.java @ 2:1c2b4f5e2c05

linnaeus for finding species
author jdamerow
date Mon, 22 Oct 2012 13:46:54 -0700
parents 036535fcd179
children
comparison
equal deleted inserted replaced
1:7a4341c9f2e5 2:1c2b4f5e2c05
4 4
5 import com.sun.jersey.api.client.Client; 5 import com.sun.jersey.api.client.Client;
6 import com.sun.jersey.api.client.WebResource; 6 import com.sun.jersey.api.client.WebResource;
7 import com.sun.jersey.api.client.config.ClientConfig; 7 import com.sun.jersey.api.client.config.ClientConfig;
8 import com.sun.jersey.api.client.config.DefaultClientConfig; 8 import com.sun.jersey.api.client.config.DefaultClientConfig;
9
10 import de.mpiwg.anteater.species.common.impl.LinnaeusNameFinder;
9 11
10 public class Test { 12 public class Test {
11 13
12 public static void main(String[] args) { 14 public static void main(String[] args) {
13 ClientConfig config = new DefaultClientConfig(); 15 ClientConfig config = new DefaultClientConfig();
22 + "bottlenose dolphins (Tursiops truncatus) and one captive false killer whale " 24 + "bottlenose dolphins (Tursiops truncatus) and one captive false killer whale "
23 + "(Pseudorca crassidens) for scientific research at the University of Hawaii."; 25 + "(Pseudorca crassidens) for scientific research at the University of Hawaii.";
24 26
25 String text = "A. Endangered Species. Applicant: 777 Ranch, Inc. Hondo TX; PRT-013008. The applicant requests renewal of their permit authorizing interstate and foreign commerce, export and cull of excess male barasingha (Cervus duvauceli), Eld's deer (Cervus eldi), Arabian oryx and red lechwe (Kobus leche) from their captive herd for the purpose of enhancement of the survival of the species. This notification covers activities conducted by the applicant over a 5-year period. Applicant: Lincoln Park Zoological Gardens, Chicago, IL; PRT-090113</HD>"; 27 String text = "A. Endangered Species. Applicant: 777 Ranch, Inc. Hondo TX; PRT-013008. The applicant requests renewal of their permit authorizing interstate and foreign commerce, export and cull of excess male barasingha (Cervus duvauceli), Eld's deer (Cervus eldi), Arabian oryx and red lechwe (Kobus leche) from their captive herd for the purpose of enhancement of the survival of the species. This notification covers activities conducted by the applicant over a 5-year period. Applicant: Lincoln Park Zoological Gardens, Chicago, IL; PRT-090113</HD>";
26 28
27 29 LinnaeusNameFinder finder = new LinnaeusNameFinder(null);
30 finder.findCommonNames(text);
28 31
29 // MultivaluedMap<String, String> values = new MultivaluedMapImpl(); 32 // MultivaluedMap<String, String> values = new MultivaluedMapImpl();
30 // values.add("documentContent", content); 33 // values.add("documentContent", content);
31 // values.add("documentType", "text/plain"); 34 // values.add("documentType", "text/plain");
32 // values.add("appid", 35 // values.add("appid",