You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(18) |
Aug
(33) |
Sep
(30) |
Oct
(27) |
Nov
(59) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(67) |
Feb
(44) |
Mar
(70) |
Apr
(73) |
May
(119) |
Jun
(31) |
Jul
(92) |
Aug
(86) |
Sep
(76) |
Oct
(152) |
Nov
(156) |
Dec
(85) |
2008 |
Jan
(111) |
Feb
(121) |
Mar
(107) |
Apr
(102) |
May
(45) |
Jun
(65) |
Jul
(62) |
Aug
(133) |
Sep
(56) |
Oct
(56) |
Nov
(17) |
Dec
(15) |
2009 |
Jan
(10) |
Feb
(5) |
Mar
(10) |
Apr
(14) |
May
(49) |
Jun
(94) |
Jul
(67) |
Aug
(23) |
Sep
(9) |
Oct
(92) |
Nov
(26) |
Dec
(51) |
2010 |
Jan
(105) |
Feb
(83) |
Mar
(52) |
Apr
(59) |
May
(68) |
Jun
(71) |
Jul
(127) |
Aug
(49) |
Sep
(91) |
Oct
(27) |
Nov
(33) |
Dec
(26) |
2011 |
Jan
(26) |
Feb
(45) |
Mar
(26) |
Apr
(28) |
May
(17) |
Jun
(15) |
Jul
(45) |
Aug
(33) |
Sep
(50) |
Oct
(22) |
Nov
(10) |
Dec
(21) |
2012 |
Jan
(33) |
Feb
(24) |
Mar
(36) |
Apr
(60) |
May
(60) |
Jun
(43) |
Jul
(114) |
Aug
(19) |
Sep
(35) |
Oct
(24) |
Nov
(64) |
Dec
(12) |
2013 |
Jan
(54) |
Feb
(58) |
Mar
(51) |
Apr
(46) |
May
(21) |
Jun
(29) |
Jul
(25) |
Aug
(25) |
Sep
(13) |
Oct
(7) |
Nov
(14) |
Dec
(27) |
2014 |
Jan
(10) |
Feb
(7) |
Mar
(16) |
Apr
(14) |
May
(19) |
Jun
(8) |
Jul
(15) |
Aug
(11) |
Sep
(5) |
Oct
(11) |
Nov
(11) |
Dec
(4) |
2015 |
Jan
(52) |
Feb
(27) |
Mar
(22) |
Apr
(17) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: <mg...@us...> - 2006-12-19 19:43:17
|
Revision: 259 http://svn.sourceforge.net/obo/?rev=259&view=rev Author: mgibson Date: 2006-12-19 11:43:13 -0800 (Tue, 19 Dec 2006) Log Message: ----------- big test - did a relocate - supposedly moving files should work??? Added Paths: ----------- phenote/trunk/conf/flybase.cfg Removed Paths: ------------- phenote/trunk/conf/initial-flybase.cfg Copied: phenote/trunk/conf/flybase.cfg (from rev 253, phenote/trunk/conf/initial-flybase.cfg) =================================================================== --- phenote/trunk/conf/flybase.cfg (rev 0) +++ phenote/trunk/conf/flybase.cfg 2006-12-19 19:43:13 UTC (rev 259) @@ -0,0 +1,31 @@ + +<phenote-configuration version="0.8" xmlns="phenote/config/xml" noNamespaceSchemaLocation="phenote-config.xsd"> + + <dataadapter name="phenosyntax"/> + <dataadapter name="phenoxml"/> + + <log config-file="conf/log4j-standalone.xml" /> + + <field name="Pub" /> + + <field name="Genotype" type="free_text"/> + + <field name="Genetic Context" file="context.obo"/> + + <field name="Entity"> + <postcomp relationship-ontology="relationship.obo"/> + <ontology name="Fly" file="fly_anatomy.obo" /> + <ontology name="GO" file="gene_ontology.obo"/> + <ontology name="SP" file="spatial.obo"/> + </field> + + <field name="Quality" file="quality.obo"/> + + <field name="Absent" file="quality.obo" slim="absent_slim" /> + <field name="Abnormal" file="quality.obo" slim="abnormal_slim" /> + + <field name="Evidence" file="evidence_code.obo"/> + + <field name="Description" /> + +</phenote-configuration> Deleted: phenote/trunk/conf/initial-flybase.cfg =================================================================== --- phenote/trunk/conf/initial-flybase.cfg 2006-12-19 19:29:45 UTC (rev 258) +++ phenote/trunk/conf/initial-flybase.cfg 2006-12-19 19:43:13 UTC (rev 259) @@ -1,31 +0,0 @@ - -<phenote-configuration version="0.8" xmlns="phenote/config/xml" noNamespaceSchemaLocation="phenote-config.xsd"> - - <dataadapter name="phenosyntax"/> - <dataadapter name="phenoxml"/> - - <log config-file="conf/log4j-standalone.xml" /> - - <field name="Pub" /> - - <field name="Genotype" type="free_text"/> - - <field name="Genetic Context" file="context.obo"/> - - <field name="Entity"> - <postcomp relationship-ontology="relationship.obo"/> - <ontology name="Fly" file="fly_anatomy.obo" /> - <ontology name="GO" file="gene_ontology.obo"/> - <ontology name="SP" file="spatial.obo"/> - </field> - - <field name="Quality" file="quality.obo"/> - - <field name="Absent" file="quality.obo" slim="absent_slim" /> - <field name="Abnormal" file="quality.obo" slim="abnormal_slim" /> - - <field name="Evidence" file="evidence_code.obo"/> - - <field name="Description" /> - -</phenote-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2006-12-19 19:29:54
|
Revision: 258 http://svn.sourceforge.net/obo/?rev=258&view=rev Author: mgibson Date: 2006-12-19 11:29:45 -0800 (Tue, 19 Dec 2006) Log Message: ----------- woops - termnotFoundException is now its own file/outer class Added Paths: ----------- phenote/trunk/src/java/phenote/datamodel/TermNotFoundException.java Added: phenote/trunk/src/java/phenote/datamodel/TermNotFoundException.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/TermNotFoundException.java (rev 0) +++ phenote/trunk/src/java/phenote/datamodel/TermNotFoundException.java 2006-12-19 19:29:45 UTC (rev 258) @@ -0,0 +1,7 @@ +package phenote.datamodel; + +/** unclear to me if we really need both ontology ex and termo not found ex */ + +public class TermNotFoundException extends Exception { + TermNotFoundException(String m) { super(m); } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2006-12-19 18:08:01
|
Revision: 257 http://svn.sourceforge.net/obo/?rev=257&view=rev Author: mgibson Date: 2006-12-19 10:08:00 -0800 (Tue, 19 Dec 2006) Log Message: ----------- got pheno syntax adapter read working again working with new generic datamodel - the syntax tags are actually configurable in the config file now - im not sure what to do with stage relationships yet - for now just hardwired in dataadapter to "during" - in future either use obo instances or clone obo classes or put a relationship in char field value? not sure yet but nothing urgent Character now has setValue(CharField,String) and looks up string in ontology throws TermNotFoundEx if string not found Modified Paths: -------------- phenote/trunk/jars/phenoteconfigbeans.jar phenote/trunk/src/java/phenote/config/Config.java phenote/trunk/src/java/phenote/config/FieldConfig.java phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java phenote/trunk/src/java/phenote/dataadapter/fly/FlyCharacter.java phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java phenote/trunk/src/java/phenote/dataadapter/phenoxml/PhenoXmlAdapter.java phenote/trunk/src/java/phenote/datamodel/CharField.java phenote/trunk/src/java/phenote/datamodel/Character.java phenote/trunk/src/java/phenote/datamodel/CharacterI.java phenote/trunk/src/java/phenote/datamodel/Ontology.java phenote/trunk/src/java/phenote/datamodel/OntologyManager.java phenote/trunk/src/java/phenote/gui/TermInfo.java Modified: phenote/trunk/jars/phenoteconfigbeans.jar =================================================================== (Binary files differ) Modified: phenote/trunk/src/java/phenote/config/Config.java =================================================================== --- phenote/trunk/src/java/phenote/config/Config.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/config/Config.java 2006-12-19 18:08:00 UTC (rev 257) @@ -31,6 +31,7 @@ import phenote.config.xml.LogDocument.Log; import phenote.util.FileUtil; +import phenote.datamodel.CharField; import phenote.datamodel.CharFieldEnum; import phenote.dataadapter.DataAdapterI; import phenote.dataadapter.fly.FlybaseDataAdapter; @@ -215,6 +216,21 @@ return fieldList; } + /** kinda silly to return list?? so there are 2 fields for "Tag" which perhaps is silly + but thats whats happening so need to deal with it */ + public List<CharField> getCharFieldsForSyntaxAbbrev(String abb) throws ConfigException { + // cache in hash?? + List<CharField> fields = new ArrayList<CharField>(2); + for (FieldConfig fc : getFieldConfigList()) { + if (fc.hasSyntaxAbbrev(abb) || fc.hasLabel(abb)) // abbrev or label + fields.add(fc.getCharField()); + //return fc.getCharField(); + } + if (fields.isEmpty()) + throw new ConfigException("No Field configured with syntax abbrev "+abb); + return fields; + } + /** should this just be a part of fieldConfigList? and main window would filter it out when making up fields? rel is for post comp gui - or maybe FieldConfig should have isPostComp, getPostCompRelFile - yes! */ @@ -296,7 +312,7 @@ String name = field.getName().getStringValue(); //toString(); // has to be a valid value - no longer true for generic free types FieldConfig fc; - try { + try { // phase this out!! CharFieldEnum cfe = CharFieldEnum.getCharFieldEnum(name); //if (cfe == null) ??? fc = new FieldConfig(cfe,name); @@ -304,6 +320,10 @@ catch (Exception e) { // no char field enum for name - new generic! fc = new FieldConfig(name); } + + if (field.getSyntaxAbbrev() != null) { + fc.setSyntaxAbbrev(field.getSyntaxAbbrev().getStringValue()); + } // POST COMP, relationship ontol if (field.getPostcomp() != null) { Modified: phenote/trunk/src/java/phenote/config/FieldConfig.java =================================================================== --- phenote/trunk/src/java/phenote/config/FieldConfig.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/config/FieldConfig.java 2006-12-19 18:08:00 UTC (rev 257) @@ -3,16 +3,19 @@ import java.util.ArrayList; import java.util.List; -import phenote.datamodel.CharFieldEnum; +import phenote.datamodel.CharField; +import phenote.datamodel.CharFieldEnum; // phase out public class FieldConfig { - private CharFieldEnum charFieldEnum; + private CharFieldEnum charFieldEnum; // phase out + private CharField charField; private String label; // Entity field can have multiple ontologies private List<OntologyConfig> ontologyConfigList; private boolean isPostComp; private OntologyConfig postCompRelOntCfg; + private String syntaxAbbrev; // FieldConfig(CharFieldEnum c,OntologyConfig o) { // charFieldEnum = c; @@ -39,6 +42,7 @@ // --> getName? public String getLabel() { return label; } + boolean hasLabel(String label) { return label.equals(this.label); } //private void setOntologyFile(String f){getOntologyConfig().setOntologyFile(f);} public boolean hasOntologies() { @@ -86,4 +90,13 @@ public OntologyConfig getPostCompRelOntCfg() { return postCompRelOntCfg; } + + void setSyntaxAbbrev(String syn) { + this.syntaxAbbrev = syn; + } + //void String getSyntaxAbbrev() { return syntaxAbbrev; } + boolean hasSyntaxAbbrev(String abb) { return abb.equals(syntaxAbbrev); } + + public void setCharField(CharField cf) { charField = cf; } + CharField getCharField() { return charField; } } Modified: phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2006-12-19 18:08:00 UTC (rev 257) @@ -71,9 +71,8 @@ // CharFieldEnum fce = fieldConfig.getCharFieldEnum(); // cf = new CharField(fce); // } -// else { cf = new CharField(fieldConfig.getLabel()); -// } + fieldConfig.setCharField(cf); // ONTOLOGIES if (fieldConfig.hasOntologies()) { Modified: phenote/trunk/src/java/phenote/dataadapter/fly/FlyCharacter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/fly/FlyCharacter.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/dataadapter/fly/FlyCharacter.java 2006-12-19 18:08:00 UTC (rev 257) @@ -5,7 +5,7 @@ import phenote.datamodel.CharacterI; import phenote.datamodel.Character; import phenote.datamodel.OntologyManager; -import phenote.datamodel.OntologyManager.TermNotFoundException; +import phenote.datamodel.TermNotFoundException; public class FlyCharacter implements FlyCharacterI { Modified: phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java 2006-12-19 18:08:00 UTC (rev 257) @@ -1,5 +1,6 @@ package phenote.dataadapter.phenosyntax; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -8,7 +9,11 @@ import phenote.datamodel.Character; import phenote.datamodel.CharacterI; +import phenote.datamodel.CharField; import phenote.datamodel.OntologyManager; +import phenote.datamodel.TermNotFoundException; +import phenote.config.Config; +import phenote.config.ConfigException; /** A phenotype character thats basically a dataadapter object for datamodel CharacterI. It can make a phenosyntax string from a CharacterI and make @@ -83,29 +88,11 @@ } private String makeValue(OBOClass term) { - // return idPrefixAndName(term); // michael wants ids... - //return term.getID(); // id & commented out name for readability return term.getID() + " /*" + term.getName() + "*/"; } -// /** Merges id prefix and name, so for id GO:1234 with name "growth" returns -// "GO:growth", which is readable and computable & syn acceptable - pase - doing ids*/ -// private String idPrefixAndName(OBOClass term) { -// return getIdPrefix(term)+term.getName(); -// } - -// /** for GO:12345 returns GO: - with colon! - pase - doing ids */ -// private String getIdPrefix(OBOClass term) { -// if (term == null) return ""; // shouldnt happen -// String id = term.getID(); -// int colonIndex = id.indexOf(":"); -// return id.substring(0,colonIndex+1); // +1 retain colon -// } - - - // READ /** Parse syntax line into character */ @@ -151,34 +138,68 @@ private void addTagValToChar(String tag, String value) { if (value.equals("")) { - System.out.println("No value given for "+tag); + log().error("No value given for "+tag); return; } OntologyManager om = OntologyManager.inst(); - + try { - if (tag.equals("PUB")) - character.setPub(value); - else if (tag.equals("GT")) - character.setGenotype(value); - else if (tag.equals("GC")) - character.setGeneticContext(om.getOboClassWithExcep(value)); // throws ex - else if (tag.equals("E")) - character.setEntity(om.getTermOrPostComp(value)); - else if (tag.equals("Q")) - character.setQuality(om.getOboClassWithExcep(value)); - else // throw exception? or let rest of char go through? - System.out.println("pheno syntax tag "+tag+" not recognized (value "+value+")"); + List<CharField> fields = Config.inst().getCharFieldsForSyntaxAbbrev(tag);//Ex + for (CharField cf : fields) { + if (cf.getName().equals("Stage")) { + // todo - a general relationship extracter? + value = extractStageHack(value); // for now - fix for real later + } + try { + // set String -> for obo class automatically find term + character.setValue(cf,value); // throws TermNotFoundEx + return; // if no ex thrown were done + } + catch (TermNotFoundException e) {} // do nothing - try next char field + } } - catch (OntologyManager.TermNotFoundException e) { - log().error("Term not found for tag "+tag+" value "+value+" in loaded " - +"ontologies - check syntax with ontology files."); - return; - } + catch (ConfigException e) { log().error(e.getMessage()); } // field not found + //catch (TermNotFoundException e) { + System.out.println("PhSynCh term not found "+value); + //log().error(e.getMessage()); + log().error("Term not found "+value); // list char field? + //} + +// try { +// if (tag.equals("PUB")) +// character.setPub(value); +// else if (tag.equals("GT")) +// character.setGenotype(value); +// else if (tag.equals("GC")) +// character.setGeneticContext(om.getOboClassWithExcep(value)); // throws ex +// else if (tag.equals("E")) +// character.setEntity(om.getTermOrPostComp(value)); +// else if (tag.equals("Q")) +// character.setQuality(om.getOboClassWithExcep(value)); +// else // throw exception? or let rest of char go through? +// System.out.println("pheno syntax tag "+tag+" not recognized (value "+value+")"); +// } +// catch (OntologyManager.TermNotFoundException e) { +// log().error("Term not found for tag "+tag+" value "+value+" in loaded " +// +"ontologies - check syntax with ontology files."); +// return; +// } } + /** Stages come with rel - eg during(adult) - for now just assuming its during and ripping + off - in future need to read in rel, and store as relationship between Instances + (not OBOClasses!) - big refactor but go for it! + this extracts the "adult" in above example out of "during(adult)" + or alternatively just record relationship in CharFieldValue? */ + private String extractStageHack(String stageWithRel) { + Pattern p = Pattern.compile("during\\(([^\\)]+)\\)"); + Matcher m = p.matcher(stageWithRel); + if (m.matches()) + return m.group(1); + return stageWithRel; + } CharacterI getCharacter() { return character; } Modified: phenote/trunk/src/java/phenote/dataadapter/phenoxml/PhenoXmlAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/phenoxml/PhenoXmlAdapter.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/dataadapter/phenoxml/PhenoXmlAdapter.java 2006-12-19 18:08:00 UTC (rev 257) @@ -30,7 +30,7 @@ import phenote.datamodel.CharacterListI; import phenote.datamodel.CharacterList; import phenote.datamodel.OntologyManager; -import phenote.datamodel.OntologyManager.TermNotFoundException; +import phenote.datamodel.TermNotFoundException; import phenote.dataadapter.CharacterListManager; import phenote.dataadapter.DataAdapterI; Modified: phenote/trunk/src/java/phenote/datamodel/CharField.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharField.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/datamodel/CharField.java 2006-12-19 18:08:00 UTC (rev 257) @@ -5,8 +5,7 @@ import org.geneontology.oboedit.datamodel.OBOClass; -// or just Field? or CharField? eventually separate class? -// associates enum & ontologies +// or just Field? or CharField? // CharField doesnt handle instance data, just specifies what ontologies are // associated with what parts of the generic character // CharFieldValue handles instance data @@ -111,6 +110,25 @@ public Ontology getPostCompRelOntol() { return postCompRelOntol; } + /** if free text returns string charfieldValue, for ontology field valueString is + id and searches ontologies for id, throws ontologyException if not found */ + public CharFieldValue makeValue(Character c, String valueString) + throws TermNotFoundException { + if (!hasOntologies()) + return new CharFieldValue(valueString,c,this); + else { + OBOClass oboClass=null; + for (Ontology ont : ontologyList) { + try { oboClass = ont.getOboClass(valueString); } + catch (TermNotFoundException e) {} // move on to next ontology + } + if (oboClass != null) + return new CharFieldValue(oboClass,c,this); + else + throw new TermNotFoundException(valueString+" not found in ontologies for "+this); + } + } + public String toString() { return "CharField: "+getName(); } } Modified: phenote/trunk/src/java/phenote/datamodel/Character.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/Character.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/datamodel/Character.java 2006-12-19 18:08:00 UTC (rev 257) @@ -13,15 +13,14 @@ public class Character implements CharacterI, Cloneable { // List<CharFieldValue> charFields??? or List<CharField> -// private String entity=""; -// private String quality=""; -// private String geneticContext=""; + // phase these out... private String pub; private String genotype=""; // eventually Genotype class // OboClass? OntologyTerm?... private OBOClass entity; // CharFieldValue??? private OBOClass quality; private OBOClass geneticContext; + // new generic data structure private HashMap<CharField,CharFieldValue> charFieldToValue = new HashMap<CharField,CharFieldValue>(); @@ -30,6 +29,12 @@ charFieldToValue.put(cf,cfv); //System.out.println("Char setVal "+cf+" val "+cfv); } + + public void setValue(CharField cf, String s) throws TermNotFoundException { + CharFieldValue cfv = cf.makeValue(this,s); + setValue(cf,cfv); + } + /** generic getter */ public CharFieldValue getValue(CharField cf) { CharFieldValue cfv = charFieldToValue.get(cf); Modified: phenote/trunk/src/java/phenote/datamodel/CharacterI.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2006-12-19 18:08:00 UTC (rev 257) @@ -13,6 +13,7 @@ /** generic fields!!! */ public void setValue(CharField cf, CharFieldValue cfv); // ?? + public void setValue(CharField cf, String valueString) throws TermNotFoundException; public CharFieldValue getValue(CharField cf); // should make an exception for this public String getValueString(String fieldName) throws Exception; // yuck Modified: phenote/trunk/src/java/phenote/datamodel/Ontology.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/Ontology.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/datamodel/Ontology.java 2006-12-19 18:08:00 UTC (rev 257) @@ -68,7 +68,7 @@ } private void filterLists() { - //if (!haveFilter() && !hasSlim()) return; // from config + //if (!haveFilter() && !hasSlim()) return; // froboSession.getTerm(id)om config if (doFiltering()) sortedTerms = filterList(sortedTerms); } @@ -78,17 +78,23 @@ /** returns null if dont have class for id, throws OntologyException if id is not found */ - public OBOClass getOboClass(String id) throws OntologyException { - OBOClass oc = oboSession.getTerm(id); - if (oc == null) throw new OntologyException(id +" id not found in ontology "+name); - return oc; + public OBOClass getOboClass(String id) throws TermNotFoundException { + // this aint right - if its a slim should only search slim + //OBOClass oc = oboSession.getTerm(id); + for (OBOClass term : sortedTerms) { + if (term.getID().equals(id)) + return term; + } + //if (term == null) + throw new TermNotFoundException(id +" id not found in ontology "+name); + //return oc; } /** Returns true if ontology holds obo class */ boolean hasOboClass(OBOClass oboClass) { // if this is too slow can do optimizations with prefixes try {getOboClass(oboClass.getID()); } - catch (OntologyException e) { return false; } + catch (TermNotFoundException e) { return false; } return true; // no exception - it has it } Modified: phenote/trunk/src/java/phenote/datamodel/OntologyManager.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/OntologyManager.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/datamodel/OntologyManager.java 2006-12-19 18:08:00 UTC (rev 257) @@ -100,11 +100,11 @@ for (Ontology o : getAllOntologies()) { //Ontology o = iter.next(); try { oboClass = o.getOboClass(id); } - catch (OntologyException e) { continue; } + catch (TermNotFoundException e) { continue; } if (oboClass != null) return oboClass; } - //return null; // not found - null -- ex? + // not sure if we need both onotlogy exception & termnotfoundEx ?? redundant? throw new TermNotFoundException("ID "+id+" not found in loaded ontologies"); } @@ -123,9 +123,6 @@ return term; } - public class TermNotFoundException extends Exception { - private TermNotFoundException(String m) { super(m); } - } private boolean isPostComp(String id) { if (id == null) return false; Modified: phenote/trunk/src/java/phenote/gui/TermInfo.java =================================================================== --- phenote/trunk/src/java/phenote/gui/TermInfo.java 2006-12-19 17:31:06 UTC (rev 256) +++ phenote/trunk/src/java/phenote/gui/TermInfo.java 2006-12-19 18:08:00 UTC (rev 257) @@ -31,7 +31,7 @@ import phenote.datamodel.CharacterI; import phenote.datamodel.CharFieldEnum; import phenote.datamodel.OntologyManager; -import phenote.datamodel.OntologyManager.TermNotFoundException; +import phenote.datamodel.TermNotFoundException; import phenote.edit.EditManager; import phenote.edit.UpdateTransaction; import phenote.util.HtmlUtil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2006-12-19 17:31:07
|
Revision: 256 http://svn.sourceforge.net/obo/?rev=256&view=rev Author: mgibson Date: 2006-12-19 09:31:06 -0800 (Tue, 19 Dec 2006) Log Message: ----------- config rnc added syntax abbrev Modified Paths: -------------- phenote/trunk/conf/phenote-config.rnc Modified: phenote/trunk/conf/phenote-config.rnc =================================================================== --- phenote/trunk/conf/phenote-config.rnc 2006-12-19 17:30:33 UTC (rev 255) +++ phenote/trunk/conf/phenote-config.rnc 2006-12-19 17:31:06 UTC (rev 256) @@ -32,6 +32,8 @@ element field { ##attribute name { "Pub" | "Genotype" | "Genetic Context" | "Entity" | "Quality" }, attribute name { text }, + ## tag for field for pheno-syntax adapter + attribute syntax-abbrev { text }, ## whether field is free text or constrained by ontology - take out? ## this is actually unnecasary - if there is no file free text is assumed attribute type { "free_text" | "ontology" }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2006-12-19 17:30:33
|
Revision: 255 http://svn.sourceforge.net/obo/?rev=255&view=rev Author: mgibson Date: 2006-12-19 09:30:33 -0800 (Tue, 19 Dec 2006) Log Message: ----------- xml scheman with syn abbrev in it Modified Paths: -------------- phenote/trunk/conf/phenote-config.xsd Modified: phenote/trunk/conf/phenote-config.xsd =================================================================== --- phenote/trunk/conf/phenote-config.xsd 2006-12-19 17:11:13 UTC (rev 254) +++ phenote/trunk/conf/phenote-config.xsd 2006-12-19 17:30:33 UTC (rev 255) @@ -41,6 +41,11 @@ <xs:documentation>attribute name { "Pub" | "Genotype" | "Genetic Context" | "Entity" | "Quality" },</xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="syntax-abbrev" use="required"> + <xs:annotation> + <xs:documentation>tag for field for pheno-syntax adapter</xs:documentation> + </xs:annotation> + </xs:attribute> <xs:attribute name="type" use="required"> <xs:simpleType> <xs:restriction base="xs:token"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2006-12-19 17:11:18
|
Revision: 254 http://svn.sourceforge.net/obo/?rev=254&view=rev Author: mgibson Date: 2006-12-19 09:11:13 -0800 (Tue, 19 Dec 2006) Log Message: ----------- with syntax abbreviations for pheno syntax adapter Modified Paths: -------------- phenote/trunk/conf/initial-zfin.cfg Modified: phenote/trunk/conf/initial-zfin.cfg =================================================================== --- phenote/trunk/conf/initial-zfin.cfg 2006-12-13 22:46:00 UTC (rev 253) +++ phenote/trunk/conf/initial-zfin.cfg 2006-12-19 17:11:13 UTC (rev 254) @@ -1,32 +1,32 @@ -<phenote-configuration version="0.8" xmlns="phenote/config/xml" xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance" schemaLocation="phenote-config.xsd"> +<phenote-configuration version="1.0" xmlns="phenote/config/xml" xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance" schemaLocation="phenote-config.xsd"> <dataadapter name="phenosyntax"/> <dataadapter name="phenoxml"/> - <log config-file="conf/log4j.xml"/> + <log config-file="conf/log4j-standalone.xml"/> - <field name="Pub" /> + <field name="Pub" syntax-abbrev="PUB"/> - <field name="Genotype" type="free_text"/> + <field name="Genotype" syntax-abbrev="GT" type="free_text"/> - <field name="Genetic Context" file="context.obo" /> + <field name="Genetic Context" file="context.obo" syntax-abbrev="GC"/> - <field name="Entity"> + <field name="Entity" syntax-abbrev="E"> <postcomp relationship-ontology="relationship.obo"/> <ontology name="ZF" file="zebrafish_anatomy.obo" filter-out="ZFS:" /> <ontology name="GO" file="gene_ontology.obo"/> <ontology name="SP" file="spatial.obo"/> </field> - <field name="Stage" file="zebrafish_anatomy.obo" filter-out="ZFA:" /> + <field name="Stage" file="zebrafish_anatomy.obo" filter-out="ZFA:" syntax-abbrev="T"/> - <field name="Quality" file="quality.obo"/> + <field name="Quality" file="quality.obo" syntax-abbrev="Q" /> - <field name="Absent" file="quality.obo" slim="absent_slim" /> - <field name="Abnormal" file="quality.obo" slim="abnormal_slim" /> + <field name="Absent" file="quality.obo" slim="absent_slim" syntax-abbrev="Tag"/> + <field name="Abnormal" file="quality.obo" slim="abnormal_slim" syntax-abbrev="Tag"/> - <field name="Evidence" file="evidence_code.obo"/> + <field name="Evidence" file="evidence_code.obo" syntax-abbrev="EV"/> - <field name="Description" /> + <field name="Description" syntax-abbrev="Desc"/> </phenote-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2006-12-13 22:46:01
|
Revision: 253 http://svn.sourceforge.net/obo/?rev=253&view=rev Author: mgibson Date: 2006-12-13 14:46:00 -0800 (Wed, 13 Dec 2006) Log Message: ----------- jar jar jar gee whiz Added Paths: ----------- phenote/trunk/jars/piccolox.jar Added: phenote/trunk/jars/piccolox.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/piccolox.jar ___________________________________________________________________ Name: svn:executable + * 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: <mg...@us...> - 2006-12-13 22:44:42
|
Revision: 252 http://svn.sourceforge.net/obo/?rev=252&view=rev Author: mgibson Date: 2006-12-13 14:44:40 -0800 (Wed, 13 Dec 2006) Log Message: ----------- jar needed for shrip graphics uvic Added Paths: ----------- phenote/trunk/jars/piccolo.jar Added: phenote/trunk/jars/piccolo.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/piccolo.jar ___________________________________________________________________ Name: svn:executable + * 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: <mg...@us...> - 2006-12-13 22:38:35
|
Revision: 251 http://svn.sourceforge.net/obo/?rev=251&view=rev Author: mgibson Date: 2006-12-13 14:38:32 -0800 (Wed, 13 Dec 2006) Log Message: ----------- some initial code for getting graph viewer setup from uvics shrimp visuals. theres now 2 notions of selection mouse over selection and just regular selection. mouse over selection (in auto comp) doesnt cause graphic to redisplay as that would be too much. also some fixes for loading from pheno syntax broken for generic datamodel - still needs more work well phenote now has a gajillion jars - gee whiz Modified Paths: -------------- phenote/trunk/conf/initial-flybase.cfg phenote/trunk/conf/initial-zfin.cfg phenote/trunk/doc/phenote-website/phenote.html phenote/trunk/src/java/phenote/config/Config.java phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java phenote/trunk/src/java/phenote/datamodel/Character.java phenote/trunk/src/java/phenote/datamodel/CharacterI.java phenote/trunk/src/java/phenote/datamodel/Ontology.java phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java phenote/trunk/src/java/phenote/gui/TermInfo.java phenote/trunk/src/java/phenote/gui/field/TermCompList.java phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java phenote/trunk/src/java/phenote/gui/selection/TermSelectionEvent.java phenote/trunk/src/java/phenote/main/Phenote.java phenote/trunk/src/web/javascript/phenote-state.js Added Paths: ----------- phenote/trunk/jars/layouts.jar phenote/trunk/jars/shrimp.jar phenote/trunk/jars/treemap.jar phenote/trunk/src/java/phenote/gui/ShrimpDag.java Modified: phenote/trunk/conf/initial-flybase.cfg =================================================================== --- phenote/trunk/conf/initial-flybase.cfg 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/conf/initial-flybase.cfg 2006-12-13 22:38:32 UTC (rev 251) @@ -1,5 +1,5 @@ -<phenote-configuration version="0.8" xmlns="phenote/config/xml"> +<phenote-configuration version="0.8" xmlns="phenote/config/xml" noNamespaceSchemaLocation="phenote-config.xsd"> <dataadapter name="phenosyntax"/> <dataadapter name="phenoxml"/> Modified: phenote/trunk/conf/initial-zfin.cfg =================================================================== --- phenote/trunk/conf/initial-zfin.cfg 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/conf/initial-zfin.cfg 2006-12-13 22:38:32 UTC (rev 251) @@ -1,4 +1,4 @@ -<phenote-configuration version="0.8" xmlns="phenote/config/xml"> +<phenote-configuration version="0.8" xmlns="phenote/config/xml" xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance" schemaLocation="phenote-config.xsd"> <dataadapter name="phenosyntax"/> <dataadapter name="phenoxml"/> @@ -9,7 +9,7 @@ <field name="Genotype" type="free_text"/> - <field name="Genetic Context" file="context.obo"/> + <field name="Genetic Context" file="context.obo" /> <field name="Entity"> <postcomp relationship-ontology="relationship.obo"/> Modified: phenote/trunk/doc/phenote-website/phenote.html =================================================================== --- phenote/trunk/doc/phenote-website/phenote.html 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/doc/phenote-website/phenote.html 2006-12-13 22:38:32 UTC (rev 251) @@ -35,7 +35,7 @@ <a href="http://reaper.lbl.gov/phenote/html/ncbo.html">Webby Phenote(components used by Zfin)</a><br> <br> -Webby phenote is a collaboration with Sohel Merchant at DichtyBase. +Webby phenote is a collaboration with Sohel Merchant at dictyBase. Here is what they have done:<br> <br> <a Added: phenote/trunk/jars/layouts.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/layouts.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: phenote/trunk/jars/shrimp.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/shrimp.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: phenote/trunk/jars/treemap.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/treemap.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Modified: phenote/trunk/src/java/phenote/config/Config.java =================================================================== --- phenote/trunk/src/java/phenote/config/Config.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/config/Config.java 2006-12-13 22:38:32 UTC (rev 251) @@ -228,6 +228,7 @@ System.out.println("config file: "+configUrl); PhenoteConfigurationDocument pcd = PhenoteConfigurationDocument.Factory.parse(configUrl);//configFile); + pcd.validate(); //??? PhenoteConfiguration pc = pcd.getPhenoteConfiguration(); Modified: phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/dataadapter/phenosyntax/PhenoSyntaxChar.java 2006-12-13 22:38:32 UTC (rev 251) @@ -53,7 +53,8 @@ // Genotype - not strictly part of pheno syntax but lets face it we need it // i would say its an omission from syntax //sb.append(" GT=").append(character.getGenotype()); - sb.append(" GT=").append(character.getValueString("Genotype")); + if (character.hasValue("Genotype")) + sb.append(" GT=").append(character.getValueString("Genotype")); if (character.hasValue("Genetic Context")) sb.append(" GC=").append(makeValue(character.getTerm("Genetic Context"))); @@ -61,6 +62,8 @@ throw new BadCharException("Error: character has no entity, ignoring"); //sb.append(" E=").append(makeValue(character.getEntity())); sb.append(" E=").append(makeValue(character.getTerm("Entity"))); + + // if (character.hasValue(CharFieldEnum.STAGE)) //if (character.getQuality() == null) if (!character.hasValue("Quality")) Modified: phenote/trunk/src/java/phenote/datamodel/Character.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/Character.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/datamodel/Character.java 2006-12-13 22:38:32 UTC (rev 251) @@ -61,8 +61,13 @@ // be some sort of somthing to indicate "empty" value? return getValue(cf) != null; // && !getValue(cf).equals(""); } - public boolean hasValue(String fieldName) throws Exception { - return hasValue(getCharFieldForName(fieldName)); + public boolean hasValue(String fieldName) { + try { + return hasValue(getCharFieldForName(fieldName)); + } + catch (Exception e) { // throws exception if doesnt have + return false; + } } private CharField getCharFieldForName(String fieldName) throws Exception { Modified: phenote/trunk/src/java/phenote/datamodel/CharacterI.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2006-12-13 22:38:32 UTC (rev 251) @@ -11,6 +11,24 @@ misspelling would end up in a char field */ public interface CharacterI { + /** generic fields!!! */ + public void setValue(CharField cf, CharFieldValue cfv); // ?? + public CharFieldValue getValue(CharField cf); + // should make an exception for this + public String getValueString(String fieldName) throws Exception; // yuck + public OBOClass getTerm(String fieldName) throws Exception; + // public void setTerm(String field, OBOClass term); + // needed for protege plugin + // public void setTerm(String field, String id) throws OboException; + public boolean hasValue(CharField cf); + public boolean hasValue(String fieldName) throws Exception; + + public CharacterI cloneCharacter(); + public boolean equals(CharacterI c); + public boolean hasNoContent(); + + + // pase! delete! public String getEntityName(); public String getQualityName(); // OBOClass? public String getGeneticContextName(); @@ -29,18 +47,4 @@ public void setEntity(OBOClass e); public void setQuality(OBOClass p); public void setGeneticContext(OBOClass gc); - - - /** generic fields!!! */ - public void setValue(CharField cf, CharFieldValue cfv); // ?? - public CharFieldValue getValue(CharField cf); - // should make an exception for this - public String getValueString(String fieldName) throws Exception; // yuck - public OBOClass getTerm(String field) throws Exception; - public boolean hasValue(CharField cf); - public boolean hasValue(String fieldName) throws Exception; - - public CharacterI cloneCharacter(); - public boolean equals(CharacterI c); - public boolean hasNoContent(); -} + } Modified: phenote/trunk/src/java/phenote/datamodel/Ontology.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/Ontology.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/datamodel/Ontology.java 2006-12-13 22:38:32 UTC (rev 251) @@ -125,7 +125,7 @@ } - private OBOSession getOboSession() { return oboSession; } + public OBOSession getOboSession() { return oboSession; } public List<OBOClass> getSortedTerms(Set terms) { List<OBOClass> sortedTerms = new ArrayList<OBOClass>(); Modified: phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java =================================================================== --- phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2006-12-13 22:38:32 UTC (rev 251) @@ -50,6 +50,7 @@ private JButton deleteButton; private JButton undoButton; private JButton commitButton; + private JButton graphWindow; private JScrollBar verticalScrollBar; private boolean scrollToNewLastRowOnRepaint = false; private boolean ignoreSelectionChange = false; @@ -102,6 +103,8 @@ // should we only add if have data adapter - or disable at least? // should this go in a menu? commitButton = addButton(SAVE_STRING,al,buttonPanel); + buttonPanel.add(Box.createRigidArea(new Dimension(20,0))); + graphWindow = addButton("Graph",al,buttonPanel); add(buttonPanel); @@ -254,6 +257,10 @@ EditManager.inst().undo(); } + else if (e.getActionCommand().equals("Graph")) { + ShrimpDag.inst().display(); + } + // IF DELETED LAST ROW, then need to make a new blank one (sandbox mode) if (!hasRows() && SANDBOX_MODE) { //fieldPanel.clear(); // SelectionManager.clearCharacterSelection() Added: phenote/trunk/src/java/phenote/gui/ShrimpDag.java =================================================================== --- phenote/trunk/src/java/phenote/gui/ShrimpDag.java (rev 0) +++ phenote/trunk/src/java/phenote/gui/ShrimpDag.java 2006-12-13 22:38:32 UTC (rev 251) @@ -0,0 +1,85 @@ +package phenote.gui; + +//import javax.swing.JFrame; + +import org.geneontology.oboedit.datamodel.OBOSession; + +//import ca.uvic.csr.shrimp.gui.QueryView.QueryView; +import ca.uvic.csr.shrimp.gui.QueryView.OBOViewer; +import ca.uvic.csr.shrimp.gui.QueryView.QueryView; + +import phenote.gui.selection.SelectionManager; +import phenote.gui.selection.TermSelectionEvent; +import phenote.gui.selection.TermSelectionListener; + +import phenote.datamodel.Ontology; +import phenote.datamodel.OntologyManager; + +class ShrimpDag { + + //private JFrame window; + private OBOViewer oboViewer; + private static ShrimpDag singleton; + + public static ShrimpDag inst() { + if (singleton == null) singleton = new ShrimpDag(); + return singleton; + } + + private ShrimpDag() { + //window = new JFrame("Shrimp ontology viewer"); + //window.pack(); + //window.setVisible(true); + init(); + } + + //public void display() {} + + /** send obo sessions to shrimp so it can set them up in its datamodel*/ + public void initOntologies() { + // do this in a separate thread! no need to hold up phenote with this + for (Ontology o : OntologyManager.inst().getAllOntologies()) { + // oboViewer.loadOboSession(o.getOboSession()); + } + } + + private void init() { + //initShrimp(); + SelectionManager.inst().addTermSelectionListener(new ShrimpSelectionListener()); + } + public void display() { + + //queryView = new QueryView(); false - show query view? + boolean showQueryPanel = true; + oboViewer = + new OBOViewer("Shrimp ontology viewer",getOboSession(),showQueryPanel); + } + + private OBOSession getOboSession() { + // just hard wire to go for now + try { + Ontology o = OntologyManager.inst().getOntologyForName("ZF"); + return o.getOboSession(); + } catch (phenote.datamodel.OntologyException e) { + System.out.println("no ontol for dag"); + return null; + } + } + + private QueryView getQueryView() { + return oboViewer.getQueryView(); + } + + private class ShrimpSelectionListener implements TermSelectionListener { + + public boolean termSelected(TermSelectionEvent e) { + if (e.isMouseOverEvent()) return false; + String term = e.getOboClass().getName(); + boolean animate = true; + getQueryView().query(term, animate); + return true; + } + + } + +} \ No newline at end of file Modified: phenote/trunk/src/java/phenote/gui/TermInfo.java =================================================================== --- phenote/trunk/src/java/phenote/gui/TermInfo.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/gui/TermInfo.java 2006-12-13 22:38:32 UTC (rev 251) @@ -119,6 +119,7 @@ /** Listen for selection from phenote (mouse over completion list) */ private class InfoTermSelectionListener implements TermSelectionListener { public boolean termSelected(TermSelectionEvent e) { + if (!e.isMouseOverEvent()) return false; setTextFromOboClass(e.getOboClass()); // This sets who now listens to use term button clicks (only 1 listener) setUseTermListener(e.getUseTermListener()); @@ -186,6 +187,8 @@ try { OBOClass term = OntologyManager.inst().getOboClass(id); // ex setTextFromOboClass(term); + // send out term selection (non mouse over) for DAG view + SelectionManager.inst().selectTerm(TermInfo.this, term); } catch (TermNotFoundException ex) { return; } } Modified: phenote/trunk/src/java/phenote/gui/field/TermCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2006-12-13 22:38:32 UTC (rev 251) @@ -54,6 +54,8 @@ if doesnt validate throw ex */ protected void setCurrentValidItem() throws OboException { setOboClass(getSelectedOboClass()); //this will set text to oboclass + // send out selection event that is NOT a mouse over event (for DAG view) + SelectionManager.inst().selectTerm(this, getSelectedOboClass()); } protected String getCurrentTermRelName() { @@ -174,7 +176,7 @@ CompletionTerm ct = (CompletionTerm)selectedValue; OBOClass oboClass = ct.getOboClass(); Object src = TermCompList.this; - getSelectionManager().selectTerm(src,oboClass,getUseTermListener()); + getSelectionManager().selectMouseOverTerm(src,oboClass,getUseTermListener()); //setTextFromOboClass(oboClass); } } // end of CompletionListListener inner class Modified: phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java =================================================================== --- phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/gui/selection/SelectionManager.java 2006-12-13 22:38:32 UTC (rev 251) @@ -35,17 +35,29 @@ // void addCharacterSelectionListener(CharacterSelectionListener l) {} - public void selectTerm(Object source, OBOClass oboClass,UseTermListener l) { - TermSelectionEvent e = makeTermEvent(source,oboClass,l); + public void selectMouseOverTerm(Object source, OBOClass oboClass,UseTermListener l) { + boolean isMouseOver = true; + TermSelectionEvent e = makeTermEvent(source,oboClass,l,isMouseOver); + fireSelect(e); + } + + public void selectTerm(Object source,OBOClass oboClass) { + boolean isMouseOver = false; + TermSelectionEvent e = makeTermEvent(source,oboClass,null,isMouseOver); + fireSelect(e); + } + + private void fireSelect(TermSelectionEvent e) { Iterator<TermSelectionListener> it = termListenerList.iterator(); while(it.hasNext()) - it.next().termSelected(e); + it.next().termSelected(e); } - + + // void selectTerm(String termName) {} ??? - private TermSelectionEvent makeTermEvent(Object src, OBOClass oc,UseTermListener l) { - return new TermSelectionEvent(src,oc,l); + private TermSelectionEvent makeTermEvent(Object src, OBOClass oc,UseTermListener l,boolean mouse) { + return new TermSelectionEvent(src,oc,l,mouse); } public CharacterI getFirstSelectedCharacter() { Modified: phenote/trunk/src/java/phenote/gui/selection/TermSelectionEvent.java =================================================================== --- phenote/trunk/src/java/phenote/gui/selection/TermSelectionEvent.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/gui/selection/TermSelectionEvent.java 2006-12-13 22:38:32 UTC (rev 251) @@ -8,14 +8,18 @@ private OBOClass oboClass; private UseTermListener useTermListener; + private boolean isMouseOverEvent; - TermSelectionEvent(Object source, OBOClass oboClass, UseTermListener utl) { + TermSelectionEvent(Object source, OBOClass oboClass, UseTermListener utl,boolean isMouse) { super(source); this.oboClass = oboClass; useTermListener = utl; + isMouseOverEvent = isMouse; } public OBOClass getOboClass() { return oboClass; } public UseTermListener getUseTermListener() { return useTermListener; } + + public boolean isMouseOverEvent() { return isMouseOverEvent; } } Modified: phenote/trunk/src/java/phenote/main/Phenote.java =================================================================== --- phenote/trunk/src/java/phenote/main/Phenote.java 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/java/phenote/main/Phenote.java 2006-12-13 22:38:32 UTC (rev 251) @@ -81,7 +81,9 @@ public void initOntologies() { //OntologyDataAdapter oda = new OntologyDataAdapter(); // singleton? // loads up OntologyManager - non intuitive? - OntologyDataAdapter.initialize(); + OntologyDataAdapter.initialize(); + // if (config.useShrimpDagViewer()) + // ShrimpDag.inst().initOntologies(); } private void loadFromCommandLine() { Modified: phenote/trunk/src/web/javascript/phenote-state.js =================================================================== --- phenote/trunk/src/web/javascript/phenote-state.js 2006-12-13 18:04:05 UTC (rev 250) +++ phenote/trunk/src/web/javascript/phenote-state.js 2006-12-13 22:38:32 UTC (rev 251) @@ -35,7 +35,7 @@ updateTermInfo : function (term) { var pars = term.params; - var myAjax = new Ajax.Updater('termInfo', url, {method: 'get', parameters: pars } ); + var myAjax = new Ajax.Updater('termInfo', this.termInfoUrl, {method: 'get', parameters: pars } ); this.setCurrentTermInfoTerm(term); }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2006-12-13 18:04:08
|
Revision: 250 http://svn.sourceforge.net/obo/?rev=250&view=rev Author: cmpich Date: 2006-12-13 10:04:05 -0800 (Wed, 13 Dec 2006) Log Message: ----------- removed old 'war' target and renamed 'war-init-dir' target to 'war'. It includes some additional deployment instructions such as: Do not deploy certain libraries (JSP) etc. Modified Paths: -------------- phenote/trunk/build.xml Modified: phenote/trunk/build.xml =================================================================== --- phenote/trunk/build.xml 2006-12-13 00:57:01 UTC (rev 249) +++ phenote/trunk/build.xml 2006-12-13 18:04:05 UTC (rev 250) @@ -310,7 +310,7 @@ </copy> </target> - <target name="war-init-dir" depends="jar-web, war-clean"> + <target name="war" depends="jar-web, war-clean"> <mkdir dir="war-deployment"/> <delete dir="${data_transfer}" /> <mkdir dir="${data_transfer}" /> @@ -331,20 +331,6 @@ <classes dir="${conf}" /> </war> </target> - <target name="war" depends="jar"> - <war destfile="war-deployment/phenote.war" webxml="src/web/WEB-INF/web.xml"> - <fileset dir="src/web"> - <exclude name="perl/*" /> - </fileset> - <lib dir="${lib}"> - <exclude name="junit-4.0.jar" /> - <exclude name="BrowserLauncher2-10rc4.jar" /> - <exclude name="tomcat-servlet.jar" /> - </lib> - <classes dir="${obo}" /> - <classes dir="${conf}" /> - </war> - </target> <target name="war-fiddle" depends="jar"> <war destfile="war-deployment/phenote-fiddle.war" webxml="src/web/WEB-INF/web-fiddle.xml"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-13 00:57:04
|
Revision: 249 http://svn.sourceforge.net/obo/?rev=249&view=rev Author: kevinschaper Date: 2006-12-12 16:57:01 -0800 (Tue, 12 Dec 2006) Log Message: ----------- added escapeXml="false" to the line where the single quote escape was already happening. (it resulted in an ugly html ampersand code in place of a nice simple \' ) Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp Modified: phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp =================================================================== --- phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp 2006-12-12 20:47:16 UTC (rev 248) +++ phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp 2006-12-13 00:57:01 UTC (rev 249) @@ -3,7 +3,7 @@ <body> <ul> <c:forEach var="completionTerm" items="${formBean.completionTermList}"> - <li onmouseover="phenoteState.updateTermInfo(new Term('<c:out value="${completionTerm.ID}" />','<c:out value="${completionTerm.escapedName}" />','<c:out value="${completionTerm.ontol}" />'));" id='<c:out value="${completionTerm.ID}" />' + <li onmouseover="phenoteState.updateTermInfo(new Term('<c:out value="${completionTerm.ID}" />','<c:out value="${completionTerm.escapedName}" escapeXml="false" />','<c:out value="${completionTerm.ontol}" />'));" id='<c:out value="${completionTerm.ID}" />' onclick="phenoteState.setCompletedTerm('<c:out value="${completionTerm.escapedName}" />','<c:out value="${completionTerm.field}" />')"><c:out value="${completionTerm.compListDisplayString}" /></li> </c:forEach> </ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-12 20:47:24
|
Revision: 248 http://svn.sourceforge.net/obo/?rev=248&view=rev Author: kevinschaper Date: 2006-12-12 12:47:16 -0800 (Tue, 12 Dec 2006) Log Message: ----------- calls CompletionTerm.getEscapedName() to deal with single anatomy terms that have single quotes, also calls CompletionTerm.getCompListDisplayString to get the display name for a term (mostly for adding [syn] or [obs]) Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp Modified: phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp =================================================================== --- phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp 2006-12-12 20:44:11 UTC (rev 247) +++ phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp 2006-12-12 20:47:16 UTC (rev 248) @@ -3,8 +3,8 @@ <body> <ul> <c:forEach var="completionTerm" items="${formBean.completionTermList}"> - <li onmouseover="phenoteState.updateTermInfo(new Term('<c:out value="${completionTerm.ID}" />','<c:out value="${completionTerm.name}" />','<c:out value="${completionTerm.ontol}" />'));" id='<c:out value="${completionTerm.ID}" />' - onclick="selectTerm('<c:out value="${completionTerm}" />','<c:out value="${completionTerm.field}" />')"><c:out value="${completionTerm.name}" /></li> + <li onmouseover="phenoteState.updateTermInfo(new Term('<c:out value="${completionTerm.ID}" />','<c:out value="${completionTerm.escapedName}" />','<c:out value="${completionTerm.ontol}" />'));" id='<c:out value="${completionTerm.ID}" />' + onclick="phenoteState.setCompletedTerm('<c:out value="${completionTerm.escapedName}" />','<c:out value="${completionTerm.field}" />')"><c:out value="${completionTerm.compListDisplayString}" /></li> </c:forEach> </ul> </body> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-12 20:44:15
|
Revision: 247 http://svn.sourceforge.net/obo/?rev=247&view=rev Author: kevinschaper Date: 2006-12-12 12:44:11 -0800 (Tue, 12 Dec 2006) Log Message: ----------- added getEscapedName to deal with single quotes being returned to javascript Modified Paths: -------------- phenote/trunk/src/java/phenote/gui/field/CompletionTerm.java Modified: phenote/trunk/src/java/phenote/gui/field/CompletionTerm.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/CompletionTerm.java 2006-12-12 05:32:33 UTC (rev 246) +++ phenote/trunk/src/java/phenote/gui/field/CompletionTerm.java 2006-12-12 20:44:11 UTC (rev 247) @@ -67,6 +67,8 @@ public String getID() { return term.getID(); } public String getName() { return term.getName(); } + public String getEscapedName() { return term.getName().replaceAll("\\'","\\\\'"); } + private Set getSyns() { return term.getSynonyms(); } private boolean hasDefinition() { return getDefinition() != null && !getDefinition().equals(""); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cmu...@us...> - 2006-12-12 05:32:57
|
Revision: 246 http://svn.sourceforge.net/obo/?rev=246&view=rev Author: cmungall Date: 2006-12-11 21:32:33 -0800 (Mon, 11 Dec 2006) Log Message: ----------- added default namespace Modified Paths: -------------- fma-conversion/trunk/fma_obo.obo Modified: fma-conversion/trunk/fma_obo.obo =================================================================== --- fma-conversion/trunk/fma_obo.obo 2006-12-06 20:46:12 UTC (rev 245) +++ fma-conversion/trunk/fma_obo.obo 2006-12-12 05:32:33 UTC (rev 246) @@ -2,6 +2,7 @@ date: 15:09:2006 13:29 saved-by: dilvan auto-generated-by: Protege OBO plugin version 1.0 +default-namespace: fma version: 0.1 [Term] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cmu...@us...> - 2006-12-06 20:53:52
|
Revision: 242 http://svn.sourceforge.net/obo/?rev=242&view=rev Author: cmungall Date: 2006-12-06 12:38:44 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Added Paths: ----------- fma-conversion/trunk/README Added: fma-conversion/trunk/README =================================================================== --- fma-conversion/trunk/README (rev 0) +++ fma-conversion/trunk/README 2006-12-06 20:38:44 UTC (rev 242) @@ -0,0 +1,23 @@ +This is the Obo-format conversion of the FMA + +This conversion should be treated as a beta release (although of +course the source FMA ontology is a production quality ontology). + +Currently the conversion is available in obo format 1.0 and 1.2. + +OWL translations are automatically generated here: + +http://www.fruitfly.org/~cjm/obo-download + +Currently the ontology only has is_a and part relations. Future +versions will include more relations from the FMA. + +The current version has a few problems, such as the inclusion of some +FMA metaclasses. Only the obof1.2 version has transitivity of part_of +declared. The 1.2 version is prefered. + +Contact: + +- obo...@li... +- nigam AT stanford DOT edu +- cjm AT berkeleybop DOT org This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2006-12-06 01:05:19
|
Revision: 241 http://svn.sourceforge.net/obo/?rev=241&view=rev Author: cmpich Date: 2006-12-05 17:05:19 -0800 (Tue, 05 Dec 2006) Log Message: ----------- added comments section in the term info and moved definitions to the top Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp Modified: phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp =================================================================== --- phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp 2006-12-05 23:17:48 UTC (rev 240) +++ phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp 2006-12-06 01:05:19 UTC (rev 241) @@ -31,72 +31,80 @@ </tr> </c:forEach> </logic:notEmpty> +</table> +<table width="90%"> + <tr valign="top"> + <td width="110"> + <b>Definition:</b> + </td> + <td> + <c:out value="${formBean.term.definition}" escapeXml="false"/> + </td> + </tr> </table> -<br> -<c:if test="${formBean.ontologyName == 'ZF'}"> +<b>PARENTS: </b> +<c:forEach var="parent" items="${formBean.parents}"> <table width="90%"> <tr valign="top"> <td width="110"> - <b>Start Stage:</b> + <b><phenote:relationhipName beanName="parent" property="type.name" type="parent"/>:</b> </td> <td> - <c:out value="${formBean.startStage.parent.name}" escapeXml="false"/> + <a href="javascript:;" + onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.parent.ID}" />','<c:out value="${parent.parent.name}" />','<c:out value="${formBean.ontologyName}" />'));"> + <c:out value="${parent.parent.name}"/></a> </td> </tr> + </table> +</c:forEach> +<br><b>CHILDREN: </b> +<c:forEach var="parent" items="${formBean.children}"> + <table width="90%"> <tr valign="top"> <td width="110"> - <b>End Stage:</b> + <b><phenote:relationhipName beanName="parent" property="type.name" type="child"/>:</b> </td> <td> - <c:out value="${formBean.endStage.parent.name}" escapeXml="false"/> + <a href="javascript:;" + onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.child.ID}" />','<c:out value="${parent.child.name}" />','<c:out value="${formBean.ontologyName}" />'));"> + <c:out value="${parent.child.name}"/></a> </td> </tr> </table> -</c:if> +</c:forEach> -<br><b>PARENTS: </b> -<c:forEach var="parent" items="${formBean.parents}"> + +<c:if test="${formBean.ontologyName == 'ZF'}"> <table width="90%"> <tr valign="top"> <td width="110"> - <b><phenote:relationhipName beanName="parent" property="type.name" type="parent"/>:</b> + <b>Start Stage:</b> </td> <td> - <a href="javascript:;" - onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.parent.ID}" />','<c:out value="${parent.parent.name}" />','<c:out value="${formBean.ontologyName}" />'));"> - <c:out value="${parent.parent.name}"/></a> + <c:out value="${formBean.startStage.parent.name}" escapeXml="false"/> </td> </tr> - </table> -</c:forEach> -<br> -<br><b>CHILDREN: </b> -<c:forEach var="parent" items="${formBean.children}"> - <table width="90%"> <tr valign="top"> <td width="110"> - <b><phenote:relationhipName beanName="parent" property="type.name" type="child"/>:</b> + <b>End Stage:</b> </td> <td> - <a href="javascript:;" - onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.child.ID}" />','<c:out value="${parent.child.name}" />','<c:out value="${formBean.ontologyName}" />'));"> - <c:out value="${parent.child.name}"/></a> + <c:out value="${formBean.endStage.parent.name}" escapeXml="false"/> </td> </tr> </table> +</c:if> -</c:forEach> - -<br> +<p/> <table width="90%"> <tr valign="top"> <td width="110"> - <b>Definition:</b> + <b>COMMENT:</b> </td> <td> - <c:out value="${formBean.term.definition}" escapeXml="false"/> + <c:out value="${formBean.term.comment}" escapeXml="false"/> </td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2006-12-05 23:17:48
|
Revision: 240 http://svn.sourceforge.net/obo/?rev=240&view=rev Author: cmpich Date: 2006-12-05 15:17:48 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Removed code that was not meant for check in 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 2006-12-05 23:05:16 UTC (rev 239) +++ phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java 2006-12-05 23:17:48 UTC (rev 240) @@ -12,11 +12,10 @@ import phenote.util.HtmlUtil; import javax.servlet.ServletConfig; -import javax.servlet.ServletException; import javax.servlet.ServletContext; +import javax.servlet.ServletException; import java.io.File; import java.io.IOException; -import java.util.Collections; public class PhenoteServlet extends DispatcherServlet { @@ -36,7 +35,6 @@ public void init(ServletConfig config) throws ServletException { super.init(config); webInfDir = getServletContext().getRealPath("/WEB-INF/"); - Collections.sy PhenoteWebConfiguration.getInstance().setWebRoot(getServletContext().getRealPath("/")); getIntialParameters(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2006-12-05 23:05:18
|
Revision: 239 http://svn.sourceforge.net/obo/?rev=239&view=rev Author: cmpich Date: 2006-12-05 15:05:16 -0800 (Tue, 05 Dec 2006) Log Message: ----------- made some layout changes to TermInfo. Moved stage info out of the parent section into the header Modified Paths: -------------- phenote/trunk/src/java/phenote/servlet/PhenoteBean.java phenote/trunk/src/java/phenote/servlet/PhenoteController.java phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp phenote/trunk/src/web/css/control.css Property Changed: ---------------- phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp Modified: phenote/trunk/src/java/phenote/servlet/PhenoteBean.java =================================================================== --- phenote/trunk/src/java/phenote/servlet/PhenoteBean.java 2006-12-01 17:49:23 UTC (rev 238) +++ phenote/trunk/src/java/phenote/servlet/PhenoteBean.java 2006-12-05 23:05:16 UTC (rev 239) @@ -27,6 +27,8 @@ private String ajaxReturn; private List<CompletionTerm> completionTermList; private OBOClass term; + private Link startStage; + private Link endStage; public boolean isTermCompletionRequest() { if (!StringUtils.isEmpty(userInput)) @@ -123,13 +125,22 @@ public List<Link> getParents(){ List<Link> parents = new ArrayList<Link>(); parents.addAll(term.getParents()); - removeStages(parents); + parents.remove(startStage); + parents.remove(endStage); Collections.sort(parents, new TermLinkComparator()); return parents; } - private void removeStages(List<Link> parents) { - + private void filterStages(List<Link> parents) { + List<Link> removeTerms = new ArrayList<Link>(); + for(Link term: parents){ + String name = term.getType().getName(); + if(name.equals("start stage")) + startStage = term; + if(name.equals("end stage")) + endStage = term; + } + parents.removeAll(removeTerms); } public List<Link> getChildren(){ @@ -139,8 +150,19 @@ return children; } + public Link getStartStage(){ + return startStage; + } + + public Link getEndStage(){ + return endStage; + } + public void setTerm(OBOClass term) { this.term = term; + List<Link> parents = new ArrayList<Link>(); + parents.addAll(term.getParents()); + filterStages(parents); } } Modified: phenote/trunk/src/java/phenote/servlet/PhenoteController.java =================================================================== --- phenote/trunk/src/java/phenote/servlet/PhenoteController.java 2006-12-01 17:49:23 UTC (rev 238) +++ phenote/trunk/src/java/phenote/servlet/PhenoteController.java 2006-12-05 23:05:16 UTC (rev 239) @@ -16,6 +16,7 @@ import phenote.datamodel.Ontology; import phenote.datamodel.OntologyManager; import phenote.util.HtmlUtil; +import phenote.dataadapter.OntologyDataAdapter; import java.util.Vector; import java.util.List; @@ -37,6 +38,9 @@ PhenoteBean form = (PhenoteBean) command; String ontologyName = form.getOntologyName(); String field = form.getField(); + // Todo: This is needed as the servlet can be configured to not initialize the ontologies (lazy initialization). + // this logic should go into the OntologyManger that checks if the configuration file has been loaded or not. + OntologyDataAdapter.initialize(); if (form.isTermCompletionRequest()) { String userInput = form.getTermCompletionTerm(); LOG.info("ontology: " + ontologyName); Modified: phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java =================================================================== --- phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java 2006-12-01 17:49:23 UTC (rev 238) +++ phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java 2006-12-05 23:05:16 UTC (rev 239) @@ -13,8 +13,10 @@ import javax.servlet.ServletConfig; import javax.servlet.ServletException; +import javax.servlet.ServletContext; import java.io.File; import java.io.IOException; +import java.util.Collections; public class PhenoteServlet extends DispatcherServlet { @@ -22,6 +24,7 @@ private static final Logger LOG = Logger.getLogger(PhenoteServlet.class); private static final String LOG4J_FILE_NAME = "log4j.xml"; private static String webInfDir; + private static boolean lazyLoading = false; /** * Initialization of this servlet upon server startup. @@ -33,8 +36,10 @@ public void init(ServletConfig config) throws ServletException { super.init(config); webInfDir = getServletContext().getRealPath("/WEB-INF/"); + Collections.sy PhenoteWebConfiguration.getInstance().setWebRoot(getServletContext().getRealPath("/")); + getIntialParameters(); // ToDo: // makes links for term info - put this method in Phenote? @@ -57,11 +62,20 @@ // Ensure the Ontologies are read during start up. This takes a while and should be done // before a different client calls and has to wait. // ToDo: Shall we create a new method called OntologyDataAdapter.start()? YES - OntologyDataAdapter.initialize(); + if (!lazyLoading) + OntologyDataAdapter.initialize(); initLog4j(); } + private void getIntialParameters() { + ServletContext context = getServletContext(); + String lazyload = context.getInitParameter("lazy-load"); + if (!StringUtils.isEmpty(lazyload) && lazyload.equals("true")) + lazyLoading = true; + + } + private void initLog4j() { String log4jFileName = getLog4JFile(); // if the log4j-init-file is set do not initialize log4j. Modified: phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp =================================================================== --- phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp 2006-12-01 17:49:23 UTC (rev 238) +++ phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp 2006-12-05 23:05:16 UTC (rev 239) @@ -1,29 +1,105 @@ -<%@ taglib prefix="phenote" uri="/WEB-INF/tld/phenote-tags.tld"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> -<html> -<body> - -<b>TERM: </b><c:out value="${formBean.term.name}" /> -<br><b>ID: </b><c:out value="${formBean.term.ID}" /> -<c:forEach var="synonym" items="${formBean.term.synonyms}" > - <br><b>Synonym: </b> <c:out value="${synonym}" /> -</c:forEach> -<br> -<br><b>PARENTS: </b> -<c:forEach var="parent" items="${formBean.parents}" > - <br><b> <phenote:relationhipName beanName="parent" property="type.name" type="parent" /> - : </b><a href="javascript:;" onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.parent.ID}" />','<c:out value="${parent.parent.name}" />','<c:out value="${formBean.ontologyName}" />'));"> - <c:out value="${parent.parent.name}" /></a> -</c:forEach> -<br> -<br><b>CHILDREN: </b> -<c:forEach var="parent" items="${formBean.children}" > - <br><b>Subclass: </b><a href="javascript:;" onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.child.ID}" />','<c:out value="${parent.child.name}" />','<c:out value="${formBean.ontologyName}" />'));"> - <c:out value="${parent.child.name}" /></a> -</c:forEach> - -<br> -<br><b>Definition: </b><c:out value="${formBean.term.definition}" escapeXml="false"/> - -</body> +<%@ taglib prefix="phenote" uri="/WEB-INF/tld/phenote-tags.tld" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<html> +<body> + +<table width="90%"> + <tr> + <td width="110"> + <FONT SIZE=+1><STRONG>TERM:</STRONG></FONT></td> + <td> + <FONT SIZE=+1><STRONG><c:out value="${formBean.term.name}"/></STRONG></FONT> + </td> + </tr> + <tr valign="top"> + <td> + <b>ID:</b> + </td> + <td> + <c:out value="${formBean.term.ID}"/> + </td> + </tr> + <logic:notEmpty name="formBean" property="term.synonyms"> + <c:forEach var="synonym" items="${formBean.term.synonyms}"> + <tr valign="top"> + <td> + <b>Synonyms:</b> + </td> + <td> + <c:out value="${synonym}"/> + </td> + </tr> + </c:forEach> + </logic:notEmpty> + +</table> + +<br> +<c:if test="${formBean.ontologyName == 'ZF'}"> + <table width="90%"> + <tr valign="top"> + <td width="110"> + <b>Start Stage:</b> + </td> + <td> + <c:out value="${formBean.startStage.parent.name}" escapeXml="false"/> + </td> + </tr> + <tr valign="top"> + <td width="110"> + <b>End Stage:</b> + </td> + <td> + <c:out value="${formBean.endStage.parent.name}" escapeXml="false"/> + </td> + </tr> + </table> +</c:if> + +<br><b>PARENTS: </b> +<c:forEach var="parent" items="${formBean.parents}"> + <table width="90%"> + <tr valign="top"> + <td width="110"> + <b><phenote:relationhipName beanName="parent" property="type.name" type="parent"/>:</b> + </td> + <td> + <a href="javascript:;" + onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.parent.ID}" />','<c:out value="${parent.parent.name}" />','<c:out value="${formBean.ontologyName}" />'));"> + <c:out value="${parent.parent.name}"/></a> + </td> + </tr> + </table> +</c:forEach> +<br> +<br><b>CHILDREN: </b> +<c:forEach var="parent" items="${formBean.children}"> + <table width="90%"> + <tr valign="top"> + <td width="110"> + <b><phenote:relationhipName beanName="parent" property="type.name" type="child"/>:</b> + </td> + <td> + <a href="javascript:;" + onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.child.ID}" />','<c:out value="${parent.child.name}" />','<c:out value="${formBean.ontologyName}" />'));"> + <c:out value="${parent.child.name}"/></a> + </td> + </tr> + </table> + +</c:forEach> + +<br> +<table width="90%"> + <tr valign="top"> + <td width="110"> + <b>Definition:</b> + </td> + <td> + <c:out value="${formBean.term.definition}" escapeXml="false"/> + </td> + </tr> +</table> + +</body> </html> \ No newline at end of file Property changes on: phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp ___________________________________________________________________ Name: svn:eol-style + native Modified: phenote/trunk/src/web/css/control.css =================================================================== --- phenote/trunk/src/web/css/control.css 2006-12-01 17:49:23 UTC (rev 238) +++ phenote/trunk/src/web/css/control.css 2006-12-05 23:05:16 UTC (rev 239) @@ -39,6 +39,7 @@ } /* div returned from ajax record retreival */ +/* div#termInfo table { border: 1px solid blue; width: 100%; @@ -46,6 +47,7 @@ background-color: lightgoldenrodyellow; height: 100%; } +*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-01 17:49:23
|
Revision: 238 http://svn.sourceforge.net/obo/?rev=238&view=rev Author: kevinschaper Date: 2006-12-01 09:49:23 -0800 (Fri, 01 Dec 2006) Log Message: ----------- this file is *almost* obsolete, the functionality has been moved to phenote-state.js, but it still has a pair of functions redirecting to the phenoteState methods. Modified Paths: -------------- phenote/trunk/src/web/javascript/ncbo-term-info.js Modified: phenote/trunk/src/web/javascript/ncbo-term-info.js =================================================================== --- phenote/trunk/src/web/javascript/ncbo-term-info.js 2006-12-01 17:47:15 UTC (rev 237) +++ phenote/trunk/src/web/javascript/ncbo-term-info.js 2006-12-01 17:49:23 UTC (rev 238) @@ -14,33 +14,14 @@ // renaming this getTermInfo... from set_ontology, // ontologyid -> termId + // ontologyName is the name of the ontology (not a term name!) -function getTermInfo(termId,termName,ontologyName,field) { +function getTermInfo(term) { + phenoteState.updateTermInfo(term); +} - // for some reason 0 doesnt work - //termId = 123; - - //alert("ncbo-term-info.js set_ontology called termId: "+termId+" field "+field); - // isNan is "is Not a Number", ontology id has to be a number - //if ( !isNaN( termId ) ) { //var pars = 'ontologyid=' + ontologyid; - var pars = 'termId='+termId+'&ontologyName='+ontologyName+'&field='+field; - - //alert("ncbo-term-info.js calling Ajax.Updater with "+pars); - //this.debug("ncbo-term-info.js calling Ajax.Updater with "+pars); - // ontologyinfo is the div where the table goes for term info - // note: this is a "get" not a post! (term comp is post) - //var myAjax = new Ajax.Updater('termInfo', url, {method: 'get', parameters: pars, onComplete: document.forms[0].qualityInput.value = '' } ); - // took out wipe out on complete - var myAjax = new Ajax.Updater('termInfo', url, {method: 'get', parameters: pars } ); - //if ( document.forms[0].ontologyid.length > 1 ) { // dont need this - //document.forms[0].ontologyid[1].value = termId; - //document.forms[0].ontologyid[2].value = termId; } else { - document.termForm.termInfoTermId.value = termId; // } - document.termForm.termInfoTermName.value = termName; - document.termForm.activeField.value = field; - //} if isNan taken out +function useTermInfo() { + phenoteState.useTermInfo(); } - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-01 17:47:15
|
Revision: 237 http://svn.sourceforge.net/obo/?rev=237&view=rev Author: kevinschaper Date: 2006-12-01 09:47:15 -0800 (Fri, 01 Dec 2006) Log Message: ----------- updated to match javascript in phenote-state.js Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp Modified: phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp =================================================================== --- phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp 2006-12-01 17:45:50 UTC (rev 236) +++ phenote/trunk/src/web/WEB-INF/jsp/term_info.jsp 2006-12-01 17:47:15 UTC (rev 237) @@ -12,13 +12,13 @@ <br><b>PARENTS: </b> <c:forEach var="parent" items="${formBean.parents}" > <br><b> <phenote:relationhipName beanName="parent" property="type.name" type="parent" /> - : </b><a href="javascript:;" onclick="getTermInfo('<c:out value="${parent.parent.ID}" />','<c:out value="${parent.parent.name}" />','<c:out value="${formBean.ontologyName}" />','<c:out value="${formBean.field}" />')"> + : </b><a href="javascript:;" onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.parent.ID}" />','<c:out value="${parent.parent.name}" />','<c:out value="${formBean.ontologyName}" />'));"> <c:out value="${parent.parent.name}" /></a> </c:forEach> <br> <br><b>CHILDREN: </b> <c:forEach var="parent" items="${formBean.children}" > - <br><b>Subclass: </b><a href="javascript:;" onclick="getTermInfo('<c:out value="${parent.child.ID}" />','<c:out value="${parent.child.name}" />','<c:out value="${formBean.ontologyName}" />','<c:out value="${formBean.field}" />')"> + <br><b>Subclass: </b><a href="javascript:;" onclick="phenoteState.updateTermInfo(new Term('<c:out value="${parent.child.ID}" />','<c:out value="${parent.child.name}" />','<c:out value="${formBean.ontologyName}" />'));"> <c:out value="${parent.child.name}" /></a> </c:forEach> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-01 17:45:50
|
Revision: 236 http://svn.sourceforge.net/obo/?rev=236&view=rev Author: kevinschaper Date: 2006-12-01 09:45:50 -0800 (Fri, 01 Dec 2006) Log Message: ----------- updated to match javascript in phenote-state.js Modified Paths: -------------- phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp Modified: phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp =================================================================== --- phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp 2006-12-01 17:45:07 UTC (rev 235) +++ phenote/trunk/src/web/WEB-INF/jsp/term_completion.jsp 2006-12-01 17:45:50 UTC (rev 236) @@ -3,8 +3,8 @@ <body> <ul> <c:forEach var="completionTerm" items="${formBean.completionTermList}"> - <li onmouseover="getTermInfo('<c:out value="${completionTerm.ID}" />','<c:out value="${completionTerm.name}" />','<c:out value="${completionTerm.ontol}" />','<c:out value="${completionTerm.field}" />')" id='<c:out value="${completionTerm.ID}" />' - onclick="selectTerm('<c:out value="${completionTerm.name}" />','<c:out value="${completionTerm.field}" />')"><c:out value="${completionTerm.name}" /></li> + <li onmouseover="phenoteState.updateTermInfo(new Term('<c:out value="${completionTerm.ID}" />','<c:out value="${completionTerm.name}" />','<c:out value="${completionTerm.ontol}" />'));" id='<c:out value="${completionTerm.ID}" />' + onclick="selectTerm('<c:out value="${completionTerm}" />','<c:out value="${completionTerm.field}" />')"><c:out value="${completionTerm.name}" /></li> </c:forEach> </ul> </body> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-01 17:45:07
|
Revision: 235 http://svn.sourceforge.net/obo/?rev=235&view=rev Author: kevinschaper Date: 2006-12-01 09:45:07 -0800 (Fri, 01 Dec 2006) Log Message: ----------- updated to match javascript in phenote-state.js Modified Paths: -------------- phenote/trunk/src/web/html/ncbo.html Modified: phenote/trunk/src/web/html/ncbo.html =================================================================== --- phenote/trunk/src/web/html/ncbo.html 2006-12-01 17:44:16 UTC (rev 234) +++ phenote/trunk/src/web/html/ncbo.html 2006-12-01 17:45:07 UTC (rev 235) @@ -18,9 +18,10 @@ <!-- /Ajax stuff --> <!-- /Custom Javascript --> - +<script type="text/javascript" src="/phenote/javascript/phenote-state.js"></script> <script src="../javascript/ncbo-term-info.js" type="text/javascript"></script> <script type="text/javascript"> + // --> addEntityOntolgy('AO', 'ZF'), addEntityOntology('GO','GO') function setEntityOntology(selectedOntology) { if (selectedOntology == 'AO') { ontologyName = 'ZF'; <!-- ZF Anatomy --> @@ -69,7 +70,8 @@ <label>Entity: </label> <!-- input autocomplete="off" id="ontologyname" name="ontologyname" size="20" type="text" value="" / --> - <input autocomplete="off" id="entityInput" name="entityInput" size="40" type="text" value="" /> + <input autocomplete="off" id="entityInput" name="entityInput" size="40" type="text" value="" + onChange="phenoteState.setActiveField(this);" /> </br> <div class="auto_complete" id="entity_auto_complete"></div> </fieldset> @@ -91,13 +93,16 @@ <label>Quality: </label> <!-- input autocomplete="off" id="ontologyname" name="ontologyname" size="20" type="text" value="" / --> - <input autocomplete="off" id="qualityInput" name="qualityInput" size="40" type="text" value="" /> + <input autocomplete="off" id="qualityInput" name="qualityInput" size="40" type="text" value="" + onChange="phenoteState.setActiveField(this);" /> </br> <div class="auto_complete" id="quality_auto_complete"></div> </fieldset> </div> + + <!-- /td --> <!-- /tr --> <!-- /table --> @@ -105,6 +110,14 @@ </div> + <script type="text/javascript"> + //phenoteState.entityString = "ENTITY"; + //phenoteState.qualityString = "QUALITY"; + //phenoteState.addField("ENTITY",document.termForm.entityInput); + //phenoteState.addField("QUALITY",document.termForm.qualityInput); + //addEntityField(document.termForm.entityInput); + //addQualityField(document.termForm.qualityInput); + </script> <script type="text/javascript"> @@ -156,6 +169,7 @@ var termName = document.termForm.termInfoTermName.value; //alert('use term info fn called - field '+field+' name '+termName); <!-- document.termForm.qualityInput.value=document.termForm.termId.value; --> + if (field == "ENTITY") { document.termForm.entityInput.value = termName; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kev...@us...> - 2006-12-01 17:44:17
|
Revision: 234 http://svn.sourceforge.net/obo/?rev=234&view=rev Author: kevinschaper Date: 2006-12-01 09:44:16 -0800 (Fri, 01 Dec 2006) Log Message: ----------- javascript object to store phenote state information in browser, also handles term info requests. Should eventually handle all of webby phenote's javascript needs. (meaning ncbo.html should get simpler) Added Paths: ----------- phenote/trunk/src/web/javascript/phenote-state.js Added: phenote/trunk/src/web/javascript/phenote-state.js =================================================================== --- phenote/trunk/src/web/javascript/phenote-state.js (rev 0) +++ phenote/trunk/src/web/javascript/phenote-state.js 2006-12-01 17:44:16 UTC (rev 234) @@ -0,0 +1,49 @@ + +function Term(termid, termname, ontologyname) { + this.termId = termid; + this.termName = termname; + this.ontology = ontologyname; + + this.params = 'termId='+this.termId+'&ontologyName='+this.ontology; +} + +var phenoteState = { + + activeField : {}, + currentTermInfoTerm : {}, + termInfoUrl : {}, + + setTermInfoUrl : function (url) { + this.termInfoUrl = url; + }, + + setActiveField : function (field) { + this.activeField = field; + }, + + getActiveField : function () { + return this.activeField; + }, + + setCurrentTermInfoTerm : function (term) { + this.currentTermInfoTerm = term; + }, + + getCurrentTermInfoTerm : function () { + return this.currentTermInfoTerm; + }, + + updateTermInfo : function (term) { + var pars = term.params; + var myAjax = new Ajax.Updater('termInfo', url, {method: 'get', parameters: pars } ); + this.setCurrentTermInfoTerm(term); + }, + + useTermInfo : function () { + this.getActiveField().value = this.currentTermInfoTerm.termName; + } + +} + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2006-12-01 00:02:17
|
Revision: 233 http://svn.sourceforge.net/obo/?rev=233&view=rev Author: cmpich Date: 2006-11-30 16:02:18 -0800 (Thu, 30 Nov 2006) Log Message: ----------- changed directory to read obo files from: from classes directory to data_transfer folder Modified Paths: -------------- phenote/trunk/conf/zfin-web.cfg Modified: phenote/trunk/conf/zfin-web.cfg =================================================================== --- phenote/trunk/conf/zfin-web.cfg 2006-11-30 23:58:10 UTC (rev 232) +++ phenote/trunk/conf/zfin-web.cfg 2006-12-01 00:02:18 UTC (rev 233) @@ -1,10 +1,10 @@ <phenote-configuration version="0.8" xmlns="phenote/config/xml"> <field name="Entity"> - <ontology name="ZF" file="zebrafish_anatomy.obo" filter-out="ZFS:" /> - <ontology name="GO" file="gene_ontology.obo"/> + <ontology name="ZF" file="../data_transfer/zebrafish_anatomy.obo" filter-out="ZFS:" /> + <ontology name="GO" file="../data_transfer/gene_ontology.obo"/> </field> - <field name="Quality" file="quality.obo"/> + <field name="Quality" file="../data_transfer/quality.obo"/> </phenote-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cm...@us...> - 2006-11-30 23:58:11
|
Revision: 232 http://svn.sourceforge.net/obo/?rev=232&view=rev Author: cmpich Date: 2006-11-30 15:58:10 -0800 (Thu, 30 Nov 2006) Log Message: ----------- added for the new phenote tag Added Paths: ----------- phenote/trunk/jars/commons-beanutils-1.6.jar phenote/trunk/jars/jsp-api.jar phenote/trunk/jars/struts-1.2.9.jar Added: phenote/trunk/jars/commons-beanutils-1.6.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/commons-beanutils-1.6.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: phenote/trunk/jars/jsp-api.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/jsp-api.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: phenote/trunk/jars/struts-1.2.9.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/struts-1.2.9.jar ___________________________________________________________________ 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. |