private EBIFetchClient ebi = null;
+ private static org.exolab.castor.mapping.Mapping map;
+
public Vector getUniprotEntries(File file)
{
UniprotFile uni = new UniprotFile();
try
{
- // 1. Load the mapping information from the file
- org.exolab.castor.mapping.Mapping map = new org.exolab.castor.mapping.Mapping(
- uni.getClass().getClassLoader());
- java.net.URL url = getClass().getResource("/uniprot_mapping.xml");
- map.loadMapping(url);
+ if (map == null)
+ {
+ // 1. Load the mapping information from the file
+ map = new org.exolab.castor.mapping.Mapping(uni.getClass()
+ .getClassLoader());
+ java.net.URL url = getClass().getResource("/uniprot_mapping.xml");
+ map.loadMapping(url);
+ }
// 2. Unmarshal the data
Unmarshaller unmar = new Unmarshaller(uni);