Changeset 20789
- Timestamp:
- 04/03/10 14:11:33 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bio/webapp/src/org/intermine/bio/web/OrthologueLinkController.java
r20762 r20789 29 29 import org.intermine.bio.logic.OrthologueLinkManager; 30 30 import org.intermine.bio.web.logic.BioUtil; 31 import org.intermine.util.TypeUtil; 31 32 import org.intermine.web.logic.bag.BagHelper; 32 33 import org.intermine.web.logic.session.SessionMethods; 33 34 34 35 35 … … 40 40 public class OrthologueLinkController extends TilesAction 41 41 { 42 private static final String IDENTIFIER_FIELD = "primaryIdentifier"; 43 42 private String identifierField = "primaryIdentifier"; 43 private String alternativeIdentifierField = "ensemblIdentifier"; 44 44 45 /** 45 46 * {@inheritDoc} … … 57 58 .getServletContext()); 58 59 59 String identifierList = BagHelper.getIdList(bag, im.getObjectStore(), "", IDENTIFIER_FIELD); 60 // if gene.ensemblId is a field, use that instead 61 // FIXME this should come from config file instead 62 63 Class c = null; 64 try { 65 c = Class.forName(bag.getQualifiedType()); 66 } catch (ClassNotFoundException e) { 67 // TODO Auto-generated catch block 68 e.printStackTrace(); 69 } 70 if (TypeUtil.getFieldInfo(c, alternativeIdentifierField) != null) { 71 identifierField = alternativeIdentifierField; 72 } 73 74 75 String identifierList = BagHelper.getIdList(bag, im.getObjectStore(), "", identifierField); 60 76 request.setAttribute("identifierList", identifierList); 61 77 62 78 OrthologueLinkManager orthologueLinkManager 63 79 = OrthologueLinkManager.getInstance(im, webProperties); 64 Collection<String> organismNamesInBag = BioUtil.getOrganisms(im.getObjectStore(), bag, 80 Collection<String> organismNamesInBag = BioUtil.getOrganisms(im.getObjectStore(), bag, 65 81 false, "shortName"); 66 Map<Mine, Map<String, Set[]>> mines 82 Map<Mine, Map<String, Set[]>> mines 67 83 = orthologueLinkManager.getMines(organismNamesInBag); 68 69 // test if mine has organisms in our list70 84 if (!mines.isEmpty()) { 71 85 request.setAttribute("mines", mines);
Note: See TracChangeset
for help on using the changeset viewer.
