You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(18) |
Aug
(33) |
Sep
(30) |
Oct
(27) |
Nov
(59) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(67) |
Feb
(44) |
Mar
(70) |
Apr
(73) |
May
(119) |
Jun
(31) |
Jul
(92) |
Aug
(86) |
Sep
(76) |
Oct
(152) |
Nov
(156) |
Dec
(85) |
2008 |
Jan
(111) |
Feb
(121) |
Mar
(107) |
Apr
(102) |
May
(45) |
Jun
(65) |
Jul
(62) |
Aug
(133) |
Sep
(56) |
Oct
(56) |
Nov
(17) |
Dec
(15) |
2009 |
Jan
(10) |
Feb
(5) |
Mar
(10) |
Apr
(14) |
May
(49) |
Jun
(94) |
Jul
(67) |
Aug
(23) |
Sep
(9) |
Oct
(92) |
Nov
(26) |
Dec
(51) |
2010 |
Jan
(105) |
Feb
(83) |
Mar
(52) |
Apr
(59) |
May
(68) |
Jun
(71) |
Jul
(127) |
Aug
(49) |
Sep
(91) |
Oct
(27) |
Nov
(33) |
Dec
(26) |
2011 |
Jan
(26) |
Feb
(45) |
Mar
(26) |
Apr
(28) |
May
(17) |
Jun
(15) |
Jul
(45) |
Aug
(33) |
Sep
(50) |
Oct
(22) |
Nov
(10) |
Dec
(21) |
2012 |
Jan
(33) |
Feb
(24) |
Mar
(36) |
Apr
(60) |
May
(60) |
Jun
(43) |
Jul
(114) |
Aug
(19) |
Sep
(35) |
Oct
(24) |
Nov
(64) |
Dec
(12) |
2013 |
Jan
(54) |
Feb
(58) |
Mar
(51) |
Apr
(46) |
May
(21) |
Jun
(29) |
Jul
(25) |
Aug
(25) |
Sep
(13) |
Oct
(7) |
Nov
(14) |
Dec
(27) |
2014 |
Jan
(10) |
Feb
(7) |
Mar
(16) |
Apr
(14) |
May
(19) |
Jun
(8) |
Jul
(15) |
Aug
(11) |
Sep
(5) |
Oct
(11) |
Nov
(11) |
Dec
(4) |
2015 |
Jan
(52) |
Feb
(27) |
Mar
(22) |
Apr
(17) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: <mg...@us...> - 2007-08-18 06:11:44
|
Revision: 804 http://obo.svn.sourceforge.net/obo/?rev=804&view=rev Author: mgibson Date: 2007-08-17 23:11:48 -0700 (Fri, 17 Aug 2007) Log Message: ----------- read only config - i was thinking it was a boolean attribute - but in rethinking i think its really just another type Modified Paths: -------------- phenote/trunk/conf/phenote-config.rnc Modified: phenote/trunk/conf/phenote-config.rnc =================================================================== --- phenote/trunk/conf/phenote-config.rnc 2007-08-18 06:05:52 UTC (rev 803) +++ phenote/trunk/conf/phenote-config.rnc 2007-08-18 06:11:48 UTC (rev 804) @@ -87,7 +87,9 @@ ## added term is assumed, otherewise free_text is the default ## ID requires a : and no whitespace ## free_text is just for backward compatibility - phase out - attribute type { "FREE_TEXT" | "TERM" | "INT" | "ID" | "free_text" }, + attribute type { "FREE_TEXT" | "TERM" | "INT" | "ID" | "READ_ONLY" | "free_text" }, + ## should this be another type? will there be anything readonly aside from strings? + ##attribute read-only { xsd:boolean }, ## file is for single ontology - rename ontology_file? ## phase these 4 out - redundant with single ontology attribute tab { xsd:string }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-08-18 06:05:50
|
Revision: 803 http://obo.svn.sourceforge.net/obo/?rev=803&view=rev Author: mgibson Date: 2007-08-17 23:05:52 -0700 (Fri, 17 Aug 2007) Log Message: ----------- recording annot id/reference for group character/annot to ref/find from main window for commit Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java Modified: phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java 2007-08-18 05:43:37 UTC (rev 802) +++ phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java 2007-08-18 06:05:52 UTC (rev 803) @@ -55,11 +55,24 @@ protected Namespace getNamespace() { return namespace; } - /** This is the real workhorse here */ - protected void loadUpMainField() { + +// protected void makeTerms() { +// if (recordsId()) +// setIdField(); +// loadUpMainField(); +// } - log().debug("AGA loadUpMainField"); + protected boolean recordsId() { return false; } + protected void setIdField(CharacterI c, String id) {} + + /** This is the real workhorse here + just goes through and makes all the terms and shoves them over to + main/default destination field */ + protected void makeTerms() { //loadUpMainField() { + + //log().debug("AGA makeTerms"); + if (!hasDestinationCharField()) return; // err msg? // clear out old obo classes??? query be namespace and OBOSess.removeObject? @@ -71,6 +84,8 @@ OBOClass o = makeOboClassFromChar(c); if (o == null) continue; os.addObject(o); + if (recordsId()) + setIdField(c,o.getID()); } // load obo classes into main field -> namespace query? @@ -124,16 +139,16 @@ return CharacterListManager.getCharListMan(group).getCharacterList().getList(); } - /** just triggers loadUpMainField */ + /** just triggers makeTerms */ private class GroupCharChangeListener implements CharChangeListener { public void charChanged(CharChangeEvent e) { - loadUpMainField(); + makeTerms(); } } private class GroupCharListChangeListener implements CharListChangeListener { public void newCharList(CharListChangeEvent e) { - loadUpMainField(); + makeTerms(); } } Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java 2007-08-18 05:43:37 UTC (rev 802) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java 2007-08-18 06:05:52 UTC (rev 803) @@ -6,6 +6,7 @@ import phenote.datamodel.CharacterI; import phenote.datamodel.CharFieldException; +import phenote.datamodel.TermNotFoundException; import phenote.dataadapter.AbstractGroupAdapter; /* Makes worm Reference list based off of Publication, Person, NBP, and @@ -16,6 +17,16 @@ public WormReferenceGroupAdapter(String group) { super(group); } + + protected boolean recordsId() { return true; } + + /** this should be read only and probably hidden */ + protected void setIdField(CharacterI c, String id) { + try { c.setValue("RefID",id); } + catch (CharFieldException e) {log().error("cant set id field"+e.getMessage());} + catch (TermNotFoundException x) { log().error(x); } + } + protected String makeNameFromChar(CharacterI c) { try { String pubID = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-08-18 05:43:35
|
Revision: 802 http://obo.svn.sourceforge.net/obo/?rev=802&view=rev Author: azurebrd Date: 2007-08-17 22:43:37 -0700 (Fri, 17 Aug 2007) Log Message: ----------- nothing really Modified Paths: -------------- phenote/trunk/conf/worm.cfg phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java phenote/trunk/src/java/phenote/edit/AddTransaction.java phenote/trunk/src/java/phenote/edit/CompoundTransaction.java phenote/trunk/src/java/phenote/edit/DeleteTransaction.java phenote/trunk/src/java/phenote/edit/EditManager.java phenote/trunk/src/java/phenote/edit/TransactionI.java phenote/trunk/src/java/phenote/edit/UpdateTransaction.java Modified: phenote/trunk/conf/worm.cfg =================================================================== --- phenote/trunk/conf/worm.cfg 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/conf/worm.cfg 2007-08-18 05:43:37 UTC (rev 802) @@ -34,7 +34,7 @@ <field name="PGDBID" enable="true" copy-field="false" groups="default"/> - <field name="Reference" datatag="Ref" type="TERM" groups="default"/> + <field name="Reference" datatag="Ref" type="TERM" groups="referenceMaker default"/> <field name="Pub" datatag="Pub" enable="true" groups="referenceMaker"> <!--<ontology name="Pub" file="http://tazendra.caltech.edu/~azurebrd/cgi-bin/forms/paper_obo.cgi"/> PUT THIS BACK --> Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-08-18 05:43:37 UTC (rev 802) @@ -21,6 +21,8 @@ import phenote.datamodel.TermNotFoundException; import phenote.datamodel.CharField; +import phenote.edit.EditManager; + import java.sql.DriverManager; import java.sql.Connection; import java.sql.SQLException; @@ -47,6 +49,18 @@ return "Commit To Worm DB"; } + public void delete() { + List<CharacterI> l = EditManager.inst().getDeletedAnnotations(); + try { + for (CharacterI chr : l) { + String pgdbid = chr.getValueString("PGDBID"); + if (pgdbid == null) continue; + System.out.println("Delete "+pgdbid+" end"); } + } catch (Exception e) { + System.out.println("Could not delete character: " + e); + } + } + public void commit(CharacterListI charList) { // String m = "Worm adapter commit not yet implemented."; // JOptionPane.showMessageDialog(null,m,"Worm stub",JOptionPane.INFORMATION_MESSAGE); @@ -258,6 +272,8 @@ } } // for (CharacterI chr : charList.getList()) + + delete(); // if alleleQueried... wipe out allele and insert // else if Pub queried... wipe out pub and insert // else - new insert & deletes(from transactions) Modified: phenote/trunk/src/java/phenote/edit/AddTransaction.java =================================================================== --- phenote/trunk/src/java/phenote/edit/AddTransaction.java 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/src/java/phenote/edit/AddTransaction.java 2007-08-18 05:43:37 UTC (rev 802) @@ -24,6 +24,10 @@ this.characterListManager = clManager; } + public List<CharacterI> getDeletedAnnotations() { + return new ArrayList<CharacterI>(0); + } + public boolean isUpdate() { return false; } public boolean isAdd() { return !isUndone; } Modified: phenote/trunk/src/java/phenote/edit/CompoundTransaction.java =================================================================== --- phenote/trunk/src/java/phenote/edit/CompoundTransaction.java 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/src/java/phenote/edit/CompoundTransaction.java 2007-08-18 05:43:37 UTC (rev 802) @@ -39,6 +39,12 @@ return upTrans; } + public List<CharacterI> getDeletedAnnotations() { + List<CharacterI>l = new ArrayList<CharacterI>(); + for (TransactionI ch : childTransactions) { l.addAll(ch.getDeletedAnnotations()); } + return l; + } + private CompoundTransaction() {} private void addTransaction(TransactionI trans) { Modified: phenote/trunk/src/java/phenote/edit/DeleteTransaction.java =================================================================== --- phenote/trunk/src/java/phenote/edit/DeleteTransaction.java 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/src/java/phenote/edit/DeleteTransaction.java 2007-08-18 05:43:37 UTC (rev 802) @@ -18,6 +18,12 @@ private CharacterListManager characterListManager; private boolean isUndone = false; + public List<CharacterI> getDeletedAnnotations() { + List<CharacterI> l = new ArrayList<CharacterI>(); + l.add(delChar); + return l; + } + DeleteTransaction(CharacterI c, CharacterListManager clManager) { this.delChar = c; this.characterListManager = clManager; Modified: phenote/trunk/src/java/phenote/edit/EditManager.java =================================================================== --- phenote/trunk/src/java/phenote/edit/EditManager.java 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/src/java/phenote/edit/EditManager.java 2007-08-18 05:43:37 UTC (rev 802) @@ -39,6 +39,12 @@ this.characterListManager = clManager; } + public List<CharacterI> getDeletedAnnotations() { + List<CharacterI> l = new ArrayList<CharacterI>(); + for (TransactionI t : getTransactionList()) { l.addAll(t.getDeletedAnnotations()); } + return l; + } + // gets the "default" (group) edit manager public static EditManager inst() { return getEditManager(OntologyManager.DEFAULT_GROUP); Modified: phenote/trunk/src/java/phenote/edit/TransactionI.java =================================================================== --- phenote/trunk/src/java/phenote/edit/TransactionI.java 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/src/java/phenote/edit/TransactionI.java 2007-08-18 05:43:37 UTC (rev 802) @@ -10,6 +10,8 @@ // interface? class? public interface TransactionI { + public List<CharacterI> getDeletedAnnotations(); + public void editModel(); public void undo(); Modified: phenote/trunk/src/java/phenote/edit/UpdateTransaction.java =================================================================== --- phenote/trunk/src/java/phenote/edit/UpdateTransaction.java 2007-08-18 04:43:30 UTC (rev 801) +++ phenote/trunk/src/java/phenote/edit/UpdateTransaction.java 2007-08-18 05:43:37 UTC (rev 802) @@ -32,6 +32,10 @@ oldValue = c.getValue(cf); } + public List<CharacterI> getDeletedAnnotations() { + return new ArrayList<CharacterI>(0); + } + // public UpdateTransaction(CharFieldValue new, CharFieldValue old) ? /** actually maybe dont need to pas in old val - just query for it phase out*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-08-18 04:43:28
|
Revision: 801 http://obo.svn.sourceforge.net/obo/?rev=801&view=rev Author: azurebrd Date: 2007-08-17 21:43:30 -0700 (Fri, 17 Aug 2007) Log Message: ----------- Copying a character duplicates it except for the PGDBID Modified Paths: -------------- phenote/trunk/conf/worm.cfg phenote/trunk/src/java/phenote/config/FieldConfig.java phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java Modified: phenote/trunk/conf/worm.cfg =================================================================== --- phenote/trunk/conf/worm.cfg 2007-08-18 01:57:16 UTC (rev 800) +++ phenote/trunk/conf/worm.cfg 2007-08-18 04:43:30 UTC (rev 801) @@ -32,7 +32,7 @@ <field name="Object Name" enable="true" groups="referenceMaker default"/> - <field name="PGDBID" enable="true" groups="default"/> + <field name="PGDBID" enable="true" copy-field="false" groups="default"/> <field name="Reference" datatag="Ref" type="TERM" groups="default"/> Modified: phenote/trunk/src/java/phenote/config/FieldConfig.java =================================================================== --- phenote/trunk/src/java/phenote/config/FieldConfig.java 2007-08-18 01:57:16 UTC (rev 800) +++ phenote/trunk/src/java/phenote/config/FieldConfig.java 2007-08-18 04:43:30 UTC (rev 801) @@ -251,7 +251,8 @@ /** specifies whether to copy field to new character when char is duplicated default is true, db ids generally shouldnt copy */ public boolean copies() { - return true; + if ( fieldBean.xgetCopyField() == null ) { return true; } + else { return fieldBean.getCopyField(); } } public void setCharField(CharField cf) { charField = cf; } Modified: phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java 2007-08-18 01:57:16 UTC (rev 800) +++ phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java 2007-08-18 04:43:30 UTC (rev 801) @@ -57,8 +57,12 @@ } CharFieldValue cloneCharFieldValue() { - if (!charField.getCopyEnabled()) - return null; // null?? new CharFieldValue(character + if (!charField.getCopyEnabled()) { + CharFieldValue nullCloneValue = new CharFieldValue(character, charField); + nullCloneValue.isOboClass = isOboClass; + return nullCloneValue; + } +// return null; // null?? new CharFieldValue(character try { return (CharFieldValue)clone(); } catch (CloneNotSupportedException x) { return null; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-08-18 01:57:16
|
Revision: 800 http://obo.svn.sourceforge.net/obo/?rev=800&view=rev Author: azurebrd Date: 2007-08-17 18:57:16 -0700 (Fri, 17 Aug 2007) Log Message: ----------- Query creates Reference and populates obo class and Reference field in Main table in the right order Modified Paths: -------------- phenote/trunk/conf/phenote-config.xsd phenote/trunk/conf/worm.cfg phenote/trunk/jars/phenoteconfigbeans.jar phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java Modified: phenote/trunk/conf/phenote-config.xsd =================================================================== --- phenote/trunk/conf/phenote-config.xsd 2007-08-18 01:56:23 UTC (rev 799) +++ phenote/trunk/conf/phenote-config.xsd 2007-08-18 01:57:16 UTC (rev 800) @@ -116,6 +116,7 @@ <xs:attribute name="slim" use="required" type="xs:string"/> <xs:attribute name="repos-subdir" use="required" type="xs:string"/> <xs:attribute name="groups" type="xs:IDREFS"/> + <xs:attribute name="copy-field" use="required" type="xs:boolean"/> </xs:complexType> </xs:element> <xs:element name="ontology"> Modified: phenote/trunk/conf/worm.cfg =================================================================== --- phenote/trunk/conf/worm.cfg 2007-08-18 01:56:23 UTC (rev 799) +++ phenote/trunk/conf/worm.cfg 2007-08-18 01:57:16 UTC (rev 800) @@ -32,7 +32,7 @@ <field name="Object Name" enable="true" groups="referenceMaker default"/> - <field name="PGDBID" enable="true" groups="default default"/> + <field name="PGDBID" enable="true" groups="default"/> <field name="Reference" datatag="Ref" type="TERM" groups="default"/> Modified: phenote/trunk/jars/phenoteconfigbeans.jar =================================================================== (Binary files differ) Modified: phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java 2007-08-18 01:56:23 UTC (rev 799) +++ phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java 2007-08-18 01:57:16 UTC (rev 800) @@ -65,7 +65,6 @@ CharListChangeEvent e = new CharListChangeEvent(source,charList); for (CharListChangeListener l : listenerList) l.newCharList(e); - System.out.println("fired char list chagne event "+e); } public void addCharListChangeListener(CharListChangeListener l) { Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-08-18 01:56:23 UTC (rev 799) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-08-18 01:57:16 UTC (rev 800) @@ -290,8 +290,8 @@ // queryableFields.add(CharFieldEnum.ALLELE.getName()); // "Allele" queryableFields.add("Object Name"); // "Object Name" // should their be a check that the current char fields have pub & allele? - queryableGroups.add("default"); - queryableGroups.add("referenceMaker"); + queryableGroups.add("referenceMaker"); // populate reference obo for the main + queryableGroups.add("default"); // default last } /** return true if data adapter can query for the char field */ public boolean isFieldQueryable(String field) { @@ -341,6 +341,33 @@ return c; } // private Connection connectToDB +// title = queryPostgresTitle(s, "wpa_title", pubID); +// name = queryPostgresName(s, "two_standardname", personID); + private String queryPostgresName(Statement s, String postgres_table, String personID) { + String joinkey = find("([0-9]+)", personID); // Find a WBPaper followed by any amount of digits + String name = null; + ResultSet rs = null; // intialize postgres query result + try { rs = s.executeQuery("SELECT * FROM "+postgres_table+" WHERE joinkey = '"+joinkey+"' ORDER BY two_timestamp "); } + catch (SQLException se) { + System.out.println("We got an exception while executing our "+postgres_table+" query: that probably means our term SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { while (rs.next()) { name = rs.getString(3); } } // assign the new term value + catch (SQLException se) { + System.out.println("We got an exception while getting a "+postgres_table+" result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } + return name; + } + private String queryPostgresTitle(Statement s, String postgres_table, String pubID) { + String joinkey = find("([0-9]+)", pubID); // Find a WBPaper followed by any amount of digits + String title = null; + ResultSet rs = null; // intialize postgres query result + try { rs = s.executeQuery("SELECT * FROM "+postgres_table+" WHERE joinkey = '"+joinkey+"' ORDER BY wpa_timestamp "); } + catch (SQLException se) { + System.out.println("We got an exception while executing our "+postgres_table+" query: that probably means our term SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { while (rs.next()) { title = rs.getString(2); } } // assign the new term value + catch (SQLException se) { + System.out.println("We got an exception while getting a "+postgres_table+" result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } + return title; + } + private String queryPostgresCharacter(Statement s, String postgres_table, String default_value, String query, int boxI, int colI) { // get the value corresponding to a phenote cell from a postgres table by column ResultSet rs = null; // intialize postgres query result @@ -398,7 +425,7 @@ charList.add(c1); // add the character to the character list } catch (TermNotFoundException e) { - System.out.println("Term Not Found Exception, assigning characters "+e.getMessage()); } + System.out.println("Term Not Found Exception, assigning characters in queryPostgresCharacterReferenceList "+e.getMessage()); } catch (CharFieldException e) { System.out.println("Char Field Exception, assigning characters "+e.getMessage()); } return charList; @@ -494,10 +521,36 @@ postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); c1.setValue("Strain",postgres_value); // assign the queried value + + String pubID = null; + String title = null; + String personID = null; + String name = null; + String nbp = null; + postgres_table = "app_paper"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + String paper_match = find("(WBPaper[0-9]*)", postgres_value); // Find a WBPaper followed by any amount of digits + if (paper_match != null) { postgres_value = paper_match; } // query for this, otherwise keep the default value + if (postgres_value == "No postgres value assigned") { } else { pubID = postgres_value; } // assign the queried value + postgres_table = "app_person"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + String person_match = find("(WBPerson[0-9]*)", postgres_value); // Find a WBPerson followed by any amount of digits + if (person_match != null) { postgres_value = person_match; } // query for this, otherwise keep the default value + if (postgres_value == "No postgres value assigned") { } else { personID = postgres_value; } // assign the queried value + postgres_table = "app_phenotype"; postgres_value = "No postgres value assigned"; + nbp = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + + if (pubID != null) { title = queryPostgresTitle(s, "wpa_title", pubID); } + if (personID != null) { name = queryPostgresName(s, "two_standardname", personID); } + + String refID = WormReferenceGroupAdapter.makeNameFromPubPersonNBP(pubID, title, personID, name, nbp); + refID = ":" + refID; + c1.setValue("Ref",refID); // assign the queried value + charList.add(c1); // add the character to the character list } catch (TermNotFoundException e) { - System.out.println("Term Not Found Exception, assigning characters "+e.getMessage()); } + System.out.println("Term Not Found Exception, assigning characters in queryPostgresCharacterMainList "+e.getMessage()); } catch (CharFieldException e) { System.out.println("Char Field Exception, assigning characters "+e.getMessage()); } return charList; Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java 2007-08-18 01:56:23 UTC (rev 799) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java 2007-08-18 01:57:16 UTC (rev 800) @@ -17,45 +17,45 @@ super(group); } protected String makeNameFromChar(CharacterI c) { + try { + String pubID = null; + if (c.getTerm("Pub") != null) { pubID = c.getTerm("Pub").getID(); } // get the Papers's ID + String title = c.getValueString("Pub"); // get the Paper's value (the title) + String personID = null; + if (c.getTerm("Person") != null) { personID = c.getTerm("Person").getID(); } + String name = c.getValueString("Person"); + String nbp = c.getValueString("NBP"); + String refID = makeNameFromPubPersonNBP(pubID, title, personID, name, nbp); + return refID; + } catch (CharFieldException e) { + log().error(e.getMessage()); + return null; + } + } + + static String makeNameFromPubPersonNBP( String pubID, String title, String personID, String name, String nbp ) { StringBuilder sb = new StringBuilder(); - try { - if (c.hasValue("Pub")) { - String pubID = c.getTerm("Pub").getID(); // get the Papers's ID + if (pubID != null) { String match = find("([0-9]+)", pubID); // Find a set of digits sb.append(match); // append it to the stringbuilder - String title = c.getValueString("Pub"); // get the Paper's value (the title) match = find("^(.{15})", title); // Find the first 15 characters if (match != null) { sb.append("_").append(match); } // if there's a match append it else { sb.append("_").append(title); } } // otherwise append the full title else { sb.append("_"); } // if there's no publication append a single underscore - if (c.hasValue("Person")) { - String personID = c.getTerm("Person").getID(); + if (personID != null) { String match = find("([0-9]+)", personID); // Find a set of digits sb.append("_").append(match); // eventually this will be a list - String name = c.getValueString("Person"); match = find("^(.{15})", name); // Find the first 15 characters if (match != null) { sb.append("_").append(match); } else { sb.append("_").append(name); } } else { sb.append("_").append("_"); } - if (c.hasValue("NBP")) { + if (nbp != null) { // this will also be a list - String nbp = c.getValueString("NBP"); String match = find("^(.{15})", nbp); // Find the first 15 characters if (match != null) { sb.append("_").append(match); } else { sb.append("_").append(nbp); } } else { sb.append("_"); } -// OtherRemark is not part of the Ref ID -// if (c.hasValue("OtherRemark")) { -// String othRem = c.getValueString("OtherRemark"); -// String match = find("^(.{15})", othRem); // Find the first 15 characters -// if (match != null) { sb.append("_").append(match); } -// else { sb.append("_").append(othRem); } } -// else { sb.append("_"); } - - } catch (CharFieldException e) { - log().error(e.getMessage()); - } return sb.toString(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-08-18 01:56:29
|
Revision: 799 http://obo.svn.sourceforge.net/obo/?rev=799&view=rev Author: mgibson Date: 2007-08-17 18:56:23 -0700 (Fri, 17 Aug 2007) Log Message: ----------- working on config for supressing copying of a field - ie for database id fields Modified Paths: -------------- phenote/trunk/src/java/phenote/config/FieldConfig.java phenote/trunk/src/java/phenote/datamodel/CharField.java phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java Modified: phenote/trunk/src/java/phenote/config/FieldConfig.java =================================================================== --- phenote/trunk/src/java/phenote/config/FieldConfig.java 2007-08-18 00:36:55 UTC (rev 798) +++ phenote/trunk/src/java/phenote/config/FieldConfig.java 2007-08-18 01:56:23 UTC (rev 799) @@ -248,6 +248,11 @@ fieldBean.setEnable(e); } + /** specifies whether to copy field to new character when char is duplicated + default is true, db ids generally shouldnt copy */ + public boolean copies() { + return true; + } public void setCharField(CharField cf) { charField = cf; } @@ -256,6 +261,7 @@ public CharField getCharField() { if (charField == null) charField = new CharField(getLabel(),getDataTag(),getType()); + charField.setCopyEnabled(copies()); return charField; } boolean hasCharField(CharField cf) { return charField == cf; } Modified: phenote/trunk/src/java/phenote/datamodel/CharField.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-08-18 00:36:55 UTC (rev 798) +++ phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-08-18 01:56:23 UTC (rev 799) @@ -23,6 +23,8 @@ private String name; // display name private String tag; // non display tag to refer to field (no spaces...) private boolean postCompAllowed=false; + /** Whether to copy this field on copy/clone/duplicating */ + private boolean copies = true; private Ontology postCompRelOntol; // RELATIONSHIP? DANGLER? INSTANCE? use CharFieldEnum? // should we actually just use xmlbean @@ -36,13 +38,20 @@ charFieldEnum = c; } - /** a generic field with no char field enum - get hip */ + /** a generic field with no char field enum - get hip + type is from field xml bean: TERM, FREE_TEXT...*/ public CharField(String name,String tag,Type.Enum type) { this.name = name; this.tag = tag; if (type != null) this.type = type; } + public void setCopyEnabled(boolean cp) { + copies = cp; + } + + public boolean getCopyEnabled() { return copies; } + /** part of constructor? probably */ public void setType(Type.Enum t) { this.type = t; Modified: phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java 2007-08-18 00:36:55 UTC (rev 798) +++ phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java 2007-08-18 01:56:23 UTC (rev 799) @@ -57,6 +57,8 @@ } CharFieldValue cloneCharFieldValue() { + if (!charField.getCopyEnabled()) + return null; // null?? new CharFieldValue(character try { return (CharFieldValue)clone(); } catch (CloneNotSupportedException x) { return null; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-08-18 00:36:53
|
Revision: 798 http://obo.svn.sourceforge.net/obo/?rev=798&view=rev Author: mgibson Date: 2007-08-17 17:36:55 -0700 (Fri, 17 Aug 2007) Log Message: ----------- added copy-field to config rnc to specify if a field should be copied or not on copy/duplicate default is true - but database ids will set this to false (like worm) as db ids should not be copied Modified Paths: -------------- phenote/trunk/conf/phenote-config.rnc Modified: phenote/trunk/conf/phenote-config.rnc =================================================================== --- phenote/trunk/conf/phenote-config.rnc 2007-08-18 00:03:50 UTC (rev 797) +++ phenote/trunk/conf/phenote-config.rnc 2007-08-18 00:36:55 UTC (rev 798) @@ -96,6 +96,9 @@ attribute slim { xsd:string }, attribute repos-subdir {xsd:string}, attribute groups { xsd:IDREFS }?, + ## whether to copy the field when character is copied/duplicated + ## a database id usually shouldnt be copied, default true + attribute copy-field { xsd:boolean }, postcomp?, ontology* } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-08-18 00:03:47
|
Revision: 797 http://obo.svn.sourceforge.net/obo/?rev=797&view=rev Author: nlw Date: 2007-08-17 17:03:50 -0700 (Fri, 17 Aug 2007) Log Message: ----------- *small change to display any property values that are associated with terms...will show up in the termInfo window at the bottom, if present Modified Paths: -------------- phenote/trunk/src/java/phenote/util/HtmlUtil.java Modified: phenote/trunk/src/java/phenote/util/HtmlUtil.java =================================================================== --- phenote/trunk/src/java/phenote/util/HtmlUtil.java 2007-08-17 23:54:28 UTC (rev 796) +++ phenote/trunk/src/java/phenote/util/HtmlUtil.java 2007-08-18 00:03:50 UTC (rev 797) @@ -26,6 +26,7 @@ import org.geneontology.oboedit.datamodel.impl.DbxrefImpl; import org.geneontology.oboedit.datamodel.impl.OBORestrictionImpl; import org.geneontology.oboedit.datamodel.TermUtil; +import org.geneontology.oboedit.datamodel.PropertyValue; public class HtmlUtil { @@ -66,6 +67,9 @@ public static String termInfo(OBOClass oboClass) { //This page is basically a html table. //rhs are each single table cells but are separated by line breaks. + //It would be really nice if these could show up as configurable items for the user... + //they could decide what is normally displayed, possibly with being able to get more + //info by clicking a button...or maybe we can set these up as expandable items if (oboClass == null) { System.out.println("null obo class for HtmlUtil.termInfo"); return ""; // null? exception? @@ -100,6 +104,7 @@ //this term is an intersection term, show the xp definition sb.append(makeRow(makeLeftCol(bold("XP Definition:"))+makeRightCol(getIntersectionParents(oboClass).toString()))); } + //what if parents/children were placed side-by-side??? might look nicer if (!oboClass.isObsolete()) {//don't really want to navigate around obs terms sb.append(makeRow("<tr><td colspan=2 align=center valign=top><font size=-1><hr></font></td></tr>")); sb.append(getParentalString(oboClass)); @@ -112,9 +117,30 @@ sb.append(makeRow("<tr><td colspan=2 align=center valign=top><font size=-1><hr></font></td></tr>")); sb.append(makeRow(makeLeftCol(bold("Comments"))+makeRightCol(comments))); } + //comment this out if you don't want to display the property values anymore. + Set<PropertyValue> properties = oboClass.getPropertyValues(); + if (!properties.isEmpty()) { + sb.append(makeRow("<tr><td colspan=2 align=center valign=top><font size=-1><hr></font></td></tr>")); + sb.append(getPropertiesString(properties)); + } sb.append("</table>"); return sb.toString(); } + + //This method is important because after a conversion of OWL->OBO, many of the properties aren't + //assigned to specific OBO properties (like synonyms). This allows all the class/annotation + //properties to be displayed in the termInfo box. They'll show up at the bottom for now. + //Note: right now these show up at least duplicated (if not quaduplicated)...but i think + //that's an oboedit problem + private static String getPropertiesString(Set<PropertyValue> properties) { + StringBuffer sb = new StringBuffer(); + PropertyValue propVal; + for (Iterator it = properties.iterator(); it.hasNext(); ) { + propVal = (PropertyValue)it.next(); + sb.append(makeRow(makeLeftCol(bold(propVal.getProperty()+":"))+makeRightCol(propVal.getValue()))); + } + return sb.toString(); + } private static String makeObsLinks(OBOClass oboClass) { //to display the replaced-bys and consider term links for obsoleted terms This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-08-17 23:54:27
|
Revision: 796 http://obo.svn.sourceforge.net/obo/?rev=796&view=rev Author: mgibson Date: 2007-08-17 16:54:28 -0700 (Fri, 17 Aug 2007) Log Message: ----------- group adapters now listen for char list change events as they should Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java phenote/trunk/src/java/phenote/dataadapter/GroupAdapterI.java phenote/trunk/src/java/phenote/gui/field/FieldPanel.java Modified: phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java 2007-08-17 23:50:06 UTC (rev 795) +++ phenote/trunk/src/java/phenote/dataadapter/AbstractGroupAdapter.java 2007-08-17 23:54:28 UTC (rev 796) @@ -22,6 +22,7 @@ public abstract class AbstractGroupAdapter implements GroupAdapterI { private CharChangeListener charListener; + private CharListChangeListener charListChangeListener; private String group; private Namespace namespace; private CharField destinationCharField; @@ -30,6 +31,7 @@ this.group = group; namespace = new Namespace(group); setCharChangeListener(new GroupCharChangeListener()); + setCharListChangeListener(new GroupCharListChangeListener()); } public boolean hasCharChangeListener() { return charListener != null; } @@ -41,10 +43,23 @@ charListener = l; } + public boolean hasCharListChangeListener() { return charListChangeListener!= null; } + + public CharListChangeListener getCharListChangeListener() { + return charListChangeListener; + } + + protected void setCharListChangeListener(CharListChangeListener l) { + charListChangeListener = l; + } + protected Namespace getNamespace() { return namespace; } /** This is the real workhorse here */ protected void loadUpMainField() { + + log().debug("AGA loadUpMainField"); + if (!hasDestinationCharField()) return; // err msg? // clear out old obo classes??? query be namespace and OBOSess.removeObject? @@ -116,6 +131,12 @@ } } + private class GroupCharListChangeListener implements CharListChangeListener { + public void newCharList(CharListChangeEvent e) { + loadUpMainField(); + } + } + private Logger log; private Logger log() { if (log == null) log = Logger.getLogger(getClass()); Modified: phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java 2007-08-17 23:50:06 UTC (rev 795) +++ phenote/trunk/src/java/phenote/dataadapter/CharacterListManager.java 2007-08-17 23:54:28 UTC (rev 796) @@ -65,6 +65,7 @@ CharListChangeEvent e = new CharListChangeEvent(source,charList); for (CharListChangeListener l : listenerList) l.newCharList(e); + System.out.println("fired char list chagne event "+e); } public void addCharListChangeListener(CharListChangeListener l) { Modified: phenote/trunk/src/java/phenote/dataadapter/GroupAdapterI.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/GroupAdapterI.java 2007-08-17 23:50:06 UTC (rev 795) +++ phenote/trunk/src/java/phenote/dataadapter/GroupAdapterI.java 2007-08-17 23:54:28 UTC (rev 796) @@ -6,6 +6,8 @@ boolean hasCharChangeListener(); CharChangeListener getCharChangeListener(); + boolean hasCharListChangeListener(); + CharListChangeListener getCharListChangeListener(); // boolean makesFieldValues()? makesRows? makesFieldNames? void setDestinationField(String field); // CharField? Ex? } Modified: phenote/trunk/src/java/phenote/gui/field/FieldPanel.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/FieldPanel.java 2007-08-17 23:50:06 UTC (rev 795) +++ phenote/trunk/src/java/phenote/gui/field/FieldPanel.java 2007-08-17 23:54:28 UTC (rev 796) @@ -19,6 +19,7 @@ import phenote.datamodel.CharField; import phenote.datamodel.OntologyManager; import phenote.edit.EditManager; +import phenote.dataadapter.CharacterListManager; import phenote.dataadapter.GroupAdapterI; import phenote.gui.selection.SelectionManager; @@ -84,9 +85,10 @@ GroupAdapterI groupAdap = Config.inst().getGroupAdapter(group); if (groupAdap.hasCharChangeListener()) { editManager.addCharChangeListener(groupAdap.getCharChangeListener()); - // testing out... - //editManager.addCharChangeListener(new phenote.dataadapter.AllFieldsGroupAdapter("genotypeMaker").getCharChangeListener()); } + if (groupAdap.hasCharListChangeListener()) { + CharacterListManager.getCharListMan(group).addCharListChangeListener(groupAdap.getCharListChangeListener()); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-08-17 23:50:07
|
Revision: 795 http://obo.svn.sourceforge.net/obo/?rev=795&view=rev Author: azurebrd Date: 2007-08-17 16:50:06 -0700 (Fri, 17 Aug 2007) Log Message: ----------- bad paper_obo file location in worm.cfg fixed Modified Paths: -------------- phenote/trunk/conf/worm.cfg Modified: phenote/trunk/conf/worm.cfg =================================================================== --- phenote/trunk/conf/worm.cfg 2007-08-17 23:48:44 UTC (rev 794) +++ phenote/trunk/conf/worm.cfg 2007-08-17 23:50:06 UTC (rev 795) @@ -38,7 +38,7 @@ <field name="Pub" datatag="Pub" enable="true" groups="referenceMaker"> <!--<ontology name="Pub" file="http://tazendra.caltech.edu/~azurebrd/cgi-bin/forms/paper_obo.cgi"/> PUT THIS BACK --> - <ontology name="Pub" file="/home/postgres/.phenote/obo-files/paper_obo.cgi"/> + <ontology name="Pub" file="paper_obo.cgi"/> </field> <field name="Person" datatag="Person" enable="true" groups="referenceMaker"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-08-17 23:48:43
|
Revision: 794 http://obo.svn.sourceforge.net/obo/?rev=794&view=rev Author: azurebrd Date: 2007-08-17 16:48:44 -0700 (Fri, 17 Aug 2007) Log Message: ----------- No reference in reference maker load reference chars and main chars separately postgres database identifier (PGDBID) different from object name field Modified Paths: -------------- phenote/trunk/conf/worm.cfg phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java Modified: phenote/trunk/conf/worm.cfg =================================================================== --- phenote/trunk/conf/worm.cfg 2007-08-17 14:28:14 UTC (rev 793) +++ phenote/trunk/conf/worm.cfg 2007-08-17 23:48:44 UTC (rev 794) @@ -32,10 +32,13 @@ <field name="Object Name" enable="true" groups="referenceMaker default"/> - <field name="Reference" datatag="Ref" type="TERM" groups="referenceMaker default"/> + <field name="PGDBID" enable="true" groups="default default"/> + <field name="Reference" datatag="Ref" type="TERM" groups="default"/> + <field name="Pub" datatag="Pub" enable="true" groups="referenceMaker"> - <ontology name="Pub" file="http://tazendra.caltech.edu/~azurebrd/cgi-bin/forms/paper_obo.cgi"/> + <!--<ontology name="Pub" file="http://tazendra.caltech.edu/~azurebrd/cgi-bin/forms/paper_obo.cgi"/> PUT THIS BACK --> + <ontology name="Pub" file="/home/postgres/.phenote/obo-files/paper_obo.cgi"/> </field> <field name="Person" datatag="Person" enable="true" groups="referenceMaker"> @@ -65,11 +68,11 @@ <field name="Entity" datatag="Entity" enable="true"> <ontology name="Relationship" file="http://www.berkeleybop.org/ontologies/obo-all/rex/rex.obo" is-postcomp-rel="true"/> - <ontology name="GO" file="gene_ontology.obo"/> +<!-- <ontology name="GO" file="gene_ontology.obo"/> PUT THIS BACK <ontology name="CHEBI" - file="http://www.berkeleybop.org/ontologies/obo-all/chebi/chebi.obo"/> + file="http://www.berkeleybop.org/ontologies/obo-all/chebi/chebi.obo"/> <ontology name="Worm" - file="http://www.berkeleybop.org/ontologies/obo-all/worm_anatomy/worm_anatomy.obo"/> + file="http://www.berkeleybop.org/ontologies/obo-all/worm_anatomy/worm_anatomy.obo"/>--> <!-- stage?? --> </field> Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-08-17 14:28:14 UTC (rev 793) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-08-17 23:48:44 UTC (rev 794) @@ -59,14 +59,15 @@ // System.out.println("Chr "+chr+" end"); try { String allele = chr.getValueString("Object Name"); // get the allele value from the character, currently could have a column number + String pgdbid = chr.getValueString("Object Name"); // get the allele value from the character, currently could have a column number int colI = 0; int boxI = 0; // initialize column to zero - String match = find(".* - ([0-9]+) - [0-9]+", allele); // Find a tempname followed by space - space number + String match = find(".* - ([0-9]+) - [0-9]+", pgdbid); // Find a tempname followed by space - space number if (match != null) { boxI = Integer.parseInt(match); } // get the column number if there is one - match = find(".* - [0-9]+ - ([0-9]+)", allele); // Find a tempname followed by space - space number + match = find(".* - [0-9]+ - ([0-9]+)", pgdbid); // Find a tempname followed by space - space number if (match != null) { colI = Integer.parseInt(match); } // get the column number if there is one - match = find("(.*) - [0-9]+ - [0-9]+", allele); // Find a tempname followed by space - space number - if (match != null) { allele = match; } // query for this, otherwise keep the default value - String joinkey = allele; // assign the tempname / allele to the joinkey + match = find("(.*) - [0-9]+ - [0-9]+", pgdbid); // Find a tempname followed by space - space number + if (match != null) { pgdbid = match; } // query for this, otherwise keep the default value + String joinkey = pgdbid; // assign the tempname / allele to the joinkey if (colI < 1) { // if there are no columns, find the highest existing column and add 1 to make the next one ResultSet rs = null; try { rs = s.executeQuery("SELECT app_column FROM app_term WHERE joinkey = '"+joinkey+"' ORDER BY app_column DESC"); } @@ -371,116 +372,128 @@ return default_value; } - private CharacterListI queryPostgresCharacterList(String group, CharacterListI charList, Statement s, String joinkey, int boxI, int colI) { + private CharacterListI queryPostgresCharacterReferenceList(String group, CharacterListI charList, Statement s, String joinkey, int boxI, int colI) { // populate a phenote character based on postgres value by joinkey, then append to character list try { Character c1 = new Character(); // create a new character for a phenote row - String alleleColumn = joinkey+" - "+boxI+" - "+colI; - c1.setValue("Object Name",alleleColumn); // assign the allele and the column + String postgres_table = "app_paper"; String postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + String paper_match = find("(WBPaper[0-9]*)", postgres_value); // Find a WBPaper followed by any amount of digits + if (paper_match != null) { postgres_value = paper_match; } // query for this, otherwise keep the default value +// c1.setValue("Pub",postgres_value); // assign the queried value + if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Pub",postgres_value); } // assign the queried value + postgres_table = "app_person"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + String person_match = find("(WBPerson[0-9]*)", postgres_value); // Find a WBPerson followed by any amount of digits + if (person_match != null) { postgres_value = person_match; } // query for this, otherwise keep the default value + if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Person",postgres_value); } // assign the queried value + postgres_table = "app_phenotype"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + c1.setValue("NBP",postgres_value); // assign the queried value + postgres_table = "app_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + c1.setValue("Reference Remark",postgres_value); // assign the queried value + charList.add(c1); // add the character to the character list + } + catch (TermNotFoundException e) { + System.out.println("Term Not Found Exception, assigning characters "+e.getMessage()); } + catch (CharFieldException e) { + System.out.println("Char Field Exception, assigning characters "+e.getMessage()); } + return charList; + } // private CharacterListI queryPostgresCharacterReferenceList(CharacterList charList, Statement s, String joinkey) + + private CharacterListI queryPostgresCharacterMainList(String group, CharacterListI charList, Statement s, String joinkey, int boxI, int colI) { + // populate a phenote character based on postgres value by joinkey, then append to character list + try { + Character c1 = new Character(); // create a new character for a phenote row + + c1.setValue("Object Name",joinkey); // assign the allele and the column + String alleleColumn = joinkey+" - "+boxI+" - "+colI; + c1.setValue("PGDBID",alleleColumn); // assign the allele and the column String postgres_table = "app_type"; String postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, 0, 0); c1.setValue("Object Type",postgres_value); // assign the queried value - if (group.equals("default")) { // these values only go to the Main tab - postgres_value = "No postgres value assigned"; - postgres_table = "app_term"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - String phenotype_match = find("(WBPhenotype[0-9]*)", postgres_value); // Find a WBPhenotype followed by any amount of digits - if (phenotype_match != null) { postgres_value = phenotype_match; } // query for this, otherwise keep the default value - if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Phenotype",postgres_value); } // assign the queried value -// c1.setValue("Phenotype",postgres_value); // assign the queried value - postgres_table = "app_intx_desc"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - c1.setValue("Genetic Intx Desc",postgres_value); // assign the queried value - postgres_table = "app_curator"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Curator",postgres_value); // assign the queried value - postgres_table = "app_phen_remark"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Phenotype Remark",postgres_value); // assign the queried value - postgres_table = "app_anat_term"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); -// c1.setValue("Anatomy",postgres_value); // this doesn't work, assigning whatever term name(s) is in postgres -// c1.setValue("Anatomy","WBbt:0004758"); // this works, assigning a term ID - postgres_table = "app_lifestage"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); -// c1.setValue("Life Stage",postgres_value); // assign the queried value - postgres_table = "app_nature"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Allele Nature",postgres_value); // assign the queried value - postgres_table = "app_func"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Functional Change",postgres_value); // assign the queried value - postgres_table = "app_temperature"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Temperature",postgres_value); // assign the queried value - postgres_table = "app_preparation"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Treatment",postgres_value); // assign the queried value - postgres_table = "app_penetrance"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance",postgres_value); // assign the queried value - postgres_table = "app_percent"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance Remark",postgres_value); // assign the queried value - postgres_table = "app_range"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance Range Start",postgres_value); // assign the queried value - postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance Range End",postgres_value); // assign the queried value - postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Quantity",postgres_value); // assign the queried value - postgres_table = "app_quantity_remark"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Quantity Remark",postgres_value); // assign the queried value - postgres_table = "app_heat_sens"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Heat Sensitive",postgres_value); // assign the queried value - postgres_table = "app_heat_degree"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Heat Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "app_cold_sens"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Cold Sensitive",postgres_value); // assign the queried value - postgres_table = "app_cold_degree"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Cold Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "app_mat_effect"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Maternal Effect",postgres_value); // assign the queried value - postgres_table = "app_pat_effect"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Paternal Effect",postgres_value); // assign the queried value - postgres_table = "app_genotype"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Genotype",postgres_value); // assign the queried value - postgres_table = "app_strain"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Strain",postgres_value); // assign the queried value - } - else if (group.equals("referenceMaker")) { // these values only go to the referenceMaker tab - postgres_table = "app_paper"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - String paper_match = find("(WBPaper[0-9]*)", postgres_value); // Find a WBPaper followed by any amount of digits - if (paper_match != null) { postgres_value = paper_match; } // query for this, otherwise keep the default value -// c1.setValue("Pub",postgres_value); // assign the queried value - if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Pub",postgres_value); } // assign the queried value - postgres_table = "app_person"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - String person_match = find("(WBPerson[0-9]*)", postgres_value); // Find a WBPerson followed by any amount of digits - if (person_match != null) { postgres_value = person_match; } // query for this, otherwise keep the default value - if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Person",postgres_value); } // assign the queried value - postgres_table = "app_phenotype"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - c1.setValue("NBP",postgres_value); // assign the queried value - postgres_table = "app_remark"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - c1.setValue("Reference Remark",postgres_value); // assign the queried value - } + postgres_value = "No postgres value assigned"; + postgres_table = "app_term"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + String phenotype_match = find("(WBPhenotype[0-9]*)", postgres_value); // Find a WBPhenotype followed by any amount of digits + if (phenotype_match != null) { postgres_value = phenotype_match; } // query for this, otherwise keep the default value + if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Phenotype",postgres_value); } // assign the queried value +// c1.setValue("Phenotype",postgres_value); // assign the queried value + postgres_table = "app_intx_desc"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + c1.setValue("Genetic Intx Desc",postgres_value); // assign the queried value + postgres_table = "app_curator"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Curator",postgres_value); // assign the queried value + postgres_table = "app_phen_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Phenotype Remark",postgres_value); // assign the queried value + postgres_table = "app_anat_term"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); +// c1.setValue("Anatomy",postgres_value); // this doesn't work, assigning whatever term name(s) is in postgres +// c1.setValue("Anatomy","WBbt:0004758"); // this works, assigning a term ID + postgres_table = "app_lifestage"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); +// c1.setValue("Life Stage",postgres_value); // assign the queried value + postgres_table = "app_nature"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Allele Nature",postgres_value); // assign the queried value + postgres_table = "app_func"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Functional Change",postgres_value); // assign the queried value + postgres_table = "app_temperature"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Temperature",postgres_value); // assign the queried value + postgres_table = "app_preparation"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Treatment",postgres_value); // assign the queried value + postgres_table = "app_penetrance"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance",postgres_value); // assign the queried value + postgres_table = "app_percent"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance Remark",postgres_value); // assign the queried value + postgres_table = "app_range"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance Range Start",postgres_value); // assign the queried value + postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance Range End",postgres_value); // assign the queried value + postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Quantity",postgres_value); // assign the queried value + postgres_table = "app_quantity_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Quantity Remark",postgres_value); // assign the queried value + postgres_table = "app_heat_sens"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Heat Sensitive",postgres_value); // assign the queried value + postgres_table = "app_heat_degree"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Heat Sensitive Degree",postgres_value); // assign the queried value + postgres_table = "app_cold_sens"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Cold Sensitive",postgres_value); // assign the queried value + postgres_table = "app_cold_degree"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Cold Sensitive Degree",postgres_value); // assign the queried value + postgres_table = "app_mat_effect"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Maternal Effect",postgres_value); // assign the queried value + postgres_table = "app_pat_effect"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Paternal Effect",postgres_value); // assign the queried value + postgres_table = "app_genotype"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Genotype",postgres_value); // assign the queried value + postgres_table = "app_strain"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Strain",postgres_value); // assign the queried value + charList.add(c1); // add the character to the character list } catch (TermNotFoundException e) { @@ -488,7 +501,7 @@ catch (CharFieldException e) { System.out.println("Char Field Exception, assigning characters "+e.getMessage()); } return charList; - } // private CharacterListI queryPostgresCharacterList(CharacterList charList, Statement s, String joinkey) + } // private CharacterListI queryPostgresCharacterMainList(CharacterList charList, Statement s, String joinkey) public CharacterListI query(String group, String field, String query) throws DataAdapterEx { @@ -516,8 +529,8 @@ System.out.println("We got an exception while creating a statement: that probably means we're no longer connected."); se.printStackTrace(); System.exit(1); } ResultSet rs = null; // intialize postgres query result - String match = find("(.*) - [0-9]+ - [0-9]+", query); // Find a tempname followed by space - space number - if (match != null) { query = match; } // query for this, otherwise keep the default value +// String match = find("(.*) - [0-9]+ - [0-9]+", query); // Find a tempname followed by space - space number when query by postgres database ID instead of object name like it really should +// if (match != null) { query = match; } // query for this, otherwise keep the default value String joinkey = query; try { rs = s.executeQuery("SELECT * FROM app_tempname WHERE app_tempname = '"+joinkey+"'"); } // find the allele that matches the queried allele catch (SQLException se) { @@ -544,8 +557,11 @@ System.out.println("We got an exception while getting a column/term joinkey "+joinkey+" result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } for (int boxI=1; boxI<boxes+1; boxI++) { // for each of those columns - for (int colI=1; colI<columns+1; colI++) { // for each of those columns - charList = queryPostgresCharacterList(group, charList, s, joinkey, boxI, colI); } } + if (group.equals("default")) { // these values only go to the Main tab + for (int colI=1; colI<columns+1; colI++) { // for each of those columns + charList = queryPostgresCharacterMainList(group, charList, s, joinkey, boxI, colI); } } + else if (group.equals("referenceMaker")) { // these values only go to the referenceMaker tab + charList = queryPostgresCharacterReferenceList(group, charList, s, joinkey, boxI, 0); } } return charList; } // if there is a match } else if (field.equals(pubString)) { // if querying the publication, get paper data @@ -596,8 +612,11 @@ catch (SQLException se) { System.out.println("We got an exception while getting a publication query result column app_term :this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } - for (int colI=1; colI<columns+1; colI++) { // for each of those columns - charList = queryPostgresCharacterList(group, charList, s, joinkey, boxI, colI); } + if (group.equals("default")) { // these values only go to the Main tab + for (int colI=1; colI<columns+1; colI++) { // for each of those columns + charList = queryPostgresCharacterMainList(group, charList, s, joinkey, boxI, colI); } } + else if (group.equals("referenceMaker")) { // these values only go to the referenceMaker tab + charList = queryPostgresCharacterReferenceList(group, charList, s, joinkey, boxI, 0); } } } catch (SQLException se) { System.out.println("We got an exception while getting a publication query result joinkey, box app_paper :this shouldn't happen: we've done something really bad."); Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java 2007-08-17 14:28:14 UTC (rev 793) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormReferenceGroupAdapter.java 2007-08-17 23:48:44 UTC (rev 794) @@ -45,12 +45,13 @@ if (match != null) { sb.append("_").append(match); } else { sb.append("_").append(nbp); } } else { sb.append("_"); } - if (c.hasValue("OtherRemark")) { - String othRem = c.getValueString("OtherRemark"); - String match = find("^(.{15})", othRem); // Find the first 15 characters - if (match != null) { sb.append("_").append(match); } - else { sb.append("_").append(othRem); } } - else { sb.append("_"); } +// OtherRemark is not part of the Ref ID +// if (c.hasValue("OtherRemark")) { +// String othRem = c.getValueString("OtherRemark"); +// String match = find("^(.{15})", othRem); // Find the first 15 characters +// if (match != null) { sb.append("_").append(match); } +// else { sb.append("_").append(othRem); } } +// else { sb.append("_"); } } catch (CharFieldException e) { log().error(e.getMessage()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2007-08-17 14:28:12
|
Revision: 793 http://obo.svn.sourceforge.net/obo/?rev=793&view=rev Author: balhoff Date: 2007-08-17 07:28:14 -0700 (Fri, 17 Aug 2007) Log Message: ----------- Changed Copy button text to Duplicate. Modified Paths: -------------- phenote/trunk/conf/character_template.xml phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java Modified: phenote/trunk/conf/character_template.xml =================================================================== --- phenote/trunk/conf/character_template.xml 2007-08-15 17:04:36 UTC (rev 792) +++ phenote/trunk/conf/character_template.xml 2007-08-17 14:28:14 UTC (rev 793) @@ -7,15 +7,15 @@ </panel> </splitpane> <panel constraints="BorderLayout.CENTER" layout="GridBagLayout"> - <scrollpane> + <scrollpane horizontalScrollBarPolicy="JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS"> <gridbagconstraints gridx="0" gridy="0" weightx="1" weighty="1" fill="GridBagConstraints.BOTH" insets="10,10,0,10"/> <table id="characterTemplateTable"/> </scrollpane> <panel id="buttonPanel"> <gridbagconstraints gridx="0" gridy="1" weightx="1" insets="10,10,10,10"/> <button id="addButton" text="New" action="addNewCharacter"/> + <button id="duplicateButton" text="Duplicate" action="duplicateSelectedCharacters"/> <button id="deleteButton" text="Delete" action="deleteSelectedCharacters"/> - <button id="copyButton" text="Copy" action="duplicateSelectedCharacters"/> <button id="undoButton" text="Undo" action="undo"/> <button id="invertSelectionButton" text="Invert Marked" action="invertMarkedCharacters"/> <button id="generateButton" text="Generate Characters" action="generateCharacters"/> Modified: phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java =================================================================== --- phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-08-15 17:04:36 UTC (rev 792) +++ phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-08-17 14:28:14 UTC (rev 793) @@ -141,7 +141,7 @@ ActionListener al = new ButtonActionListener(); addButton("New",al,buttonPanel); //newButton = - copyButton = addButton("Copy",al,buttonPanel); + copyButton = addButton("Duplicate",al,buttonPanel); deleteButton = addButton("Delete",al,buttonPanel); buttonPanel.add(Box.createRigidArea(new Dimension(20,0))); undoButton = addButton("Undo",al,buttonPanel); @@ -308,11 +308,11 @@ return; // its empty! no rows to copy or delete or save or undo } - // COPY - else if (e.getActionCommand().equals("Copy")) { + // DUPLICATE + else if (e.getActionCommand().equals("Duplicate")) { //selectRow = characterTableModel.copyRow(getSelectedRow()); if (!hasSelection()) { - log().error("No rows selected for copy - this shouldnt happen!"); + log().error("No rows selected for duplicate - this shouldnt happen!"); return; } selectRows = characterTableModel.copyChars(getSelectedChars()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-08-15 17:04:34
|
Revision: 792 http://obo.svn.sourceforge.net/obo/?rev=792&view=rev Author: nlw Date: 2007-08-15 10:04:36 -0700 (Wed, 15 Aug 2007) Log Message: ----------- adding back in birnlex Modified Paths: -------------- phenote/trunk/conf/smart-atlas.cfg Modified: phenote/trunk/conf/smart-atlas.cfg =================================================================== --- phenote/trunk/conf/smart-atlas.cfg 2007-08-15 14:48:59 UTC (rev 791) +++ phenote/trunk/conf/smart-atlas.cfg 2007-08-15 17:04:36 UTC (rev 792) @@ -34,6 +34,7 @@ <ns:ontology name="Relationship" is-postcomp-rel="true" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/OBO_REL/ro.obo"/> <ns:ontology name="SAO" file="SAO.obo"/> + <ns:ontology name="BIRNLex-Anatomy" file="BIRNLex-Anatomy.obo"/> <ns:ontology name="BIRNLex" file="BIRNLex.obo"/> <ns:ontology name="FMA" file="fma_obo.obo"/> <ns:ontology name="Mouse" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/gross_anatomy/animal_gross_anatomy/mouse/adult_mouse_anatomy.obo"/> @@ -55,6 +56,7 @@ <ns:ontology name="Relationship" is-postcomp-rel="true" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/OBO_REL/ro.obo"/> <ns:ontology name="SAO" file="SAO.obo"/> + <ns:ontology name="BIRNLex-Anatomy" file="BIRNLex-Anatomy.obo"/> <ns:ontology name="BIRNLex" file="BIRNLex.obo"/> <ns:ontology name="FMA" file="fma_obo.obo"/> <ns:ontology name="Mouse" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/gross_anatomy/animal_gross_anatomy/mouse/adult_mouse_anatomy.obo"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-08-15 14:48:57
|
Revision: 791 http://obo.svn.sourceforge.net/obo/?rev=791&view=rev Author: nlw Date: 2007-08-15 07:48:59 -0700 (Wed, 15 Aug 2007) Log Message: ----------- removed birnlex-anatomy ontology until it gets fixed Modified Paths: -------------- phenote/trunk/conf/smart-atlas.cfg Modified: phenote/trunk/conf/smart-atlas.cfg =================================================================== --- phenote/trunk/conf/smart-atlas.cfg 2007-08-15 04:48:40 UTC (rev 790) +++ phenote/trunk/conf/smart-atlas.cfg 2007-08-15 14:48:59 UTC (rev 791) @@ -34,7 +34,6 @@ <ns:ontology name="Relationship" is-postcomp-rel="true" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/OBO_REL/ro.obo"/> <ns:ontology name="SAO" file="SAO.obo"/> - <ns:ontology name="BIRNLex-Anat" file="BIRNLex-Anatomy.obo"/> <ns:ontology name="BIRNLex" file="BIRNLex.obo"/> <ns:ontology name="FMA" file="fma_obo.obo"/> <ns:ontology name="Mouse" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/gross_anatomy/animal_gross_anatomy/mouse/adult_mouse_anatomy.obo"/> @@ -56,7 +55,6 @@ <ns:ontology name="Relationship" is-postcomp-rel="true" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/OBO_REL/ro.obo"/> <ns:ontology name="SAO" file="SAO.obo"/> - <ns:ontology name="BIRNLex-Anat" file="BIRNLex-Anatomy.obo"/> <ns:ontology name="BIRNLex" file="BIRNLex.obo"/> <ns:ontology name="FMA" file="fma_obo.obo"/> <ns:ontology name="Mouse" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/gross_anatomy/animal_gross_anatomy/mouse/adult_mouse_anatomy.obo"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-08-15 04:46:09
|
Revision: 789 http://obo.svn.sourceforge.net/obo/?rev=789&view=rev Author: nlw Date: 2007-08-14 21:45:49 -0700 (Tue, 14 Aug 2007) Log Message: ----------- adding birnlex anatomy to the smart-atlas Modified Paths: -------------- phenote/trunk/conf/smart-atlas.cfg Modified: phenote/trunk/conf/smart-atlas.cfg =================================================================== --- phenote/trunk/conf/smart-atlas.cfg 2007-08-15 03:31:48 UTC (rev 788) +++ phenote/trunk/conf/smart-atlas.cfg 2007-08-15 04:45:49 UTC (rev 789) @@ -35,6 +35,7 @@ file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/OBO_REL/ro.obo"/> <ns:ontology name="SAO" file="SAO.obo"/> <ns:ontology name="BIRNLex" file="BIRNLex.obo"/> + <ns:ontology name="BIRNLex-Anat" file="BIRNLex-Anatomy.obo"/> <ns:ontology name="FMA" file="fma_obo.obo"/> <ns:ontology name="Mouse" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/gross_anatomy/animal_gross_anatomy/mouse/adult_mouse_anatomy.obo"/> <ns:ontology name="GO" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2007-08-08 19:22:59
|
Revision: 787 http://obo.svn.sourceforge.net/obo/?rev=787&view=rev Author: balhoff Date: 2007-08-08 12:22:59 -0700 (Wed, 08 Aug 2007) Log Message: ----------- Added phylogeny chooser functionality to CharacterTemplate. User can input a Newick-formatted phylogenetic tree, with nodes matching ontology term IDs for a CharField. Selected nodes on the tree can be applied to the marked characters in the CharacterTemplate. Created TemplateChooser interface, which TreeChooser implements. Other choosers may be implemented in the future. Right now phylogeny chooser is opened through "Choosers" menu on CharacterTemplate window. Will need to keep thinking about best interface for bringing up phylogeny window. Modified Paths: -------------- phenote/trunk/conf/phenomap.cfg phenote/trunk/conf/phenote-config.rnc phenote/trunk/conf/phenote-config.xsd phenote/trunk/jars/phenoteconfigbeans.jar phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateController.java phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateTableModel.java Added Paths: ----------- phenote/trunk/conf/tree_chooser.xml phenote/trunk/jars/jebl-0.4.jar phenote/trunk/src/java/phenote/charactertemplate/AbstractTemplateChooser.java phenote/trunk/src/java/phenote/charactertemplate/OntologyTermPainter.java phenote/trunk/src/java/phenote/charactertemplate/TemplateChoiceListener.java phenote/trunk/src/java/phenote/charactertemplate/TemplateChooser.java phenote/trunk/src/java/phenote/charactertemplate/TreeChooser.java Modified: phenote/trunk/conf/phenomap.cfg =================================================================== --- phenote/trunk/conf/phenomap.cfg 2007-08-07 21:29:53 UTC (rev 786) +++ phenote/trunk/conf/phenomap.cfg 2007-08-08 19:22:59 UTC (rev 787) @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<ns:phenote-configuration xmlns:ns="phenote/config/xml" name="PhenoMaP Configuration" author="Jim Balhoff" description="This configuration is used by curators with the PhenoMaP project at NESCent."> - +<ns:phenote-configuration version="1.0" xmlns:ns="phenote/config/xml" name="PhenoMaP Configuration" author="Jim Balhoff" description="This configuration is used by curators with the PhenoMaP project at NESCent."> + + <ns:master-to-local-config mode="WIPEOUT" when="ALWAYS" overriding-master-url="http://obo.svn.sourceforge.net/viewvc/*checkout*/obo/phenote/trunk/conf/phenomap.cfg"/> <ns:log config-file="conf/log4j-standalone.xml"/> <ns:uvic-graph enable="false"/> <ns:term-history enable="false"/> @@ -14,14 +15,16 @@ <ns:dataadapter name="phenote.dataadapter.phenoxml.PhenoXmlAdapter" enable="true"/> <ns:dataadapter name="phenote.dataadapter.nexus.NEXUSAdapter" enable="true"/> - <ns:group name="specimen-list" title="Specimen List" container="window" interface="character-template"/> + <ns:group name="specimen-list" title="Specimen List" container="window" interface="character-template"> + <ns:templatechooser title="Phylogeny Chooser" adapter="phenote.charactertemplate.TreeChooser" field="Taxon"/> + </ns:group> <ns:group name="default" title="Default Group" container="window" interface="default"/> - <ns:field name="Publication" syntax-abbrev="PUB" enable="true" colwidth="150" groups="default"/> + <ns:field name="Publication" syntax-abbrev="PUB" enable="true" colwidth="150" groups="default specimen-list"/> <ns:field name="Taxon" syntax-abbrev="GT" enable="true" colwidth="150" groups="default specimen-list"/> - <ns:field name="Specimen ID" syntax-abbrev="Specimen" enable="true" colwidth="150" groups="default specimen-list"/> + <ns:field name="Catalog Number" syntax-abbrev="Specimen" enable="true" colwidth="150" groups="default specimen-list"/> <ns:field name="Specimen Count" syntax-abbrev="SpecimenCount" enable="true" colwidth="150" groups="default specimen-list"/> - <ns:field name="Specimen Preparation" syntax-abbrev="SpecimenPreparation" enable="true" colwidth="150" groups="default specimen-list"/> + <ns:field name="Preparation" syntax-abbrev="SpecimenPreparation" enable="true" colwidth="150" groups="default specimen-list"/> <ns:field name="Entity" syntax-abbrev="E" enable="true" colwidth="150" groups="default"> <ns:ontology name="Relationship" file="relationship.obo" repos-subdir="OBO_REL" is-postcomp-rel="true"/> <ns:ontology name="Entity" file="zebrafish_anatomy.obo" repos-subdir="anatomy/gross_anatomy/animal_gross_anatomy/fish" namespace="zebrafish_anatomy"/> @@ -29,15 +32,16 @@ <ns:field name="Quality" syntax-abbrev="Q" enable="true" colwidth="150" groups="default"> <ns:ontology name="Quality" file="quality.obo" repos-subdir="phenotype"/> </ns:field> - <ns:field name="Add'l Entity" syntax-abbrev="E2" enable="true" colwidth="150" groups="default"> + <ns:field name="Additional Entity" syntax-abbrev="E2" enable="true" colwidth="150" groups="default"> <ns:ontology name="Relationship" file="relationship.obo" repos-subdir="OBO_REL" is-postcomp-rel="true"/> <ns:ontology name="Add'l Entity" file="zebrafish_anatomy.obo" repos-subdir="anatomy/gross_anatomy/animal_gross_anatomy/fish"/> </ns:field> - <ns:field name="Numerical Value" syntax-abbrev="C" enable="true" colwidth="150" groups="default"/> + <ns:field name="Measurement" syntax-abbrev="M" enable="true" colwidth="150" groups="default"/> <ns:field name="Unit" syntax-abbrev="U" enable="true" colwidth="150" groups="default"> <ns:ontology name="Unit" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/unit.obo"/> </ns:field> - <ns:field name="Original Description" syntax-abbrev="Desc" enable="true" colwidth="150" groups="default"/> + <ns:field name="Compare To" datatag="Compar" enable="true" groups="default"/> + <ns:field name="Textual Description" syntax-abbrev="Desc" enable="true" colwidth="150" groups="default"/> <ns:field name="Image URI" syntax-abbrev="URI" enable="true" colwidth="150" groups="default"/> </ns:phenote-configuration> \ No newline at end of file Modified: phenote/trunk/conf/phenote-config.rnc =================================================================== --- phenote/trunk/conf/phenote-config.rnc 2007-08-07 21:29:53 UTC (rev 786) +++ phenote/trunk/conf/phenote-config.rnc 2007-08-08 19:22:59 UTC (rev 787) @@ -127,9 +127,21 @@ attribute group_adapter { xsd:string }, ## which field (in main group) is destination for this group, if its ## destiny is a field - attribute destination_field { xsd:string } + attribute destination_field { xsd:string }, + templatechooser* } + templatechooser = + element templatechooser { + ## title is for the user interface + attribute title { xsd:string }, + ## adapter is class which implement TemplateChooser interface + attribute adapter { xsd:string }, + ## field is name of field this chooser works with + ## it really should be an IDREF - that will require refactoring field element and existing configs + attribute field { xsd:string } + } + ## Whether to check if ontology(obo) has been updated/more current obo file ## I think this needs to be taken out as replaced by quartz scheduler Modified: phenote/trunk/conf/phenote-config.xsd =================================================================== --- phenote/trunk/conf/phenote-config.xsd 2007-08-07 21:29:53 UTC (rev 786) +++ phenote/trunk/conf/phenote-config.xsd 2007-08-08 19:22:59 UTC (rev 787) @@ -139,6 +139,9 @@ </xs:element> <xs:element name="group"> <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="x:templatechooser"/> + </xs:sequence> <xs:attribute name="name" use="required" type="xs:ID"/> <xs:attribute name="container" use="required"> <xs:simpleType> @@ -161,6 +164,21 @@ <xs:attribute name="destination_field" use="required" type="xs:string"/> </xs:complexType> </xs:element> + <xs:element name="templatechooser"> + <xs:complexType> + <xs:attribute name="title" use="required" type="xs:string"> + <xs:annotation> + <xs:documentation>title is for the user interface</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="adapter" use="required" type="xs:string"> + <xs:annotation> + <xs:documentation>adapter is class which implement TemplateChooser interface</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="field" use="required" type="xs:string"/> + </xs:complexType> + </xs:element> <xs:element name="postcomp"> <xs:complexType> <xs:sequence> Added: phenote/trunk/conf/tree_chooser.xml =================================================================== --- phenote/trunk/conf/tree_chooser.xml (rev 0) +++ phenote/trunk/conf/tree_chooser.xml 2007-08-08 19:22:59 UTC (rev 787) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<panel layout="GridBagLayout" size="800,600"> + <panel id="treeViewerContainer" layout="GridLayout"> + <gridbagconstraints gridx="0" gridy="0" weightx="1" weighty="1" fill="GridBagConstraints.BOTH"/> + </panel> + <panel id="buttonPanel" layout="GridBagLayout"> + <gridbagconstraints gridx="0" gridy="1" weightx="1" fill="GridBagConstraints.HORIZONTAL" insets="10,10,10,10"/> + <label id="newickFieldLabel" text="Newick Tree:"> + <gridbagconstraints gridx="0" gridy="0" weightx="0" anchor="GridBagConstraints.WEST" insets="0,0,0,5"/> + </label> + <textfield id="newickField" action="changeNewickTreeAction"> + <gridbagconstraints gridx="1" gridy="0" weightx="1" fill="GridBagConstraints.HORIZONTAL"/> + </textfield> + <button id="applyButton" text="Apply Selection" action="applySelectionAction"> + <gridbagconstraints gridx="2" gridy="0" weightx="0" anchor="GridBagConstraints.EAST" insets="0,5,0,0"/> + </button> + </panel> +</panel> \ No newline at end of file Added: phenote/trunk/jars/jebl-0.4.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/jebl-0.4.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: phenote/trunk/jars/phenoteconfigbeans.jar =================================================================== (Binary files differ) Added: phenote/trunk/src/java/phenote/charactertemplate/AbstractTemplateChooser.java =================================================================== --- phenote/trunk/src/java/phenote/charactertemplate/AbstractTemplateChooser.java (rev 0) +++ phenote/trunk/src/java/phenote/charactertemplate/AbstractTemplateChooser.java 2007-08-08 19:22:59 UTC (rev 787) @@ -0,0 +1,58 @@ +package phenote.charactertemplate; + +import java.awt.event.ActionEvent; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import phenote.datamodel.CharField; +import phenote.datamodel.CharacterI; + +public abstract class AbstractTemplateChooser implements TemplateChooser { + + private CharField charField; + private String title; + private Set<TemplateChoiceListener> templateChoiceListeners = new HashSet<TemplateChoiceListener>(); + + public void addTemplateChoiceListener(TemplateChoiceListener listener) { + this.templateChoiceListeners.add(listener); + } + + public void removeTemplateChoiceListener(TemplateChoiceListener listener) { + this.templateChoiceListeners.remove(listener); + } + + public void setCharField(CharField field) { + this.charField = field; + } + + public CharField getCharField() { + return charField; + } + + public void setTitle(String aTitle) { + this.title = aTitle; + } + + public String getTitle() { + return this.title; + } + + public abstract Collection<CharacterI> getChosenTemplates(Collection<CharacterI> candidates); + + public abstract void showChooser(); + + public void actionPerformed(ActionEvent event) { + final String actionCommand = event.getActionCommand(); + if (actionCommand.equals(TemplateChooser.SHOW_CHOOSER_ACTION)) { + this.showChooser(); + } + } + + protected void fireTemplateChoiceChanged() { + for (TemplateChoiceListener listener : this.templateChoiceListeners) { + listener.templateChoiceChanged(this); + } + } + +} Modified: phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateController.java =================================================================== --- phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateController.java 2007-08-07 21:29:53 UTC (rev 786) +++ phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateController.java 2007-08-08 19:22:59 UTC (rev 787) @@ -1,8 +1,6 @@ package phenote.charactertemplate; -import java.awt.BorderLayout; import java.awt.Component; -import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; @@ -11,6 +9,7 @@ import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JMenu; +import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JSeparator; @@ -20,8 +19,11 @@ import org.swixml.SwingEngine; import phenote.config.Config; +import phenote.config.xml.GroupDocument.Group; +import phenote.config.xml.TemplatechooserDocument.Templatechooser; import phenote.dataadapter.CharacterListManager; import phenote.dataadapter.LoadSaveManager; +import phenote.datamodel.CharField; import phenote.datamodel.CharacterI; import phenote.edit.EditManager; import phenote.gui.MenuManager; @@ -31,7 +33,7 @@ import phenote.main.Phenote; import phenote.util.FileUtil; -public class CharacterTemplateController implements ActionListener { +public class CharacterTemplateController implements ActionListener, TemplateChoiceListener { public static final String SHOW_CHARACTER_TEMPLATE_ACTION = "showCharacterTemplate"; public static final String IMPORT_TEMPLATE_CHARACTERS_ACTION = "importCharacters"; @@ -46,6 +48,7 @@ private JPanel charFieldPanelContainer; // initialized by swix private JPanel termInfoPanelContainer; // initialized by swix private JTable characterTemplateTable; // initialized by swix + private List<TemplateChooser> templateChoosers = new ArrayList<TemplateChooser>(); public CharacterTemplateController(String groupName) { super(); @@ -55,6 +58,7 @@ this.selectionManager = new SelectionManager(); this.tableModel = new CharacterTemplateTableModel(this.representedGroup, this.characterListManager, this.editManager); this.addInitialBlankCharacter(); + this.configureTemplateChoosers(); this.configureMenus(); } @@ -116,6 +120,10 @@ Phenote.getPhenote().getFrame().toFront(); } + public void templateChoiceChanged(TemplateChooser source) { + this.showCharacterTemplate(); + } + private String getGroupTitle() { return Config.inst().getTitleForGroup(this.representedGroup); } @@ -123,6 +131,7 @@ private void configureMenus() { this.addFileMenuItems(); this.addViewMenuItem(); + this.addChooserMenuItems(); } private void addViewMenuItem() { @@ -154,6 +163,18 @@ fileMenu.add(templateMenu, i); } + private void addChooserMenuItems() { + this.getWindow().setJMenuBar(new JMenuBar()); + final JMenu chooserMenu = new JMenu("Choosers"); + this.getWindow().getJMenuBar().add(chooserMenu); + for (TemplateChooser chooser : this.templateChoosers) { + final JMenuItem menuItem = new JMenuItem(chooser.getTitle()); + chooserMenu.add(menuItem); + menuItem.setActionCommand(TemplateChooser.SHOW_CHOOSER_ACTION); + menuItem.addActionListener(chooser); + } + } + private JFrame getWindow() { if (this.window == null) { this.window = new JFrame(this.getGroupTitle()); @@ -186,6 +207,46 @@ this.selectionManager.selectCharacters(this, this.characterListManager.getCharacterList().getList()); } + private void configureTemplateChoosers() { + for (Group group : Config.inst().getFieldGroups()) { + if (group.getName() == this.representedGroup) { + for (Templatechooser chooserConfig : group.getTemplatechooserArray()) { + TemplateChooser chooser = this.createTemplateChooserInstance(chooserConfig.getAdapter()); + chooser.setCharField(this.getCharFieldWithName(chooserConfig.getField())); + chooser.setTitle(chooserConfig.getTitle()); + chooser.addTemplateChoiceListener(this.tableModel); + chooser.addTemplateChoiceListener(this); + this.templateChoosers.add(chooser); + } + } + } + } + + private TemplateChooser createTemplateChooserInstance(String className) { + final String errorMessage = "Failed creating TemplateChooser"; + try { + Class adapterClass = Class.forName(className); + Object chooser = adapterClass.newInstance(); + return (TemplateChooser)chooser; + } catch (ClassNotFoundException e) { + this.getLogger().error(errorMessage, e); + } catch (InstantiationException e) { + this.getLogger().error(errorMessage, e); + } catch (IllegalAccessException e) { + this.getLogger().error(errorMessage, e); + } + return null; + } + + private CharField getCharFieldWithName(String fieldName) { + final int fieldsNum = Config.inst().getEnbldFieldsNum(); + for (int i = 0; i < fieldsNum; i++) { + final CharField field = Config.inst().getEnbldCharField(i); + if (field.getName().equals(fieldName)) return field; + } + return null; + } + private LoadSaveManager getLoadSaveManager() { if (this.loadSaveManager == null) { this.loadSaveManager = new LoadSaveManager(this.characterListManager); Modified: phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateTableModel.java =================================================================== --- phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateTableModel.java 2007-08-07 21:29:53 UTC (rev 786) +++ phenote/trunk/src/java/phenote/charactertemplate/CharacterTemplateTableModel.java 2007-08-08 19:22:59 UTC (rev 787) @@ -1,6 +1,8 @@ package phenote.charactertemplate; import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -20,7 +22,7 @@ import phenote.edit.EditManager; @SuppressWarnings("serial") -public class CharacterTemplateTableModel extends AbstractTableModel implements CharChangeListener, CharListChangeListener { +public class CharacterTemplateTableModel extends AbstractTableModel implements CharChangeListener, CharListChangeListener, TemplateChoiceListener { private String representedGroup; private CharacterListManager characterListManager; @@ -49,6 +51,12 @@ return characters; } + public void setMarkedCharacters(Collection<CharacterI> charactersToMark) { + for (CharacterI character : this.getAllCharacters()) { + this.setCharacterIsMarked(character, charactersToMark.contains(character)); + } + } + public boolean isCharacterMarked(CharacterI character) { return this.markedCharacters.contains(character); } @@ -131,6 +139,10 @@ this.fireTableDataChanged(); } + public void templateChoiceChanged(TemplateChooser source) { + this.setMarkedCharacters(source.getChosenTemplates(Collections.unmodifiableList(this.getAllCharacters()))); + } + private CharacterI getCharacterAtRow(int row) { return this.characterListManager.getCharacterList().get(row); } Added: phenote/trunk/src/java/phenote/charactertemplate/OntologyTermPainter.java =================================================================== --- phenote/trunk/src/java/phenote/charactertemplate/OntologyTermPainter.java (rev 0) +++ phenote/trunk/src/java/phenote/charactertemplate/OntologyTermPainter.java 2007-08-08 19:22:59 UTC (rev 787) @@ -0,0 +1,34 @@ +package phenote.charactertemplate; + +import jebl.evolution.graphs.Node; +import jebl.evolution.trees.RootedTree; +import jebl.gui.trees.treeviewer.painters.BasicLabelPainter; + +import org.geneontology.oboedit.datamodel.OBOClass; + +import phenote.datamodel.OntologyManager; +import phenote.datamodel.TermNotFoundException; + +public class OntologyTermPainter extends BasicLabelPainter { + + public OntologyTermPainter(String title, RootedTree tree, PainterIntent intent) { + super(title, tree, intent); + } + + public OntologyTermPainter(String title, RootedTree tree, PainterIntent intent, int defaultSize) { + super(title, tree, intent, defaultSize); + } + + @Override + protected String getLabel(Node node) { + final String defaultLabel = super.getLabel(node); + if (defaultLabel == null) return defaultLabel; + try { + OBOClass term = OntologyManager.inst().getOboClass(defaultLabel.trim()); + return " " + term.getName() + " [" + defaultLabel.trim() + "] "; + } catch (TermNotFoundException e) { + return defaultLabel; + } + } + +} Added: phenote/trunk/src/java/phenote/charactertemplate/TemplateChoiceListener.java =================================================================== --- phenote/trunk/src/java/phenote/charactertemplate/TemplateChoiceListener.java (rev 0) +++ phenote/trunk/src/java/phenote/charactertemplate/TemplateChoiceListener.java 2007-08-08 19:22:59 UTC (rev 787) @@ -0,0 +1,7 @@ +package phenote.charactertemplate; + +public interface TemplateChoiceListener { + + public void templateChoiceChanged(TemplateChooser source); + +} Added: phenote/trunk/src/java/phenote/charactertemplate/TemplateChooser.java =================================================================== --- phenote/trunk/src/java/phenote/charactertemplate/TemplateChooser.java (rev 0) +++ phenote/trunk/src/java/phenote/charactertemplate/TemplateChooser.java 2007-08-08 19:22:59 UTC (rev 787) @@ -0,0 +1,29 @@ +package phenote.charactertemplate; + +import java.awt.event.ActionListener; +import java.util.Collection; + +import phenote.datamodel.CharField; +import phenote.datamodel.CharacterI; + +public interface TemplateChooser extends ActionListener { + + public static final String SHOW_CHOOSER_ACTION = "showChooser"; + + public void showChooser(); + + public void setCharField(CharField field); + + public CharField getCharField(); + + public void setTitle(String title); + + public String getTitle(); + + public void addTemplateChoiceListener(TemplateChoiceListener listener); + + public void removeTemplateChoiceListener(TemplateChoiceListener listener); + + public Collection<CharacterI> getChosenTemplates(Collection<CharacterI> candidates); + +} Added: phenote/trunk/src/java/phenote/charactertemplate/TreeChooser.java =================================================================== --- phenote/trunk/src/java/phenote/charactertemplate/TreeChooser.java (rev 0) +++ phenote/trunk/src/java/phenote/charactertemplate/TreeChooser.java 2007-08-08 19:22:59 UTC (rev 787) @@ -0,0 +1,155 @@ +package phenote.charactertemplate; + +import java.awt.Color; +import java.io.IOException; +import java.io.Reader; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import javax.swing.JComponent; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; + +import jebl.evolution.graphs.Node; +import jebl.evolution.io.ImportException; +import jebl.evolution.io.NewickImporter; +import jebl.evolution.trees.Tree; +import jebl.evolution.trees.Utils; +import jebl.gui.trees.treeviewer.TreeViewer; +import jebl.gui.trees.treeviewer.painters.BasicLabelPainter; + +import org.apache.log4j.Logger; +import org.geneontology.oboedit.datamodel.OBOClass; +import org.swixml.SwingEngine; + +import phenote.datamodel.CharFieldValue; +import phenote.datamodel.CharacterI; +import phenote.util.FileUtil; + +public class TreeChooser extends AbstractTemplateChooser { + + private JFrame window; + private TreeViewer treeViewer; + private JTextField newickField; // initialized by swix + private JLabel newickFieldLabel; // initialized by swix + private JPanel treeViewerContainer; // initialized by swix + + public void showChooser() { + this.getWindow().setVisible(true); + } + + public void changeNewickTreeAction() { + this.setNewickTree(this.newickField.getText()); + } + + public void applySelectionAction() { + this.fireTemplateChoiceChanged(); + } + + public Collection<CharacterI> getChosenTemplates(Collection<CharacterI> candidates) { + if (this.getCharField() == null) { + this.getLogger().error("CharField not set for TreeChooser - no matching templates."); + return Collections.emptyList(); + } + final Collection<String> chosenTermIDs = this.getChosenTermIDs(); + final Collection<CharacterI> chosenTemplates = new ArrayList<CharacterI>(); + for (CharacterI character : candidates) { + final CharFieldValue fieldValue = character.getValue(this.getCharField()); + if (fieldValue.isTerm()) { + OBOClass term = fieldValue.getTerm(); + if ((term != null) && (chosenTermIDs.contains(term.getID()))) { + chosenTemplates.add(character); + } + } else if (chosenTermIDs.contains(fieldValue.getName())){ + chosenTemplates.add(character); + } + } + return chosenTemplates; + } + + public void setNewickTree(String treeText) { + try { + Tree tree = this.importTree(treeText); + this.getTreeViewer().setTree(tree); + // must reset label painters every time tree is changed, because TreeViewer creates new ones + final OntologyTermPainter ontologyTermTipPainter = new OntologyTermPainter("Tip Labels", this.getTreeViewer().getTreePane().getTree(), BasicLabelPainter.PainterIntent.TIP); + final OntologyTermPainter ontologyTermNodePainter = new OntologyTermPainter("Node Labels", this.getTreeViewer().getTreePane().getTree(), BasicLabelPainter.PainterIntent.NODE); + this.getTreeViewer().getTreePane().setTaxonLabelPainter(ontologyTermTipPainter); + this.getTreeViewer().getTreePane().setNodeLabelPainter(ontologyTermNodePainter); + if (this.newickFieldLabel != null) this.newickFieldLabel.setForeground(Color.BLACK); + } + catch (ImportException e) { + if (this.newickFieldLabel != null) this.newickFieldLabel.setForeground(Color.RED); + } + } + + private Set<String> getChosenTermIDs() { + final Set<String> termIDs = new HashSet<String>(); + final Set<Node> nodes = this.getTreeViewer().getTreePane().getSelectedNodes(); + final Tree tree = this.getTreeViewer().getTreePane().getTree(); + for (Node node : nodes) { + if (tree.isExternal(node)) { + termIDs.add(tree.getTaxon(node).getName()); + } + } + return termIDs; + } + + private TreeViewer getTreeViewer() { + if (this.treeViewer == null) { + this.treeViewer = this.createViewer(); + // starting out with a tree helps the TreeViewer to display correctly + this.setNewickTree("(((Chimp, Human), Gorilla)Apes, Lemur)"); + } + return this.treeViewer; + } + + private JFrame getWindow() { + if (this.window == null) { + this.window = new JFrame("Phylogeny Chooser"); + final JComponent component = this.createPanel(); + this.treeViewerContainer.add(this.getTreeViewer()); + this.window.setSize(component.getSize()); + this.window.getContentPane().add(component); + } + return this.window; + } + + private JComponent createPanel() { + SwingEngine swix = new SwingEngine(this); + try { + JComponent component = (JComponent)swix.render(FileUtil.findUrl("tree_chooser.xml")); + return component; + } catch (Exception e) { + this.getLogger().error("Unable to render interface", e); + return new JPanel(); + } + } + + private TreeViewer createViewer() { + return new TreeViewer(); + } + + private Tree importTree(String newickText) throws ImportException { + Reader reader = new StringReader(newickText); + NewickImporter importer = new NewickImporter(reader, false); + try { + return Utils.rootTheTree(importer.importNextTree()); + } catch (IOException e) { + // this is unlikely since we're using a StringReader + this.getLogger().error("Can't read tree, newick text must be null", e); + return null; + } + } + + private Logger getLogger() { + return Logger.getLogger(this.getClass()); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-08-07 21:29:59
|
Revision: 786 http://obo.svn.sourceforge.net/obo/?rev=786&view=rev Author: nlw Date: 2007-08-07 14:29:53 -0700 (Tue, 07 Aug 2007) Log Message: ----------- changed date in header for html page of transcript Modified Paths: -------------- phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html Modified: phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html =================================================================== --- phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html 2007-08-07 21:27:11 UTC (rev 785) +++ phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html 2007-08-07 21:29:53 UTC (rev 786) @@ -3,14 +3,14 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<meta name="description" content="Phenote Transcripts 06.05.2007" /> +<meta name="description" content="Phenote Transcripts 08.07.2007" /> <meta name="keywords" content="Phenotype, Annotation, Phenote, NCBO, National Center for Biomedical Ontology, Ontology, Berkeley Bioinformatics and Ontology Project, BBOP, Curation, EQ model, entities and qualities, phenotype annotation, PATO, phenotype and trait ontology, OBO, Open Biomedical Ontologies" /> <!-- TODO: need an icon --> <link rel="icon" href="" type="image/png" /> <link rel="shortcut icon" href="" type="image/png" /> <link rel="stylesheet" type="text/css" href="/css/colloquy2.css" title="standard" /> -<title>Phenote Working Group IRC chat 06.05.2007</title> +<title>Phenote Working Group IRC chat 08.07.2007</title> </head> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-08-07 21:29:42
|
Revision: 785 http://obo.svn.sourceforge.net/obo/?rev=785&view=rev Author: nlw Date: 2007-08-07 14:27:11 -0700 (Tue, 07 Aug 2007) Log Message: ----------- transcript from today's phenote user's group meeting Added Paths: ----------- phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html Added: phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html =================================================================== --- phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html (rev 0) +++ phenote/trunk/doc/phenote-website/irc_chat/transcripts/PWG_irc_080707.html 2007-08-07 21:27:11 UTC (rev 785) @@ -0,0 +1,276 @@ +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + +<head> + +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<meta name="description" content="Phenote Transcripts 06.05.2007" /> +<meta name="keywords" content="Phenotype, Annotation, Phenote, NCBO, National Center for Biomedical Ontology, Ontology, Berkeley Bioinformatics and Ontology Project, BBOP, Curation, EQ model, entities and qualities, phenotype annotation, PATO, phenotype and trait ontology, OBO, Open Biomedical Ontologies" /> + +<!-- TODO: need an icon --> +<link rel="icon" href="" type="image/png" /> +<link rel="shortcut icon" href="" type="image/png" /> +<link rel="stylesheet" type="text/css" href="/css/colloquy2.css" title="standard" /> +<title>Phenote Working Group IRC chat 06.05.2007</title> + +</head> + +<body> +<div id="GG02CB1DSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:27<span class="secs">:11</span></span><span class="ampm">08:27<span class="secs">:11</span>am</span>)</span> <span class="message">hey <span class="member">lisa</span></span></div> +</div><div id="LG9IEV4DSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:29<span class="secs">:19</span></span><span class="ampm">08:29<span class="secs">:19</span>am</span>)</span> <span class="message">okay good, wasn't sure if I had this working correctly</span></div> +</div><div id="V0BC9L5DSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:29<span class="secs">:45</span></span><span class="ampm">08:29<span class="secs">:45</span>am</span>)</span> <span class="message">looks like its good. we</span></div> +</div><div id="ESRD5U5DSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:29<span class="secs">:54</span></span><span class="ampm">08:29<span class="secs">:54</span>am</span>)</span> <span class="message">we'll wait a few more minutes for any others</span></div> +</div><div id="TMKL46DSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:30<span class="secs">:04</span></span><span class="ampm">08:30<span class="secs">:04</span>am</span>)</span> <span class="message">i just got sarah's spreadsheet, i'll take a look at it now</span></div> +</div><div id="XSW4FS6DSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:30<span class="secs">:28</span></span><span class="ampm">08:30<span class="secs">:28</span>am</span>)</span> <span class="message">okay, great</span></div> +</div><div class="event"><span class="message"><message><span class="member">jim</span> joined the chat room.</message></span> <span class="timestamp"><span class="tfh">08:30<span class="secs">:42</span></span><span class="ampm">08:30<span class="secs">:42</span>am</span></span></div><div class="event"><span class="message"><message><span class="member">DavidOS</span> joined the chat room.</message></span> <span class="timestamp"><span class="tfh">08:30<span class="secs">:46</span></span><span class="ampm">08:30<span class="secs">:46</span>am</span></span></div><div id="T1037PFDSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:35<span class="secs">:49</span></span><span class="ampm">08:35<span class="secs">:49</span>am</span>)</span> <span class="message">hi everyone. just another minute or two and we'll get started</span></div> +</div><div id="PU8JCXMDSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:40<span class="secs">:09</span></span><span class="ampm">08:40<span class="secs">:09</span>am</span>)</span> <span class="message">so mark is on vacation for this month's meeting. </span></div> +</div><div id="QQQ6RNDSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:40<span class="secs">:39</span></span><span class="ampm">08:40<span class="secs">:39</span>am</span>)</span> <span class="message">there isn't an elaborate agenda. i wanted to leave the floor open for questions</span></div> +</div><div id="UX8DJ2RDSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:42<span class="secs">:38</span></span><span class="ampm">08:42<span class="secs">:38</span>am</span>)</span> <span class="message">alrighty then.</span></div> +</div><div id="JEMRDQRDSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:43<span class="secs">:02</span></span><span class="ampm">08:43<span class="secs">:02</span>am</span>)</span> <span class="message">so i'm taking a look at some of the 'phenotype statements' that our BIRN friends want to be making in phenote</span></div> +</div><div id="PVAG7FSDSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:43<span class="secs">:27</span></span><span class="ampm">08:43<span class="secs">:27</span>am</span>)</span> <span class="message">and perhaps this is a good forum to discuss some of those issues</span></div> +</div><div id="T44NFLUDSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">08:44<span class="secs">:45</span></span><span class="ampm">08:44<span class="secs">:45</span>am</span>)</span> <span class="message">OK</span></div> +</div><div id="RLNH32WDSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:45<span class="secs">:38</span></span><span class="ampm">08:45<span class="secs">:38</span>am</span>)</span> <span class="message">for example...</span></div> +</div><div id="QDHYEIYDSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:47<span class="secs">:06</span></span><span class="ampm">08:47<span class="secs">:06</span>am</span>)</span> <span class="message">it looks like there's an association being made between a medical diagnosis, such as parkinson's disease, and an observable phenotype, is that right, <span class="member">lisa</span>?</span></div> +</div><div id="BPRZ82ZDSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:47<span class="secs">:26</span></span><span class="ampm">08:47<span class="secs">:26</span>am</span>)</span> <span class="message">yes, that's right</span></div> +</div><div id="Y6V078ZDSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:47<span class="secs">:32</span></span><span class="ampm">08:47<span class="secs">:32</span>am</span>)</span> <span class="message">ok</span></div> +</div><div id="KZQVIWZDSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:47<span class="secs">:56</span></span><span class="ampm">08:47<span class="secs">:56</span>am</span>)</span> <span class="message">let's start out easy...</span></div> +</div><div id="UCUFJF2ESC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:49<span class="secs">:27</span></span><span class="ampm">08:49<span class="secs">:27</span>am</span>)</span> <span class="message">'Nigrostriatal tract degenerates'</span></div> +</div><div id="RVXHKJ3ESC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:50<span class="secs">:07</span></span><span class="ampm">08:50<span class="secs">:07</span>am</span>)</span> <span class="message">now, is this to say that the 'N tract' is observed to degenerate, or that you observe bits of degenerated tract?</span></div> +</div><div id="PCCU5C6ESC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:51<span class="secs">:48</span></span><span class="ampm">08:51<span class="secs">:48</span>am</span>)</span> <span class="message">(aside: is everyone going to the biocurator meeting in october?)</span></div> +</div><div id="QAO3DU6ESC1" class="first message color2"> + <div class="text"><span class="member"><a href="member:jim" class="member">jim</a></span><span class="timestamp">(<span class="tfh">08:52<span class="secs">:06</span></span><span class="ampm">08:52<span class="secs">:06</span>am</span>)</span> <span class="message">yes, I am</span></div> +</div><div id="RZU5DU6ESC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:52<span class="secs">:06</span></span><span class="ampm">08:52<span class="secs">:06</span>am</span>)</span> <span class="message">my guess is that it's the first one</span></div> +</div><div id="CDQCGZ6ESC1" class="later message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:52<span class="secs">:11</span></span><span class="ampm">08:52<span class="secs">:11</span>am</span>)</span> <span class="message">we'll have to double check that paper though</span></div> +</div><div id="PRMQ4N7ESC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">08:52<span class="secs">:35</span></span><span class="ampm">08:52<span class="secs">:35</span>am</span>)</span> <span class="message">yep - going to the meeting too</span></div> +</div><div id="Q04FJP8ESC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">08:53<span class="secs">:13</span></span><span class="ampm">08:53<span class="secs">:13</span>am</span>)</span> <span class="message">This sounds like the basic problem of directly observing a disrupted process vs inferring from results</span></div> +</div><div id="D97LB99ESC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">08:53<span class="secs">:33</span></span><span class="ampm">08:53<span class="secs">:33</span>am</span>)</span> <span class="message">inferring disruption from the resulting phenotype</span></div> +</div><div id="OHQB65AESC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:54<span class="secs">:05</span></span><span class="ampm">08:54<span class="secs">:05</span>am</span>)</span> <span class="message">yes, I agree</span></div> +</div><div id="K0QCJDAESC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:54<span class="secs">:13</span></span><span class="ampm">08:54<span class="secs">:13</span>am</span>)</span> <span class="message">right. what is it you want to capture? the actual observable, or the inferred process?</span></div> +</div><div id="ZV137QBESC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">08:55<span class="secs">:02</span></span><span class="ampm">08:55<span class="secs">:02</span>am</span>)</span> <span class="message">We use GO terms at the gene level along with 'inferred from mutant phenotype' to suggest an actual role in a process</span></div> +</div><div id="FBCYLCESC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">08:55<span class="secs">:33</span></span><span class="ampm">08:55<span class="secs">:33</span>am</span>)</span> <span class="message">Perhaps better to use phenotype statements to capture what is directly observed?</span></div> +</div><div id="ELDHCPDESC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:56<span class="secs">:13</span></span><span class="ampm">08:56<span class="secs">:13</span>am</span>)</span> <span class="message">Our group is certainly most interested in capturing what is directly observed</span></div> +</div><div id="ACF1IUGESC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">08:58<span class="secs">:06</span></span><span class="ampm">08:58<span class="secs">:06</span>am</span>)</span> <span class="message">so this is an interesting question. should there be a PATO term that described 'degenerates' (meaning to imply that there was once something which is now not the same object) or would a 'decreased mass' or 'decreased length' be more appropriate here?</span></div> +</div><div id="JV155WJESC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">08:59<span class="secs">:56</span></span><span class="ampm">08:59<span class="secs">:56</span>am</span>)</span> <span class="message">well, sometimes it is not specifically stated if there is decreased mass or decreased length</span></div> +</div><div id="VBOM19LESC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:00<span class="secs">:45</span></span><span class="ampm">09:00<span class="secs">:45</span>am</span>)</span> <span class="message">degeneration sounds like a process - albeit a patholohical one - rather than a quality ... doesn't it?</span></div> +</div><div id="NYHU3SLESC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:01<span class="secs">:04</span></span><span class="ampm">09:01<span class="secs">:04</span>am</span>)</span> <span class="message">Not that I'm entirely clear what counts as a quality...</span></div> +</div><div id="I2JKHRMESC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:01<span class="secs">:39</span></span><span class="ampm">09:01<span class="secs">:39</span>am</span>)</span> <span class="message">it does sound like a process. and what would that process produce?</span></div> +</div><div id="YPTI24OESC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:02<span class="secs">:28</span></span><span class="ampm">09:02<span class="secs">:28</span>am</span>)</span> <span class="message">note: i just noticed PATO has 'degenerate'. def: changed from a higher to a lower form</span></div> +</div><div id="MD5E4HPESC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:03<span class="secs">:17</span></span><span class="ampm">09:03<span class="secs">:17</span>am</span>)</span> <span class="message">hmmm... not at all clear to me what that def means...</span></div> +</div><div id="J9GCAIPESC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:03<span class="secs">:18</span></span><span class="ampm">09:03<span class="secs">:18</span>am</span>)</span> <span class="message">the def seems more like a process definition too. </span></div> +</div><div id="X1S9BDQESC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:03<span class="secs">:49</span></span><span class="ampm">09:03<span class="secs">:49</span>am</span>)</span> <span class="message">it does seem like a process</span></div> +</div><div id="DA0HJKRESC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:04<span class="secs">:32</span></span><span class="ampm">09:04<span class="secs">:32</span>am</span>)</span> <span class="message">perhaps a change in definition might be in order for this term, and it might solve this issue?</span></div> +</div><div id="ID7O8ORESC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:04<span class="secs">:36</span></span><span class="ampm">09:04<span class="secs">:36</span>am</span>)</span> <span class="message">like...</span></div> +</div><div id="CC8V2KTESC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:05<span class="secs">:44</span></span><span class="ampm">09:05<span class="secs">:44</span>am</span>)</span> <span class="message">the quality of an entity that has undergone the process of changing from a higher to lower form (i don't like this higher/lower business)</span></div> +</div><div id="A2G73BUESC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:06<span class="secs">:11</span></span><span class="ampm">09:06<span class="secs">:11</span>am</span>)</span> <span class="message">or does that break the rules for PATO?</span></div> +</div><div id="Y6Z12JUESC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:06<span class="secs">:19</span></span><span class="ampm">09:06<span class="secs">:19</span>am</span>)</span> <span class="message">Well - I guess you could have degenerated as a relational quality? - degenerated relative to WT - where degenerated is defined as loss of structure relative to some standard (e.g. WT)</span></div> +</div><div id="F1ZE72VESC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:06<span class="secs">:38</span></span><span class="ampm">09:06<span class="secs">:38</span>am</span>)</span> <span class="message">are there other qualities that are the result of undergoing a process?</span></div> +</div><div id="LYYL2YVESC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:07<span class="secs">:10</span></span><span class="ampm">09:07<span class="secs">:10</span>am</span>)</span> <span class="message">Not entirely sure I'm using relative quality correctly here - but PATO certainly contains terms that only make sense as comparisons</span></div> +</div><div id="UH4QJQWESC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:07<span class="secs">:38</span></span><span class="ampm">09:07<span class="secs">:38</span>am</span>)</span> <span class="message">david - but isn't that the case most of the time anyway...isn't it kindof implied that its compared to wildtype unless specified?</span></div> +</div><div id="ZJNA4I0FSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:09<span class="secs">:54</span></span><span class="ampm">09:09<span class="secs">:54</span>am</span>)</span> <span class="message">Not for all qualities - a fruit flies eyes have the quality 'red' - although we may only choose to record such qualities when they differ from WT</span></div> +</div><div id="AC55AV0FSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:10<span class="secs">:07</span></span><span class="ampm">09:10<span class="secs">:07</span>am</span>)</span> <span class="message">true enough</span></div> +</div><div id="D9F41R1FSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:10<span class="secs">:39</span></span><span class="ampm">09:10<span class="secs">:39</span>am</span>)</span> <span class="message">how about 'degenerated from' as the relational quality?</span></div> +</div><div id="TSMGJE2FSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:11<span class="secs">:02</span></span><span class="ampm">09:11<span class="secs">:02</span>am</span>)</span> <span class="message">where the relation is to specify the starting point of the degeneration></span></div> +</div><div id="KGBJFZ2FSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:11<span class="secs">:23</span></span><span class="ampm">09:11<span class="secs">:23</span>am</span>)</span> <span class="message">so we could suggest 'loss of structure' as opposed to this higher/lower business for the def?</span></div> +</div><div id="EU1TJB3FSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:11<span class="secs">:35</span></span><span class="ampm">09:11<span class="secs">:35</span>am</span>)</span> <span class="message">that's an interesting one</span></div> +</div><div id="JAALAN4FSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:12<span class="secs">:23</span></span><span class="ampm">09:12<span class="secs">:23</span>am</span>)</span> <span class="message">well, degenerate is currently a subclass of structure</span></div> +</div><div id="WCN4AZ4FSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:12<span class="secs">:35</span></span><span class="ampm">09:12<span class="secs">:35</span>am</span>)</span> <span class="message">a different definition maybe?</span></div> +</div><div id="G3LX226FSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:13<span class="secs">:14</span></span><span class="ampm">09:13<span class="secs">:14</span>am</span>)</span> <span class="message">The current def sounds more like conservative social commentary than biology</span></div> +</div><div id="JI17B6FSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:13<span class="secs">:23</span></span><span class="ampm">09:13<span class="secs">:23</span>am</span>)</span> <span class="message">ha!</span></div> +</div><div id="CDUW8N6FSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:13<span class="secs">:35</span></span><span class="ampm">09:13<span class="secs">:35</span>am</span>)</span> <span class="message">i just noticed another term that's a subclass of structure: apoptosis. def:</span></div> +</div><div id="LQ77AL7FSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:14<span class="secs">:09</span></span><span class="ampm">09:14<span class="secs">:09</span>am</span>)</span> <span class="message">A structural quality inhering in a bearer by virtue of its undergoing apoptosis. oh, the term is apoptotic</span></div> +</div><div id="SPEVG78FSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:14<span class="secs">:31</span></span><span class="ampm">09:14<span class="secs">:31</span>am</span>)</span> <span class="message">so, perhaps similarly for degenerat?</span></div> +</div><div id="FW2BCK9FSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:15<span class="secs">:20</span></span><span class="ampm">09:15<span class="secs">:20</span>am</span>)</span> <span class="message">good point, because apoptosis is clearly a process</span></div> +</div><div id="X51A3Y9FSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:15<span class="secs">:34</span></span><span class="ampm">09:15<span class="secs">:34</span>am</span>)</span> <span class="message">An apoptotic cell has distinct structural qualities - e.g.- membrane blebbing</span></div> +</div><div id="EFL92JAFSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:15<span class="secs">:55</span></span><span class="ampm">09:15<span class="secs">:55</span>am</span>)</span> <span class="message">But a structure could degenerate in many different ways</span></div> +</div><div id="TW9QDEBFSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:16<span class="secs">:26</span></span><span class="ampm">09:16<span class="secs">:26</span>am</span>)</span> <span class="message">So - it seems to me that apoptotic is a structural quality that inheres in a cell</span></div> +</div><div id="K90YELBFSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:16<span class="secs">:33</span></span><span class="ampm">09:16<span class="secs">:33</span>am</span>)</span> <span class="message">no comparisons needed</span></div> +</div><div id="NKR648CFSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:16<span class="secs">:56</span></span><span class="ampm">09:16<span class="secs">:56</span>am</span>)</span> <span class="message">But something is always degenrated relative to somethng else no?</span></div> +</div><div id="A6VFDLCFSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:17<span class="secs">:09</span></span><span class="ampm">09:17<span class="secs">:09</span>am</span>)</span> <span class="message">so its really a structure within something else that is degenerating?</span></div> +</div><div id="LVJ1LGDFSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:17<span class="secs">:40</span></span><span class="ampm">09:17<span class="secs">:40</span>am</span>)</span> <span class="message">An apoptic cell is?</span></div> +</div><div id="U9K74RDFSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:17<span class="secs">:51</span></span><span class="ampm">09:17<span class="secs">:51</span>am</span>)</span> <span class="message">Not necessarily</span></div> +</div><div id="JN9D9NFFSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:18<span class="secs">:59</span></span><span class="ampm">09:18<span class="secs">:59</span>am</span>)</span> <span class="message">hmmm... so rather than 'within' or 'contained', its more about comparing two different instances of the same object, right?</span></div> +</div><div id="JD9326GFSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:19<span class="secs">:18</span></span><span class="ampm">09:19<span class="secs">:18</span>am</span>)</span> <span class="message">another def for degeneration: "The evolutionary decline or loss of a function, characteristic, or structure in an organism or a species."</span></div> +</div><div id="AJ7CKAHFSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:19<span class="secs">:58</span></span><span class="ampm">09:19<span class="secs">:58</span>am</span>)</span> <span class="message">nice. An evolutionary process rather than a pathological one.</span></div> +</div><div id="A75HBPHFSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:20<span class="secs">:13</span></span><span class="ampm">09:20<span class="secs">:13</span>am</span>)</span> <span class="message">that is interesting. yes. </span></div> +</div><div id="EYYJ30JFSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:21<span class="secs">:00</span></span><span class="ampm">09:21<span class="secs">:00</span>am</span>)</span> <span class="message">would that make sense as a quality in the case of this particular phenotype?</span></div> +</div><div class="event"><span class="message"><message><span class="member">yvonne</span> joined the chat room.</message></span> <span class="timestamp"><span class="tfh">09:22<span class="secs">:32</span></span><span class="ampm">09:22<span class="secs">:32</span>am</span></span></div><div id="YCVXCZMFSC1" class="first message color2"> + <div class="text"><span class="member"><a href="member:jim" class="member">jim</a></span><span class="timestamp">(<span class="tfh">09:23<span class="secs">:23</span></span><span class="ampm">09:23<span class="secs">:23</span>am</span>)</span> <span class="message">I am going to take off soon - are we going to have the developers' conference next Tuesday?</span></div> +</div><div id="LMGT45NFSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:23<span class="secs">:29</span></span><span class="ampm">09:23<span class="secs">:29</span>am</span>)</span> <span class="message">Hi sorry I'm late. issues being able to log on.....</span></div> +</div><div id="C53WGFOFSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:24<span class="secs">:15</span></span><span class="ampm">09:24<span class="secs">:15</span>am</span>)</span> <span class="message">"so rather than 'within' or 'contained', its more about comparing two different instances of the same object, right?" If you mean degenerated vs not - then I guess that's appropriate (although lets not get in to whather a degenerated object has the same identity as a non-degenerated one - sounds like tha same problem as absensce as a quality)</span></div> +</div><div id="KIRZDTOFSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:24<span class="secs">:29</span></span><span class="ampm">09:24<span class="secs">:29</span>am</span>)</span> <span class="message">hope I didn't miss much. I'll check the notes. </span></div> +</div><div id="I21A9ESFSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:26<span class="secs">:38</span></span><span class="ampm">09:26<span class="secs">:38</span>am</span>)</span> <span class="message">hi <span class="member">yvonne</span>. we're discussing some phenotype statement issues. current topic is 'degenerate' as a quality</span></div> +</div><div id="NTD69HVFSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:28<span class="secs">:29</span></span><span class="ampm">09:28<span class="secs">:29</span>am</span>)</span> <span class="message">degenerate as a quality would be nice. But as David pointed out we could run into the same issues as with absence.</span></div> +</div><div id="ERH3JJVFSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:28<span class="secs">:31</span></span><span class="ampm">09:28<span class="secs">:31</span>am</span>)</span> <span class="message">david- i think we are treading on some of the same ground as the whole absence issue, which is why this one is tough. and we resolved that by coming up with the new relational qualities of 'lacking ___ parts'</span></div> +</div><div class="event"><span class="message"><message><span class="member">jim</span> left the chat room.</message></span> () <span class="timestamp"><span class="tfh">09:29<span class="secs">:24</span></span><span class="ampm">09:29<span class="secs">:24</span>am</span></span></div><div id="D4EVFK0GSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:31<span class="secs">:32</span></span><span class="ampm">09:31<span class="secs">:32</span>am</span>)</span> <span class="message">Hmmm... gonna have to get the distinction between relational qualities and relations clearer...</span></div> +</div><div id="OWC4G42GSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:32<span class="secs">:28</span></span><span class="ampm">09:32<span class="secs">:28</span>am</span>)</span> <span class="message">Having degenerated ___ part ?</span></div> +</div><div id="A0VCI3GSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:33<span class="secs">:18</span></span><span class="ampm">09:33<span class="secs">:18</span>am</span>)</span> <span class="message">hmmm... that doesn't seem quite right</span></div> +</div><div id="P7Z7HV3GSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:33<span class="secs">:31</span></span><span class="ampm">09:33<span class="secs">:31</span>am</span>)</span> <span class="message">agreed</span></div> +</div><div id="OKB7H74GSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:33<span class="secs">:43</span></span><span class="ampm">09:33<span class="secs">:43</span>am</span>)</span> <span class="message">agreed</span></div> +</div><div id="FL5M665GSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:34<span class="secs">:18</span></span><span class="ampm">09:34<span class="secs">:18</span>am</span>)</span> <span class="message">let's go back to <span class="member">lisa</span>'s 'evolutionary' def. </span></div> +</div><div id="T3LE7L5GSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:34<span class="secs">:33</span></span><span class="ampm">09:34<span class="secs">:33</span>am</span>)</span> <span class="message">which was?</span></div> +</div><div id="C4TN6M6GSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:35<span class="secs">:10</span></span><span class="ampm">09:35<span class="secs">:10</span>am</span>)</span> <span class="message">i like this one, the only problem i worry about is that it is describing both processes and non-processes</span></div> +</div><div id="KB6H9T6GSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:35<span class="secs">:17</span></span><span class="ampm">09:35<span class="secs">:17</span>am</span>)</span> <span class="message">"The evolutionary decline or loss of a function, characteristic, or structure in an organism or a species."</span></div> +</div><div id="NZOK4P7GSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:35<span class="secs">:49</span></span><span class="ampm">09:35<span class="secs">:49</span>am</span>)</span> <span class="message">or continuants and non-continuants</span></div> +</div><div id="NDP3L88GSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:36<span class="secs">:08</span></span><span class="ampm">09:36<span class="secs">:08</span>am</span>)</span> <span class="message">but maybe that isn't a problem at all.</span></div> +</div><div id="DRFAYBGSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:38<span class="secs">:22</span></span><span class="ampm">09:38<span class="secs">:22</span>am</span>)</span> <span class="message">I like this def. but there would be times when degeneration is not due to evolution.</span></div> +</div><div id="KNMC8VDGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:39<span class="secs">:31</span></span><span class="ampm">09:39<span class="secs">:31</span>am</span>)</span> <span class="message">i was interpreting 'evolution' in the broadest sense of the word. but maybe there shouldn't be room for interpretation.</span></div> +</div><div id="AGEL8NEGSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:39<span class="secs">:59</span></span><span class="ampm">09:39<span class="secs">:59</span>am</span>)</span> <span class="message">in this case, a parkinsonian patient, its definately not 'evolution'</span></div> +</div><div id="YLITKNEGSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:39<span class="secs">:59</span></span><span class="ampm">09:39<span class="secs">:59</span>am</span>)</span> <span class="message">it's a fine line.</span></div> +</div><div id="BHQBAFGSC1" class="later message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:40<span class="secs">:22</span></span><span class="ampm">09:40<span class="secs">:22</span>am</span>)</span> <span class="message">right - very good example</span></div> +</div><div id="YO9IEMFGSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:40<span class="secs">:34</span></span><span class="ampm">09:40<span class="secs">:34</span>am</span>)</span> <span class="message">OK - so can't hang around much longer.</span></div> +</div><div id="Y6K7EWFGSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:40<span class="secs">:44</span></span><span class="ampm">09:40<span class="secs">:44</span>am</span>)</span> <span class="message">Here2019s a summary of the progress I thnk we2019ve made: We seem to agree that "degenerate" ("degenerated"?) has a lousy def. There is, I think, a good case for a def in terms of "loss of structure" (& in that case the term is probably not a child of structure?) - and perhaps we need a second term for the evolutionary meaning. One or both may be relational qualities 2013 but this is not yet clear. </span></div> +</div><div id="NB0KC6GGSC1" class="later message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:40<span class="secs">:54</span></span><span class="ampm">09:40<span class="secs">:54</span>am</span>)</span> <span class="message">How does that sound?</span></div> +</div><div id="L59319GGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:40<span class="secs">:57</span></span><span class="ampm">09:40<span class="secs">:57</span>am</span>)</span> <span class="message">so i think this is a good item to take to the list. the phenotype list.</span></div> +</div><div id="EEY03LGGSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:41<span class="secs">:09</span></span><span class="ampm">09:41<span class="secs">:09</span>am</span>)</span> <span class="message">yep</span></div> +</div><div id="UKD3KSGGSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:41<span class="secs">:16</span></span><span class="ampm">09:41<span class="secs">:16</span>am</span>)</span> <span class="message">sounds good to me.</span></div> +</div><div id="DCZFFYGGSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:41<span class="secs">:22</span></span><span class="ampm">09:41<span class="secs">:22</span>am</span>)</span> <span class="message">i agree as well</span></div> +</div><div id="W3EJ5QHGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:41<span class="secs">:50</span></span><span class="ampm">09:41<span class="secs">:50</span>am</span>)</span> <span class="message">good. </span></div> +</div><div id="JDBD3JGSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:42<span class="secs">:39</span></span><span class="ampm">09:42<span class="secs">:39</span>am</span>)</span> <span class="message">ok, well, i'm going to adjourn this meeting, unless if there's any other issues?</span></div> +</div><div id="IU7E5HJGSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:42<span class="secs">:53</span></span><span class="ampm">09:42<span class="secs">:53</span>am</span>)</span> <span class="message">and i'll post this stuff to the list (and on the pato tracker)</span></div> +</div><div id="NA4XIEKGSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:43<span class="secs">:26</span></span><span class="ampm">09:43<span class="secs">:26</span>am</span>)</span> <span class="message"><span class="highlight member">Nicole</span>, is this list available to view somewhere?</span></div> +</div><div id="KHLRHTKGSC1" class="first message color6"> + <div class="text"><span class="member"><a href="member:DavidOS" class="member">DavidOS</a></span><span class="timestamp">(<span class="tfh">09:43<span class="secs">:41</span></span><span class="ampm">09:43<span class="secs">:41</span>am</span>)</span> <span class="message">OK. See ya. David</span></div> +</div><div id="HT7162LGSC1" class="first message color1"> + <div class="text"><span class="member"><a href="member:yvonne" class="member">yvonne</a></span><span class="timestamp">(<span class="tfh">09:43<span class="secs">:50</span></span><span class="ampm">09:43<span class="secs">:50</span>am</span>)</span> <span class="message">ok. have a great week. goodbye.</span></div> +</div><div class="event"><span class="message"><message><span class="member">DavidOS</span> left the chat room.</message></span> () <span class="timestamp"><span class="tfh">09:43<span class="secs">:55</span></span><span class="ampm">09:43<span class="secs">:55</span>am</span></span></div><div id="FX8O2ALGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:43<span class="secs">:58</span></span><span class="ampm">09:43<span class="secs">:58</span>am</span>)</span> <span class="message">oh, the obo-phenotype list? sure. its on sourceforge. you can subscribe too. i can get it...hold on...</span></div> +</div><div class="event"><span class="message"><message><span class="member">yvonne</span> left the chat room.</message></span> (Quit: yvonne) <span class="timestamp"><span class="tfh">09:44<span class="secs">:05</span></span><span class="ampm">09:44<span class="secs">:05</span>am</span></span></div><div id="IYIO75MGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:44<span class="secs">:29</span></span><span class="ampm">09:44<span class="secs">:29</span>am</span>)</span> <span class="message"><a href="https://lists.sourceforge.net/lists/listinfo/obo-phenotype">https://lists.sourceforge.net/lists/listinfo/obo-phenotype</a></span></div> +</div><div id="KNQC4IMGSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:44<span class="secs">:42</span></span><span class="ampm">09:44<span class="secs">:42</span>am</span>)</span> <span class="message">that's how you can subscribe. but you can also just look at the postings</span></div> +</div><div id="EDCS1TMGSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:44<span class="secs">:53</span></span><span class="ampm">09:44<span class="secs">:53</span>am</span>)</span> <span class="message">ok, great</span></div> +</div><div id="VY19CDNGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:45<span class="secs">:13</span></span><span class="ampm">09:45<span class="secs">:13</span>am</span>)</span> <span class="message">there's often interesting posts and discussion much like we had in this forum today.</span></div> +</div><div id="DQG61QNGSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:45<span class="secs">:26</span></span><span class="ampm">09:45<span class="secs">:26</span>am</span>)</span> <span class="message">perfect</span></div> +</div><div id="JIKTF9OGSC1" class="later message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:45<span class="secs">:45</span></span><span class="ampm">09:45<span class="secs">:45</span>am</span>)</span> <span class="message">so maybe next week when you come, we can hash through some more statements on the spreadsheet</span></div> +</div><div id="YMGZHFOGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:45<span class="secs">:51</span></span><span class="ampm">09:45<span class="secs">:51</span>am</span>)</span> <span class="message">i'll look more at these phenotype statements, and chat with chris and get back to you...before we come down next week</span></div> +</div><div id="AECYANOGSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:45<span class="secs">:59</span></span><span class="ampm">09:45<span class="secs">:59</span>am</span>)</span> <span class="message">yeah.</span></div> +</div><div id="BKL7KZOGSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:46<span class="secs">:11</span></span><span class="ampm">09:46<span class="secs">:11</span>am</span>)</span> <span class="message">sorry it took so long to get back to you</span></div> +</div><div id="IA4J9APGSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:46<span class="secs">:22</span></span><span class="ampm">09:46<span class="secs">:22</span>am</span>)</span> <span class="message">that sounds good...it's no problem</span></div> +</div><div id="G3TM4LPGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:46<span class="secs">:33</span></span><span class="ampm">09:46<span class="secs">:33</span>am</span>)</span> <span class="message">okay. talk to you soon.</span></div> +</div><div id="YL1UBNPGSC1" class="later message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:46<span class="secs">:35</span></span><span class="ampm">09:46<span class="secs">:35</span>am</span>)</span> <span class="message">thanks!</span></div> +</div><div id="VJH19ZPGSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:46<span class="secs">:47</span></span><span class="ampm">09:46<span class="secs">:47</span>am</span>)</span> <span class="message">let us know if you have any questions about the spreadsheet</span></div> +</div><div id="C390IXQGSC1" class="first message colors"> + <div class="text"><span class="member self"><a href="member:nicole" class="member">nicole</a></span><span class="timestamp">(<span class="tfh">09:47<span class="secs">:21</span></span><span class="ampm">09:47<span class="secs">:21</span>am</span>)</span> <span class="message">sure thing. bye now!</span></div> +</div><div id="KQF34KRGSC1" class="first message color5"> + <div class="text"><span class="member"><a href="member:Lisa" class="member">Lisa</a></span><span class="timestamp">(<span class="tfh">09:47<span class="secs">:44</span></span><span class="ampm">09:47<span class="secs">:44</span>am</span>)</span> <span class="message">bye!</span></div> +</div> +</body> +</html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-08-02 17:55:36
|
Revision: 784 http://obo.svn.sourceforge.net/obo/?rev=784&view=rev Author: mgibson Date: 2007-08-02 10:55:39 -0700 (Thu, 02 Aug 2007) Log Message: ----------- you can now nullify a term/ontology field delete contents and hit enter as michael has been asking amongst others generalized return/enter detection - free text field should take advantage - use for edit (and maybe advance to next field - like tab?) Modified Paths: -------------- phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java phenote/trunk/src/java/phenote/gui/field/RelationCompList.java phenote/trunk/src/java/phenote/gui/field/TermCompList.java phenote/trunk/src/java/phenote/main/PhenoteVersion.java Modified: phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java 2007-08-01 17:02:45 UTC (rev 783) +++ phenote/trunk/src/java/phenote/datamodel/CharFieldValue.java 2007-08-02 17:55:39 UTC (rev 784) @@ -109,6 +109,7 @@ // else { //System.out.println("CFV editMod "+getName()); character.setValue(charField,this); + // could also edit obo edit model at this point! // } } Modified: phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java 2007-08-01 17:02:45 UTC (rev 783) +++ phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java 2007-08-02 17:55:39 UTC (rev 784) @@ -56,7 +56,7 @@ jComboBox.addActionListener(new ComboBoxActionListener()); compListSearcher = new CompListSearcher(getCharField().getOntologyList()); // init with all terms if config.showAllOnEmptyInput... - doCompletion(false); // dont show pupup - we dont have a gui yet, just populating + doCompletion(false); // dont show popup - we dont have a gui yet, just populating } protected Component getUserInputGui() { return jComboBox; } @@ -136,6 +136,8 @@ autoTextField = new AutoTextField(); // outer instance var for testing editor = autoTextField; // protected editor var from BCBE addDocumentListener(new AutoDocumentListener()); + // call returnKeyHit - for nulling out term + addReturnKeyListener(autoTextField); } // editor is protected JTextField - wacky @@ -231,6 +233,12 @@ } + // for subclasses to override - abstract? + protected void returnKeyHit() {} + + abstract protected void setModelToNull(); + + /** This is cheesy but theres a hanging bug with showPopup that only happens in test mode - dont know why but doesnt actually matter, so setting flag to turn off showpopup in test - if hangs in nontest will investigate */ @@ -518,86 +526,3 @@ //new Throwable().printStackTrace(); //this.keyTyped = doCompletion; // key has to be typed for completion // {charField.getCharFieldEnum().getValue(chr).getOboClass() } - - ///** If true than the auto combo is for setting the differentia in a post comp term, - // if false (default) than no post comp or genus in post comp */ - //void setIsDifferentia(boolean isDiff) { isDifferentia = isDiff; } - - //protected boolean editModelEnabled() { return editModel; } - - //void setOntology(Ontology o) { ontology = o; } - - //void setSearchParams(SearchParamsI sp) { searchParams = sp; } - - //void setCharField(CharField charField) { this.charField = charField; } - - //protected CharField getCharField() { return charField; } - -// protected void setSearchParams(SearchParamsI sp) { -// searchParams = sp; -// // this assumes that its set up initially with ALL - presumptious? -// compListSearcher = new CompListSearcher(getCharField().getOntologyList()); -// } - - //setOntology(ontology); - //searchParams = sp; // singleton access? part of ontology? - //compListSearcher = new CompListSearcher(cf.getFirstOntology(),sp);//s; - //enableTermInfoListening(true); // default - hardwired in rel & term subclasses - //addCompletionListListener(compList); - // why is this commented out? - //if (editModel) // ComboBoxActionListener edits the model - //this.editModel = editModel; - //charFieldGui = cfg; - //setCharField(cf); - //jComboBox.setMaximumSize(CharFieldGui.inputSize); //new Dimension(390,20)); - // this is super critical - fixes bug where layout goes to hell if string are long - // in completion - dont ask me why???? - //jComboBox.setMinimumSize(CharFieldGui.inputSize); - // dont know why by setting fonts this seem to get worse not better in terms of - // the wierd layout issue with large terms & list - //setFont(new Font("Courier",Font.PLAIN,12)); yuck - //setFont(new Font("Lucida Console",Font.PLAIN,12)); not fixed - //Font[] fonts = - //java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); - //for (Font f : fonts) System.out.println(f); - //setFont(new Font("Lucida Typewriter",Font.PLAIN,10)); - //private AutoTextFieldEditor autoTextFieldEditor; - //private SearchParamsI searchParams; - //private DefaultComboBoxModel defaultComboBoxModel; - //private Ontology ontology; - //private boolean keyTyped = false; - //private String previousInput = ""; - //private CharField charField; - //private CharFieldGui charFieldGui; // should it be ISA not HASA? - ///** Whether differentia of a post composed term */ - //private boolean isDifferentia = false; - /** if false then model is not edited */ - //private boolean editModel = true; - //private CompletionListListener compListListener = new CompletionListListener();// private class AutoKeyListener extends KeyAdapter { -// // keyTyped doesnt seem to catch backspace in 1.5 - but did in 1.4 - odd -// // public void keyTyped(KeyEvent e) { -// // // return & tab should be ignored, as well as a lot of other things -// // keyTyped = true; -// // // this may be funny but with key type event the text has not yet be set -// // // this catches cases where text changed due select/action - kinda cheap -// // previousInput = getText(); -// // } -// public void keyReleased(KeyEvent e) { -// // return & tab should be ignored, as well as a lot of other things -// //keyTyped = true; -// // this may be funny but with key type event the text has not yet be set -// // this catches cases where text changed due select/action - kinda cheap -// previousInput = getText(); -// } -// } -// private void editModel() { -// OBOClass oboClass; -// try { oboClass = getCurrentOboClass(); } -// catch (Exception e) { return; } // shouldnt happen, error? -// if (charField == null) return; // shouldnt happen -// CharacterI c = getSelectedCharacter(); // from selectionManager -// CharFieldEnum cfe = charField.getCharFieldEnum(); -// // isDifferentia boolean? -// UpdateTransaction ut = new UpdateTransaction(c,cfe,oboClass); -// EditManager.inst().updateModel(this,ut); -// } Modified: phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-08-01 17:02:45 UTC (rev 783) +++ phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-08-02 17:55:39 UTC (rev 784) @@ -1,10 +1,12 @@ package phenote.gui.field; import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.Container; -import java.awt.Dimension; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; @@ -359,29 +361,7 @@ // } -// void addOntologyChooser(JComboBox oc) { fieldPanel.addOntologyChooser(oc); } -// private void initOntologyChooser(CharField charField) { -// ontologyChooserCombo = new JComboBox(); -// // add listener.... -// for (Ontology o : charField.getOntologyList()) { -// ontologyChooserCombo.addItem(o.getName()); -// } -// ontologyChooserCombo.addActionListener(new OntologyChooserListener()); -// fieldPanel.addOntologyChooser(ontologyChooserCombo); -// } - -// private void initTextField(String label) { -// //isCompList = false; -// fieldPanel.addLabel(label); -// freeTextField = new FreeTextField(this); -// // textField = new JTextField(25); -// // textField.setEditable(true); -// // textField.getDocument().addDocumentListener(new TextFieldDocumentListener()); -// // textField.addKeyListener(new TextKeyListener()); -// fieldPanel.addFieldGui(freeTextField.getComponent()); -// } - // private FreeTextField getFreeTextField() { return freeTextField; } // ?? was this moved somewhere else? @@ -519,6 +499,27 @@ /** Overridden by TermCompList */ protected JButton getCompButton() { return null; } + protected void addReturnKeyListener(Component c) { + c.addKeyListener(new ReturnKeyListener()); + } + + private class ReturnKeyListener extends KeyAdapter { + // doesnt work +// public void keyTyped(KeyEvent e) { +// if (e.getKeyCode() == KeyEvent.VK_ENTER) returnKeyHit(); +// } +// public void keyReleased(KeyEvent e) { +// if (e.getKeyCode() == KeyEvent.VK_ENTER) returnKeyHit(); +// } + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_ENTER) returnKeyHit(); + } + + } + + // for subclasses to override + protected void returnKeyHit() {} + private Logger log; private Logger log() { if (log == null) log = Logger.getLogger(getClass()); @@ -526,6 +527,28 @@ } } +// void addOntologyChooser(JComboBox oc) { fieldPanel.addOntologyChooser(oc); } + +// private void initOntologyChooser(CharField charField) { +// ontologyChooserCombo = new JComboBox(); +// // add listener.... +// for (Ontology o : charField.getOntologyList()) { +// ontologyChooserCombo.addItem(o.getName()); +// } +// ontologyChooserCombo.addActionListener(new OntologyChooserListener()); +// fieldPanel.addOntologyChooser(ontologyChooserCombo); +// } + +// private void initTextField(String label) { +// //isCompList = false; +// fieldPanel.addLabel(label); +// freeTextField = new FreeTextField(this); +// // textField = new JTextField(25); +// // textField.setEditable(true); +// // textField.getDocument().addDocumentListener(new TextFieldDocumentListener()); +// // textField.addKeyListener(new TextKeyListener()); +// fieldPanel.addFieldGui(freeTextField.getComponent()); +// } // private static CharFieldGui createFreeTextField() {} ?? // private static CharFieldGui createCompList(CharField charField, SearchParamsI sp) { Modified: phenote/trunk/src/java/phenote/gui/field/RelationCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/RelationCompList.java 2007-08-01 17:02:45 UTC (rev 783) +++ phenote/trunk/src/java/phenote/gui/field/RelationCompList.java 2007-08-02 17:55:39 UTC (rev 784) @@ -100,6 +100,9 @@ /** no-op - relation list doesnt edit model (at least presently) */ protected void editModel() {} + /** no-op override */ + protected void setModelToNull() {} + /** char in table changed - adjust - not needed for rel(at least not yet) as post comp doesnt listen to table changes (does it? should it?), just term */ Modified: phenote/trunk/src/java/phenote/gui/field/TermCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2007-08-01 17:02:45 UTC (rev 783) +++ phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2007-08-02 17:55:39 UTC (rev 784) @@ -188,19 +188,33 @@ OBOClass oboClass; try { oboClass = getCurrentOboClass(); + setModel(oboClass); } - catch (Exception e) { + catch (CharFieldGuiEx e) { return; } // shouldnt happen, error? + } + + /** oc may be null - for nullifying model */ + private void setModel(OBOClass oboClass) { if (getCharField() == null) return; // shouldnt happen List<CharacterI> chars = getSelectedChars(); // from selectionManager - //CharFieldEnum cfe = getCharField().getCharFieldEnum(); - // isDifferentia boolean? - //CompoundTransaction ct = new CompoundTransaction(chars,cfe,oboClass); - CompoundTransaction ct = CompoundTransaction.makeUpdate(chars, getCharField(), oboClass); + CompoundTransaction ct = + CompoundTransaction.makeUpdate(chars, getCharField(), oboClass); this.getEditManager().updateModel(this, ct); } + // allow user to nullify field + protected void setModelToNull() { + setModel(null); + } + + protected void returnKeyHit() { + //log().debug("return key hit - value ["+getText()+"]"); + if (getText() == null || getText().trim().equals("")) + setModelToNull(); + } + private List<CharacterI> getSelectedChars() { return getSelectionManager().getSelectedChars(); } @@ -351,40 +365,3 @@ // //fieldPanel.addPostCompButton(postCompButton); // } - // pase i think -// TermCompList(CompListSearcher s,boolean editModel,CharFieldGui cfg) { -// super(s,editModel,cfg.getCharField()); -// this.charFieldGui = cfg; // pass to super? AACL subclass CFG? -// enableTermInfoListening(); -// if (hasMoreThanOneOntology()) // super AACL -// initOntologyChooser(getCharField()); -// } - -// protected TermCompList(CharField cf, boolean addCompButton) { -// super(cf); -// this.addCompButton = addCompButton; -// init(); -// } - - // pase? -// protected TermCompList(CharField cf, SearchParamsI sp, boolean editModel) { -// this(cf,sp,editModel,true,null); // true - dont supress configured comp button -// // super(sp,editModel,cf); protected CharFieldGui(CharField charField,String label) { -// init(charField,label); -// } - -// // enableTermInfoListening(); -// // if (hasMoreThanOneOntology()) // super AACL -// // initOntologyChooser(getCharField()); -// // if (charField.postCompAllowed() && addCompButton) { -// // JButton postCompButton = new JButton("Comp"); // ??? -// // postCompButton.addActionListener(new PostCompListener()); -// // //fieldPanel.addPostCompButton(postCompButton); -// // } -// } - -// protected TermCompList(CharField cf, SearchParamsI sp, boolean editModel, -// boolean addCompButton, String label) { -// super(sp,editModel,cf,label); -// init(); -// } Modified: phenote/trunk/src/java/phenote/main/PhenoteVersion.java =================================================================== --- phenote/trunk/src/java/phenote/main/PhenoteVersion.java 2007-08-01 17:02:45 UTC (rev 783) +++ phenote/trunk/src/java/phenote/main/PhenoteVersion.java 2007-08-02 17:55:39 UTC (rev 784) @@ -9,7 +9,7 @@ //private static final float MAJOR_VERSION_NUM = 0.8f; //private static final float SUB_VERSION_NUM = .3f; - private static final String VERSION = "1.4-beta2"; // ?? + private static final String VERSION = "1.4-beta3"; // ?? // type is "dev" or "release" //private static final String type = " dev"; // "release" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-08-01 17:02:44
|
Revision: 783 http://obo.svn.sourceforge.net/obo/?rev=783&view=rev Author: mgibson Date: 2007-08-01 10:02:45 -0700 (Wed, 01 Aug 2007) Log Message: ----------- added type=ID constraint which just for now checks that theres a colon in the entry - so the check is obviuolsy trivial - the hard part was how to report an error to the user - at first i went with popups - which was problematic in terms of swing threading - but once i more or less solved some of that it also stunk from a user point of view - as loss of focus was causing the popup to come up all the time - totally annoying a better way is to have a place for errors to print out - so to get this off the ground im using term info - but actually i kinda like it there - Info (not just term info) - im curious what others think and a i made a general controller event listener framework - ErrorManager ErrorListener ErrorEvent - so it will be easy to switch around how we wanna display errors so not only is error coming up in term info - but both violating field and term info blink red twice - as just having text in term info didnt feel like enough to show somethings wrong - and blinking is a lot less obtrusive than popups - so im curious what folks think about the blinking (nicole?) - different color - blink more? less? slower? all easy to change obviously - took advantage of swings Timer class Modified Paths: -------------- phenote/trunk/conf/flybase.cfg phenote/trunk/conf/ncbo.cfg phenote/trunk/conf/phenote-config.rnc phenote/trunk/conf/phenote-config.xsd phenote/trunk/conf/worm.cfg phenote/trunk/jars/phenoteconfigbeans.jar phenote/trunk/src/java/phenote/config/FieldConfig.java phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java phenote/trunk/src/java/phenote/datamodel/CharField.java phenote/trunk/src/java/phenote/gui/TermInfo.java phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java phenote/trunk/src/java/phenote/gui/field/FreeTextField.java phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java Added Paths: ----------- phenote/trunk/src/java/phenote/gui/ErrorEvent.java phenote/trunk/src/java/phenote/gui/ErrorListener.java phenote/trunk/src/java/phenote/gui/ErrorManager.java phenote/trunk/src/java/phenote/gui/GuiUtil.java phenote/trunk/src/java/phenote/gui/field/IdFieldGui.java Modified: phenote/trunk/conf/flybase.cfg =================================================================== --- phenote/trunk/conf/flybase.cfg 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/conf/flybase.cfg 2007-08-01 17:02:45 UTC (rev 783) @@ -31,7 +31,7 @@ <ns:field name="Pub" syntax-abbrev="PUB"/> - <ns:field name="Genotype" syntax-abbrev="GT" type="free_text"/> + <ns:field name="Genotype" syntax-abbrev="GT" type="FREE_TEXT"/> <ns:field name="Genetic Context" syntax-abbrev="GC"> <ns:ontology file="context.obo"/> Modified: phenote/trunk/conf/ncbo.cfg =================================================================== --- phenote/trunk/conf/ncbo.cfg 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/conf/ncbo.cfg 2007-08-01 17:02:45 UTC (rev 783) @@ -29,16 +29,18 @@ listed here. If a repository location is given as the filename (ie "http://www.your-repository.com/your_obo_file.obo"), then this site will be checked for updates --> + + <!-- type="ID" ?? would require a colon for every entry --> + <ns:field name="Pub" datatag="PUB" enable="true" + desc="For publication references. Format ID:1234567; Typically PMID:1234567."/> - <ns:field name="Pub" syntax-abbrev="PUB" enable="true" desc="For publication references. Format ID:1234567; Typically PMID:1234567."/> + <ns:field name="Genotype" datatag="GT" enable="true" desc="Genotype or genotype ID"/> - <ns:field name="Genotype" syntax-abbrev="GT" enable="true" desc="Genotype or genotype ID"/> - - <ns:field name="Genetic Context" syntax-abbrev="GC" enable="true"> + <ns:field name="Genetic Context" datatag="GC" enable="true"> <ns:ontology name="Genetic Context" file="context.obo"/> </ns:field> - <ns:field name="Entity" syntax-abbrev="E" enable="true"> + <ns:field name="Entity" datatag="E" enable="true"> <ns:ontology name="Relationship" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/OBO_REL/ro.obo" is-postcomp-rel="true"/> <ns:ontology name="FMA" file="http://obo.svn.sourceforge.net/viewvc/*checkout*/obo/fma-conversion/trunk/fma_obo.obo"/> <ns:ontology name="EHDAA" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/gross_anatomy/animal_gross_anatomy/human/human-dev-anat-abstract.obo"/> @@ -49,12 +51,12 @@ <ns:ontology name="CHEBI" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/chemical/chebi.obo"/> </ns:field> - <ns:field name="Quality" syntax-abbrev="Q" enable="true"> + <ns:field name="Quality" datatag="Q" enable="true"> <ns:ontology name="PATO" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/quality.obo"/> <ns:ontology name="MP" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/mammalian_phenotype.obo"/> </ns:field> - <ns:field name="Add'l Entity" syntax-abbrev="E2" enable="true" desc="To be used when using relational qualities"> + <ns:field name="Add'l Entity" datatag="E2" enable="true" desc="To be used when using relational qualities"> <ns:ontology name="Relationship" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/OBO_REL/ro.obo" is-postcomp-rel="true"/> <ns:ontology name="FMA" file="http://obo.svn.sourceforge.net/viewvc/*checkout*/obo/fma-conversion/trunk/fma_obo.obo"/> <ns:ontology name="EHDAA" file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/gross_anatomy/animal_gross_anatomy/human/human-dev-anat-abstract.obo"/> @@ -65,11 +67,11 @@ file="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/anatomy/cell_type/cell.obo"/> </ns:field> - <ns:field name="Abnormal" syntax-abbrev="Tag" enable="true" desc="To specify if the phenotype statement is reflecting an abnormal/normal phenotype; most likely a mutant phenotype will be abnormal, except for exceptional cases of normality"> + <ns:field name="Abnormal" datatag="Tag" enable="true" desc="To specify if the phenotype statement is reflecting an abnormal/normal phenotype; most likely a mutant phenotype will be abnormal, except for exceptional cases of normality"> <ns:ontology name="Abnormal" file="quality.obo" slim="abnormal_slim"/> </ns:field> - <ns:field name="Description" syntax-abbrev="Desc" enable="true" desc="Some kind of free text description, actual sentence, note to yourself, etc."/> + <ns:field name="Description" datatag="Desc" enable="true" desc="Some kind of free text description, actual sentence, note to yourself, etc."/> <!-- ******************** REVISION HISTORY *********************** --> <!-- 05.20.2007 - Latest update changes relationship.obo to ro.obo; included ehdaa repository; Modified: phenote/trunk/conf/phenote-config.rnc =================================================================== --- phenote/trunk/conf/phenote-config.rnc 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/conf/phenote-config.rnc 2007-08-01 17:02:45 UTC (rev 783) @@ -86,7 +86,8 @@ ## whether field is free text, (ontology)term, int, ID, if obo file is ## added term is assumed, otherewise free_text is the default ## ID requires a : and no whitespace - attribute type { "free_text" | "term" | "int" | "ID" }, + ## free_text is just for backward compatibility - phase out + attribute type { "FREE_TEXT" | "TERM" | "INT" | "ID" | "free_text" }, ## file is for single ontology - rename ontology_file? ## phase these 4 out - redundant with single ontology attribute tab { xsd:string }, Modified: phenote/trunk/conf/phenote-config.xsd =================================================================== --- phenote/trunk/conf/phenote-config.xsd 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/conf/phenote-config.xsd 2007-08-01 17:02:45 UTC (rev 783) @@ -102,10 +102,11 @@ <xs:attribute name="type" use="required"> <xs:simpleType> <xs:restriction base="xs:token"> + <xs:enumeration value="FREE_TEXT"/> + <xs:enumeration value="TERM"/> + <xs:enumeration value="INT"/> + <xs:enumeration value="ID"/> <xs:enumeration value="free_text"/> - <xs:enumeration value="term"/> - <xs:enumeration value="int"/> - <xs:enumeration value="ID"/> </xs:restriction> </xs:simpleType> </xs:attribute> Modified: phenote/trunk/conf/worm.cfg =================================================================== --- phenote/trunk/conf/worm.cfg 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/conf/worm.cfg 2007-08-01 17:02:45 UTC (rev 783) @@ -32,7 +32,7 @@ <field name="Object Name" enable="true" groups="referenceMaker default"/> - <field name="Reference" datatag="Ref" type="ontology" groups="referenceMaker default"/> + <field name="Reference" datatag="Ref" type="TERM" groups="referenceMaker default"/> <field name="Pub" datatag="Pub" enable="true" groups="referenceMaker"> <ontology name="Pub" file="http://tazendra.caltech.edu/~azurebrd/cgi-bin/forms/paper_obo.cgi"/> Modified: phenote/trunk/jars/phenoteconfigbeans.jar =================================================================== (Binary files differ) Modified: phenote/trunk/src/java/phenote/config/FieldConfig.java =================================================================== --- phenote/trunk/src/java/phenote/config/FieldConfig.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/config/FieldConfig.java 2007-08-01 17:02:45 UTC (rev 783) @@ -104,6 +104,22 @@ return getLabel(); } + private Field.Type.Enum getType() { + // if not configged default to term if have ontols, otherwise free text + if (fieldBean.getType() == null) { + if (hasOntologies()) fieldBean.setType(Field.Type.TERM); + else fieldBean.setType(Field.Type.FREE_TEXT); + } + return fieldBean.getType(); + } + + public boolean isID() { + if (getType() == null) return false; + return getType() == Field.Type.ID; + } + + + //public String getLabel() { return label; } public String getDesc() { return desc; } @@ -239,7 +255,7 @@ configs - so this is funny but its actually not funny */ public CharField getCharField() { if (charField == null) - charField = new CharField(getLabel(),getDataTag()); + charField = new CharField(getLabel(),getDataTag(),getType()); return charField; } boolean hasCharField(CharField cf) { return charField == cf; } Modified: phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-08-01 17:02:45 UTC (rev 783) @@ -557,9 +557,10 @@ private void initOntolsSeparateOboSessions() { // getFieldConfigList gives enabled fields - not disabled for (FieldConfig fieldConfig : cfg().getEnbldFieldCfgs()) { - if (!fieldConfig.isEnabled()) continue; // not necasary actually - CharField cf = new CharField(fieldConfig.getLabel(),fieldConfig.getDataTag()); - fieldConfig.setCharField(cf); + //if (!fieldConfig.isEnabled()) continue; // not necasary actually + CharField cf = fieldConfig.getCharField(); + //new CharField(fieldConfig.getLabel(),fieldConfig.getDataTag()); + //fieldConfig.setCharField(cf); // ONTOLOGIES if (fieldConfig.hasOntologies()) { Modified: phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java 2007-08-01 17:02:45 UTC (rev 783) @@ -79,6 +79,8 @@ return cf.isFreeText();//!cf.hasOntologies(); } + + // this may be more general than just this class class BadCharException extends Exception { BadCharException(String m) { super(m); } @@ -86,7 +88,7 @@ private String makeValue(CharFieldValue v) { if (v.isTerm()) return makeTermValue(v.getOboClass()); - return v.getName(); + return v.getName()+" "; // just in case } private String makeTermValue(OBOClass term) { Modified: phenote/trunk/src/java/phenote/datamodel/CharField.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-08-01 17:02:45 UTC (rev 783) @@ -6,6 +6,9 @@ import org.geneontology.oboedit.datamodel.OBOClass; import org.geneontology.oboedit.datamodel.OBOSession; +// type is from xmlbean Field?? +import phenote.config.xml.FieldDocument.Field.Type; + // or just Field? or CharField? // CharField doesnt handle instance data, just specifies what ontologies are // associated with what parts of the generic character @@ -22,8 +25,10 @@ private boolean postCompAllowed=false; private Ontology postCompRelOntol; // RELATIONSHIP? DANGLER? INSTANCE? use CharFieldEnum? - public enum Type { TERM, FREE_TEXT, INT }; - private Type type = Type.FREE_TEXT; // free text default, bkwrd compat + // should we actually just use xmlbean + // phenote.config.xml.FieldDocument.Field.Type??? + //public enum Type { TERM, FREE_TEXT, INT, ID }; + private Type.Enum type = Type.FREE_TEXT; // free text default, bkwrd compat // index? orderNumber? for order in gui/datamodel? /** used for relationship */ @@ -32,13 +37,14 @@ } /** a generic field with no char field enum - get hip */ - public CharField(String name,String tag) { + public CharField(String name,String tag,Type.Enum type) { this.name = name; this.tag = tag; + if (type != null) this.type = type; } /** part of constructor? probably */ - public void setType(Type t) { + public void setType(Type.Enum t) { this.type = t; } @@ -102,6 +108,8 @@ return type == Type.TERM; } + public boolean isID() { return type == Type.ID; } + public boolean hasOntologies() { return ontologyList != null && !ontologyList.isEmpty(); } Added: phenote/trunk/src/java/phenote/gui/ErrorEvent.java =================================================================== --- phenote/trunk/src/java/phenote/gui/ErrorEvent.java (rev 0) +++ phenote/trunk/src/java/phenote/gui/ErrorEvent.java 2007-08-01 17:02:45 UTC (rev 783) @@ -0,0 +1,16 @@ +package phenote.gui; + +import java.util.EventObject; + +public class ErrorEvent extends EventObject { + + private String message; + + public ErrorEvent(Object source,String m) { + super(source); + message = m; + } + + public String getMsg() { return message; } + +} Added: phenote/trunk/src/java/phenote/gui/ErrorListener.java =================================================================== --- phenote/trunk/src/java/phenote/gui/ErrorListener.java (rev 0) +++ phenote/trunk/src/java/phenote/gui/ErrorListener.java 2007-08-01 17:02:45 UTC (rev 783) @@ -0,0 +1,5 @@ +package phenote.gui; + +public interface ErrorListener { + public void handleError(ErrorEvent e); +} Added: phenote/trunk/src/java/phenote/gui/ErrorManager.java =================================================================== --- phenote/trunk/src/java/phenote/gui/ErrorManager.java (rev 0) +++ phenote/trunk/src/java/phenote/gui/ErrorManager.java 2007-08-01 17:02:45 UTC (rev 783) @@ -0,0 +1,29 @@ +package phenote.gui; + +// dataadapter?? datamodel?? + +import java.util.ArrayList; +import java.util.List; + +public class ErrorManager { + + // group based?? separate managers for sep groups?? for now just 1 + private static ErrorManager singleton; + private List<ErrorListener> errorListeners = new ArrayList<ErrorListener>(2); + + public static ErrorManager inst() { + if (singleton == null) singleton = new ErrorManager(); + return singleton; + } + + public void error(ErrorEvent e) { + for (ErrorListener l : errorListeners) { + l.handleError(e); + } + } + + public void addErrorListener(ErrorListener el) { + errorListeners.add(el); + } + +} Added: phenote/trunk/src/java/phenote/gui/GuiUtil.java =================================================================== --- phenote/trunk/src/java/phenote/gui/GuiUtil.java (rev 0) +++ phenote/trunk/src/java/phenote/gui/GuiUtil.java 2007-08-01 17:02:45 UTC (rev 783) @@ -0,0 +1,40 @@ +package phenote.gui; + +import java.awt.Color; +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.Timer; + +public class GuiUtil { + + + public static void doBlinker(Component c) { + GuiUtil g = new GuiUtil(); // is this silly? + g.doBlinkerInst(c); // ?? + } + + private void doBlinkerInst(Component c) { + Blinker b = new Blinker(c); + Timer timer = new Timer(300,b); // 300 ms?? + b.setTimer(timer); + timer.start(); + } + + private class Blinker implements ActionListener { + private int counter = 0; + private Timer timer; + + private Component comp; + private Blinker(Component c) { comp = c; } + + public void actionPerformed(ActionEvent e) { + Color c = Color.RED; + if (++counter % 2 == 0) c = Color.WHITE; + comp.setBackground(c); + if (counter == 4) timer.stop(); + } + private void setTimer(Timer t) { timer = t; } + } + +} Modified: phenote/trunk/src/java/phenote/gui/TermInfo.java =================================================================== --- phenote/trunk/src/java/phenote/gui/TermInfo.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/gui/TermInfo.java 2007-08-01 17:02:45 UTC (rev 783) @@ -65,6 +65,7 @@ public TermInfo(SelectionManager selManager) { this.selectionManager = selManager; this.selectionManager.addTermSelectionListener(new InfoTermSelectionListener()); + ErrorManager.inst().addErrorListener(new InfoErrorListener()); } public JComponent getComponent() { @@ -163,7 +164,8 @@ // } /** Fires use term event to use term listener with currently browsed term when - useTermButton is pressed */ + useTermButton is pressed - i think this causes the model to be edited? + TermCompList listens for */ private class UseTermActionListener implements ActionListener { public void actionPerformed(ActionEvent e) { //commitTerm(); @@ -328,6 +330,16 @@ catch (TermNotFoundException ex) { return; } } } + + private class InfoErrorListener implements ErrorListener { + public void handleError(ErrorEvent e) { + GuiUtil.doBlinker(textArea); // and/or termField? + GuiUtil.doBlinker(termField); + textArea.setText(e.getMsg()); + termField.setText("ERROR!"); + } + } + } // /** put present term into current character - not used yet... Modified: phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-08-01 17:02:45 UTC (rev 783) @@ -62,13 +62,16 @@ /** CharFieldGui for main window not post comp box - factory method */ static CharFieldGui makeCharFieldGui(CharField charField) { - if (charField.hasOntologies()) { + if (charField.isTerm()) { //hasOntologies()) { //return new TermCompList(charField,sp,true); // enable listeners TermCompList t = new TermCompList(charField); //t.setSearchParams(sp); t.allowPostCompButton(true); return t; } + else if (charField.isID()) { + return new IdFieldGui(charField); + } else { FreeTextField f = new FreeTextField(charField); return f; Modified: phenote/trunk/src/java/phenote/gui/field/FreeTextField.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/FreeTextField.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/gui/field/FreeTextField.java 2007-08-01 17:02:45 UTC (rev 783) @@ -1,5 +1,8 @@ package phenote.gui.field; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.Color; import java.awt.Component; import java.awt.Point; import java.awt.Toolkit; @@ -15,9 +18,16 @@ import java.awt.event.MouseListener; import java.util.List; +import javax.swing.InputVerifier; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JOptionPane; import javax.swing.JPopupMenu; import javax.swing.JTextField; import javax.swing.KeyStroke; +//import javax.swing.SwingUtilities; +import javax.swing.Timer; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.text.DefaultEditorKit; @@ -29,8 +39,12 @@ import phenote.datamodel.CharField; import phenote.datamodel.CharacterI; import phenote.edit.CompoundTransaction; +import phenote.gui.ErrorEvent; +import phenote.gui.ErrorManager; import phenote.gui.FieldRightClickMenu; +import phenote.gui.GuiUtil; import phenote.gui.selection.CharSelectionEvent; +import phenote.main.Phenote; // should this be a subclass of charfieldGui? maybe? @@ -55,10 +69,20 @@ MouseListener popupListener = new PopupListener(popup); textField.addMouseListener(popupListener); + if (hasInputVerifier()) + textField.setInputVerifier(getInputVerifier()); + //textField.addKeyListener(new TextKeyListener()); loadKeyMap(); // mac cut copy paste } + protected boolean hasInputVerifier() { + return getInputVerifier() != null; + } + + /** overridden by subclasses that verify input (IdFieldGui, IntFieldGui...) */ + protected InputVerifier getInputVerifier() { return null; } + private static final int shortcut = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); @@ -139,6 +163,7 @@ } } + // whats this about??? private class PopupListener extends MouseAdapter { JPopupMenu popup; @@ -199,8 +224,27 @@ // if only updating gui (multi select clear) then dont update model if (updateGuiOnly()) return; if (!guiTextHasChanged) return; // gui hasnt been edited + if (!verify()) { + //JOptionPane.showMessageDialog(null,getConstraintFailureMsg(),"Input Error", + // JOptionPane.ERROR_MESSAGE); +// try { SwingUtilities.invokeLater(new ErrMsgThread()); } // invokeAndWait +// catch (Exception e) { log().error("err msg thread ex "+e); } + //fireErrorEvent(getConstraintFailureMsg()); + return; // error message? + } + String v = getText(); - String v = getText(); + // if constraints fail - ie IDField doesnt have : - then passesConstraints is + // responsible for putting up error message? + // InputVerifier should take care of this? +// if (!passesConstraints(v)) { +// displayConstraintFailureMsg(); //?? +// guiTextHasChanged = false; // ????? +// textField.requestFocus(false); // false - not temporary +// // if a new row was selected old row should get selected somehow.... +// return; // failed - dont edit model - clear out field? +// } + //CompoundTransaction ct = new CompoundTransaction(chars,getCharFieldEnum(),v); CompoundTransaction ct = CompoundTransaction.makeUpdate(chars,getCharField(),v); this.getEditManager().updateModel(this,ct);//charFieldGui,ct); // cfg source @@ -208,9 +252,82 @@ } - /** selection (from table) comes in before focus lost! update model with + //private Timer timer; + + protected void fireErrorEvent(String m) { +// textField.setBackground(java.awt.Color.RED); +// textField.repaint(); +// Blinker b = new Blinker(); +// Timer timer = new Timer(300,b); +// b.setTimer(timer); +// timer.start(); + GuiUtil.doBlinker(textField); + ErrorManager.inst().error(new ErrorEvent(this,m)); +// textField.repaint(); +// try { Thread.sleep(1000); } catch (InterruptedException e) {} +// textField.setBackground(java.awt.Color.BLUE); +// textField.repaint(); +// try { Thread.sleep(1000); } catch (InterruptedException e) {} +// textField.setBackground(java.awt.Color.RED); + } + + private class Blinker implements ActionListener { + private int counter = 0; + private Timer timer; + public void actionPerformed(ActionEvent e) { + Color c = Color.RED; + if (counter++ % 2 == 0) c = Color.WHITE; + textField.setBackground(c); + if (counter == 5) timer.stop(); + } + private void setTimer(Timer t) { timer = t; } + } + +// private class ErrMsgThread implements Runnable { +// public void run() { +// JOptionPane.showMessageDialog(null,getConstraintFailureMsg(),"ID Input Error", +// JOptionPane.ERROR_MESSAGE); +// } +// } + + protected boolean verify() { + if (!hasInputVerifier()) return true; + return getInputVerifier().verify(textField); + } + + // no constraints for free text - subclasses override this + // maybe there should be an abstract method/class? +// protected boolean passesConstraints(String input) { +// return true; +// } + +// private void displayConstraintFailureMsg() { +// boolean modal = false; //true; +// final JDialog d = new JDialog(Phenote.getPhenote().getFrame(),"Input Error",modal); +// // causes it to hang +// //JOptionPane.showInternalMessageDialog(d,getConstraintFailureMsg(),"Input Error", +// // JOptionPane.ERROR_MESSAGE); +// // causes table selection event to not go through(???) +// //JOptionPane.showMessageDialog(null,getConstraintFailureMsg(),"Input Error", +// // JOptionPane.ERROR_MESSAGE); +// d.add(new JLabel(getConstraintFailureMsg()),"North"); +// JButton ok = new JButton("OK"); +// ok.addActionListener(new ActionListener() { +// public void actionPerformed(ActionEvent e) { +// System.out.println("disposing "+d); +// d.dispose();}}); +// d.add(ok,"South"); +// d.setAlwaysOnTop(true); +// d.pack(); +// d.show(); +// } + + protected String getConstraintFailureMsg() { return null; } + + /** selection (from selMan/table) comes in before focus lost! update model with previous selection */ protected void charactersSelected(CharSelectionEvent e) { + //new Throwable().printStackTrace(); if (e.hasPreviouslySelectedChars()) updateModel(e.getPreviouslySelectedChars()); super.charactersSelected(e); // CharFieldGui @@ -236,7 +353,7 @@ } private Logger log; - private Logger log() { + protected Logger log() { if (log == null) log = Logger.getLogger(getClass()); return log; } Added: phenote/trunk/src/java/phenote/gui/field/IdFieldGui.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/IdFieldGui.java (rev 0) +++ phenote/trunk/src/java/phenote/gui/field/IdFieldGui.java 2007-08-01 17:02:45 UTC (rev 783) @@ -0,0 +1,66 @@ +package phenote.gui.field; + +import javax.swing.InputVerifier; +import javax.swing.JComponent; +import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; + +import phenote.datamodel.CharField; + +/** for now this is just a free text field that checks if theres a ":" present + eventually may get more savvy with option of prepending an id prefix and + using OBOInstance instead of String */ + +class IdFieldGui extends FreeTextField { + + private final static String ERR = "Input string must have a colon(':') for ID field"; + + private InputVerifier idVerifier;//=new IdInputVerifier(); //init after getInVer! + + IdFieldGui(CharField cf) { super(cf); } + + protected boolean passesConstraints(String input) { + //new Throwable().printStackTrace(); + //if (true) return true; + return input.contains(":"); + } + + protected String getConstraintFailureMsg() { + return ERR+" for field "+getLabel()+" value "+getText(); + } + + protected InputVerifier getInputVerifier() { + if (idVerifier==null) idVerifier = new IdInputVerifier(); + return idVerifier; + } + + private class IdInputVerifier extends InputVerifier { + /** Calls verify(input) to ensure that the input is valid. */ + public boolean shouldYieldFocus(JComponent input) { + if (!verify(input)) { + fireErrorEvent(getConstraintFailureMsg()); +// try { SwingUtilities.invokeLater(new ErrMsgThread()); } // invokeAndWait +// catch (Exception e) { log().error("err msg thread ex "+e); } + // this causes row selection to not go through + //JOptionPane.showMessageDialog(null,getConstraintFailureMsg(),"ID Input Error", + // JOptionPane.ERROR_MESSAGE); + } + return verify(input); // for now - should put up error message on failure + } + + private class ErrMsgThread implements Runnable { + public void run() { + JOptionPane.showMessageDialog(null,getConstraintFailureMsg(),"ID Input Error", + JOptionPane.ERROR_MESSAGE); + } + } + + public boolean verify(JComponent input) { + //new Throwable().printStackTrace(); + //System.out.println("verify: "+getText()+" "+getText().contains(":")); + if (getText() == null || getText().trim().equals("")) return true; + return getText().contains(":"); + } + } + +} Modified: phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java =================================================================== --- phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java 2007-08-01 16:41:40 UTC (rev 782) +++ phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java 2007-08-01 17:02:45 UTC (rev 783) @@ -108,6 +108,7 @@ // l.characterSelected(e); // } + // called from CharacterTablePanel and CharacterTemplateController public void selectCharacters(Object src, List<CharacterI> chars) { selectedCharList = chars; //if (chars.size() == 1) { selectCharacter(src,chars.get(0)); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2007-08-01 16:41:38
|
Revision: 782 http://obo.svn.sourceforge.net/obo/?rev=782&view=rev Author: balhoff Date: 2007-08-01 09:41:40 -0700 (Wed, 01 Aug 2007) Log Message: ----------- Fixed layout of field panel so that it starts out at a reasonable width when the term history view is showing. Modified Paths: -------------- phenote/trunk/src/java/phenote/main/Phenote.java Modified: phenote/trunk/src/java/phenote/main/Phenote.java =================================================================== --- phenote/trunk/src/java/phenote/main/Phenote.java 2007-07-28 00:03:27 UTC (rev 781) +++ phenote/trunk/src/java/phenote/main/Phenote.java 2007-08-01 16:41:40 UTC (rev 782) @@ -35,7 +35,6 @@ import phenote.dataadapter.CharacterListManager; import phenote.dataadapter.OntologyDataAdapter; import phenote.datamodel.CharacterListI; -import phenote.datamodel.OntologyManager; import phenote.gui.CharacterTablePanel; import phenote.gui.GridBagUtil; import phenote.gui.MenuManager; @@ -333,7 +332,8 @@ infoHistoryPanel.add(selectionHistory.getComponent(),ugbc); JSplitPane innerSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, groupFieldPanel, infoHistoryPanel); - + innerSplitPane.setDividerLocation(700); + characterTablePanel = new CharacterTablePanel(group.getName()); JSplitPane outerSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, innerSplitPane, characterTablePanel); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-07-28 00:03:24
|
Revision: 781 http://obo.svn.sourceforge.net/obo/?rev=781&view=rev Author: azurebrd Date: 2007-07-27 17:03:27 -0700 (Fri, 27 Jul 2007) Log Message: ----------- WormAdapter now checks which group query is calling, and gets the appropriate values in queryPostgresCharacterList Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-07-27 16:58:25 UTC (rev 780) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-07-28 00:03:27 UTC (rev 781) @@ -371,110 +371,116 @@ return default_value; } - private CharacterListI queryPostgresCharacterList(CharacterListI charList, Statement s, String joinkey, int boxI, int colI) { + private CharacterListI queryPostgresCharacterList(String group, CharacterListI charList, Statement s, String joinkey, int boxI, int colI) { // populate a phenote character based on postgres value by joinkey, then append to character list try { Character c1 = new Character(); // create a new character for a phenote row String alleleColumn = joinkey+" - "+boxI+" - "+colI; c1.setValue("Object Name",alleleColumn); // assign the allele and the column - String postgres_value = "No postgres value assigned"; - String postgres_table = "app_term"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - String phenotype_match = find("(WBPhenotype[0-9]*)", postgres_value); // Find a WBPhenotype followed by any amount of digits - if (phenotype_match != null) { postgres_value = phenotype_match; } // query for this, otherwise keep the default value - if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Phenotype",postgres_value); } // assign the queried value -// c1.setValue("Phenotype",postgres_value); // assign the queried value - postgres_table = "app_type"; postgres_value = "No postgres value assigned"; + + + String postgres_table = "app_type"; String postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, 0, 0); c1.setValue("Object Type",postgres_value); // assign the queried value - postgres_table = "app_intx_desc"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - c1.setValue("Genetic Intx Desc",postgres_value); // assign the queried value - postgres_table = "app_paper"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - String paper_match = find("(WBPaper[0-9]*)", postgres_value); // Find a WBPaper followed by any amount of digits - if (paper_match != null) { postgres_value = paper_match; } // query for this, otherwise keep the default value -// c1.setValue("Pub",postgres_value); // assign the queried value - if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Pub",postgres_value); } // assign the queried value - postgres_table = "app_person"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - String person_match = find("(WBPerson[0-9]*)", postgres_value); // Find a WBPerson followed by any amount of digits - if (person_match != null) { postgres_value = person_match; } // query for this, otherwise keep the default value - if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Person",postgres_value); } // assign the queried value - postgres_table = "app_phenotype"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - c1.setValue("NBP",postgres_value); // assign the queried value - postgres_table = "app_remark"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); - c1.setValue("Reference Remark",postgres_value); // assign the queried value - postgres_table = "app_curator"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Curator",postgres_value); // assign the queried value - postgres_table = "app_phen_remark"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Phenotype Remark",postgres_value); // assign the queried value - postgres_table = "app_anat_term"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); -// c1.setValue("Anatomy",postgres_value); // this doesn't work, assigning whatever term name(s) is in postgres -// c1.setValue("Anatomy","WBbt:0004758"); // this works, assigning a term ID - postgres_table = "app_lifestage"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); -// c1.setValue("Life Stage",postgres_value); // assign the queried value - postgres_table = "app_nature"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Allele Nature",postgres_value); // assign the queried value - postgres_table = "app_func"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Functional Change",postgres_value); // assign the queried value - postgres_table = "app_temperature"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Temperature",postgres_value); // assign the queried value - postgres_table = "app_preparation"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Treatment",postgres_value); // assign the queried value - postgres_table = "app_penetrance"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance",postgres_value); // assign the queried value - postgres_table = "app_percent"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance Remark",postgres_value); // assign the queried value - postgres_table = "app_range"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance Range Start",postgres_value); // assign the queried value - postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Penetrance Range End",postgres_value); // assign the queried value - postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Quantity",postgres_value); // assign the queried value - postgres_table = "app_quantity_remark"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Quantity Remark",postgres_value); // assign the queried value - postgres_table = "app_heat_sens"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Heat Sensitive",postgres_value); // assign the queried value - postgres_table = "app_heat_degree"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Heat Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "app_cold_sens"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Cold Sensitive",postgres_value); // assign the queried value - postgres_table = "app_cold_degree"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Cold Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "app_mat_effect"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Maternal Effect",postgres_value); // assign the queried value - postgres_table = "app_pat_effect"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Paternal Effect",postgres_value); // assign the queried value - postgres_table = "app_genotype"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Genotype",postgres_value); // assign the queried value - postgres_table = "app_strain"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); - c1.setValue("Strain",postgres_value); // assign the queried value + if (group.equals("default")) { // these values only go to the Main tab + postgres_value = "No postgres value assigned"; + postgres_table = "app_term"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + String phenotype_match = find("(WBPhenotype[0-9]*)", postgres_value); // Find a WBPhenotype followed by any amount of digits + if (phenotype_match != null) { postgres_value = phenotype_match; } // query for this, otherwise keep the default value + if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Phenotype",postgres_value); } // assign the queried value +// c1.setValue("Phenotype",postgres_value); // assign the queried value + postgres_table = "app_intx_desc"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + c1.setValue("Genetic Intx Desc",postgres_value); // assign the queried value + postgres_table = "app_curator"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Curator",postgres_value); // assign the queried value + postgres_table = "app_phen_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Phenotype Remark",postgres_value); // assign the queried value + postgres_table = "app_anat_term"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); +// c1.setValue("Anatomy",postgres_value); // this doesn't work, assigning whatever term name(s) is in postgres +// c1.setValue("Anatomy","WBbt:0004758"); // this works, assigning a term ID + postgres_table = "app_lifestage"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); +// c1.setValue("Life Stage",postgres_value); // assign the queried value + postgres_table = "app_nature"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Allele Nature",postgres_value); // assign the queried value + postgres_table = "app_func"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Functional Change",postgres_value); // assign the queried value + postgres_table = "app_temperature"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Temperature",postgres_value); // assign the queried value + postgres_table = "app_preparation"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Treatment",postgres_value); // assign the queried value + postgres_table = "app_penetrance"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance",postgres_value); // assign the queried value + postgres_table = "app_percent"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance Remark",postgres_value); // assign the queried value + postgres_table = "app_range"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance Range Start",postgres_value); // assign the queried value + postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Penetrance Range End",postgres_value); // assign the queried value + postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Quantity",postgres_value); // assign the queried value + postgres_table = "app_quantity_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Quantity Remark",postgres_value); // assign the queried value + postgres_table = "app_heat_sens"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Heat Sensitive",postgres_value); // assign the queried value + postgres_table = "app_heat_degree"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Heat Sensitive Degree",postgres_value); // assign the queried value + postgres_table = "app_cold_sens"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Cold Sensitive",postgres_value); // assign the queried value + postgres_table = "app_cold_degree"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Cold Sensitive Degree",postgres_value); // assign the queried value + postgres_table = "app_mat_effect"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Maternal Effect",postgres_value); // assign the queried value + postgres_table = "app_pat_effect"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Paternal Effect",postgres_value); // assign the queried value + postgres_table = "app_genotype"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Genotype",postgres_value); // assign the queried value + postgres_table = "app_strain"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + c1.setValue("Strain",postgres_value); // assign the queried value + } + else if (group.equals("referenceMaker")) { // these values only go to the referenceMaker tab + postgres_table = "app_paper"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + String paper_match = find("(WBPaper[0-9]*)", postgres_value); // Find a WBPaper followed by any amount of digits + if (paper_match != null) { postgres_value = paper_match; } // query for this, otherwise keep the default value +// c1.setValue("Pub",postgres_value); // assign the queried value + if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Pub",postgres_value); } // assign the queried value + postgres_table = "app_person"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + String person_match = find("(WBPerson[0-9]*)", postgres_value); // Find a WBPerson followed by any amount of digits + if (person_match != null) { postgres_value = person_match; } // query for this, otherwise keep the default value + if (postgres_value == "No postgres value assigned") { } else { c1.setValue("Person",postgres_value); } // assign the queried value + postgres_table = "app_phenotype"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + c1.setValue("NBP",postgres_value); // assign the queried value + postgres_table = "app_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, 0); + c1.setValue("Reference Remark",postgres_value); // assign the queried value + } charList.add(c1); // add the character to the character list } catch (TermNotFoundException e) { @@ -489,6 +495,8 @@ // something like this....? // if (group.equals("default")) return queryForDefaultGroup(field,query) // else if (group.equals("referenceMaker")) return queryForReferenceMaker(field,query); + // if (group.equals("default")) { System.out.println("Querying group default field "+field+" query "+query+" end"); } + // else if (group.equals("referenceMaker")) { System.out.println("Querying group referenceMaker field "+field+" query "+query+" end"); } // String m = "Worm adapter query not yet implemented. field: "+field+" query: "+query; // JOptionPane.showMessageDialog(null,m,"Worm stub",JOptionPane.INFORMATION_MESSAGE); @@ -537,7 +545,7 @@ se.printStackTrace(); System.exit(1); } for (int boxI=1; boxI<boxes+1; boxI++) { // for each of those columns for (int colI=1; colI<columns+1; colI++) { // for each of those columns - charList = queryPostgresCharacterList(charList, s, joinkey, boxI, colI); } } + charList = queryPostgresCharacterList(group, charList, s, joinkey, boxI, colI); } } return charList; } // if there is a match } else if (field.equals(pubString)) { // if querying the publication, get paper data @@ -565,7 +573,8 @@ System.out.println("We got an exception while executing our app_paper joinkey query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } try { if (rs.next()) { foundPaper++; } } catch (SQLException se) { - System.out.println("We got an exception while getting a publication query result joinkey app_paper :this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } + System.out.println("We got an exception while getting a publication query result joinkey app_paper :this shouldn't happen: we've done something really bad."); + se.printStackTrace(); System.exit(1); } if (foundPaper <= 0) { throw new DataAdapterEx("Worm query of "+query+" of field "+field+" has no match in postgres"); } // if there is no match for the allele in postgres else { ResultSet rs2 = null; // initialize result of query @@ -581,24 +590,18 @@ catch (SQLException se) { System.out.println("We got an exception while executing our app_term query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } -// if (rs.getInt(2) > columns) { columns = rs.getInt(2); } } } // assign the highest number column for that allele to the number of columns -// catch (SQLException se) { -// System.out.println("We got an exception while getting a column/term joinkey "+joinkey+" result:this shouldn't happen: we've done something really bad."); -// se.printStackTrace(); System.exit(1); } -// for (int boxI=1; boxI<boxes+1; boxI++) { // for each of those columns -// for (int colI=1; colI<columns+1; colI++) { // for each of those columns -// charList = queryPostgresCharacterList(charList, s, joinkey, boxI, colI); } } - int columns = 0; try { while (rs3.next()) { // while there's data in postgres if (rs3.getInt(1) > columns) { columns = rs3.getInt(1); } } } // assign the highest number column for that allele to the number of columns catch (SQLException se) { - System.out.println("We got an exception while getting a publication query result column app_term :this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } + System.out.println("We got an exception while getting a publication query result column app_term :this shouldn't happen: we've done something really bad."); + se.printStackTrace(); System.exit(1); } for (int colI=1; colI<columns+1; colI++) { // for each of those columns - charList = queryPostgresCharacterList(charList, s, joinkey, boxI, colI); } + charList = queryPostgresCharacterList(group, charList, s, joinkey, boxI, colI); } } } catch (SQLException se) { - System.out.println("We got an exception while getting a publication query result joinkey, box app_paper :this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } + System.out.println("We got an exception while getting a publication query result joinkey, box app_paper :this shouldn't happen: we've done something really bad."); + se.printStackTrace(); System.exit(1); } return charList; } // end -- if there's a publication found in postgres This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-07-27 16:58:23
|
Revision: 780 http://obo.svn.sourceforge.net/obo/?rev=780&view=rev Author: mgibson Date: 2007-07-27 09:58:25 -0700 (Fri, 27 Jul 2007) Log Message: ----------- added ID type which should require a : and no whitespace Modified Paths: -------------- phenote/trunk/conf/phenote-config.rnc phenote/trunk/conf/phenote-config.xsd phenote/trunk/jars/phenoteconfigbeans.jar Modified: phenote/trunk/conf/phenote-config.rnc =================================================================== --- phenote/trunk/conf/phenote-config.rnc 2007-07-27 02:21:27 UTC (rev 779) +++ phenote/trunk/conf/phenote-config.rnc 2007-07-27 16:58:25 UTC (rev 780) @@ -76,17 +76,17 @@ field = element field { attribute enable { xsd:boolean }, - ##attribute name { "Pub" | "Genotype" | "Genetic Context" | "Entity" | "Quality" }, attribute name { xsd:string }, attribute colwidth { xsd:int }, attribute desc { xsd:string }, + ## tag for field, replaces syntax-abbrev + attribute datatag { xsd:string }, ## tag for field for pheno-syntax adapter - replaced by datatag attribute syntax-abbrev { xsd:string }, - ## tag for field, replaces syntax-abbrev - attribute datatag { xsd:string }, - ## whether field is free text or constrained by ontology - take out? - ## this is actually unnecasary - if there is no file free text is assumed - attribute type { "free_text" | "ontology" | "int" }, + ## whether field is free text, (ontology)term, int, ID, if obo file is + ## added term is assumed, otherewise free_text is the default + ## ID requires a : and no whitespace + attribute type { "free_text" | "term" | "int" | "ID" }, ## file is for single ontology - rename ontology_file? ## phase these 4 out - redundant with single ontology attribute tab { xsd:string }, Modified: phenote/trunk/conf/phenote-config.xsd =================================================================== --- phenote/trunk/conf/phenote-config.xsd 2007-07-27 02:21:27 UTC (rev 779) +++ phenote/trunk/conf/phenote-config.xsd 2007-07-27 16:58:25 UTC (rev 780) @@ -86,29 +86,26 @@ <xs:element minOccurs="0" maxOccurs="unbounded" ref="x:ontology"/> </xs:sequence> <xs:attribute name="enable" use="required" type="xs:boolean"/> - <xs:attribute name="name" use="required" type="xs:string"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="colwidth" use="required" type="xs:int"/> + <xs:attribute name="desc" use="required" type="xs:string"/> + <xs:attribute name="datatag" use="required" type="xs:string"> <xs:annotation> - <xs:documentation>attribute name { "Pub" | "Genotype" | "Genetic Context" | "Entity" | "Quality" },</xs:documentation> + <xs:documentation>tag for field, replaces syntax-abbrev</xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute name="colwidth" use="required" type="xs:int"/> - <xs:attribute name="desc" use="required" type="xs:string"/> <xs:attribute name="syntax-abbrev" use="required" type="xs:string"> <xs:annotation> <xs:documentation>tag for field for pheno-syntax adapter - replaced by datatag</xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute name="datatag" use="required" type="xs:string"> - <xs:annotation> - <xs:documentation>tag for field, replaces syntax-abbrev</xs:documentation> - </xs:annotation> - </xs:attribute> <xs:attribute name="type" use="required"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="free_text"/> - <xs:enumeration value="ontology"/> + <xs:enumeration value="term"/> <xs:enumeration value="int"/> + <xs:enumeration value="ID"/> </xs:restriction> </xs:simpleType> </xs:attribute> Modified: phenote/trunk/jars/phenoteconfigbeans.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |