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: <azu...@us...> - 2007-04-05 18:00:00
|
Revision: 466 http://svn.sourceforge.net/obo/?rev=466&view=rev Author: azurebrd Date: 2007-04-05 11:00:01 -0700 (Thu, 05 Apr 2007) Log Message: ----------- 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-04-04 23:26:47 UTC (rev 465) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-04-05 18:00:01 UTC (rev 466) @@ -54,15 +54,24 @@ for (CharacterI chr : charList.getList()) { // System.out.println("Chr "+chr+" end"); try { - String allele = chr.getValueString("Allele"); - int colI = 0; + String allele = chr.getValueString("Allele"); // get the allele value from the character, currently could have a column number + int colI = 0; // initialize column to zero String match = find(".* - ([0-9]+)", allele); // Find a tempname followed by space - space number - if (match != null) { colI = Integer.parseInt(match); } // get the column number + if (match != null) { colI = Integer.parseInt(match); } // get the column number if there is one match = find("(.*) - [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; - System.out.println( "Allele : "+allele+" end."); - System.out.println( "Column : "+colI+" end."); + String joinkey = allele; // 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"); } + catch (SQLException se) { + System.out.println("We got an exception while executing our app_term query: that probably means our column SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { if (rs.next()) { if (rs.getInt(1) > colI) { colI = rs.getInt(1); } } colI++; } // get the next highest number column for that allele + 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); } } +// System.out.println( "Allele : "+allele+" end."); +// System.out.println( "Column : "+colI+" end."); String app_paper = chr.getValueString("Pub"); String postgres_table = "app_paper"; String postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); @@ -468,7 +477,7 @@ try { rs = s.executeQuery("SELECT app_column FROM app_term WHERE joinkey = '"+joinkey+"' ORDER BY app_column DESC"); } catch (SQLException se) { System.out.println("We got an exception while executing our app_term query: that probably means our column SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { if (rs.getInt(1) > columns) { columns = rs.getInt(1); } } } // assign the highest number column for that allele to the number of columns + try { if (rs.next()) { if (rs.getInt(1) > columns) { columns = rs.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 column/term joinkey "+joinkey+" result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-04-04 23:26:56
|
Revision: 465 http://svn.sourceforge.net/obo/?rev=465&view=rev Author: azurebrd Date: 2007-04-04 16:26:47 -0700 (Wed, 04 Apr 2007) Log Message: ----------- 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-04-04 23:04:51 UTC (rev 464) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-04-04 23:26:47 UTC (rev 465) @@ -110,15 +110,15 @@ postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); if (postgres_value.equals(app_anat_term)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_anat_term); } // System.out.println( "Anatomy : "+app_anat_term+" end."); - String app_entity = chr.getValueString("Entity"); - postgres_table = "app_entity"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); - if (postgres_value.equals(app_entity)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_entity); } +// String app_entity = chr.getValueString("Entity"); +// postgres_table = "app_entity"; postgres_value = "No postgres value assigned"; +// postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); +// if (postgres_value.equals(app_entity)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_entity); } // System.out.println( "Entity : "+app_entity+" end."); - String app_quality = chr.getValueString("Quality"); - postgres_table = "app_quality"; postgres_value = "No postgres value assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); - if (postgres_value.equals(app_quality)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_quality); } +// String app_quality = chr.getValueString("Quality"); +// postgres_table = "app_quality"; postgres_value = "No postgres value assigned"; +// postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); +// if (postgres_value.equals(app_quality)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_quality); } // System.out.println( "Quality : "+app_quality+" end."); String app_lifestage = chr.getValueString("Stage"); postgres_table = "app_lifestage"; postgres_value = "No postgres value assigned"; @@ -160,6 +160,11 @@ postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); if (postgres_value.equals(app_range)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_range); } // System.out.println( "Penetrance Range : "+app_range+" end."); + String app_quantity = chr.getValueString("Quantity"); + postgres_table = "app_quantity"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_quantity)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_quantity); } +// System.out.println( "Quantity : "+app_quantity+" end."); String app_quantity_remark = chr.getValueString("Quantity Remark"); postgres_table = "app_quantity_remark"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); @@ -317,6 +322,8 @@ 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); } // System.out.println("Added in function charList term "+query+" column "+colI+"."); // comment out later + if (default_value == null) { default_value = "postgres value is null"; } + if (default_value == "") { default_value = "postgres value is blank"; } return default_value; } @@ -379,6 +386,9 @@ postgres_table = "app_range"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Penetrance Range",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, 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, colI); c1.setValue("Quantity Remark",postgres_value); // assign the queried value This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-04-04 23:04:52
|
Revision: 464 http://svn.sourceforge.net/obo/?rev=464&view=rev Author: azurebrd Date: 2007-04-04 16:04:51 -0700 (Wed, 04 Apr 2007) Log Message: ----------- 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-04-04 21:20:21 UTC (rev 463) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-04-04 23:04:51 UTC (rev 464) @@ -55,69 +55,164 @@ // System.out.println("Chr "+chr+" end"); try { String allele = chr.getValueString("Allele"); -// System.out.println( "Allele : "+allele+" end."); - String paper = chr.getValueString("Pub"); -// System.out.println( "Pub : "+paper+" end."); - String curator = chr.getValueString("Curator"); + int colI = 0; + String match = find(".* - ([0-9]+)", allele); // Find a tempname followed by space - space number + if (match != null) { colI = Integer.parseInt(match); } // get the column number + match = find("(.*) - [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; + System.out.println( "Allele : "+allele+" end."); + System.out.println( "Column : "+colI+" end."); + String app_paper = chr.getValueString("Pub"); + String postgres_table = "app_paper"; String postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_paper)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_paper); } +// System.out.println( "Pub : "+app_paper+" end."); + String app_curator = chr.getValueString("Curator"); + postgres_table = "app_curator"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_curator)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_curator); } // System.out.println( "Curator : "+curator+" end."); - String person = chr.getValueString("Person"); + String app_person = chr.getValueString("Person"); + postgres_table = "app_person"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_person)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_person); } // System.out.println( "Person : "+person+" end."); - String phen_text_remark = chr.getValueString("Phenotype Text Remark"); -// System.out.println( "Phenotype Text Remark : "+phen_text_remark+" end."); - String remark = chr.getValueString("Other Remark"); + String app_phenotype = chr.getValueString("Phenotype Text Remark"); + postgres_table = "app_phenotype"; postgres_value = "No postgres value assigned"; +// System.out.println( "Phenotype Text Remark : "+app_phenotype+" end."); + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); +// System.out.println( "Phenotype Text Remark Postgres : "+postgres_value+" end."); + if (postgres_value.equals(app_phenotype)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_phenotype); } +// System.out.println( "Phenotype Text Remark : "+app_phenotype+" end."); + String app_remark = chr.getValueString("Other Remark"); + postgres_table = "app_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_remark)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_remark); } // System.out.println( "Other Remark : "+remark+" end."); - String genetic_interaction = chr.getValueString("Genetic Interaction"); + String app_intx_desc = chr.getValueString("Genetic Interaction"); + postgres_table = "app_intx_desc"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_intx_desc)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_intx_desc); } // System.out.println( "Genetic Interaction : "+genetic_interaction+" end."); String app_term = chr.getValueString("Phenotype"); + postgres_table = "app_term"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_term)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_term); } // System.out.println( "Phenotype : "+app_term+" end."); String app_phen_remark = chr.getValueString("Phenotype Remark"); + postgres_table = "app_phen_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_phen_remark)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_phen_remark); } // System.out.println( "Phenotype Remark : "+app_phen_remark+" end."); String app_anat_term = chr.getValueString("Anatomy"); + postgres_table = "app_anat_term"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_anat_term)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_anat_term); } // System.out.println( "Anatomy : "+app_anat_term+" end."); - String entity = chr.getValueString("Entity"); -// System.out.println( "Entity : "+entity+" end."); - String quality = chr.getValueString("Quality"); -// System.out.println( "Quality : "+quality+" end."); + String app_entity = chr.getValueString("Entity"); + postgres_table = "app_entity"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_entity)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_entity); } +// System.out.println( "Entity : "+app_entity+" end."); + String app_quality = chr.getValueString("Quality"); + postgres_table = "app_quality"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_quality)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_quality); } +// System.out.println( "Quality : "+app_quality+" end."); String app_lifestage = chr.getValueString("Stage"); + postgres_table = "app_lifestage"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_lifestage)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_lifestage); } // System.out.println( "Stage : "+app_lifestage+" end."); String app_nature = chr.getValueString("Allele Nature"); + postgres_table = "app_nature"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_nature)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_nature); } // System.out.println( "Allele Nature : "+app_nature+" end."); String app_func = chr.getValueString("Functional Change"); + postgres_table = "app_func"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_func)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_func); } // System.out.println( "Functional Change : "+app_func+" end."); String app_temperature = chr.getValueString("Temperature"); + postgres_table = "app_temperature"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_temperature)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_temperature); } // System.out.println( "Temperature : "+app_temperature+" end."); String app_preparation = chr.getValueString("Preparation"); + postgres_table = "app_preparation"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_preparation)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_preparation); } // System.out.println( "Preparation : "+app_preparation+" end."); String app_penetrance = chr.getValueString("Penetrance"); + postgres_table = "app_penetrance"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_penetrance)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_penetrance); } // System.out.println( "Penetrance : "+app_penetrance+" end."); String app_percent = chr.getValueString("Penetrance Percent"); + postgres_table = "app_percent"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_percent)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_percent); } // System.out.println( "Penetrance Percent : "+app_percent+" end."); String app_range = chr.getValueString("Penetrance Range"); + postgres_table = "app_range"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_range)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_range); } // System.out.println( "Penetrance Range : "+app_range+" end."); String app_quantity_remark = chr.getValueString("Quantity Remark"); + postgres_table = "app_quantity_remark"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_quantity_remark)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_quantity_remark); } // System.out.println( "Quantity Remark : "+app_quantity_remark+" end."); String app_heat_sens = chr.getValueString("Heat Sensitive"); + postgres_table = "app_heat_sens"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_heat_sens)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_heat_sens); } // System.out.println( "Heat Sensitive : "+app_heat_sens+" end."); String app_heat_degree = chr.getValueString("Heat Sensitive Degree"); + postgres_table = "app_heat_degree"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_heat_degree)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_heat_degree); } // System.out.println( "Heat Sensitive Degree : "+app_heat_degree+" end."); String app_cold_sens = chr.getValueString("Cold Sensitive"); + postgres_table = "app_cold_sens"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_cold_sens)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_cold_sens); } // System.out.println( "Cold Sensitive : "+app_cold_sens+" end."); String app_cold_degree = chr.getValueString("Cold Sensitive"); + postgres_table = "app_cold_degree"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_cold_degree)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_cold_degree); } // System.out.println( "Cold Sensitive Degree : "+app_cold_degree+" end."); String app_mat_effect = chr.getValueString("Maternal Effect"); + postgres_table = "app_mat_effect"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_mat_effect)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_mat_effect); } // System.out.println( "Maternal Effect : "+app_mat_effect+" end."); String app_pat_effect = chr.getValueString("Paternal Effect"); + postgres_table = "app_pat_effect"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_pat_effect)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_pat_effect); } // System.out.println( "Paternal Effect : "+app_pat_effect+" end."); String app_genotype = chr.getValueString("Genotype"); + postgres_table = "app_genotype"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_genotype)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_genotype); } // System.out.println( "Genotype : "+app_genotype+" end."); String app_strain = chr.getValueString("Strain"); + postgres_table = "app_strain"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_strain)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_strain); } // System.out.println( "Strain : "+app_strain+" end."); - String app_delevered = chr.getValueString("Delivered By"); -// System.out.println( "Delivered By : "+app_delevered+" end."); + String app_delivered = chr.getValueString("Delivered By"); + postgres_table = "app_delivered"; postgres_value = "No postgres value assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + if (postgres_value.equals(app_delivered)) { } else { updatePostgresCol(c, postgres_table, joinkey, colI, app_delivered); } +// System.out.println( "Delivered By : "+app_delivered+" end."); if (allele != null) { int found_allele = 0; ResultSet rs = null; // intialize postgres query result - String joinkey = allele; try { rs = s.executeQuery("SELECT * FROM app_tempname WHERE app_tempname = '"+joinkey+"'"); } // find the allele that matches the queried allele catch (SQLException se) { System.out.println("We got an exception while executing our app_tempname query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } @@ -146,12 +241,22 @@ // else - new insert & deletes(from transactions) } // public void commit(CharacterListI charList) + private void updatePostgresCol(Connection c, String postgres_table, String joinkey, int colI, String value) { + PreparedStatement ps = null; // intialize postgres insert + try { ps = c.prepareStatement("INSERT INTO "+postgres_table+" VALUES (?, ?, ?)"); ps.setString(1, joinkey); ps.setInt(2, colI); ps.setString(3, value); } + catch (SQLException se) { + System.out.println("We got an exception while preparing our insert: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { ps.executeUpdate(); } // write to app_tempname, which is not what we really want, but we need to figure out the pubchunk thing to see what we're going to do + catch (SQLException se) { System.out.println("We got an exception while executing an update: possibly bad SQL, or check the connection."); se.printStackTrace(); System.exit(1); } + } // private void updatePostgresCol(String postgres_table, String joinkey, int colI, String value) + // Returns the first substring in input that matches the pattern. Returns null if no match found. // lifted from http://www.exampledepot.com/egs/java.util.regex/Greedy.html?l=rel public static String find(String patternStr, CharSequence input) { Pattern pattern = Pattern.compile(patternStr); Matcher matcher = pattern.matcher(input); - if (matcher.find()) { return matcher.group(); } +// System.out.println("Pattern "+pattern+" end"); + if (matcher.find()) { return matcher.group(1); } return null; } @@ -215,112 +320,101 @@ return default_value; } - private CharacterListI queryPostgresCharacterList(CharacterListI charList, Statement s, String joinkey) { + private CharacterListI queryPostgresCharacterList(CharacterListI charList, Statement s, String joinkey, int colI) { // populate a phenote character based on postgres value by joinkey, then append to character list - int columns = 0; // the number of columns - ResultSet rs = null; // grab the highest number column for that allele - try { rs = s.executeQuery("SELECT app_column FROM app_term WHERE joinkey = '"+joinkey+"' ORDER BY app_column DESC"); } - catch (SQLException se) { - System.out.println("We got an exception while executing our app_term query: that probably means our column SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { if (rs.getInt(1) > columns) { columns = rs.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 column/term joinkey "+joinkey+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } - try { - for (int colI=1; colI<columns+1; colI++) { // for each of those columns Character c1 = new Character(); // create a new character for a phenote row - c1.setValue("Allele",joinkey); // assign the allele - String postgres_value = "No Phenotype assigned"; + String alleleColumn = joinkey+" - "+colI; + c1.setValue("Allele",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, colI); c1.setValue("Phenotype",postgres_value); // assign the queried value - postgres_table = "app_curator"; postgres_value = "No Curator assigned"; + postgres_table = "app_curator"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Curator",postgres_value); // assign the queried value - postgres_table = "app_paper"; postgres_value = "No Pub assigned"; + postgres_table = "app_paper"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Pub",postgres_value); // assign the queried value - postgres_table = "app_person"; postgres_value = "No Person assigned"; + postgres_table = "app_person"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Person",postgres_value); // assign the queried value - postgres_table = "app_phenotype"; postgres_value = "No Phenotype Text Remark assigned"; + postgres_table = "app_phenotype"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Phenotype Text Remark",postgres_value); // assign the queried value - postgres_table = "app_remark"; postgres_value = "No Other Remark assigned"; + postgres_table = "app_remark"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Other Remark",postgres_value); // assign the queried value - postgres_table = "app_intx_desc"; postgres_value = "No Genetic Interaction assigned"; + postgres_table = "app_intx_desc"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Genetic Interaction",postgres_value); // assign the queried value - postgres_table = "app_phen_remark"; postgres_value = "No Phenotype Remark assigned"; + postgres_table = "app_phen_remark"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Phenotype Remark",postgres_value); // assign the queried value - postgres_table = "app_anat_term"; postgres_value = "No Anatomy assigned"; + postgres_table = "app_anat_term"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, 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 Stage assigned"; + postgres_table = "app_lifestage"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Stage",postgres_value); // assign the queried value - postgres_table = "app_nature"; postgres_value = "No Nature of Allele assigned"; + postgres_table = "app_nature"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Allele Nature",postgres_value); // assign the queried value - postgres_table = "app_func"; postgres_value = "No Functional Change assigned"; + postgres_table = "app_func"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Functional Change",postgres_value); // assign the queried value - postgres_table = "app_temperature"; postgres_value = "No Temperature assigned"; + postgres_table = "app_temperature"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Temperature",postgres_value); // assign the queried value - postgres_table = "app_preparation"; postgres_value = "No Preparation assigned"; + postgres_table = "app_preparation"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Preparation",postgres_value); // assign the queried value - postgres_table = "app_penetrance"; postgres_value = "No Penetrance assigned"; + postgres_table = "app_penetrance"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Penetrance",postgres_value); // assign the queried value - postgres_table = "app_percent"; postgres_value = "No Penetrance Percent assigned"; + postgres_table = "app_percent"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Penetrance Percent",postgres_value); // assign the queried value - postgres_table = "app_range"; postgres_value = "No Penetrance Range assigned"; + postgres_table = "app_range"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Penetrance Range",postgres_value); // assign the queried value - postgres_table = "app_quantity_remark"; postgres_value = "No Quantity Remark assigned"; + postgres_table = "app_quantity_remark"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Quantity Remark",postgres_value); // assign the queried value - postgres_table = "app_heat_sens"; postgres_value = "No Heat Sensitive assigned"; + postgres_table = "app_heat_sens"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Heat Sensitive",postgres_value); // assign the queried value - postgres_table = "app_heat_degree"; postgres_value = "No Heat Sensitive Degree assigned"; + postgres_table = "app_heat_degree"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Heat Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "app_cold_sens"; postgres_value = "No Cold Sensitive assigned"; + postgres_table = "app_cold_sens"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Cold Sensitive",postgres_value); // assign the queried value - postgres_table = "app_cold_degree"; postgres_value = "No Cold Sensitive Degree assigned"; + postgres_table = "app_cold_degree"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Cold Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "app_mat_effect"; postgres_value = "No Maternal Effect assigned"; + postgres_table = "app_mat_effect"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Maternal Effect",postgres_value); // assign the queried value - postgres_table = "app_pat_effect"; postgres_value = "No Paternal Effect assigned"; + postgres_table = "app_pat_effect"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Paternal Effect",postgres_value); // assign the queried value - postgres_table = "app_genotype"; postgres_value = "No Genotype assigned"; + postgres_table = "app_genotype"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Genotype",postgres_value); // assign the queried value - postgres_table = "app_strain"; postgres_value = "No Strain assigned"; + postgres_table = "app_strain"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Strain",postgres_value); // assign the queried value - postgres_table = "app_delivered"; postgres_value = "No Delivered By assigned"; + postgres_table = "app_delivered"; postgres_value = "No postgres value assigned"; postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Delivered By",postgres_value); // assign the queried value charList.add(c1); // add the character to the character list - } // for (int colI=1; colI<columns; colI++) - } - catch (TermNotFoundException e) { - System.out.println("Term Not Found Exception, assigning characters by Allele."); } - catch (CharFieldException e) { - System.out.println("Char Field Exception, assigning characters by Allele."); } + } + catch (TermNotFoundException e) { + System.out.println("Term Not Found Exception, assigning characters by Allele."); } + catch (CharFieldException e) { + System.out.println("Char Field Exception, assigning characters by Allele."); } return charList; } // private CharacterListI queryPostgresCharacterList(CharacterList charList, Statement s, String joinkey) @@ -343,6 +437,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]+", query); // Find a tempname followed by space - space number + 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) { @@ -357,7 +453,18 @@ se.printStackTrace(); System.exit(1); } if (foundAllele <= 0) { throw new DataAdapterEx("Worm query of "+joinkey+" of field "+field+" has no match in postgres"); } // if there is no match for the allele in postgres - else { charList = queryPostgresCharacterList(charList, s, joinkey); return charList; } // if there is a match + else { + rs = null; int columns = 0; // the number of columns + try { rs = s.executeQuery("SELECT app_column FROM app_term WHERE joinkey = '"+joinkey+"' ORDER BY app_column DESC"); } + catch (SQLException se) { + System.out.println("We got an exception while executing our app_term query: that probably means our column SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { while (rs.next()) { if (rs.getInt(1) > columns) { columns = rs.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 column/term joinkey "+joinkey+" result: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, colI); } + return charList; } // if there is a match } else if (field.equals(pubString)) { // if querying the publication, get paper data Connection c = connectToDB(); @@ -370,10 +477,11 @@ catch (SQLException se) { System.out.println("We got an exception while creating a statement: that probably means we're no longer connected."); se.printStackTrace(); System.exit(1); } - String match = find("WBPaper[0-9]*", query); // Find a WBPaper followed by any amount of digits + String match = find("(WBPaper[0-9]*)", query); // Find a WBPaper followed by any amount of digits if (match != null) { query = match; } // query for this, otherwise keep the default value int foundPaper = 0; // flag if there are any papers in postgres that match, otherwise give an error warning ResultSet rs = null; // initialize result of query + System.out.println("Paper "+query+" end"); try { rs = s2.executeQuery("SELECT DISTINCT(joinkey) FROM app_paper WHERE app_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper catch (SQLException se) { System.out.println("We got an exception while executing our app_paper query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } @@ -383,13 +491,14 @@ 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 - try { rs2 = s2.executeQuery("SELECT DISTINCT(joinkey) FROM app_paper WHERE app_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper + try { rs2 = s2.executeQuery("SELECT DISTINCT(joinkey), app_column FROM app_paper WHERE app_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper catch (SQLException se) { System.out.println("We got an exception while executing our app_paper query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } try { while (rs2.next()) { // while there's data in postgres String joinkey = "No Allele assigned for Publication "+query+"."; // initialize allele in each phenote character Row joinkey = rs2.getString(1); // get the allele from postgres - charList = queryPostgresCharacterList(charList, s, joinkey); + int colI = rs2.getInt(2); // get the allele from postgres + charList = queryPostgresCharacterList(charList, s, joinkey, colI); } } catch (SQLException se) { System.out.println("We got an exception while getting a publication query result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-04-04 21:20:28
|
Revision: 463 http://svn.sourceforge.net/obo/?rev=463&view=rev Author: nlw Date: 2007-04-04 14:20:21 -0700 (Wed, 04 Apr 2007) Log Message: ----------- added a splash screen to phenote. gives user a hint that something is going on. especially important for webstart customers that don't have the stdout window. Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java phenote/trunk/src/java/phenote/gui/SelectionHistory.java phenote/trunk/src/java/phenote/main/Phenote.java Added Paths: ----------- phenote/trunk/src/java/phenote/gui/SplashScreen.java Modified: phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-04-04 05:41:07 UTC (rev 462) +++ phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-04-04 21:20:21 UTC (rev 463) @@ -84,7 +84,7 @@ // to prevent reload during init , maybe dont need with synchronization? initializingOntologies = true; for (FieldConfig fieldConfig : config.getFieldConfigList()) { - if (!fieldConfig.isEnabled()) continue; + if (!fieldConfig.isEnabled()) continue; // this is where char field enums happen - scrap entirely???? // if (fieldConfig.hasCharFieldEnum()) { // CharFieldEnum fce = fieldConfig.getCharFieldEnum(); Modified: phenote/trunk/src/java/phenote/gui/SelectionHistory.java =================================================================== --- phenote/trunk/src/java/phenote/gui/SelectionHistory.java 2007-04-04 05:41:07 UTC (rev 462) +++ phenote/trunk/src/java/phenote/gui/SelectionHistory.java 2007-04-04 21:20:21 UTC (rev 463) @@ -120,7 +120,7 @@ { OBOClass term = transList.get(i-1).getNewTerm(); if (term!=null) - html = html + "<br> *"+term.getName(); + html = html + "<br> *"+term.getNamespace()+":"+term.getName(); // html = html + "<br>"+HtmlUtil.termLink(term); } textArea.setText(html); Added: phenote/trunk/src/java/phenote/gui/SplashScreen.java =================================================================== --- phenote/trunk/src/java/phenote/gui/SplashScreen.java (rev 0) +++ phenote/trunk/src/java/phenote/gui/SplashScreen.java 2007-04-04 21:20:21 UTC (rev 463) @@ -0,0 +1,97 @@ +package phenote.gui; + +/*I grabbed the basics from +http://www.devdaily.com/java/edu/SplashScreen/SplashScreen.java +*/ + +import javax.swing.*; +import java.awt.*; + +public class SplashScreen extends JWindow { + BorderLayout borderLayout1 = new BorderLayout(); + JLabel imageLabel = new JLabel(); + JPanel southPanel = new JPanel(); + FlowLayout southPanelFlowLayout = new FlowLayout(); + JProgressBar progressBar = new JProgressBar(); +// JTextArea messagePanel = new JTextArea(); + ImageIcon imageIcon; + + + public SplashScreen(ImageIcon imageIcon) { + this.imageIcon = imageIcon; + try { + jbInit(); + } + catch(Exception ex) { + ex.printStackTrace(); + } + } + + // note - this class created with JBuilder + void jbInit() throws Exception { + imageLabel.setIcon(imageIcon); + this.getContentPane().setLayout(borderLayout1); + southPanel.setLayout(southPanelFlowLayout); + southPanel.setBackground(Color.BLUE); +// messagePanel.setBackground(Color.BLACK); + this.getContentPane().add(imageLabel, BorderLayout.CENTER); + this.getContentPane().add(southPanel, BorderLayout.SOUTH); +// this.getContentPane().add(messagePanel, BorderLayout.NORTH); + southPanel.add(progressBar, null); + this.pack(); + } + + public void setProgressMax(int maxProgress) + { + progressBar.setMaximum(maxProgress); + } + + public void setProgress(int progress) + { + final int theProgress = progress; + SwingUtilities.invokeLater(new Runnable() { + public void run() { + progressBar.setValue(theProgress); + } + }); + } + + public void setProgress(String message, int progress) + { + final int theProgress = progress; + final String theMessage = message; + setProgress(progress); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + progressBar.setValue(theProgress); + setMessage(theMessage); + } + }); + } + + public void setScreenVisible(boolean b) + { + final boolean boo = b; + SwingUtilities.invokeLater(new Runnable() { + public void run() { + setVisible(boo); + } + }); + } + + private void setMessage(String message) + { + if (message==null) + { + message = ""; + progressBar.setStringPainted(false); + } + else + { + progressBar.setStringPainted(true); + } + progressBar.setString(message); +// messagePanel.setText(message); + } + +} \ No newline at end of file Modified: phenote/trunk/src/java/phenote/main/Phenote.java =================================================================== --- phenote/trunk/src/java/phenote/main/Phenote.java 2007-04-04 05:41:07 UTC (rev 462) +++ phenote/trunk/src/java/phenote/main/Phenote.java 2007-04-04 21:20:21 UTC (rev 463) @@ -12,10 +12,13 @@ import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.UIManager; +import javax.swing.ImageIcon; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.plaf.metal.MetalLookAndFeel; import java.io.FileNotFoundException; + + // import javax.swing.JTextField; // import javax.swing.text.Keymap; @@ -33,6 +36,7 @@ import phenote.gui.TermInfo; import phenote.gui.SelectionHistory; import phenote.gui.field.FieldPanel; +import phenote.gui.SplashScreen; public class Phenote { @@ -46,6 +50,8 @@ private SelectionHistory selectionHistory; private CommandLine commandLine = CommandLine.inst(); private JFrame frame; + public SplashScreen splashScreen; + private String logoFile = "src/java/phenote/images/phenote_logo.jpg"; // public static Keymap defaultKeymap; @@ -69,18 +75,29 @@ System.out.println("Failed to set to Java/Metal look & feel"); } phenote = getPhenote(); + phenote.splashScreenInit(); //initialize the splash screen; phenote.doCommandLine(args); // does config // put this is in a phenote.util.Log class? - get file from config - default? + phenote.splashScreen.setProgress("Configuring...", 10); try { DOMConfigurator.configure(Config.inst().getLogConfigUrl()); } - catch (FileNotFoundException e) { LOG.error(e.getMessage()); } + catch (FileNotFoundException e) { + phenote.splashScreen.setProgress("bad file:"+e.getMessage(),10); + LOG.error(e.getMessage()); } + phenote.splashScreen.setProgress("Initializing Ontologies...", 20); phenote.initOntologies(); + phenote.splashScreen.setProgress("Ontologies Initialized", 70); phenote.loadFromCommandLine(); // aft ontols, reads from cmd line if specified + phenote.splashScreen.setProgress("Phenote Loaded", 100); if (phenote.commandLine.writeIsSpecified()) phenote.writeFromCommandLine(); - else // init gui if not writing (& reading) from cmd line - phenote.initGui(); - } + else // init gui if not writing (& reading) from cmd line + { + phenote.initGui(); + phenote.splashScreenDestruct(); + } + } + /** private constructor -> singleton */ private Phenote() {} @@ -115,6 +132,20 @@ makeWindow(); } + + private void splashScreenInit() { + ImageIcon myImage = new ImageIcon(logoFile); + splashScreen = new SplashScreen(myImage); + splashScreen.setLocationRelativeTo(null); + splashScreen.setProgressMax(100); + splashScreen.setScreenVisible(true); + splashScreen.setProgress("Phenote version "+PhenoteVersion.versionString(), 0); + } + + private void splashScreenDestruct() { + splashScreen.setScreenVisible(false); + } + private void doCommandLine(String[] args) { //doCommandLineOld(args); // -c -u --> move to CommandLine! try { commandLine.setArgs(args); } // no log yet - sys.out @@ -210,6 +241,7 @@ public FieldPanel getFieldPanel() { return fieldPanel; } public TermInfo getTermInfo() { return termInfo; } public CharacterTablePanel getCharacterTablePanel() { return characterTablePanel; } + } // /** args is most likely null if not called from command line */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-04-04 05:41:09
|
Revision: 462 http://svn.sourceforge.net/obo/?rev=462&view=rev Author: nlw Date: 2007-04-03 22:41:07 -0700 (Tue, 03 Apr 2007) Log Message: ----------- took out notes about "uvic graphics" due to hesitation by uvic people Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/software/index.shtml phenote/trunk/doc/phenote-website/phenote-release-notes.html Modified: phenote/trunk/doc/phenote-website/content/software/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-04 00:01:12 UTC (rev 461) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-04 05:41:07 UTC (rev 462) @@ -23,7 +23,6 @@ <li>Tabbed main data-entry panel if more than 12 fields are present. Note that all fields will be displayed in the lower display table without scrolling</li> <li>Refactored code for field guis</li> <li>Ontology chooser reflects current term (bug fix)</li> -<li>Improvements to uvic graphics (still not ready for prime time)</li> </ul> <p> See the <a href="http://www.phenote.org/phenote-release-notes.html">Release Notes</a> for more information or back-versions. Modified: phenote/trunk/doc/phenote-website/phenote-release-notes.html =================================================================== --- phenote/trunk/doc/phenote-website/phenote-release-notes.html 2007-04-04 00:01:12 UTC (rev 461) +++ phenote/trunk/doc/phenote-website/phenote-release-notes.html 2007-04-04 05:41:07 UTC (rev 462) @@ -40,7 +40,6 @@ QueryableDataAdapter interface for adding a database data adapter that can be queried. The data adapter specifies queryable fields, which get a retrieve button.<br> -Improvements to uvic graphics (still not ready for prime time)<br> Layout improved<br> Can now search ALL ontologies of a field<br> Retrieve obo from web if more up to date or no local found<br> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-04-04 00:01:11
|
Revision: 461 http://svn.sourceforge.net/obo/?rev=461&view=rev Author: nlw Date: 2007-04-03 17:01:12 -0700 (Tue, 03 Apr 2007) Log Message: ----------- added a splash screen image. very temporary. Added Paths: ----------- phenote/trunk/src/java/phenote/images/ phenote/trunk/src/java/phenote/images/phenote_logo.jpg Added: phenote/trunk/src/java/phenote/images/phenote_logo.jpg =================================================================== (Binary files differ) Property changes on: phenote/trunk/src/java/phenote/images/phenote_logo.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-04-03 22:56:13
|
Revision: 459 http://svn.sourceforge.net/obo/?rev=459&view=rev Author: azurebrd Date: 2007-04-03 15:56:02 -0700 (Tue, 03 Apr 2007) Log Message: ----------- 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-04-03 00:05:54 UTC (rev 458) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-04-03 22:56:02 UTC (rev 459) @@ -68,71 +68,71 @@ // System.out.println( "Other Remark : "+remark+" end."); String genetic_interaction = chr.getValueString("Genetic Interaction"); // System.out.println( "Genetic Interaction : "+genetic_interaction+" end."); - String alp_term = chr.getValueString("Phenotype"); -// System.out.println( "Phenotype : "+alp_term+" end."); - String alp_phen_remark = chr.getValueString("Phenotype Remark"); -// System.out.println( "Phenotype Remark : "+alp_phen_remark+" end."); - String alp_anat_term = chr.getValueString("Anatomy"); -// System.out.println( "Anatomy : "+alp_anat_term+" end."); + String app_term = chr.getValueString("Phenotype"); +// System.out.println( "Phenotype : "+app_term+" end."); + String app_phen_remark = chr.getValueString("Phenotype Remark"); +// System.out.println( "Phenotype Remark : "+app_phen_remark+" end."); + String app_anat_term = chr.getValueString("Anatomy"); +// System.out.println( "Anatomy : "+app_anat_term+" end."); String entity = chr.getValueString("Entity"); // System.out.println( "Entity : "+entity+" end."); String quality = chr.getValueString("Quality"); // System.out.println( "Quality : "+quality+" end."); - String alp_lifestage = chr.getValueString("Stage"); -// System.out.println( "Stage : "+alp_lifestage+" end."); - String alp_nature = chr.getValueString("Allele Nature"); -// System.out.println( "Allele Nature : "+alp_nature+" end."); - String alp_func = chr.getValueString("Functional Change"); -// System.out.println( "Functional Change : "+alp_func+" end."); - String alp_temperature = chr.getValueString("Temperature"); -// System.out.println( "Temperature : "+alp_temperature+" end."); - String alp_preparation = chr.getValueString("Preparation"); -// System.out.println( "Preparation : "+alp_preparation+" end."); - String alp_penetrance = chr.getValueString("Penetrance"); -// System.out.println( "Penetrance : "+alp_penetrance+" end."); - String alp_percent = chr.getValueString("Penetrance Percent"); -// System.out.println( "Penetrance Percent : "+alp_percent+" end."); - String alp_range = chr.getValueString("Penetrance Range"); -// System.out.println( "Penetrance Range : "+alp_range+" end."); - String alp_quantity_remark = chr.getValueString("Quantity Remark"); -// System.out.println( "Quantity Remark : "+alp_quantity_remark+" end."); - String alp_heat_sens = chr.getValueString("Heat Sensitive"); -// System.out.println( "Heat Sensitive : "+alp_heat_sens+" end."); - String alp_heat_degree = chr.getValueString("Heat Sensitive Degree"); -// System.out.println( "Heat Sensitive Degree : "+alp_heat_degree+" end."); - String alp_cold_sens = chr.getValueString("Cold Sensitive"); -// System.out.println( "Cold Sensitive : "+alp_cold_sens+" end."); - String alp_cold_degree = chr.getValueString("Cold Sensitive"); -// System.out.println( "Cold Sensitive Degree : "+alp_cold_degree+" end."); - String alp_mat_effect = chr.getValueString("Maternal Effect"); -// System.out.println( "Maternal Effect : "+alp_mat_effect+" end."); - String alp_pat_effect = chr.getValueString("Paternal Effect"); -// System.out.println( "Paternal Effect : "+alp_pat_effect+" end."); - String alp_genotype = chr.getValueString("Genotype"); -// System.out.println( "Genotype : "+alp_genotype+" end."); - String alp_strain = chr.getValueString("Strain"); -// System.out.println( "Strain : "+alp_strain+" end."); - String alp_delevered = chr.getValueString("Delivered By"); -// System.out.println( "Delivered By : "+alp_delevered+" end."); + String app_lifestage = chr.getValueString("Stage"); +// System.out.println( "Stage : "+app_lifestage+" end."); + String app_nature = chr.getValueString("Allele Nature"); +// System.out.println( "Allele Nature : "+app_nature+" end."); + String app_func = chr.getValueString("Functional Change"); +// System.out.println( "Functional Change : "+app_func+" end."); + String app_temperature = chr.getValueString("Temperature"); +// System.out.println( "Temperature : "+app_temperature+" end."); + String app_preparation = chr.getValueString("Preparation"); +// System.out.println( "Preparation : "+app_preparation+" end."); + String app_penetrance = chr.getValueString("Penetrance"); +// System.out.println( "Penetrance : "+app_penetrance+" end."); + String app_percent = chr.getValueString("Penetrance Percent"); +// System.out.println( "Penetrance Percent : "+app_percent+" end."); + String app_range = chr.getValueString("Penetrance Range"); +// System.out.println( "Penetrance Range : "+app_range+" end."); + String app_quantity_remark = chr.getValueString("Quantity Remark"); +// System.out.println( "Quantity Remark : "+app_quantity_remark+" end."); + String app_heat_sens = chr.getValueString("Heat Sensitive"); +// System.out.println( "Heat Sensitive : "+app_heat_sens+" end."); + String app_heat_degree = chr.getValueString("Heat Sensitive Degree"); +// System.out.println( "Heat Sensitive Degree : "+app_heat_degree+" end."); + String app_cold_sens = chr.getValueString("Cold Sensitive"); +// System.out.println( "Cold Sensitive : "+app_cold_sens+" end."); + String app_cold_degree = chr.getValueString("Cold Sensitive"); +// System.out.println( "Cold Sensitive Degree : "+app_cold_degree+" end."); + String app_mat_effect = chr.getValueString("Maternal Effect"); +// System.out.println( "Maternal Effect : "+app_mat_effect+" end."); + String app_pat_effect = chr.getValueString("Paternal Effect"); +// System.out.println( "Paternal Effect : "+app_pat_effect+" end."); + String app_genotype = chr.getValueString("Genotype"); +// System.out.println( "Genotype : "+app_genotype+" end."); + String app_strain = chr.getValueString("Strain"); +// System.out.println( "Strain : "+app_strain+" end."); + String app_delevered = chr.getValueString("Delivered By"); +// System.out.println( "Delivered By : "+app_delevered+" end."); if (allele != null) { int found_allele = 0; ResultSet rs = null; // intialize postgres query result String joinkey = allele; - try { rs = s.executeQuery("SELECT * FROM alp_tempname WHERE alp_tempname = '"+joinkey+"'"); } // find the allele that matches the queried allele + try { rs = s.executeQuery("SELECT * FROM app_tempname WHERE app_tempname = '"+joinkey+"'"); } // find the allele that matches the queried allele catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } + System.out.println("We got an exception while executing our app_tempname query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } try { while (rs.next()) { // default_value = rs.getString(4); -// System.out.println("Found "+joinkey+" allele in alp_tempname."); +// System.out.println("Found "+joinkey+" allele in app_tempname."); found_allele++; } } catch (SQLException se) { - System.out.println("We got an exception while getting a alp_tempname result: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 app_tempname result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } if (found_allele > 0) { PreparedStatement ps = null; // intialize postgres insert - try { ps = c.prepareStatement("INSERT INTO alp_tempname VALUES (?, ?)"); ps.setString(1, joinkey); ps.setString(2, allele); } + try { ps = c.prepareStatement("INSERT INTO app_tempname VALUES (?, ?)"); ps.setString(1, joinkey); ps.setString(2, allele); } catch (SQLException se) { System.out.println("We got an exception while preparing our insert: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { ps.executeUpdate(); } // write to alp_tempname, which is not what we really want, but we need to figure out the pubchunk thing to see what we're going to do + try { ps.executeUpdate(); } // write to app_tempname, which is not what we really want, but we need to figure out the pubchunk thing to see what we're going to do catch (SQLException se) { System.out.println("We got an exception while executing an update: possibly bad SQL, or check the connection."); se.printStackTrace(); System.exit(1); } } } else { System.out.println("There is no allele for "+chr+" Character"); } @@ -201,170 +201,118 @@ return c; } // private Connection connectToDB - 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 box and column + private String queryPostgresCharacter(Statement s, String postgres_table, String default_value, String query, int colI) { + // get the value corresponding to a phenote cell from a postgres table by column ResultSet rs = null; // intialize postgres query result - // get the phenotype term in timestamp order where the allele and box and column number match - try { rs = s.executeQuery("SELECT * FROM "+postgres_table+" WHERE joinkey = '"+query+"' AND alp_box='"+boxI+"' AND alp_column='"+colI+"' ORDER BY alp_timestamp"); } + // get the phenotype term in timestamp order where the allele and column number match + try { rs = s.executeQuery("SELECT * FROM "+postgres_table+" WHERE joinkey = '"+query+"' AND app_column='"+colI+"' ORDER BY app_timestamp"); } catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our term SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { default_value = rs.getString(4); } } // assign the new term value + 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()) { default_value = 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); } -// System.out.println("Added in function charList term "+query+" column "+colI+" box "+boxI+"."); // comment out later +// System.out.println("Added in function charList term "+query+" column "+colI+"."); // comment out later return default_value; } - private CharacterListI queryPostgresCharacterList(CharacterListI charList, Statement s, String joinkey, int boxI) { - // populate a phenote character based on postgres value by joinkey and box, then append to character list - String paper = "No Paper assigned"; // initialize paper value - ResultSet rs = null; // intialize postgres query result - // get the papers in timestamp order where the allele and box number match - try { rs = s.executeQuery("SELECT * FROM alp_paper WHERE joinkey = '"+joinkey+"' AND alp_box='"+boxI+"' ORDER BY alp_timestamp"); } + private CharacterListI queryPostgresCharacterList(CharacterListI charList, Statement s, String joinkey) { + // populate a phenote character based on postgres value by joinkey, then append to character list + int columns = 0; // the number of columns + ResultSet rs = null; // grab the highest number column for that allele + try { rs = s.executeQuery("SELECT app_column FROM app_term WHERE joinkey = '"+joinkey+"' ORDER BY app_column DESC"); } catch (SQLException se) { - System.out.println("We got an exception while executing our joinkey: that probably means our pap SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { paper = rs.getString(3); } } // assign the paper + System.out.println("We got an exception while executing our app_term query: that probably means our column SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { while (rs.next()) { if (rs.getInt(1) > columns) { columns = rs.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 paper joinkey "+joinkey+" box "+boxI+" result:this shouldn't happen: we've done something really bad."); + 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); } - String curator = "No Curator assigned"; - rs = null; - try { rs = s.executeQuery("SELECT * FROM alp_curator WHERE joinkey = '"+joinkey+"' AND alp_box='"+boxI+"' ORDER BY alp_timestamp"); } - catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our cur SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { curator = rs.getString(3); } } - catch (SQLException se) { - System.out.println("We got an exception while getting a curator joinkey "+joinkey+" box "+boxI+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } - - String person = "No Person assigned"; - rs = null; - try { rs = s.executeQuery("SELECT * FROM alp_person WHERE joinkey = '"+joinkey+"' AND alp_box='"+boxI+"' ORDER BY alp_timestamp"); } - catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our per SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { person = rs.getString(3); } } - catch (SQLException se) { - System.out.println("We got an exception while getting a person joinkey "+joinkey+" box "+boxI+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } - - String phen_text_remark = "No Phenotype Text Remark assigned"; - rs = null; - try { rs = s.executeQuery("SELECT * FROM alp_phenotype WHERE joinkey = '"+joinkey+"' AND alp_box='"+boxI+"' ORDER BY alp_timestamp"); } - catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our ptr SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { phen_text_remark = rs.getString(3); } } - catch (SQLException se) { - System.out.println("We got an exception while getting a phenotype joinkey "+joinkey+" box "+boxI+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } - - String remark = "No Other Remark assigned"; - rs = null; - try { rs = s.executeQuery("SELECT * FROM alp_remark WHERE joinkey = '"+joinkey+"' AND alp_box='"+boxI+"' ORDER BY alp_timestamp"); } - catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our orem SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { remark = rs.getString(3); } } - catch (SQLException se) { - System.out.println("We got an exception while getting a remark joinkey "+joinkey+" box "+boxI+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } - - String genetic_interaction = "No Genetic Interaction assigned"; - rs = null; - try { rs = s.executeQuery("SELECT * FROM alp_intx_desc WHERE joinkey = '"+joinkey+"' AND alp_box='"+boxI+"' ORDER BY alp_timestamp"); } - catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our gint SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { while (rs.next()) { genetic_interaction = rs.getString(3); } } - catch (SQLException se) { - System.out.println("We got an exception while getting a intx_desc joinkey "+joinkey+" box "+boxI+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } - - int columns = 0; // the number of columns in that box - rs = null; - // grab the highest number column for that box and that allele - try { rs = s.executeQuery("SELECT alp_column FROM alp_term WHERE joinkey = '"+joinkey+"' AND alp_box = '"+boxI+"' ORDER BY alp_column DESC"); } - catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our column SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { if (rs.next()) { { columns = rs.getInt(1); } } } // assign the highest number column for that box and that allele to the number of columns - catch (SQLException se) { - System.out.println("We got an exception while getting a column/term joinkey "+joinkey+" box "+boxI+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } - -// System.out.println("We have "+columns+" columns in box "+boxI+"."); // comment out later - try { for (int colI=1; colI<columns+1; colI++) { // for each of those columns Character c1 = new Character(); // create a new character for a phenote row c1.setValue("Allele",joinkey); // assign the allele - c1.setValue("Pub",paper); - c1.setValue("Curator",curator); - c1.setValue("Person",person); - c1.setValue("Phenotype Text Remark",phen_text_remark); - c1.setValue("Other Remark",remark); - c1.setValue("Genetic Interaction",genetic_interaction); String postgres_value = "No Phenotype assigned"; - String postgres_table = "alp_term"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + String postgres_table = "app_term"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Phenotype",postgres_value); // assign the queried value - postgres_table = "alp_phen_remark"; postgres_value = "No Phenotype Remark assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_curator"; postgres_value = "No Curator assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + c1.setValue("Curator",postgres_value); // assign the queried value + postgres_table = "app_paper"; postgres_value = "No Pub assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + c1.setValue("Pub",postgres_value); // assign the queried value + postgres_table = "app_person"; postgres_value = "No Person assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + c1.setValue("Person",postgres_value); // assign the queried value + postgres_table = "app_phenotype"; postgres_value = "No Phenotype Text Remark assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + c1.setValue("Phenotype Text Remark",postgres_value); // assign the queried value + postgres_table = "app_remark"; postgres_value = "No Other Remark assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + c1.setValue("Other Remark",postgres_value); // assign the queried value + postgres_table = "app_intx_desc"; postgres_value = "No Genetic Interaction assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); + c1.setValue("Genetic Interaction",postgres_value); // assign the queried value + postgres_table = "app_phen_remark"; postgres_value = "No Phenotype Remark assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Phenotype Remark",postgres_value); // assign the queried value - postgres_table = "alp_anat_term"; postgres_value = "No Anatomy assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_anat_term"; postgres_value = "No Anatomy assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, 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 = "alp_lifestage"; postgres_value = "No Stage assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_lifestage"; postgres_value = "No Stage assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Stage",postgres_value); // assign the queried value - postgres_table = "alp_nature"; postgres_value = "No Nature of Allele assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_nature"; postgres_value = "No Nature of Allele assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Allele Nature",postgres_value); // assign the queried value - postgres_table = "alp_func"; postgres_value = "No Functional Change assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_func"; postgres_value = "No Functional Change assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Functional Change",postgres_value); // assign the queried value - postgres_table = "alp_temperature"; postgres_value = "No Temperature assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_temperature"; postgres_value = "No Temperature assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Temperature",postgres_value); // assign the queried value - postgres_table = "alp_preparation"; postgres_value = "No Preparation assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_preparation"; postgres_value = "No Preparation assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Preparation",postgres_value); // assign the queried value - postgres_table = "alp_penetrance"; postgres_value = "No Penetrance assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_penetrance"; postgres_value = "No Penetrance assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Penetrance",postgres_value); // assign the queried value - postgres_table = "alp_percent"; postgres_value = "No Penetrance Percent assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_percent"; postgres_value = "No Penetrance Percent assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Penetrance Percent",postgres_value); // assign the queried value - postgres_table = "alp_range"; postgres_value = "No Penetrance Range assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_range"; postgres_value = "No Penetrance Range assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Penetrance Range",postgres_value); // assign the queried value - postgres_table = "alp_quantity_remark"; postgres_value = "No Quantity Remark assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_quantity_remark"; postgres_value = "No Quantity Remark assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Quantity Remark",postgres_value); // assign the queried value - postgres_table = "alp_heat_sens"; postgres_value = "No Heat Sensitive assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_heat_sens"; postgres_value = "No Heat Sensitive assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Heat Sensitive",postgres_value); // assign the queried value - postgres_table = "alp_heat_degree"; postgres_value = "No Heat Sensitive Degree assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_heat_degree"; postgres_value = "No Heat Sensitive Degree assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Heat Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "alp_cold_sens"; postgres_value = "No Cold Sensitive assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_cold_sens"; postgres_value = "No Cold Sensitive assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Cold Sensitive",postgres_value); // assign the queried value - postgres_table = "alp_cold_degree"; postgres_value = "No Cold Sensitive Degree assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_cold_degree"; postgres_value = "No Cold Sensitive Degree assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Cold Sensitive Degree",postgres_value); // assign the queried value - postgres_table = "alp_mat_effect"; postgres_value = "No Maternal Effect assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_mat_effect"; postgres_value = "No Maternal Effect assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Maternal Effect",postgres_value); // assign the queried value - postgres_table = "alp_pat_effect"; postgres_value = "No Paternal Effect assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_pat_effect"; postgres_value = "No Paternal Effect assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Paternal Effect",postgres_value); // assign the queried value - postgres_table = "alp_genotype"; postgres_value = "No Genotype assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_genotype"; postgres_value = "No Genotype assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Genotype",postgres_value); // assign the queried value - postgres_table = "alp_strain"; postgres_value = "No Strain assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_strain"; postgres_value = "No Strain assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Strain",postgres_value); // assign the queried value - postgres_table = "alp_delivered"; postgres_value = "No Delivered By assigned"; - postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, boxI, colI); + postgres_table = "app_delivered"; postgres_value = "No Delivered By assigned"; + postgres_value = queryPostgresCharacter(s, postgres_table, postgres_value, joinkey, colI); c1.setValue("Delivered By",postgres_value); // assign the queried value charList.add(c1); // add the character to the character list } // for (int colI=1; colI<columns; colI++) @@ -374,7 +322,7 @@ catch (CharFieldException e) { System.out.println("Char Field Exception, assigning characters by Allele."); } return charList; - } // private CharacterListI queryPostgresCharacterList(CharacterList charList, Statement s, String joinkey, int boxI) + } // private CharacterListI queryPostgresCharacterList(CharacterList charList, Statement s, String joinkey) public CharacterListI query(String field, String query) throws DataAdapterEx { // String m = "Worm adapter query not yet implemented. field: "+field+" query: "+query; @@ -396,9 +344,9 @@ ResultSet rs = null; // intialize postgres query result String joinkey = query; - try { rs = s.executeQuery("SELECT * FROM alp_tempname WHERE alp_tempname = '"+joinkey+"'"); } // find the allele that matches the queried allele + try { rs = s.executeQuery("SELECT * FROM app_tempname WHERE app_tempname = '"+joinkey+"'"); } // find the allele that matches the queried allele catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } + System.out.println("We got an exception while executing our app_tempname query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } int foundAllele = 0; try { while (rs.next()) { @@ -409,22 +357,7 @@ se.printStackTrace(); System.exit(1); } if (foundAllele <= 0) { throw new DataAdapterEx("Worm query of "+joinkey+" of field "+field+" has no match in postgres"); } // if there is no match for the allele in postgres - else { // if there is a match - int boxes = 0; // the number of boxes for that allele - rs = null; // init result from postgres query - try { rs = s.executeQuery("SELECT alp_box FROM alp_curator WHERE joinkey = '"+joinkey+"' ORDER BY alp_box DESC"); } // grab the highest number box for that allele - catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } - try { rs.next(); { boxes = rs.getInt(1); } } // assign the highest number box for that joinkey to the number of boxes - catch (SQLException se) { - System.out.println("We got an exception while getting a curator joinkey "+joinkey+" result:this shouldn't happen: we've done something really bad."); - se.printStackTrace(); System.exit(1); } -// System.out.println("We have "+boxes+" boxes"); // comment out later - for (int boxI=1; boxI<boxes+1; boxI++) { // for each of those boxes - charList = queryPostgresCharacterList(charList, s, joinkey, boxI); - } // for (int boxI=1; boxI<boxes; boxI++) - return charList; - } // end -- if there's an allele found in postgres + else { charList = queryPostgresCharacterList(charList, s, joinkey); return charList; } // if there is a match } else if (field.equals(pubString)) { // if querying the publication, get paper data Connection c = connectToDB(); @@ -441,24 +374,22 @@ if (match != null) { query = match; } // query for this, otherwise keep the default value int foundPaper = 0; // flag if there are any papers in postgres that match, otherwise give an error warning ResultSet rs = null; // initialize result of query - try { rs = s2.executeQuery("SELECT DISTINCT(joinkey), alp_box FROM alp_paper WHERE alp_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper + try { rs = s2.executeQuery("SELECT DISTINCT(joinkey) FROM app_paper WHERE app_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } + System.out.println("We got an exception while executing our app_paper 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: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 - try { rs2 = s2.executeQuery("SELECT DISTINCT(joinkey), alp_box FROM alp_paper WHERE alp_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper + try { rs2 = s2.executeQuery("SELECT DISTINCT(joinkey) FROM app_paper WHERE app_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper catch (SQLException se) { - System.out.println("We got an exception while executing our query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } + System.out.println("We got an exception while executing our app_paper query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } try { while (rs2.next()) { // while there's data in postgres String joinkey = "No Allele assigned for Publication "+query+"."; // initialize allele in each phenote character Row - int boxI = 0; joinkey = rs2.getString(1); // get the allele from postgres - boxI = rs2.getInt(2); // get the big box from postgres - charList = queryPostgresCharacterList(charList, s, joinkey, boxI); + charList = queryPostgresCharacterList(charList, s, joinkey); } } catch (SQLException se) { System.out.println("We got an exception while getting a publication query result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-04-03 00:05:54
|
Revision: 458 http://svn.sourceforge.net/obo/?rev=458&view=rev Author: nlw Date: 2007-04-02 17:05:54 -0700 (Mon, 02 Apr 2007) Log Message: ----------- updated my config file for everyone Modified Paths: -------------- phenote/trunk/conf/nicole.cfg Modified: phenote/trunk/conf/nicole.cfg =================================================================== --- phenote/trunk/conf/nicole.cfg 2007-04-02 23:49:18 UTC (rev 457) +++ phenote/trunk/conf/nicole.cfg 2007-04-03 00:05:54 UTC (rev 458) @@ -1,48 +1,47 @@ - -<phenote-configuration version="1.0" xmlns="phenote/config/xml" noNamespaceSchemaLocation="phenote-config.xsd"> - - <dataadapter name="phenosyntax" enable="true"/> - <dataadapter name="phenoxml" enable="true"/> - <dataadapter name="delimited" enable="true"/> - - <log config-file="conf/log4j-standalone.xml" /> - - <uvic-graph enable="false"/> - - <obo-repository url-dir="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/"/> - - <field name="Pub" syntax-abbrev="PUB" type="free_text"/> - - <field name="Genotype" syntax-abbrev="GT" type="free_text"/> - - <field name="Genetic Context" syntax-abbrev="GC"> - <ontology file="context.obo"/> - </field> - - <field name="Entity" syntax-abbrev="E"> - <!-- postcomp relationship-ontology="relationship.obo" repos-subdir="OBO_REL"/ --> - <ontology file="relationship.obo" is-postcomp-rel="true" repos-subdir="OBO_REL"/> - <ontology name="FMA" file="fma_obo.obo" /> - <ontology name="GO" file="gene_ontology.obo" repos-subdir="genomic-proteomic"/> - <ontology name="CHEBI" file="chebi.obo" repos-subdir="chemical"/> - <ontology name="CL" file="cell.obo" repos-subdir="anatomy/cell_type" /> - <ontology name="SP" file="spatial.obo"/> - </field> - - <field name="Quality" syntax-abbrev="Q"> - <ontology name="PATO" file="quality.obo" repos-subdir="phenotype" /> - <ontology name="MP" file="mammalian_phenotype.obo" repos-subdir="phenotype" /> - </field> - - <field name="Count" syntax-abbrev="C" type="free_text"/> - <field name="Measurement" syntax-abbrev="M" type="free_text"/> - <field name="Unit" file="unit.obo" syntax-abbrev="U" repos-subdir="phenotype" /> - <field name="Evidence" file="evidence_code.obo" syntax-abbrev="EC" repos-subdir="." /> - - <field name="Abnormal" syntax-abbrev="Tag"> - <ontology file="quality.obo" slim="abnormal_slim" /> - </field> - - <field name="Description" syntax-abbrev="Desc" type="free_text"/> - -</phenote-configuration> +<?xml version="1.0" encoding="UTF-8"?> +<ns:phenote-configuration version="1.1.2" xmlns:ns="phenote/config/xml"> + <ns:log config-file="conf/log4j-standalone.xml"/> + <ns:dataadapter name="phenote.dataadapter.phenosyntax.PhenoSyntaxFileAdapter" enable="true"/> + <ns:dataadapter name="phenote.dataadapter.phenoxml.PhenoXmlAdapter" enable="true"/> + <ns:dataadapter name="phenote.dataadapter.nexus.NEXUSAdapter" enable="false"/> + <ns:dataadapter name="phenote.dataadapter.delimited.DelimitedFileAdapter" enable="true"/> + <ns:uvic-graph enable="false"/> + <ns:obo-repository url-dir="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/"/> + <ns:field name="Pub" syntax-abbrev="PUB" enable="true"/> + <ns:field name="Genotype" syntax-abbrev="GT" enable="true"/> + <ns:field name="Genetic Context" syntax-abbrev="GC" enable="true"> + <ns:ontology name="Genetic Context" file="context.obo"/> + </ns:field> + <ns:field name="Entity" syntax-abbrev="E" enable="true"> + <ns:ontology name="Relationship" file="relationship.obo" repos-subdir="OBO_REL" is-postcomp-rel="true"/> + <ns:ontology name="FMA" file="fma_obo.obo"/> + <ns:ontology name="GO" file="gene_ontology.obo" repos-subdir="genomic-proteomic"/> + <ns:ontology name="CL" file="cell.obo" repos-subdir="anatomy/cell_type"/> + <ns:ontology name="SO" file="so.obo" repos-subdir="genomic-proteomic"/> + <ns:ontology name="CHEBI" file="chebi.obo" repos-subdir="chemical"/> + </ns:field> + <ns:field name="Quality" syntax-abbrev="Q" enable="true"> + <ns:ontology name="PATO" file="quality.obo" repos-subdir="phenotype"/> + <ns:ontology name="MP" file="mammalian_phenotype.obo" repos-subdir="phenotype"/> + </ns:field> + <ns:field name="Add'l Entity" syntax-abbrev="E2" enable="true"> + <ns:ontology name="Relationship" file="relationship.obo" repos-subdir="OBO_REL" is-postcomp-rel="true"/> + <ns:ontology name="FMA" file="fma_obo.obo"/> + <ns:ontology name="GO" file="gene_ontology.obo" repos-subdir="genomic-proteomic"/> + <ns:ontology name="CL" file="cell.obo" repos-subdir="anatomy/cell_type"/> + <ns:ontology name="SO" file="so.obo" repos-subdir="genomic-proteomic"/> + <ns:ontology name="CHEBI" file="chebi.obo" repos-subdir="chemical"/> + </ns:field> + <ns:field name="Time" syntax-abbrev="T" enable="true"/> + <ns:field name="Count" syntax-abbrev="C" enable="true"/> + <ns:field name="Unit" syntax-abbrev="U" enable="true"> + <ns:ontology name="Unit" file="unit.obo" repos-subdir="phenotype"/> + </ns:field> + <ns:field name="Abnormal" syntax-abbrev="Tag" enable="true"> + <ns:ontology name="Abnormal" file="quality.obo" slim="abnormal_slim"/> + </ns:field> + <ns:field name="Description" syntax-abbrev="Desc" enable="true"/> + <ns:field name="Evidence" syntax-abbrev="EC" enable="false"> + <ns:ontology name="Evidence" file="evidence_code.obo" repos-subdir="."/> + </ns:field> +</ns:phenote-configuration> \ 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: <nl...@us...> - 2007-04-02 23:49:21
|
Revision: 457 http://svn.sourceforge.net/obo/?rev=457&view=rev Author: nlw Date: 2007-04-02 16:49:18 -0700 (Mon, 02 Apr 2007) Log Message: ----------- fixed bad link on homepage rearranged order of "features" Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/info/index.shtml phenote/trunk/doc/phenote-website/content/software/index.shtml phenote/trunk/doc/phenote-website/index.shtml Modified: phenote/trunk/doc/phenote-website/content/info/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/info/index.shtml 2007-04-02 23:25:14 UTC (rev 456) +++ phenote/trunk/doc/phenote-website/content/info/index.shtml 2007-04-02 23:49:18 UTC (rev 457) @@ -22,12 +22,16 @@ </li> <li>Bulk copy/edit/delete/sort of phenotype-genotype character entries </li> - <li>Two output formats: phenosyntax and phenoxml + <li>Excel-compatible output format (tab-delimited) </li> + <li>Additional export formats: phenosyntax, xml + </li> <li>configurable input fields to allow custom data entry and user-specified ontologies </li> <li>Preconfigurations available for different communities </li> + <li>Customized configurations easily added + </li> </ul> <p> Modified: phenote/trunk/doc/phenote-website/content/software/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-02 23:25:14 UTC (rev 456) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-02 23:49:18 UTC (rev 457) @@ -8,19 +8,19 @@ <h2>Phenote Software</h2> -<h3><a name="current">Current Release: 1.1</a><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote.jnlp">Webstart</a> -<a href="http://obo.svn.sourceforge.net/*checkout*/obo/phenote/tags/release-1.1/">Download</a></h3> +<h3><a name="current">Current Release: 1.1</a> [<a href="http://toy.lbl.gov:9010/phenote/1.1/phenote.jnlp">Webstart</a>] [ +<a href="http://obo.svn.sourceforge.net/*checkout*/obo/phenote/tags/release-1.1/">Download</a>]</h3> Newest Features: <ul> -<li>Phenote will merge its default configuration with users' configuration. This preserves user's additions as well as adding anything new from phenote upgrades.</li> -<li>User can select configuration they want to use at initialization or subsequently from file menu (currently requires phenote restart). </li> +<li>Can now search ALL ontologies of a field without having to change the pull-down menu</li> +<li>User can choose to update their local copy of an OBO ontology from sourceforge (can also retrieve if no local file found)</li> <li>Tab delimited data adapter</li> <li>Beginnings of term history</li> +<li>User can select configuration they want to use at initialization or subsequently from file menu (currently requires phenote restart). </li> +<li>Phenote merges its default configuration with users' configuration. This preserves user's additions as well as adds anything new from phenote upgrades.</li> +<li>QueryableDataAdapter interface for adding a database data adapter that can be queried. The data adapter specifies queryable fields, which get a retrieve button.</li> +<li>Improved layout</li> <li>Tabbed main data-entry panel if more than 12 fields are present. Note that all fields will be displayed in the lower display table without scrolling</li> -<li>QueryableDataAdapter interface for adding a database data adapter that can be queried. The data adapter specifies queryable fields, which get a retrieve button.</li> -<li>Layout improved</li> -<li>Can now search ALL ontologies of a field without having to change the pull-down menu</li> -<li>User can choose to update their local copy of an OBO ontology from sourceforge (can also retrieve if no local file found)</li> <li>Refactored code for field guis</li> <li>Ontology chooser reflects current term (bug fix)</li> <li>Improvements to uvic graphics (still not ready for prime time)</li> Modified: phenote/trunk/doc/phenote-website/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/index.shtml 2007-04-02 23:25:14 UTC (rev 456) +++ phenote/trunk/doc/phenote-website/index.shtml 2007-04-02 23:49:18 UTC (rev 457) @@ -13,7 +13,7 @@ <p>Data annotated with Phenote is based on the <a href="http://www.fruitfly.org/~cjm/obd/formats.html">EQ model</a> for representing phenotypes, combining entities from any OBO ontology with qualities (such as from <a href="http://www.bioontology.org/wiki/index.php/PATO:About">PATO</a>). </p> -<p>The software can be used as a complete package, or individual compontents can be downloaded and plugged in to your desired application. Check out our <a href="/info/">Info</a> page to learn more.</p> +<p>The software can be used as a complete package, or individual compontents can be downloaded and plugged in to your desired application. Check out our <a href="/content/info/">Info</a> page to learn more.</p> <p>This tool is being developed by the <a href="http://berkeleybop.org/">Bioinformatics Core</a> of the <a href="http://www.bioontology.org">National Center for Biomedical Ontology</a>. </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-04-02 23:25:39
|
Revision: 456 http://svn.sourceforge.net/obo/?rev=456&view=rev Author: nlw Date: 2007-04-02 16:25:14 -0700 (Mon, 02 Apr 2007) Log Message: ----------- adding content... Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/howtos/customize.shtml phenote/trunk/doc/phenote-website/content/howtos/index.shtml phenote/trunk/doc/phenote-website/content/software/index.shtml Modified: phenote/trunk/doc/phenote-website/content/howtos/customize.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/customize.shtml 2007-04-02 21:57:56 UTC (rev 455) +++ phenote/trunk/doc/phenote-website/content/howtos/customize.shtml 2007-04-02 23:25:14 UTC (rev 456) @@ -35,16 +35,19 @@ <h2>How to set up a custom configuration in Phenote</h2> <p> -Once you have placed or modified your configuration file in the ".phenote/conf" directory, you need to tell Phenote to use that particular file. +Once you have placed or modified your configuration file in the ".phenote/conf" directory, you need to tell Phenote to use that particular file. + +Note that with Phenote v1.1 or later, the user can choose a different configuration from the "File" menu. +When you select "Load Configuration", you are prompted with a list of options. +Listed are several configuration styles that come standard with the Phenote software, with the current choice's radio-button selected. +If you have created your own custom configuration file with a ".cfg" extension, it should be listed here. +After selecting (the radio button) for a new configuration, press "OK", or press "Cancel" to revert to your previous selection. +Any changes to your configuration settings will take effect the next time Phenote is loaded. + </p> <p> -To do this, simply edit the file ".phenote/conf/my-phenote.cfg". -If you don't already have this file, you can create a new one. -It should have one single line, which should have the name of the file you want to use. For example, if the name of the file I have copied into ".phenote/conf/" is called my-config.cfg, the my-phenote.cfg file will have one line that reads "my-config.cfg". +Then, you should be able to start phenote with the same webstart link as before, but it should load with this new configuration. you can also start it by double-clicking on the java icon that downloaded to your desktop called "phenote.jnlp". </p> -<p> -Then, you should be able to start phenote with the same webstart link as before, but it should load with this new configuration. you can also start it by double-clicking on the java icon that downloaded to your desktop called "phenote-zfin.jnlp" or somesuch. -</p> <br /> <h2>Other topics under construction:</h2> <h2>Location to put your personal obo files</h2> Modified: phenote/trunk/doc/phenote-website/content/howtos/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-04-02 21:57:56 UTC (rev 455) +++ phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-04-02 23:25:14 UTC (rev 456) @@ -10,15 +10,11 @@ <h3><a name="software">Software</a></h3> <h4><a name="webstart">Running Phenote Webstart Version(s)</a></h4> <p> -By clicking any of links below, Phenote will use Webstart to launch the java application from the web. Simply clicking on a link below will download the application to your computer and run. Future clicks on the link should recognize that you've already downloaded the application, and it will simply start the software. If a newer version of the software is detected on the server, the newest version will replace your old version and then run.</p> +Phenote is a Java application, which can be launched from the web using "Webstart". Simply click on the link below, and this will download the application to your computer and run. Future clicks on the link should recognize that you've already downloaded the application, and it will simply start the software.</p> <p> -Three configurations of Phenote 1.0 have been created to include the ontologies most appropriate for use by those communities: -<ul> -<li><a href="/phenote/1.0/phenote-flybase.jnlp">Fly</a></li> -<li><a href="/phenote/1.0/phenote-zfin.jnlp">Zebrafish</a></li> -<li><a href="/phenote/1.0/phenote-human.jnlp">Human</a></li> -</ul> - +Webstart: <a href="/phenote/1.1/phenote.jnlp">Phenote v1.1</a> +</p> +<p> Phenote can also be launched from our <a href="/content/software/">Downloads</a> page. There you will also find any newer versions under development. </p> @@ -39,8 +35,7 @@ <a href="http://obo.svn.sourceforge.net/viewvc/obo/phenote/trunk/"> https://obo.svn.sourceforge.net/viewvc/obo/phenote/trunk/</a> <br /> - -Note that if you use this version, it might be buggy. +Note that if you use this version, it might be buggy. Stable releases can be checked out from phenote/tags in the subversion repository. </p> @@ -51,7 +46,12 @@ <p> At the moment it requires hand editing of a file, which is fairly painless. If you are interested in configuring your version of Phenote, please read our <a href="/content/howtos/customize.shtml">Instructions on how to edit the configuration file.</a> In the future, we plan to have an easy-to-use GUI that will allow you to achieve the same results. </p> - +<p> +Note that with Phenote v1.1 or later, the user can choose a different configuration from the "File" menu. When you select "Load Configuration" from the "File" menu, you are prompted with a menu of options. Listed are several configuration styles that come standard with the Phenote software, with the current choice's radio-button selected. +If you have created your own custom configuration file, it should be listed here. +After selecting (the radio button) for a new configuration, press "OK", or press "Cancel" to revert to your previous selection. +Any changes to your configuration settings will take effect the next time Phenote is loaded. +</p> <h3><a name="annotation">Making Annotations</a></h3> <p> </p> Modified: phenote/trunk/doc/phenote-website/content/software/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-02 21:57:56 UTC (rev 455) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-02 23:25:14 UTC (rev 456) @@ -8,10 +8,8 @@ <h2>Phenote Software</h2> -<h3><a name="current">Current Release: 1.1</a></h3> -<a href="http://toy.lbl.gov:9010/phenote/1.1/phenote.jnlp">Webstart</a> -<a href="http://obo.svn.sourceforge.net/*checkout*/obo/phenote/tags/release-1.1/">Download</a> -<br /> +<h3><a name="current">Current Release: 1.1</a><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote.jnlp">Webstart</a> +<a href="http://obo.svn.sourceforge.net/*checkout*/obo/phenote/tags/release-1.1/">Download</a></h3> Newest Features: <ul> <li>Phenote will merge its default configuration with users' configuration. This preserves user's additions as well as adding anything new from phenote upgrades.</li> @@ -27,9 +25,8 @@ <li>Ontology chooser reflects current term (bug fix)</li> <li>Improvements to uvic graphics (still not ready for prime time)</li> </ul> -<br /> <p> -See the <a href="http://www.phenote.org/phenote-release-notes.html">Release Notes</a> for more information. +See the <a href="http://www.phenote.org/phenote-release-notes.html">Release Notes</a> for more information or back-versions. </p> <h3><a name="devel">Development Version</a></h3> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <azu...@us...> - 2007-04-02 21:57:56
|
Revision: 455 http://svn.sourceforge.net/obo/?rev=455&view=rev Author: azurebrd Date: 2007-04-02 14:57:56 -0700 (Mon, 02 Apr 2007) Log Message: ----------- 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-04-02 20:44:49 UTC (rev 454) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-04-02 21:57:56 UTC (rev 455) @@ -26,6 +26,7 @@ import java.sql.SQLException; import java.sql.Statement; import java.sql.ResultSet; +import java.sql.PreparedStatement; @@ -43,12 +44,107 @@ } public void commit(CharacterListI charList) { - String m = "Worm adapter commit not yet implemented."; - JOptionPane.showMessageDialog(null,m,"Worm stub",JOptionPane.INFORMATION_MESSAGE); +// String m = "Worm adapter commit not yet implemented."; +// JOptionPane.showMessageDialog(null,m,"Worm stub",JOptionPane.INFORMATION_MESSAGE); + Connection c = connectToDB(); + Statement s = null; + try { s = c.createStatement(); } + catch (SQLException se) { + System.out.println("We got an exception while creating a statement: that probably means we're no longer connected."); se.printStackTrace(); System.exit(1); } + for (CharacterI chr : charList.getList()) { +// System.out.println("Chr "+chr+" end"); + try { + String allele = chr.getValueString("Allele"); +// System.out.println( "Allele : "+allele+" end."); + String paper = chr.getValueString("Pub"); +// System.out.println( "Pub : "+paper+" end."); + String curator = chr.getValueString("Curator"); +// System.out.println( "Curator : "+curator+" end."); + String person = chr.getValueString("Person"); +// System.out.println( "Person : "+person+" end."); + String phen_text_remark = chr.getValueString("Phenotype Text Remark"); +// System.out.println( "Phenotype Text Remark : "+phen_text_remark+" end."); + String remark = chr.getValueString("Other Remark"); +// System.out.println( "Other Remark : "+remark+" end."); + String genetic_interaction = chr.getValueString("Genetic Interaction"); +// System.out.println( "Genetic Interaction : "+genetic_interaction+" end."); + String alp_term = chr.getValueString("Phenotype"); +// System.out.println( "Phenotype : "+alp_term+" end."); + String alp_phen_remark = chr.getValueString("Phenotype Remark"); +// System.out.println( "Phenotype Remark : "+alp_phen_remark+" end."); + String alp_anat_term = chr.getValueString("Anatomy"); +// System.out.println( "Anatomy : "+alp_anat_term+" end."); + String entity = chr.getValueString("Entity"); +// System.out.println( "Entity : "+entity+" end."); + String quality = chr.getValueString("Quality"); +// System.out.println( "Quality : "+quality+" end."); + String alp_lifestage = chr.getValueString("Stage"); +// System.out.println( "Stage : "+alp_lifestage+" end."); + String alp_nature = chr.getValueString("Allele Nature"); +// System.out.println( "Allele Nature : "+alp_nature+" end."); + String alp_func = chr.getValueString("Functional Change"); +// System.out.println( "Functional Change : "+alp_func+" end."); + String alp_temperature = chr.getValueString("Temperature"); +// System.out.println( "Temperature : "+alp_temperature+" end."); + String alp_preparation = chr.getValueString("Preparation"); +// System.out.println( "Preparation : "+alp_preparation+" end."); + String alp_penetrance = chr.getValueString("Penetrance"); +// System.out.println( "Penetrance : "+alp_penetrance+" end."); + String alp_percent = chr.getValueString("Penetrance Percent"); +// System.out.println( "Penetrance Percent : "+alp_percent+" end."); + String alp_range = chr.getValueString("Penetrance Range"); +// System.out.println( "Penetrance Range : "+alp_range+" end."); + String alp_quantity_remark = chr.getValueString("Quantity Remark"); +// System.out.println( "Quantity Remark : "+alp_quantity_remark+" end."); + String alp_heat_sens = chr.getValueString("Heat Sensitive"); +// System.out.println( "Heat Sensitive : "+alp_heat_sens+" end."); + String alp_heat_degree = chr.getValueString("Heat Sensitive Degree"); +// System.out.println( "Heat Sensitive Degree : "+alp_heat_degree+" end."); + String alp_cold_sens = chr.getValueString("Cold Sensitive"); +// System.out.println( "Cold Sensitive : "+alp_cold_sens+" end."); + String alp_cold_degree = chr.getValueString("Cold Sensitive"); +// System.out.println( "Cold Sensitive Degree : "+alp_cold_degree+" end."); + String alp_mat_effect = chr.getValueString("Maternal Effect"); +// System.out.println( "Maternal Effect : "+alp_mat_effect+" end."); + String alp_pat_effect = chr.getValueString("Paternal Effect"); +// System.out.println( "Paternal Effect : "+alp_pat_effect+" end."); + String alp_genotype = chr.getValueString("Genotype"); +// System.out.println( "Genotype : "+alp_genotype+" end."); + String alp_strain = chr.getValueString("Strain"); +// System.out.println( "Strain : "+alp_strain+" end."); + String alp_delevered = chr.getValueString("Delivered By"); +// System.out.println( "Delivered By : "+alp_delevered+" end."); + if (allele != null) { + int found_allele = 0; + ResultSet rs = null; // intialize postgres query result + String joinkey = allele; + try { rs = s.executeQuery("SELECT * FROM alp_tempname WHERE alp_tempname = '"+joinkey+"'"); } // find the allele that matches the queried allele + catch (SQLException se) { + System.out.println("We got an exception while executing our query: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { while (rs.next()) { +// default_value = rs.getString(4); +// System.out.println("Found "+joinkey+" allele in alp_tempname."); + found_allele++; } } + catch (SQLException se) { + System.out.println("We got an exception while getting a alp_tempname result:this shouldn't happen: we've done something really bad."); se.printStackTrace(); System.exit(1); } + if (found_allele > 0) { + PreparedStatement ps = null; // intialize postgres insert + try { ps = c.prepareStatement("INSERT INTO alp_tempname VALUES (?, ?)"); ps.setString(1, joinkey); ps.setString(2, allele); } + catch (SQLException se) { + System.out.println("We got an exception while preparing our insert: that probably means our SQL is invalid"); se.printStackTrace(); System.exit(1); } + try { ps.executeUpdate(); } // write to alp_tempname, which is not what we really want, but we need to figure out the pubchunk thing to see what we're going to do + catch (SQLException se) { System.out.println("We got an exception while executing an update: possibly bad SQL, or check the connection."); se.printStackTrace(); System.exit(1); } } } + else { + System.out.println("There is no allele for "+chr+" Character"); } + } catch (Exception e) { + System.out.println("Could not get terms from character: " + e); + } + + } // for (CharacterI chr : charList.getList()) // if alleleQueried... wipe out allele and insert // else if Pub queried... wipe out pub and insert // else - new insert & deletes(from transactions) - } + } // public void commit(CharacterListI charList) // Returns the first substring in input that matches the pattern. Returns null if no match found. // lifted from http://www.exampledepot.com/egs/java.util.regex/Greedy.html?l=rel @@ -343,7 +439,6 @@ String match = find("WBPaper[0-9]*", query); // Find a WBPaper followed by any amount of digits if (match != null) { query = match; } // query for this, otherwise keep the default value -System.out.println("Going to query for "+query+"."); int foundPaper = 0; // flag if there are any papers in postgres that match, otherwise give an error warning ResultSet rs = null; // initialize result of query try { rs = s2.executeQuery("SELECT DISTINCT(joinkey), alp_box FROM alp_paper WHERE alp_paper ~ '"+query+"' ORDER BY joinkey;"); } // get the alleles from a paper This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-04-02 20:44:48
|
Revision: 454 http://svn.sourceforge.net/obo/?rev=454&view=rev Author: nlw Date: 2007-04-02 13:44:49 -0700 (Mon, 02 Apr 2007) Log Message: ----------- added list of new features directly on page Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/software/index.shtml Modified: phenote/trunk/doc/phenote-website/content/software/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-02 20:31:16 UTC (rev 453) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-02 20:44:49 UTC (rev 454) @@ -11,8 +11,26 @@ <h3><a name="current">Current Release: 1.1</a></h3> <a href="http://toy.lbl.gov:9010/phenote/1.1/phenote.jnlp">Webstart</a> <a href="http://obo.svn.sourceforge.net/*checkout*/obo/phenote/tags/release-1.1/">Download</a> - +<br /> +Newest Features: +<ul> +<li>Phenote will merge its default configuration with users' configuration. This preserves user's additions as well as adding anything new from phenote upgrades.</li> +<li>User can select configuration they want to use at initialization or subsequently from file menu (currently requires phenote restart). </li> +<li>Tab delimited data adapter</li> +<li>Beginnings of term history</li> +<li>Tabbed main data-entry panel if more than 12 fields are present. Note that all fields will be displayed in the lower display table without scrolling</li> +<li>QueryableDataAdapter interface for adding a database data adapter that can be queried. The data adapter specifies queryable fields, which get a retrieve button.</li> +<li>Layout improved</li> +<li>Can now search ALL ontologies of a field without having to change the pull-down menu</li> +<li>User can choose to update their local copy of an OBO ontology from sourceforge (can also retrieve if no local file found)</li> +<li>Refactored code for field guis</li> +<li>Ontology chooser reflects current term (bug fix)</li> +<li>Improvements to uvic graphics (still not ready for prime time)</li> +</ul> +<br /> +<p> See the <a href="http://www.phenote.org/phenote-release-notes.html">Release Notes</a> for more information. +</p> <h3><a name="devel">Development Version</a></h3> Note that this version has not been fully tested and might contain bugs. Please report any bugs you find on our <a href="https://sourceforge.net/tracker/?group_id=76834&atid=887913">tracker</a> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-04-02 20:37:26
|
Revision: 453 http://svn.sourceforge.net/obo/?rev=453&view=rev Author: nlw Date: 2007-04-02 13:31:16 -0700 (Mon, 02 Apr 2007) Log Message: ----------- adding links to newest phenote v1.1 Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/software/index.shtml Modified: phenote/trunk/doc/phenote-website/content/software/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-03-30 21:31:05 UTC (rev 452) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-04-02 20:31:16 UTC (rev 453) @@ -8,27 +8,17 @@ <h2>Phenote Software</h2> -<h3>Current Release: 1.0</h3> -Three configurations of Phenote have been created to include the ontologies most appropriate for use by those communities. The following are the webstart versions for the most current stable release: -<ul> -<li><a href="/phenote/1.0/phenote-flybase.jnlp">Fly</a></li> -<li><a href="/phenote/1.0/phenote-zfin.jnlp">Zebrafish</a></li> -<li><a href="/phenote/1.0/phenote-human.jnlp">Human</a></li> -</ul> +<h3><a name="current">Current Release: 1.1</a></h3> +<a href="http://toy.lbl.gov:9010/phenote/1.1/phenote.jnlp">Webstart</a> +<a href="http://obo.svn.sourceforge.net/*checkout*/obo/phenote/tags/release-1.1/">Download</a> -<h3><a name="annotation">Development Versions</a></h3> -Note that these versions have not been fully tested and might contain bugs. Please report any bugs you find on our <a href="https://sourceforge.net/tracker/?group_id=76834&atid=887913">tracker</a> +See the <a href="http://www.phenote.org/phenote-release-notes.html">Release Notes</a> for more information. + +<h3><a name="devel">Development Version</a></h3> +Note that this version has not been fully tested and might contain bugs. Please report any bugs you find on our <a href="https://sourceforge.net/tracker/?group_id=76834&atid=887913">tracker</a> <ul> -<li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-zfin.jnlp">Zebrafish v1.1</a> -<p> Most notable features of this version are: - <ul> - <li>Ability to configure phenote input fields/ontologies for use with webstart, not just the command-line version. (For more information about how to create and use your own custom configuration, read our <a href="/content/howtos/customize.shtml">how-to:customize</a> documentation.) - </li> - <li>Ability to search through all loaded ontologies at once with the autocompletion feature, in addition to searching for terms in individual ontologies. - </li> - </ul> +<li><a href="http://toy.lbl.gov:9010/phenote/latest/phenote.jnlp">Phenote-devel</a> </ul> -</p> <p> You can also <a href="http://obo.svn.sourceforge.net/*checkout*/obo/phenote/trunk/">checkout</a> the latest Development version of Phenote from sourceforge. </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:31:05
|
Revision: 452 http://svn.sourceforge.net/obo/?rev=452&view=rev Author: cmpich Date: 2007-03-30 14:31:05 -0700 (Fri, 30 Mar 2007) Log Message: ----------- added comment about the hard-coded actions Modified Paths: -------------- phenote/trunk/src/web/html/ajax-test.html Modified: phenote/trunk/src/web/html/ajax-test.html =================================================================== --- phenote/trunk/src/web/html/ajax-test.html 2007-03-30 21:30:15 UTC (rev 451) +++ phenote/trunk/src/web/html/ajax-test.html 2007-03-30 21:31:05 UTC (rev 452) @@ -6,7 +6,9 @@ <BODY> - +<!-- +Hard-coded context to phenote! +--> <form name="termForm" action="/phenote/Phenote/" method="post"> <div id="ontology" width="20%"> @@ -40,6 +42,9 @@ </form> <p></p> +<!-- +Hard-coded context to phenote! +--> GET: <a href="/phenote/Phenote/?termId=ZFA:0001066&ontologyName=ZF&field=ENTITY"> Get Term Info</a> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:30:14
|
Revision: 451 http://svn.sourceforge.net/obo/?rev=451&view=rev Author: cmpich Date: 2007-03-30 14:30:15 -0700 (Fri, 30 Mar 2007) Log Message: ----------- create log file in the tomcat logs directory, log only warnings and higher by default. In dev mode just change 'warn' to 'info' Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/log4j.xml Modified: phenote/trunk/src/web/WEB-INF/log4j.xml =================================================================== --- phenote/trunk/src/web/WEB-INF/log4j.xml 2007-03-30 21:28:56 UTC (rev 450) +++ phenote/trunk/src/web/WEB-INF/log4j.xml 2007-03-30 21:30:15 UTC (rev 451) @@ -4,7 +4,7 @@ <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="MAIN" class="org.apache.log4j.RollingFileAppender"> - <param name="File" value="phenote_log4j.log" /> + <param name="File" value="${catalina.base}/logs/phenote.log" /> <param name="Append" value="true" /> <param name="MaxFileSize" value="1MB" /> <param name="MaxBackupIndex" value="10" /> @@ -20,12 +20,12 @@ </appender> <category name="phenote" additivity="true"> - <priority value="info"/> + <priority value="warn"/> <appender-ref ref="MAIN" /> </category> <root> - <priority value="info" /> + <priority value="warn" /> <appender-ref ref="MAIN" /> </root> </log4j:configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:28:55
|
Revision: 450 http://svn.sourceforge.net/obo/?rev=450&view=rev Author: cmpich Date: 2007-03-30 14:28:56 -0700 (Fri, 30 Mar 2007) Log Message: ----------- removed appender and ensured that if no log4j file being found not to call the log4j Configurator Modified Paths: -------------- phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java Modified: phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java =================================================================== --- phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java 2007-03-30 21:27:06 UTC (rev 449) +++ phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java 2007-03-30 21:28:56 UTC (rev 450) @@ -2,8 +2,6 @@ import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.apache.log4j.RollingFileAppender; import org.apache.log4j.xml.DOMConfigurator; import org.springframework.web.servlet.DispatcherServlet; import phenote.config.Config; @@ -15,7 +13,6 @@ import javax.servlet.ServletContext; import javax.servlet.ServletException; import java.io.File; -import java.io.IOException; public class PhenoteServlet extends DispatcherServlet { @@ -29,7 +26,7 @@ * Initialization of this servlet upon server startup. * Happens when <load-on-startup> tag in the web.xml is set to '1'. * - * @param config + * @param config ServletConfig * @throws ServletException */ public void init(ServletConfig config) throws ServletException { @@ -80,36 +77,20 @@ if (log4jFileName != null) { DOMConfigurator.configure(log4jFileName); } - addRootAppender(); } private String getLog4JFile() { File log4jFile = new File(webInfDir, LOG4J_FILE_NAME); String log4jFileName = log4jFile.getAbsolutePath(); - if (!log4jFile.exists()) - System.out.println("Cannot find log4j file: " + log4jFileName); + if (!log4jFile.exists()){ + LOG.info("Cannot find the log4j file: " + log4jFileName ); + LOG.info(" Log4j is not configured in this servlet. Use App servers configuration " + + "make sure you have a log4j.properties file in the classes directory."); + return null; + } return log4jFileName; } - private void addRootAppender() { - Logger rootLogger = Logger.getRootLogger(); - String logFileName = "phenote.log"; - File file = new File(webInfDir, logFileName); - String absoluteFilePath = file.getAbsolutePath(); - RollingFileAppender appender = null; - try { - String logFilePattern = "%d [%t] %-5p %c{2} - %m%n"; - appender = new RollingFileAppender(new PatternLayout(logFilePattern), absoluteFilePath); - appender.setMaximumFileSize(1 * 1024 * 1024); - appender.setAppend(true); - appender.setMaxBackupIndex(10); - } catch (IOException e) { - e.printStackTrace(); - } - rootLogger.addAppender(appender); - } - - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:27:06
|
Revision: 449 http://svn.sourceforge.net/obo/?rev=449&view=rev Author: cmpich Date: 2007-03-30 14:27:06 -0700 (Fri, 30 Mar 2007) Log Message: ----------- adjusted cron jobs to run once a day Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/phenote-servlet.xml Modified: phenote/trunk/src/web/WEB-INF/phenote-servlet.xml =================================================================== --- phenote/trunk/src/web/WEB-INF/phenote-servlet.xml 2007-03-30 21:26:47 UTC (rev 448) +++ phenote/trunk/src/web/WEB-INF/phenote-servlet.xml 2007-03-30 21:27:06 UTC (rev 449) @@ -95,7 +95,7 @@ <ref bean="anatomyOntologyReloadJob"/> </property> <property name="cronExpression"> - <value>20 * * * * ?</value> + <value>20 0 23 * * ?</value> </property> </bean> @@ -104,7 +104,7 @@ <ref bean="geneOntologyReloadJob"/> </property> <property name="cronExpression"> - <value>40 * * * * ?</value> + <value>40 0 22 * * ?</value> </property> </bean> @@ -113,7 +113,7 @@ <ref bean="qualityOntologyReloadJob"/> </property> <property name="cronExpression"> - <value>0 * * * * ?</value> + <value>0 30 23 * * ?</value> </property> </bean> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:26:46
|
Revision: 448 http://svn.sourceforge.net/obo/?rev=448&view=rev Author: cmpich Date: 2007-03-30 14:26:47 -0700 (Fri, 30 Mar 2007) Log Message: ----------- added JavaDoc Modified Paths: -------------- phenote/trunk/src/java/phenote/servlet/AdminBean.java Modified: phenote/trunk/src/java/phenote/servlet/AdminBean.java =================================================================== --- phenote/trunk/src/java/phenote/servlet/AdminBean.java 2007-03-30 21:26:03 UTC (rev 447) +++ phenote/trunk/src/java/phenote/servlet/AdminBean.java 2007-03-30 21:26:47 UTC (rev 448) @@ -5,11 +5,8 @@ import java.util.List; /** - * Created by IntelliJ IDEA. - * User: Christian Pich - * Date: Nov 3, 2006 - * Time: 10:57:20 AM - * To change this template use File | Settings | File Templates. + * Bean used on the admin page that shows information about the ontologies + * loaded into Phenote. */ public class AdminBean { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:26:03
|
Revision: 447 http://svn.sourceforge.net/obo/?rev=447&view=rev Author: cmpich Date: 2007-03-30 14:26:03 -0700 (Fri, 30 Mar 2007) Log Message: ----------- added date for version release. Needs to be updated manually as you create a new version number. Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/jsp/admin.jsp Modified: phenote/trunk/src/web/WEB-INF/jsp/admin.jsp =================================================================== --- phenote/trunk/src/web/WEB-INF/jsp/admin.jsp 2007-03-30 21:25:44 UTC (rev 446) +++ phenote/trunk/src/web/WEB-INF/jsp/admin.jsp 2007-03-30 21:26:03 UTC (rev 447) @@ -1,5 +1,8 @@ <%@ page import="phenote.main.PhenoteVersion"%> +<%@ page import="java.util.Date"%> +<%@ page import="java.text.DateFormat"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> <%@ taglib prefix="phenote" uri="/WEB-INF/tld/phenote-tags.tld" %> <html> @@ -27,7 +30,12 @@ Date </td> <td colspan="3" class="listContent"> - 2006 + <% + Date date = PhenoteVersion.getDateOfVersion(); + DateFormat format = DateFormat.getDateInstance(DateFormat.LONG); + %> + <%= format.format(date)%> + <fmt:formatDate value="${versionDate}" /> </td> </tr> <tr><td colspan="4" class="sectionTitle"> List of Ontologies</td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:25:44
|
Revision: 446 http://svn.sourceforge.net/obo/?rev=446&view=rev Author: cmpich Date: 2007-03-30 14:25:44 -0700 (Fri, 30 Mar 2007) Log Message: ----------- added date for version release. Needs to be updated manually as you create a new version number. Modified Paths: -------------- phenote/trunk/src/java/phenote/main/PhenoteVersion.java Modified: phenote/trunk/src/java/phenote/main/PhenoteVersion.java =================================================================== --- phenote/trunk/src/java/phenote/main/PhenoteVersion.java 2007-03-30 21:25:28 UTC (rev 445) +++ phenote/trunk/src/java/phenote/main/PhenoteVersion.java 2007-03-30 21:25:44 UTC (rev 446) @@ -1,19 +1,27 @@ package phenote.main; +import java.util.Date; +import java.util.GregorianCalendar; + /** Simple class for phenote version number - for standalone & servlet */ public class PhenoteVersion { - + //private static final float MAJOR_VERSION_NUM = 0.8f; //private static final float SUB_VERSION_NUM = .3f; private static final String VERSION = "1.2-beta1"; // ?? // type is "dev" or "release" //private static final String type = " dev"; // "release" - + public static String versionString() { //return MAJOR_VERSION_NUM +""+ SUB_VERSION_NUM + type; return VERSION; } - + public static Date getDateOfVersion(){ + GregorianCalendar cal = new GregorianCalendar(2007, GregorianCalendar.MARCH, 16); + return cal.getTime(); + } + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-30 21:25:27
|
Revision: 445 http://svn.sourceforge.net/obo/?rev=445&view=rev Author: mgibson Date: 2007-03-30 14:25:28 -0700 (Fri, 30 Mar 2007) Log Message: ----------- commit button is now hooked up to QueryableDataAdapterI if there is one - like worm - and gets it label from the adapter Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java Modified: phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java 2007-03-30 21:23:28 UTC (rev 444) +++ phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java 2007-03-30 21:25:28 UTC (rev 445) @@ -10,5 +10,7 @@ public CharacterListI query(String field, String query) throws DataAdapterEx; public void commit(CharacterListI charList); + /** The label that gets displayed on the db commit button */ + public String getCommitButtonLabel(); } Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-03-30 21:23:28 UTC (rev 444) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-03-30 21:25:28 UTC (rev 445) @@ -38,6 +38,10 @@ public WormAdapter() { init(); } + public String getCommitButtonLabel() { + return "Commit To Worm DB"; + } + public void commit(CharacterListI charList) { String m = "Worm adapter commit not yet implemented."; JOptionPane.showMessageDialog(null,m,"Worm stub",JOptionPane.INFORMATION_MESSAGE); Modified: phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java =================================================================== --- phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-03-30 21:23:28 UTC (rev 444) +++ phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-03-30 21:25:28 UTC (rev 445) @@ -109,7 +109,7 @@ buttonPanel.add(Box.createRigidArea(new Dimension(80,0))); // should we only add if have data adapter - or disable at least? // should this go in a menu? - commitButton = addButton(SAVE_STRING,al,buttonPanel); + commitButton = addButton(getCommitButtonString(),al,buttonPanel); buttonPanel.add(Box.createRigidArea(new Dimension(20,0))); if (Config.inst().uvicGraphIsEnabled()) graphWindow = addButton("Graph",al,buttonPanel); @@ -123,6 +123,12 @@ getCharListManager().addCharListChangeListener(new TableCharListChangeListener()); } + private String getCommitButtonString() { + if (Config.inst().hasQueryableDataAdapter()) + return Config.inst().getQueryableDataAdapter().getCommitButtonLabel(); + else return SAVE_STRING; + } + private CharacterListManager getCharListManager() { return CharacterListManager.inst(); } @@ -249,7 +255,7 @@ } // SAVE - else if (e.getActionCommand().equals(SAVE_STRING)) { + else if (e.getActionCommand().equals(getCommitButtonString())) { // commented out this check because it won't work if there are multiple data adapters // error should probably be printed in LoadSaveManager anyway //Config c = Config.inst(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2007-03-30 21:23:28
|
Revision: 444 http://svn.sourceforge.net/obo/?rev=444&view=rev Author: cmpich Date: 2007-03-30 14:23:28 -0700 (Fri, 30 Mar 2007) Log Message: ----------- changed System.out into LOG.debug Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java Modified: phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-03-30 21:16:17 UTC (rev 443) +++ phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-03-30 21:23:28 UTC (rev 444) @@ -205,7 +205,7 @@ stopTimer(url+" checked against repos... obo session loaded"); mem = Runtime.getRuntime().totalMemory()/1000000; long max = Runtime.getRuntime().maxMemory()/1000000; - System.out.println("mem after load "+mem+" max "+max); + LOG.debug("mem after load "+mem+" max "+max); } /** url is either local file or repos url */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-30 21:16:18
|
Revision: 443 http://svn.sourceforge.net/obo/?rev=443&view=rev Author: mgibson Date: 2007-03-30 14:16:17 -0700 (Fri, 30 Mar 2007) Log Message: ----------- save data button now does a commit to queryable data adapter if there is one like worm - i wonder if the button should go away otherwise - as otherwise it brings up file dialog Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-03-30 20:58:39 UTC (rev 442) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-03-30 21:16:17 UTC (rev 443) @@ -39,6 +39,8 @@ public void commit(CharacterListI charList) { + String m = "Worm adapter commit not yet implemented."; + JOptionPane.showMessageDialog(null,m,"Worm stub",JOptionPane.INFORMATION_MESSAGE); // 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/gui/CharacterTablePanel.java =================================================================== --- phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-03-30 20:58:39 UTC (rev 442) +++ phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-03-30 21:16:17 UTC (rev 443) @@ -258,7 +258,18 @@ // return; //} //c.getSingleDataAdapter().commit(characterTableModel.getCharacterList()); - LoadSaveManager.inst().saveData(); + + // DATABASE if theres a queryable data adapter (database) then that steals + // the button from the file adapters + if (Config.inst().hasQueryableDataAdapter()) { + CharacterListI c = CharacterListManager.inst().getCharacterList(); + Config.inst().getQueryableDataAdapter().commit(c); + } + // FILE + else { + // should be renamed FileLoadSaveManager as its just for files + LoadSaveManager.inst().saveData(); + } } // UNDO This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-30 20:58:38
|
Revision: 442 http://svn.sourceforge.net/obo/?rev=442&view=rev Author: mgibson Date: 2007-03-30 13:58:39 -0700 (Fri, 30 Mar 2007) Log Message: ----------- well a funny omission - i never put a commit in the QueryablDataAdapterI and worm - need to now hook in to button Modified Paths: -------------- phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java Modified: phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java 2007-03-30 20:30:15 UTC (rev 441) +++ phenote/trunk/src/java/phenote/dataadapter/QueryableDataAdapterI.java 2007-03-30 20:58:39 UTC (rev 442) @@ -8,5 +8,7 @@ public boolean isFieldQueryable(String field); /** Throws exception if query fails, and no data to return */ public CharacterListI query(String field, String query) throws DataAdapterEx; + + public void commit(CharacterListI charList); } Modified: phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-03-30 20:30:15 UTC (rev 441) +++ phenote/trunk/src/java/phenote/dataadapter/worm/WormAdapter.java 2007-03-30 20:58:39 UTC (rev 442) @@ -37,6 +37,13 @@ public WormAdapter() { init(); } + + public void commit(CharacterListI charList) { + // if alleleQueried... wipe out allele and insert + // else if Pub queried... wipe out pub and insert + // else - new insert & deletes(from transactions) + } + // Returns the first substring in input that matches the pattern. Returns null if no match found. // lifted from http://www.exampledepot.com/egs/java.util.regex/Greedy.html?l=rel public static String find(String patternStr, CharSequence input) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-30 20:30:15
|
Revision: 441 http://svn.sourceforge.net/obo/?rev=441&view=rev Author: mgibson Date: 2007-03-30 13:30:15 -0700 (Fri, 30 Mar 2007) Log Message: ----------- added another diff field to post comp - what the heck Modified Paths: -------------- phenote/trunk/src/java/phenote/gui/field/PostCompGui.java Modified: phenote/trunk/src/java/phenote/gui/field/PostCompGui.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/PostCompGui.java 2007-03-30 20:00:40 UTC (rev 440) +++ phenote/trunk/src/java/phenote/gui/field/PostCompGui.java 2007-03-30 20:30:15 UTC (rev 441) @@ -109,6 +109,9 @@ // HARDWIRE 2ND REL&DIFF FOR NOW eventually put in refine button to add more diffs addRelDiffGui(); + // WHAT THE HELL HARDWIRE A 3RD + addRelDiffGui(); + // // Relationship?? stripped down ontology? hmmmmmm... // CharField relChar = new CharField(CharFieldEnum.RELATIONSHIP); // // Ontology o = OntologyManager.getRelationshipOntology() ?? getRelCharField? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |