Commit 933f53da authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Replaced Resource classes by Resource.Type

parent 484d79dd
......@@ -16,8 +16,7 @@
*/
package de.cebitec.common.dbxref.providers;
import de.cebitec.common.dbxref.api.HTMLResource;
import de.cebitec.common.dbxref.api.XMLResource;
import de.cebitec.common.dbxref.api.Resource.Type;
import de.cebitec.common.dbxref.spi.DbXRefResolver;
import org.kohsuke.MetaInfServices;
......@@ -34,8 +33,8 @@ public class TaxonomyProvider extends GenericDbXRefProvider {
public static ResolverData createResolverData() {
ResolverData resolverData = new ResolverData("Taxon", "taxon", "taxid");
resolverData.addResourceTemplate(HTMLResource.class, "http://www.uniprot.org/taxonomy/%i");
resolverData.addResourceTemplate(XMLResource.class, "http://www.uniprot.org/taxonomy/%i.rdf");
resolverData.addResourceTemplate(Type.Html, "http://www.uniprot.org/taxonomy/%i");
resolverData.addResourceTemplate(Type.Xml, "http://www.uniprot.org/taxonomy/%i.rdf");
return resolverData;
}
}
......@@ -16,8 +16,7 @@
*/
package de.cebitec.common.dbxref.providers;
import de.cebitec.common.dbxref.api.HTMLResource;
import de.cebitec.common.dbxref.api.XMLResource;
import de.cebitec.common.dbxref.api.Resource.Type;
import de.cebitec.common.dbxref.spi.DbXRefResolver;
import org.kohsuke.MetaInfServices;
......@@ -34,8 +33,8 @@ public class UniProtProvider extends GenericDbXRefProvider {
public static ResolverData createResolverData() {
ResolverData resolverData = new ResolverData("UniProtKB/TrEMBL", "UniProtKB/Swiss-Prot");
resolverData.addResourceTemplate(HTMLResource.class, "http://www.uniprot.org/uniprot/%i");
resolverData.addResourceTemplate(XMLResource.class, "http://www.uniprot.org/uniprot/%i.xml");
resolverData.addResourceTemplate(Type.Html, "http://www.uniprot.org/uniprot/%i");
resolverData.addResourceTemplate(Type.Xml, "http://www.uniprot.org/uniprot/%i.xml");
return resolverData;
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment