package tools;

import java.io.IOException;

/**
 * A class helping reading resources
 * @author Julien OUVRARD
 *
 */
public class ResourceReader {
	
	/**
	 * A function that return the path of an rdf file with a specific ph
	 * @param arg The ph we search 
	 * @return Path to the resource targeted
	 * @throws IOException
	 */
	public String readPh(String arg) throws IOException{
        return this.getClass().getResource("/kegg-compounds-alberty-ph"+arg+".rdf").toString();
	}
	
	/**
	 * 
	 * @return Path to the resource of the Kegg compounds
	 * @throws IOException
	 */
	public String readCpd() throws IOException{
        return this.getClass().getResource("/kegg.cpd.rdf").toString();
	}
}

@@ -373,32 +373,261 @@
 OException%7B%0A
-        
+%09%09String ph=%22%22;%0A%09%09if(arg.matches(%22(%5B0-9%5D*)%22))%7B%0A%09%09%09ph=arg+%22-0%22;%0A%09%09%7Delse if(arg.matches(%22(%5B0-9%5D*)-(%5B0-9%5D*)%22))%7B%0A%09%09%09ph=arg;%0A%09%09%7Delse%7B%0A%09%09%09String part1=arg.substring(0,1);%0A%09%09%09String part2=arg.substring(2,3);%0A%09%09%09ph=part1+%22-%22+part2;%0A%09%09%7D%0A        %09
 return this.
@@ -678,19 +678,18 @@
 rty-ph%22+
-arg
+ph
 +%22.rdf%22)
@@ -845,24 +845,24 @@
 eption%7B%0A
-
         
 return t
@@ -853,16 +853,17 @@
         
+%09
 return t

Update ResourceReader.java