Skip to content
Snippets Groups Projects
Commit 3f7751d7 authored by tjc's avatar tjc
Browse files

cache organism names

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@6960 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 5190fb59
No related branches found
No related tags found
No related merge requests found
......@@ -120,6 +120,8 @@ public class DatabaseDocument extends Document
private List schema_list;
private static List organismNames;
private boolean gene_builder;
// include children in reading from the database
......@@ -1772,9 +1774,12 @@ public class DatabaseDocument extends Document
public List getOrganismNames()
{
if(organismNames != null && organismNames.size() > 0)
return organismNames;
GmodDAO dao = getDAOOnly();
List organisms = dao.getOrganisms();
List organismNames = new Vector();
organismNames = new Vector();
Iterator it = organisms.iterator();
while(it.hasNext())
{
......@@ -2285,6 +2290,12 @@ public class DatabaseDocument extends Document
if(db == null)
db = new HashMap();
if(organismNames == null)
organismNames = new Vector();
if(!organismNames.contains(orgName))
organismNames.add(orgName);
db.put(orgName + " - " + typeName + " - " + feature.getUniqueName(),
Integer.toString(feature.getFeatureId()));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment