You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(18) |
Aug
(33) |
Sep
(30) |
Oct
(27) |
Nov
(59) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(67) |
Feb
(44) |
Mar
(70) |
Apr
(73) |
May
(119) |
Jun
(31) |
Jul
(92) |
Aug
(86) |
Sep
(76) |
Oct
(152) |
Nov
(156) |
Dec
(85) |
2008 |
Jan
(111) |
Feb
(121) |
Mar
(107) |
Apr
(102) |
May
(45) |
Jun
(65) |
Jul
(62) |
Aug
(133) |
Sep
(56) |
Oct
(56) |
Nov
(17) |
Dec
(15) |
2009 |
Jan
(10) |
Feb
(5) |
Mar
(10) |
Apr
(14) |
May
(49) |
Jun
(94) |
Jul
(67) |
Aug
(23) |
Sep
(9) |
Oct
(92) |
Nov
(26) |
Dec
(51) |
2010 |
Jan
(105) |
Feb
(83) |
Mar
(52) |
Apr
(59) |
May
(68) |
Jun
(71) |
Jul
(127) |
Aug
(49) |
Sep
(91) |
Oct
(27) |
Nov
(33) |
Dec
(26) |
2011 |
Jan
(26) |
Feb
(45) |
Mar
(26) |
Apr
(28) |
May
(17) |
Jun
(15) |
Jul
(45) |
Aug
(33) |
Sep
(50) |
Oct
(22) |
Nov
(10) |
Dec
(21) |
2012 |
Jan
(33) |
Feb
(24) |
Mar
(36) |
Apr
(60) |
May
(60) |
Jun
(43) |
Jul
(114) |
Aug
(19) |
Sep
(35) |
Oct
(24) |
Nov
(64) |
Dec
(12) |
2013 |
Jan
(54) |
Feb
(58) |
Mar
(51) |
Apr
(46) |
May
(21) |
Jun
(29) |
Jul
(25) |
Aug
(25) |
Sep
(13) |
Oct
(7) |
Nov
(14) |
Dec
(27) |
2014 |
Jan
(10) |
Feb
(7) |
Mar
(16) |
Apr
(14) |
May
(19) |
Jun
(8) |
Jul
(15) |
Aug
(11) |
Sep
(5) |
Oct
(11) |
Nov
(11) |
Dec
(4) |
2015 |
Jan
(52) |
Feb
(27) |
Mar
(22) |
Apr
(17) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: <mg...@us...> - 2007-03-08 00:17:04
|
Revision: 390 http://svn.sourceforge.net/obo/?rev=390&view=rev Author: mgibson Date: 2007-03-07 16:17:04 -0800 (Wed, 07 Mar 2007) Log Message: ----------- developer docs - maybe its silly to put this under phenote-website? Added Paths: ----------- phenote/trunk/doc/phenote-website/developer-docs/ phenote/trunk/doc/phenote-website/developer-docs/dataadapter.html Added: phenote/trunk/doc/phenote-website/developer-docs/dataadapter.html =================================================================== --- phenote/trunk/doc/phenote-website/developer-docs/dataadapter.html (rev 0) +++ phenote/trunk/doc/phenote-website/developer-docs/dataadapter.html 2007-03-08 00:17:04 UTC (rev 390) @@ -0,0 +1,130 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + + + <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> + + + <title>Creating a phenote data adapter - developer docs</title> +</head> + + +<body> + +<h1 style="text-decoration: underline; text-align: center;">Creating a Phenote Data Adapter</h1> + +First off if youve just downloaded phenote from sourceforge obo svn, +the (latest) source is located in phenote/trunk/src/java. The most +important subdirectories under src/java for creating a data adapter are +phenote/dataadapter and phenote/datamodel. <br> +<br> +A good example data adapter to check out is phenote.dataadapter.phenosyntax.PhenoSyntaxFileAdapter<br> +<br> + +The interface that a phenote data adapter implements is phenote.dataadapter.DataAdapterI, and here is what it looks like:<br> + +<br> + +public interface DataAdapterI {<br> + +<br> + + public void load();<br> + + public CharacterListI load(File f);<br> + +<br> + + public void commit(CharacterListI charList);<br> + + public void commit(CharacterListI charList, File f);<br> + +<br> + + /** Set value to use for loading or writeback, for a file adapter this would be<br> + + the file name */<br> + + public void setAdapterValue(String adapterValue);<br> + + public List<String> getExtensions();<br> + + public String getDescription();<br> + +}<br> + +<br> +The most important methods are load() and commit(charList). + load() will be called by phenote to load up a +phenote.datamodel.CharacterListI. A CharacterListI is just a list of +phenote.datamodel.Characters. A Character is basically a phenotypic +statement (relating E,Q,genotype, etc...). So basically what a data +adapter needs to produce is a list of characters. <br> +<br> +A Character is just a set of tag-value fields, where the tag is the +name of the field (Entity, Quality, Genotype...), and value is the +value of the field. The actual names of the fields come from the +phenote configuration. (link to nicoles doc on phenote config), in +other words the phenote datamodel is proscribed by its configuration +file. This means that either a data adapter needs to be able to read +and write any tag-values that come at it, a dataadapter only handles a +certain subset of a configuration, or a configuration is in tune with a +data adapter. If the set of fields in configuration is completely +different than the fields a data adapter is expecting than the data +adapter wont be able to get/load the data it expects. The upshot is in +addition to making a data adapter you need to make a configuration that +fits with it (or make sure it fits with an existing configuration).<br> +<br> + To set a field in a character use:<br> +setValue(CharField cf, String valueString) which throws a +phenote.datamodel.TermNotFoundException if the valueString is not found +in the ontologies associated with the CharField(via configuration)<br> +where phenote.datamodel.CharField is an object that represents a field in a character. To get a char field you can call <br> +getCharFieldForName(String fieldName) which throws a +phenote.datamodel.CharFieldException if you give it a string that is +not from the configuration. Ok even better I just combined this into +one convenience method:<br> +setValue(String fieldString, String valueString) throws TermNotFoundException, CharFieldException.<br> +For fields with ontologies (with term completion) the valueString has to be the id for the term (not the term name)<br> +<br> +So thats basically it for making characters. Some code might look like this:<br> +<br> +try {<br> + Character c = new Character();<br> + c.setValue("Entity","GO:123");<br> + c.setValue("Quality","PATO:345");<br> + c.setValue("Genotype","somegenotypehere");<br> + ....<br> +} <br> +catch (CharFieldException e) {...} // may want to do this per field - error msg?<br> +catch (TermNotFoundException e) {...} // perhaps per field - error message?<br> +<br> +and for CharacterLists just add the characters made above to it:<br> +CharacterList cl = new CharacterList();<br> +cl.add(character1);<br> +cl.add(character2);<br> +...<br> +<br> +Ok I just noticed that currently only load(file) and +commit(charList,file) are being called via the LoadSaveManager - I will +fix this pronto.<br> +<br> +<br> +<br> +<br> +<br> +ToDo:<br> +So load & save from file menu has been directed to LoadSaveManager +which is hardwired to files(Jim Balhoffs work for phenoxml,syntax, +& nexus adapters - which are all file based - we havent had +non-file yet). This wont work for database adapters and needs a +refactoring - I will get on this! <br> +<br> +Add method to Character for setting a field with just strings:<br> +setValue(String field, String value)<br> +<br> +<br> +(dev note: Im wondering if the file stuff in DataAdapterI should be refactored) +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-07 20:39:24
|
Revision: 389 http://svn.sourceforge.net/obo/?rev=389&view=rev Author: mgibson Date: 2007-03-07 12:39:21 -0800 (Wed, 07 Mar 2007) Log Message: ----------- added convenience method setValue(String field,String value) for setting values in char throws CharFieldException if faluty field TermNotFoundException if term not found in ontologies from char field Modified Paths: -------------- phenote/trunk/src/java/phenote/datamodel/Character.java phenote/trunk/src/java/phenote/datamodel/CharacterI.java Modified: phenote/trunk/src/java/phenote/datamodel/Character.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/Character.java 2007-03-07 19:56:46 UTC (rev 388) +++ phenote/trunk/src/java/phenote/datamodel/Character.java 2007-03-07 20:39:21 UTC (rev 389) @@ -8,27 +8,23 @@ /** Characters are the EAV building blocks of a Phenotype. Previously this was called a Phenotype which was a misnomer - Should the Character datamodel be a generic list of CharFieldValues? - That can be free text or from ontologies? hmmmm..... im starting to think - this datamodel is too hardwired - hmmmm....*/ + Should the Character datamodel be a generic hash of CharField-CharFieldValues? + That can be free text or from ontologies? */ public class Character implements CharacterI, Cloneable { - // List<CharFieldValue> charFields??? or List<CharField> - // 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 try { setValue(new CharFieldValue(e,this,getEntityField())); } - private HashMap<CharField,CharFieldValue> charFieldToValue = new HashMap<CharField,CharFieldValue>(); // obo edit annotation that gets modified in setValues // private OBOEditAnntotation - get & set methods + /** Throws CharFieldEx if fieldString not valid field, TermNotFoundEx if valueString + not found in ontologies associated with field */ + public void setValue(String fieldString, String valueString) + throws CharFieldException,TermNotFoundException { + setValue(getCharFieldForName(fieldString),valueString); + } + /** for generic fields its just a map from char field to char field value */ public void setValue(CharField cf, CharFieldValue cfv) { charFieldToValue.put(cf,cfv); Modified: phenote/trunk/src/java/phenote/datamodel/CharacterI.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2007-03-07 19:56:46 UTC (rev 388) +++ phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2007-03-07 20:39:21 UTC (rev 389) @@ -12,8 +12,11 @@ public interface CharacterI { /** generic fields!!! */ + public void setValue(String fieldString, String valueString) + throws CharFieldException,TermNotFoundException; public void setValue(CharField cf, CharFieldValue cfv); // ?? public void setValue(CharField cf, String valueString) throws TermNotFoundException; + public CharField getCharFieldForName(String fieldName) throws CharFieldException; public CharFieldValue getValue(CharField cf); public String getValueString(CharField cf); // should make an exception for this This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-07 19:57:11
|
Revision: 388 http://svn.sourceforge.net/obo/?rev=388&view=rev Author: mgibson Date: 2007-03-07 11:56:46 -0800 (Wed, 07 Mar 2007) Log Message: ----------- well this is exciting - so now when phenote is initially started up (from webstart or whatnot) seeing that theres no file specified in .phenote/conf/my-phenote.cfg (initial state) it will query for all cfg files it can find - .phenote/conf, webstart jar /*.cfg, conf/*.cfg - i think a regular jar as well - and list all the configs to shoose from - this eliminates the need for separate jnlp webstarts for each config need to add menu item where you canchange your config - only way to change config now is to manually set my-phenote.cfg or -c or -u cmd line options but gui config is coming along... Modified Paths: -------------- phenote/trunk/build.xml phenote/trunk/doc/phenote-website/phenote.html phenote/trunk/src/java/phenote/config/Config.java phenote/trunk/src/java/phenote/datamodel/Character.java phenote/trunk/src/java/phenote/datamodel/CharacterI.java phenote/trunk/src/java/phenote/edit/CompoundTransaction.java phenote/trunk/src/java/phenote/gui/GridBagUtil.java phenote/trunk/src/java/phenote/gui/ShrimpDag.java phenote/trunk/src/java/phenote/gui/field/TermCompList.java phenote/trunk/src/java/phenote/main/PhenoteVersion.java phenote/trunk/src/java/phenote/util/FileUtil.java Added Paths: ----------- phenote/trunk/jars/jnlp.jar phenote/trunk/src/java/phenote/config/ConfigFileQueryGui.java Modified: phenote/trunk/build.xml =================================================================== --- phenote/trunk/build.xml 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/build.xml 2007-03-07 19:56:46 UTC (rev 388) @@ -132,7 +132,7 @@ </classpath> </java> </target> - <target name="run-jar" > + <target name="run-jar" depends="jar"> <java classname="phenote.main.Phenote" fork="yes" jvmargs="-Xmx300M"> <!-- arg value="-c configfilehereventually"/ --> <classpath> @@ -206,6 +206,16 @@ </jar> </target> + <!-- JAR The jar target compiles everything, and produces a phenote.jar in + phenote/jars/phenote.jar. --> + <target name="jar-reduced" depends="compile"> + <jar destfile="${jarfile}"> + <fileset dir="${classfiles}"/> + <fileset dir="." includes="obo-files/" excludes="obo-files/old,obo-files/fma_obo.obo,obo-files/gene_ontology.obo,obo-files/chebi.obo" /> + <fileset file="${conf}/*.cfg"/> + </jar> + </target> + <target name="jar-web" depends="compile"> <jar destfile="${jarfile}"> <fileset dir="${classfiles}"/> @@ -427,7 +437,8 @@ </copy> </target> - <target name="webstart-jars" depends="build-all,jar,copy-webstart-jars,sign-webstart-jars"/> + <target name="webstart-jars" + depends="build-all,jar,copy-webstart-jars,sign-webstart-jars"/> <target name="copy-webstart-jars"> <echo message="Env Var PHENOTE VERSION is set to ${env.PHENOTE_VERSION}" /> @@ -453,7 +464,15 @@ storepass="plumper" keypass="plumper"/> </target> + <!-- for quick test purposes - exclude big & slow human --> + <target name="webstart-just-phenote-jar-reduced" depends="compile,jar-reduced"> + <copy file="${lib}/phenote.jar" + todir="phenote-webstart/${env.PHENOTE_VERSION}/jars"/> + <signjar jar="phenote-webstart/${env.PHENOTE_VERSION}/jars/phenote.jar" keystore="plumpkey" alias="signFiles" + storepass="plumper" keypass="plumper"/> + </target> + <target name="if-version"> <if> <equals arg1="${env.PHENOTE_VERSION}" arg2="" /> Modified: phenote/trunk/doc/phenote-website/phenote.html =================================================================== --- phenote/trunk/doc/phenote-website/phenote.html 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/doc/phenote-website/phenote.html 2007-03-07 19:56:46 UTC (rev 388) @@ -4,16 +4,20 @@ + + <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> + + <title>Phenote</title> </head> @@ -22,18 +26,22 @@ + <h1 style="text-align: left;"><span style="font-weight: bold;"></span>Phenote<br> + </h1> + <br> + Phenote is a tool to annotate phenotypes using the Entity Quality paradigm. It takes advantage of ontologies. It uses term completion to allow curators quick access to @@ -41,51 +49,63 @@ + <br> + <a href="1.0/phenote-flybase.jnlp">Phenote 1.0 for fly</a><br> + <br> + <a href="1.0/phenote-zfin.jnlp">Phenote 1.0 for zfin</a><br> + <br> + <a href="1.0/phenote-zfin.jnlp"></a><a href="1.0/phenote-human.jnlp">Phenote 1.0 for human</a><br> + <br> + To be clear the above webstart links for zfin & fly were made via configuration not hard wired code. Thus one could in theory configure phenote for ones own purposes.<br> + <br> + Recent addditions include the ability to add any field you like, post compose terms, bulk update, undo, spring framework, and synonyms now are shown in the completion list.<br> + <br> + Zebrafish requires components of phenote(to plug into their non-public website), not a full web app. Here is a proof of concept of some of @@ -94,41 +114,50 @@ + <br> + <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 dictyBase. Here is what they have done:<br> + <br> + <a href="http://165.124.152.194/db/cgi-bin/dictyBase/curation/phenotypeCuration.pl">DictyBase webby phenote</a><br> + <br> + <br> + We are doing these releases to get feedback. Please report any bugs (ideally through the <a href="https://sourceforge.net/tracker/?group_id=76834&atid=887913">bug tracker</a>) and let us know what you @@ -136,224 +165,280 @@ + <br> +In development - the bleeding edge if you will:<br> +<br> +<a href="1.1/phenote.jnlp">Phenote 1.1</a><br> + <h4>Phenote links:<br> + </h4> + <a href="https://lists.sourceforge.net/lists/listinfo/obo-phenote">Phenote email list</a><br> + <a href="https://sourceforge.net/tracker/?group_id=76834&atid=887913">Phenote bug tracker</a><br> + <a href="https://lists.sourceforge.net/lists/listinfo/obo-phenote-bug-tracker">Bug tracker email list</a><br> + <a href="https://sourceforge.net/svn/?group_id=76834">Phenote source code (obo sourceforge svn)</a><br> + <a href="https://lists.sourceforge.net/lists/listinfo/obo-svn-commit">Phenote svn commit email list</a><br> + <a href="http://wiki.dictybase.org/dictywiki/index.php/Phenotype_Curation_Tool_Documentation#Usage">Dicty webby phenote wiki developer docs</a><br> + <a href="http://www.bioontology.org/wiki-internal/index.php/Phenotype_Annotation_Tool">Phenote ncbo internal wiki (ncbo folk only)</a><br> + <br> + <a href="phenote-release-notes.html">Phenote Release Notes and old webstart releases</a><br> + <br> + If the Phenote webstart link fails to do anything, then there are probably problems with webstart and/or java(has to be jdk 1.5). Take a look at the <a href="webstart-troubleshooting.html">webstart troubleshooting</a><br> + page.<br> + <br> + Click here for <a href="phenote-java-requirements.html">phenote java requirements</a><br> + <br> + <br> + <br> + Old releases: <br> + <br> + <a href="0.9/phenote-flybase.jnlp">Phenote 0.9 for fly</a><br> + <a href="0.9/phenote-zfin.jnlp">Phenote (standalone) 0.9 for zfin</a><br> + <br> + <a href="0.8/phenote-flybase.jnlp">Phenote 0.8 for fly.</a><br> + <a href="0.8/phenote-zfin.jnlp">Phenote (standalone) 0.8 for zfin</a><br> + <br> + <a href="0.7/phenote-flybase.jnlp">Phenote 0.7 for fly.</a><br> + <a href="0.7/phenote-zfin.jnlp">Phenote (standalone) 0.7 for zfin</a><br> + <br> + <a href="0.6/phenote-flybase.jnlp">Phenote 0.6 with fly anatomy</a><br> + <br> + <a href="0.6/phenote-zfin.jnlp">Phenote 0.6 with zebrafish anatomy</a><br> + <br> + <a href="0.5/phenote-flybase.jnlp">Phenote 0.5 webstart for FlyBase</a><br> + <br> + <a href="0.5/phenote-zfin.jnlp">Phenote 0.5 webstart for ZFIN</a><br> + <br> + <a href="0.4/phenote-flybase.jnlp">Phenote 0.4 webstart for FlyBase</a><br> + <br> + <a href="0.4/phenote-zfin.jnlp">Phenote 0.4 webstart for ZFIN</a><br> + <br> + <a href="0.3.1/phenote-webstart.jnlp">Phenote for CToL group (0.3.1)</a> (a special release for the CToL group that uses fish taxonomy)<br> + <br> + <a href="0.3/phenote-webstart.jnlp">Phenote 0.3</a><br> + <br> + <a href="0.2/phenote-webstart.jnlp">Phenote 0.2</a><br> + <br> + <a href="0.1/phenote-webstart.jnlp">Phenote 0.1</a><br> + <br> + <br> + </body> </html> Added: phenote/trunk/jars/jnlp.jar =================================================================== (Binary files differ) Property changes on: phenote/trunk/jars/jnlp.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: phenote/trunk/src/java/phenote/config/Config.java =================================================================== --- phenote/trunk/src/java/phenote/config/Config.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/config/Config.java 2007-03-07 19:56:46 UTC (rev 388) @@ -1,6 +1,7 @@ package phenote.config; import java.io.File; +import java.io.FilenameFilter; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; @@ -12,6 +13,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.xmlbeans.XmlException; import phenote.main.PhenoteVersion; @@ -87,18 +89,25 @@ } /** default file should be in .phenote/conf/my-phenote.cfg. if not set yet then just - do good ol flybase.cfg */ + do good ol flybase.cfg - actually if not there then query user */ private String getDefaultFile() { String file=null; try { LineNumberReader r = new LineNumberReader(new FileReader(getMyPhenoteFile())); file = r.readLine(); } catch (IOException e) {} - if (file == null || file.equals("")) - file = FLYBASE_DEFAULT_CONFIG_FILE; + if (file == null || file.equals("")) { + //file = FLYBASE_DEFAULT_CONFIG_FILE; + file = queryUserForConfigFile(); + } return file; } + + private String queryUserForConfigFile() { + return ConfigFileQueryGui.queryUserForConfigFile(); + } + /** if usePersonalConfig is false then ignore personal(my-phenote.cfg). if true then overwrite personal if overwritePersonal is true, otherwise only write to personal if personal doesnt exist, if personal exists ignore passed in @@ -169,11 +178,9 @@ //return dotConfFile.toString(); // ? } - private File getDotPhenoteConfDir() { - File dotPhenote = FileUtil.getDotPhenoteDir(); - File conf = new File(dotPhenote,"conf"); - conf.mkdir(); - return conf; + private static File getDotPhenoteConfDir() { + return FileUtil.getDotPhenoteConfDir(); + //File conf = new File(dotPhenote,"conf");conf.mkdir();return conf; } private File getMyPhenoteFile() { Added: phenote/trunk/src/java/phenote/config/ConfigFileQueryGui.java =================================================================== --- phenote/trunk/src/java/phenote/config/ConfigFileQueryGui.java (rev 0) +++ phenote/trunk/src/java/phenote/config/ConfigFileQueryGui.java 2007-03-07 19:56:46 UTC (rev 388) @@ -0,0 +1,207 @@ +package phenote.config; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.List; +import java.util.LinkedHashSet; +import java.util.Set; + +import java.util.Enumeration; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.io.IOException; +import java.net.URL; +import java.net.JarURLConnection; + +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.Dimension; +import java.awt.Point; +//import java.awt.BorderLayout; +//import java.awt.GridLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Toolkit; +import javax.swing.AbstractAction; +import javax.swing.BoxLayout; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JButton; +import javax.swing.ButtonGroup; +import javax.swing.JRadioButton; + + +import javax.jnlp.*; + +import phenote.gui.GridBagUtil; +import phenote.util.FileUtil; + +class ConfigFileQueryGui { + + //private String selection; + private String selectedFile; + private JDialog dialog; + private boolean okPressed = false; + private ButtonGroup buttonGroup; + + static String queryUserForConfigFile() { + ConfigFileQueryGui c = new ConfigFileQueryGui(); + return c.queryUser(); + } + + private String queryUser() { + dialog = new JDialog(); //"Choose Configuration",true); + //dialog.setPreferredSize(new Dimension(300,400)); + //dialog.setLayout(new BoxLayout(dialog,BoxLayout.Y_AXIS)); + //dialog.setLayout(new GridLayout(0,1)); + //dialog.setLayout(new BorderLayout()); + dialog.setLayout(new GridBagLayout()); + dialog.setTitle("Phenote Configuration"); + // set layout? + JLabel text = new JLabel("Please pick a configuration for Phenote: "); + int center = GridBagConstraints.CENTER; + GridBagConstraints gbc = GridBagUtil.makeAnchorConstraint(0,0,center); + dialog.add(text,gbc); + + JPanel buttonPanel = new JPanel(); + buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.Y_AXIS)); + buttonGroup = new ButtonGroup(); + boolean first = true; + for (String cfg : getConfigNames()) { + JRadioButton b = new JRadioButton(new BtnAction(cfg)); + buttonPanel.add(b); + if (first) { + b.setSelected(true); + selectedFile = cfg; + first = false; + } + buttonGroup.add(b); + } + ++gbc.gridy; + dialog.add(buttonPanel,gbc); + JButton ok = new JButton("OK"); + ++gbc.gridy; + dialog.add(ok,gbc); + ok.addActionListener(new OkActionListener()); + dialog.pack(); + centerOnScreen(dialog); + dialog.setVisible(true); + //return selection; // ???? + while (!okPressed) { + //System.out.println("ok pressed? "+okPressed); + try { Thread.sleep(10); } catch (InterruptedException e) {} + } // sleep?? + return selectedFile; + } + + private class OkActionListener implements ActionListener { + public void actionPerformed(ActionEvent e) { + //selection = g.getSelection().getActionCommand(); + //String selectedFile = (String)(buttonGroup.getSelection().getValue("filename")); + okPressed = true; + //System.out.println("ok pressed in ok action listener "+okPressed); + dialog.dispose(); + } + } + + private class BtnAction extends AbstractAction { + private String configFilename; + BtnAction(String configFilename) { + //String display = makeDisplayFromFile(configFilename); + super(makeDisplayFromFile(configFilename)); + //putValue("filename",configFilename); + this.configFilename = configFilename; + } + public void actionPerformed(ActionEvent e) { + selectedFile = configFilename; + } + } + private String makeDisplayFromFile(String f) { + f = f.replaceAll(".cfg",""); + f = f.replaceAll("-"," "); + return f; + } + + /** query conf directories in app conf, jar conf(webstart) and .phenote/conf */ + private Set<String> getConfigNames() { + + Set<String> names = new LinkedHashSet<String>(); + + // should only go into jar if actually running from jar hmmmmm + // will this work with webstart??? probably not + + File jf = new File("jars/phenote.jar"); + + try { + BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService"); + URL codeBaseUrl = bs.getCodeBase(); // this is the url to phenote webstart + String s = "jar:"+codeBaseUrl.toString()+"/jars/phenote.jar!/"; + URL jarUrl = new URL(s); + JarURLConnection juc = (JarURLConnection)jarUrl.openConnection(); + JarFile jar = juc.getJarFile();//new JarFile(jf); + Enumeration<JarEntry> en = jar.entries(); + while (en.hasMoreElements()) { + System.out.println("entry: "+en.nextElement()); + String entry = en.nextElement().getName(); + if (entry.endsWith(".cfg")) { + // test if jar if running off of jar basically + //System.out.println("cfg "+entry +" res? "+ConfigFileQueryGui.class.getResource(entry)+ConfigFileQueryGui.class.getResource("/"+entry)); + if (ConfigFileQueryGui.class.getResource("/"+entry) != null) { + //System.out.println("cfg that is in jar "+entry); + names.add(entry); + } + } + } + } catch (IOException e) {}//System.out.println("io cant open phen jar "+e);} + catch (Exception e) {} //System.out.println("cant open phen jar "+e); } // ??? + + // do app/distrib conf dir + File appConf = new File("conf/"); + addCfgFromDir(appConf,names); + + // ~/.phenote/conf + File dotPhenConf = FileUtil.getDotPhenoteConfDir(); + addCfgFromDir(dotPhenConf,names); + return names; + } + + private void addCfgFromDir(File confDir,Set<String> names) { + FilenameFilter filter = new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.endsWith(".cfg");} + }; + File[] cfgFiles = confDir.listFiles(filter); + if (cfgFiles == null) return; // null if nothing found + for (File f : cfgFiles) + names.add(f.getName()); + } + + /** generic util? */ + private void centerOnScreen(Component c) { + Toolkit t = Toolkit.getDefaultToolkit(); + Dimension screen = t.getScreenSize(); + int x = (int)screen.getWidth()/2 - c.getWidth()/2; + int y = (int)screen.getHeight()/2 - c.getHeight()/2; + Point p = new Point(x,y); + c.setLocation(p); + } + + private class PhenoteClassLoader extends ClassLoader { + + private PhenoteClassLoader() { + super(ClassLoader.getSystemClassLoader()); + } + + protected String findLibrary(String lib) { + return super.findLibrary(lib); + //return this.getParent().findLibrary(lib); + } + + //protected ClassLoader getParent() { return super.getParent(); } + + } + +} Modified: phenote/trunk/src/java/phenote/datamodel/Character.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/Character.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/datamodel/Character.java 2007-03-07 19:56:46 UTC (rev 388) @@ -26,13 +26,17 @@ private HashMap<CharField,CharFieldValue> charFieldToValue = new HashMap<CharField,CharFieldValue>(); + // obo edit annotation that gets modified in setValues + // private OBOEditAnntotation - get & set methods + /** for generic fields its just a map from char field to char field value */ public void setValue(CharField cf, CharFieldValue cfv) { charFieldToValue.put(cf,cfv); //System.out.println("Char setVal "+cf+" val "+cfv); + // setOboEditModel(oboEditAnnotation,cf,cfv); } private void setValue(CharFieldValue cfv) { - charFieldToValue.put(cfv.getCharField(),cfv); + setValue(cfv.getCharField(),cfv); } public void setValue(CharField cf, String s) throws TermNotFoundException { @@ -96,7 +100,7 @@ } } - private CharField getCharFieldForName(String fieldName) throws CharFieldException { + public CharField getCharFieldForName(String fieldName) throws CharFieldException { for (CharField cf : getAllCharFields()) { if (cf.getName().equalsIgnoreCase(fieldName)) return cf; Modified: phenote/trunk/src/java/phenote/datamodel/CharacterI.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/datamodel/CharacterI.java 2007-03-07 19:56:46 UTC (rev 388) @@ -29,6 +29,8 @@ public boolean equals(CharacterI c); public boolean hasNoContent(); + + /** these methods are pase and need to be phased out! */ public String getPub(); public boolean hasPub(); public String getGenotype(); Modified: phenote/trunk/src/java/phenote/edit/CompoundTransaction.java =================================================================== --- phenote/trunk/src/java/phenote/edit/CompoundTransaction.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/edit/CompoundTransaction.java 2007-03-07 19:56:46 UTC (rev 388) @@ -9,6 +9,7 @@ import phenote.datamodel.CharFieldEnum; import phenote.datamodel.CharacterI; +/** used for bulk updating (see TermCompList) */ public class CompoundTransaction implements TransactionI { // for now we just have UpdateTransactions - later will have Add & Del trans Modified: phenote/trunk/src/java/phenote/gui/GridBagUtil.java =================================================================== --- phenote/trunk/src/java/phenote/gui/GridBagUtil.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/gui/GridBagUtil.java 2007-03-07 19:56:46 UTC (rev 388) @@ -15,7 +15,7 @@ return makeConstraint(x,y,horizPad,vertPad,GridBagConstraints.WEST); } - static GridBagConstraints makeAnchorConstraint(int x, int y, int anchor) { + public static GridBagConstraints makeAnchorConstraint(int x, int y, int anchor) { return makeConstraint(x,y,3,3,anchor); } Modified: phenote/trunk/src/java/phenote/gui/ShrimpDag.java =================================================================== --- phenote/trunk/src/java/phenote/gui/ShrimpDag.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/gui/ShrimpDag.java 2007-03-07 19:56:46 UTC (rev 388) @@ -72,6 +72,8 @@ // just hard wire to go for now try { Ontology o = OntologyManager.inst().getOntologyForName("ZF"); + // fly causes an endless loop - oh my + //Ontology o = OntologyManager.inst().getOntologyForName("Fly"); return o.getOboSession(); } catch (phenote.datamodel.OntologyException e) { System.out.println("no ontol for dag"); Modified: phenote/trunk/src/java/phenote/gui/field/TermCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2007-03-07 19:56:46 UTC (rev 388) @@ -140,6 +140,7 @@ } + /** edits one or more selected chars */ protected void editModel() { OBOClass oboClass; try { oboClass = getCurrentOboClass(); } Modified: phenote/trunk/src/java/phenote/main/PhenoteVersion.java =================================================================== --- phenote/trunk/src/java/phenote/main/PhenoteVersion.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/main/PhenoteVersion.java 2007-03-07 19:56:46 UTC (rev 388) @@ -6,7 +6,7 @@ //private static final float MAJOR_VERSION_NUM = 0.8f; //private static final float SUB_VERSION_NUM = .3f; - private static final String VERSION = "1.1"; // ?? + private static final String VERSION = "1.1.1"; // ?? // type is "dev" or "release" //private static final String type = " dev"; // "release" Modified: phenote/trunk/src/java/phenote/util/FileUtil.java =================================================================== --- phenote/trunk/src/java/phenote/util/FileUtil.java 2007-03-03 01:48:35 UTC (rev 387) +++ phenote/trunk/src/java/phenote/util/FileUtil.java 2007-03-07 19:56:46 UTC (rev 388) @@ -35,16 +35,9 @@ public static File getDotPhenoteOboDir() { return getDotPhenoteSubDir("obo-files"); -// File d = getDotPhenoteDir(); -// File obo = new File(d,"obo-files"); -// if (!obo.exists()) { -// LOG.info("creating "+obo+" directory"); -// obo.mkdir(); -// } -// return obo; } - private static File getDotPhenoteConfDir() { + public static File getDotPhenoteConfDir() { return getDotPhenoteSubDir("conf"); } @@ -90,7 +83,7 @@ throw new FileNotFoundException(filename+" not found"); } - // this is muddling config and obop - probably should be 2 methods? or be smart about + // this is muddling config and obo - probably should be 2 methods? or be smart about // suffix - or who cares? private static List<URL> getPossibleUrls(String filename) { List<URL> urls = new ArrayList(5); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cmu...@us...> - 2007-03-03 01:48:53
|
Revision: 387 http://svn.sourceforge.net/obo/?rev=387&view=rev Author: cmungall Date: 2007-03-02 17:48:35 -0800 (Fri, 02 Mar 2007) Log Message: ----------- Modified Paths: -------------- phenote/trunk/conf/go-function-process.cfg Added Paths: ----------- phenote/trunk/conf/mp-xp.cfg phenote/trunk/doc/phenote-website/phenote-mp-xp.jnlp Modified: phenote/trunk/conf/go-function-process.cfg =================================================================== --- phenote/trunk/conf/go-function-process.cfg 2007-03-02 12:25:45 UTC (rev 386) +++ phenote/trunk/conf/go-function-process.cfg 2007-03-03 01:48:35 UTC (rev 387) @@ -10,10 +10,10 @@ <obo-repository url-dir="http://purl.org/obo/obo-all/"/> - <field name="T1" syntax-abbrev="T1"> + <field name="T1" syntax-abbrev="Term"> <ontology name="GO-BP" file="biological_process.obo" repos-subdir="biological_process" /> </field> - <field name="T2" syntax-abbrev="T2"> + <field name="T2" syntax-abbrev="Xref"> <ontology name="GO-MF" file="molecular_function.obo" repos-subdir="molecular_function" /> </field> <field name="Context" syntax-abbrev="Context" type="free_text"/> Added: phenote/trunk/conf/mp-xp.cfg =================================================================== --- phenote/trunk/conf/mp-xp.cfg (rev 0) +++ phenote/trunk/conf/mp-xp.cfg 2007-03-03 01:48:35 UTC (rev 387) @@ -0,0 +1,25 @@ + +<phenote-configuration version="1.0" xmlns="phenote/config/xml" noNamespaceSchemaLocation="phenote-config.xsd"> + + <dataadapter name="phenosyntax" enable="true"/> + <dataadapter name="phenoxml" enable="true"/> + + <log config-file="conf/log4j-standalone.xml" /> + + <uvic-graph enable="false"/> + + <obo-repository url-dir="http://purl.org/obo/obo-all/"/> + + <field name="Term" syntax-abbrev="Term"> + <ontology name="MP" file="mammalian_phenotype.obo" repos-subdir="mammalian_phenotype" /> + </field> + <field name="EquivalentTo" syntax-abbrev="EquivalentTo"> + <ontology name="PATO" file="quality.obo" repos-subdir="quality" /> + <ontology name="MA" file="adult_mouse_anatomy.obo" repos-subdir="adult_mouse_anatomy" /> + <postcomp relationship-ontology="relationship.obo" repos-subdir="OBO_REL"/> + <ontology name="GO-BP" file="biological_process.obo" repos-subdir="biological_process" /> + <ontology name="GO-CC" file="cellular_component.obo" repos-subdir="cellular_component" /> + <ontology name="CHEBI" file="chebi.obo" repos-subdir="chebi" /> + </field> + +</phenote-configuration> Added: phenote/trunk/doc/phenote-website/phenote-mp-xp.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-mp-xp.jnlp (rev 0) +++ phenote/trunk/doc/phenote-website/phenote-mp-xp.jnlp 2007-03-03 01:48:35 UTC (rev 387) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<jnlp +spec="1.0+" +codebase="http://toy.lbl.gov:9010/phenote/1.1/" +href="phenote-mp-xp.jnlp"> +<information> + <title>Phenote-for-GO 1.1</title> + <vendor>BBOP</vendor> + <description>Phenote demo for </description> + <!-- Declares that the application can run without + access to the server it was downloaded from --> + <offline-allowed /> +</information> +<security> + <!-- Request that the application be given full + access to the local (executing) machine, + as if it were a regular Java application. + Requires that all JAR files be signed + by a trusted party --> + <all-permissions /> +</security> +<resources> + <!-- Specify the versions of the Java Runtime Environment + (JRE) that are supported by the application. + Multiple entries of this kind are allowed, in which + case they are considered to be in order of preference --> + <j2se version="1.5+" initial-heap-size="64m" max-heap-size="500m" /> + <jar href="jars/phenote.jar" /> + <jar href="jars/oboedit.jar" /> + <jar href="jars/org.geneontology.jar" /> + <jar href="jars/BrowserLauncher2-10rc4.jar" /> + <jar href="jars/jsr173_1.0_api.jar" /> + <jar href="jars/phenoxmlbeans.jar" /> + <jar href="jars/phenoteconfigbeans.jar" /> + <jar href="jars/xbean.jar" /> + <jar href="jars/tomcat-servlet.jar" /> + <jar href="jars/te-common.jar" /> + <jar href="jars/log4j-1.2.13.jar" /> +</resources> +<application-desc main-class="phenote.main.Phenote"> + <argument>-u</argument> + <argument>/mp-xp.cfg</argument> +</application-desc> +</jnlp> + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-02 12:25:47
|
Revision: 386 http://svn.sourceforge.net/obo/?rev=386&view=rev Author: mgibson Date: 2007-03-02 04:25:45 -0800 (Fri, 02 Mar 2007) Log Message: ----------- -i -> -u 1.0 -> 1.1 Modified Paths: -------------- phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp Modified: phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp 2007-03-02 03:19:12 UTC (rev 385) +++ phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp 2007-03-02 12:25:45 UTC (rev 386) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" -codebase="http://toy.lbl.gov:9010/phenote/1.0/" +codebase="http://toy.lbl.gov:9010/phenote/1.1/" href="phenote-go-function-process.jnlp"> <information> - <title>Phenote-for-GO 1.0</title> + <title>Phenote-for-GO 1.1</title> <vendor>BBOP</vendor> <description>Phenote demo for </description> <!-- Declares that the application can run without @@ -38,7 +38,7 @@ <jar href="jars/log4j-1.2.13.jar" /> </resources> <application-desc main-class="phenote.main.Phenote"> - <argument>-i</argument> + <argument>-u</argument> <argument>/go-function-process.cfg</argument> </application-desc> </jnlp> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cmu...@us...> - 2007-03-02 03:19:13
|
Revision: 385 http://svn.sourceforge.net/obo/?rev=385&view=rev Author: cmungall Date: 2007-03-01 19:19:12 -0800 (Thu, 01 Mar 2007) Log Message: ----------- Added Paths: ----------- phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp Added: phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp (rev 0) +++ phenote/trunk/doc/phenote-website/phenote-go-function-process.jnlp 2007-03-02 03:19:12 UTC (rev 385) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<jnlp +spec="1.0+" +codebase="http://toy.lbl.gov:9010/phenote/1.0/" +href="phenote-go-function-process.jnlp"> +<information> + <title>Phenote-for-GO 1.0</title> + <vendor>BBOP</vendor> + <description>Phenote demo for </description> + <!-- Declares that the application can run without + access to the server it was downloaded from --> + <offline-allowed /> +</information> +<security> + <!-- Request that the application be given full + access to the local (executing) machine, + as if it were a regular Java application. + Requires that all JAR files be signed + by a trusted party --> + <all-permissions /> +</security> +<resources> + <!-- Specify the versions of the Java Runtime Environment + (JRE) that are supported by the application. + Multiple entries of this kind are allowed, in which + case they are considered to be in order of preference --> + <j2se version="1.5+" initial-heap-size="64m" max-heap-size="500m" /> + <jar href="jars/phenote.jar" /> + <jar href="jars/oboedit.jar" /> + <jar href="jars/org.geneontology.jar" /> + <jar href="jars/BrowserLauncher2-10rc4.jar" /> + <jar href="jars/jsr173_1.0_api.jar" /> + <jar href="jars/phenoxmlbeans.jar" /> + <jar href="jars/phenoteconfigbeans.jar" /> + <jar href="jars/xbean.jar" /> + <jar href="jars/tomcat-servlet.jar" /> + <jar href="jars/te-common.jar" /> + <jar href="jars/log4j-1.2.13.jar" /> +</resources> +<application-desc main-class="phenote.main.Phenote"> + <argument>-i</argument> + <argument>/go-function-process.cfg</argument> +</application-desc> +</jnlp> + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-03-02 00:03:45
|
Revision: 384 http://svn.sourceforge.net/obo/?rev=384&view=rev Author: mgibson Date: 2007-03-01 16:03:45 -0800 (Thu, 01 Mar 2007) Log Message: ----------- woops forgot to update to 1.1 from 1.0 Modified Paths: -------------- phenote/trunk/doc/phenote-website/phenote-flybase.jnlp phenote/trunk/doc/phenote-website/phenote-human.jnlp phenote/trunk/doc/phenote-website/phenote-zfin.jnlp Modified: phenote/trunk/doc/phenote-website/phenote-flybase.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-flybase.jnlp 2007-03-01 23:56:22 UTC (rev 383) +++ phenote/trunk/doc/phenote-website/phenote-flybase.jnlp 2007-03-02 00:03:45 UTC (rev 384) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" -codebase="http://toy.lbl.gov:9010/phenote/1.0/" +codebase="http://toy.lbl.gov:9010/phenote/1.1" href="phenote-flybase.jnlp"> <information> - <title>Phenote 1.0</title> + <title>Phenote 1.1</title> <vendor>BBOP</vendor> <description>Phenote standalone app via webstart</description> <!-- Declares that the application can run without Modified: phenote/trunk/doc/phenote-website/phenote-human.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-human.jnlp 2007-03-01 23:56:22 UTC (rev 383) +++ phenote/trunk/doc/phenote-website/phenote-human.jnlp 2007-03-02 00:03:45 UTC (rev 384) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" -codebase="http://toy.lbl.gov:9010/phenote/1.0/" +codebase="http://toy.lbl.gov:9010/phenote/1.1/" href="phenote-human.jnlp"> <information> - <title>Phenote 1.0</title> + <title>Phenote 1.1</title> <vendor>BBOP</vendor> <description>Phenote standalone app via webstart</description> <!-- Declares that the application can run without Modified: phenote/trunk/doc/phenote-website/phenote-zfin.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-zfin.jnlp 2007-03-01 23:56:22 UTC (rev 383) +++ phenote/trunk/doc/phenote-website/phenote-zfin.jnlp 2007-03-02 00:03:45 UTC (rev 384) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" -codebase="http://toy.lbl.gov:9010/phenote/1.0/" +codebase="http://toy.lbl.gov:9010/phenote/1.1/" href="phenote-zfin.jnlp"> <information> - <title>Phenote 1.0</title> + <title>Phenote 1.1</title> <vendor>BBOP</vendor> <description>Phenote standalone app via webstart</description> <!-- Declares that the application can run without This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cmu...@us...> - 2007-03-01 23:56:21
|
Revision: 383 http://svn.sourceforge.net/obo/?rev=383&view=rev Author: cmungall Date: 2007-03-01 15:56:22 -0800 (Thu, 01 Mar 2007) Log Message: ----------- Added Paths: ----------- phenote/trunk/conf/go-function-process.cfg Added: phenote/trunk/conf/go-function-process.cfg =================================================================== --- phenote/trunk/conf/go-function-process.cfg (rev 0) +++ phenote/trunk/conf/go-function-process.cfg 2007-03-01 23:56:22 UTC (rev 383) @@ -0,0 +1,23 @@ + +<phenote-configuration version="1.0" xmlns="phenote/config/xml" noNamespaceSchemaLocation="phenote-config.xsd"> + + <dataadapter name="phenosyntax" enable="true"/> + <dataadapter name="phenoxml" enable="true"/> + + <log config-file="conf/log4j-standalone.xml" /> + + <uvic-graph enable="false"/> + + <obo-repository url-dir="http://purl.org/obo/obo-all/"/> + + <field name="T1" syntax-abbrev="T1"> + <ontology name="GO-BP" file="biological_process.obo" repos-subdir="biological_process" /> + </field> + <field name="T2" syntax-abbrev="T2"> + <ontology name="GO-MF" file="molecular_function.obo" repos-subdir="molecular_function" /> + </field> + <field name="Context" syntax-abbrev="Context" type="free_text"/> + <field name="Pub" syntax-abbrev="PUB" type="free_text"/> + <field name="Description" syntax-abbrev="Desc" type="free_text"/> + +</phenote-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-28 19:14:59
|
Revision: 382 http://svn.sourceforge.net/obo/?rev=382&view=rev Author: nlw Date: 2007-02-28 11:14:56 -0800 (Wed, 28 Feb 2007) Log Message: ----------- edits to termInfo box - making it look a little prettier Modified Paths: -------------- phenote/trunk/src/java/phenote/util/HtmlUtil.java Modified: phenote/trunk/src/java/phenote/util/HtmlUtil.java =================================================================== --- phenote/trunk/src/java/phenote/util/HtmlUtil.java 2007-02-22 19:50:38 UTC (rev 381) +++ phenote/trunk/src/java/phenote/util/HtmlUtil.java 2007-02-28 19:14:56 UTC (rev 382) @@ -26,7 +26,11 @@ isStandAlone = standAlone; } - public static String termInfo(OBOClass oboClass) { + //this is Mark's old termInfo box. I'll keep it around + //just in case we need to go back to it. note that it might not + //work quite right because i've now changed the other functions it + //calls. + public static String termInfoOld(OBOClass oboClass) { if (oboClass == null) { System.out.println("null obo class for HtmlUtil.termInfo"); return ""; // null? exception? @@ -35,27 +39,72 @@ if (oboClass.isObsolete()) sb.append("This term is OBSOLETE").append(newLine()); sb.append(bold("TERM: ")).append(oboClass.getName()); - sb.append(nl()).append(bold("ID: ")).append(oboClass.getID()); + sb.append(nl()).append(bold("ID: ")).append(colorFont(oboClass.getID(), "red")); + Set syns = oboClass.getSynonyms(); for (Iterator it = syns.iterator(); it.hasNext(); ) { sb.append(newLine()).append(bold("Synonym: ")).append(it.next()); } - - sb.append(nl()).append(nl()).append(bold("PARENTS: ")); - sb.append(getParentalString(oboClass)); - sb.append(nl()).append(nl()).append(bold("CHILDREN: ")); - sb.append(getChildrenString(oboClass)); String definition = oboClass.getDefinition(); // definition = lineWrap(definition); if (definition != null && !definition.equals("")) sb.append(nl()).append(nl()).append(bold("Definition: ")).append(definition); + + sb.append(nl()).append(nl()).append(bold("CHILDREN: ")); + sb.append(getChildrenString(oboClass)); + // if (DEBUG) System.out.println(sb); return sb.toString(); } + //Nicole's attempt at making the Term Info box look a little better + //I'm puting all the information into an html table. rhs are each single table cells + //but are separated by line breaks. + public static String termInfo(OBOClass oboClass) { + if (oboClass == null) { + System.out.println("null obo class for HtmlUtil.termInfo"); + return ""; // null? exception? + } + StringBuffer sb = new StringBuffer(); + sb.append("<table>"); + if (oboClass.isObsolete()) { + sb.append(makeRow(makeLeftCol(bold("TERM"))+makeRightCol(bold(oboClass.getName())+colorFont(bold(" (OBSOLETE)"), "red")))); + } + else { + sb.append(makeRow(makeLeftCol(bold("TERM"))+makeRightCol(bold(oboClass.getName())))); + } + sb.append(makeRow(makeLeftCol(bold("ID"))+makeRightCol(oboClass.getID()))); + + Set syns = oboClass.getSynonyms(); + int pos = 0; + StringBuffer temp = new StringBuffer(); + for (Iterator it = syns.iterator(); it.hasNext(); ) { + temp.append(it.next()+"<br>"); + pos++; + } + if (pos>0) { + sb.append(makeRow(makeLeftCol(bold("Synonyms"))+makeRightCol(temp.toString()))); + } + + String definition = oboClass.getDefinition(); + + if ((definition != null) && !(definition.equals(""))) { + sb.append(makeRow(makeLeftCol(bold("Definition"))+makeRightCol(definition))); + } + + sb.append(makeRow(makeLeftCol("")+makeRightCol(""))); + sb.append(makeRow(makeLeftCol(bold("Parents"))+makeRightCol("<hr>"))); + sb.append(getParentalString(oboClass)); + sb.append(makeRow("")); + sb.append(makeRow(makeLeftCol(bold("Children"))+makeRightCol("<hr>"))); + sb.append(getChildrenString(oboClass)); + sb.append("</table>"); + return sb.toString(); + } + public static String termInfo(OBOClass oboClass, String ontology,String field) { // funny - revisit for sure - either should pass through all methods // or util should actually be an object - singleton? i think maybe its @@ -81,6 +130,34 @@ return "<b>"+text+"</b>"; } + private static String italic(String text) { + if (!DO_HTML) return text; + return "<i>"+text+"</i>"; + } + + private static String colorFont(String text, String color) { + if (!DO_HTML) return text; + return "<font color="+color+">"+text+"</font>"; + } + + private static String makeRow(String text) { + if (!DO_HTML) return text; + return "<tr>"+text+"</tr>"; + } + private static String makeLeftCol(String text) { + if (!DO_HTML) return text; + return "<td width=70 align=right valign=top><font size=-1>"+text+"</font></td>"; + } + private static String makeRightCol(String text) { + if (!DO_HTML) return text; + return "<td align=left valign=top>"+text+"</td>"; + } + + private static String makeTable(String text) { + if (!DO_HTML) return text; + return "<table>"+text+"</table>"; + } + private static String nl() { return newLine(); } private static String newLine() { @@ -101,53 +178,72 @@ StringBuffer sb = new StringBuffer(); // or should thi sjust be done more generically with a hash of string bufs // for each unique link type name? + // YES...that would be a better method i think -nlw + //method: make all the rt hand columns, then wrap around the left col of the type for the table entry StringBuffer isaStringBuf = new StringBuffer(); StringBuffer partofStringBuf = new StringBuffer(); + StringBuffer haspartStringBuf = new StringBuffer(); StringBuffer devFromStringBuf = new StringBuffer(); StringBuffer otherStringBuf = new StringBuffer(); + int countIsa=0; + int countPartof=0; + int countHaspart=0; + int countDevfrom=0; + int countOther=0; + //i would like to clean this up to be able to group all relationships together, despite + //the fact that they could be non-standard, like in SO. might need two for-loops. + //would this be a drain on space/time? for (Iterator it = links.iterator(); it.hasNext(); ) { Link link = (Link)it.next(); OBOProperty type = link.getType(); - //sb.append(newLine()); - //if (type == OBOProperty.IS_A) - somehow theres 2 instances??? if (type.getName().equals("is_a")) { - isaStringBuf.append(newLine()); - isaStringBuf.append(bold( isChild ? "Subclass" : "Superclass")); - isaStringBuf.append(bold("(ISA): ")); - appendLink(isaStringBuf,isChild,link); + countIsa++; + appendLink(isaStringBuf,isChild,link); } - else if (type.getName().equals("part of")) { - partofStringBuf.append(newLine()); - partofStringBuf.append(bold( isChild ? "Subpart: " : "Part of: ")); - appendLink(partofStringBuf,isChild,link); + else if (type.getName().equals("part of") || type.getName().equals("part_of")) { + countPartof++; + appendLink(partofStringBuf,isChild,link); } - else if (type.getName().equals("develops from")) { - devFromStringBuf.append(newLine()); - devFromStringBuf.append(bold( isChild ? "Develops into: ":"Develops from: ")); - appendLink(devFromStringBuf,isChild,link); + else if (type.getName().equals("has part") || type.getName().equals("has_part")) { + //i'm using this to catch the wierd reciprocal stuff in FMA + //not sure yet if this is the best solution + //probably need a new way to visualize reciprocal 'part' relationships + countHaspart++; + appendLink(haspartStringBuf,isChild,link); + } + else if (type.getName().equals("develops from") || type.getName().equals("develops_from")) { + countDevfrom++; + appendLink(devFromStringBuf,isChild,link); + } + else { //catch all other relationships + countOther++; + otherStringBuf.append("<tr>"); + otherStringBuf.append(makeLeftCol(italic(capitalize(type.getName())))+"<td>"); + appendLink(otherStringBuf,isChild,link); + otherStringBuf.append("</td></tr>"); } - // catch all - any relationships missed just do its name capitalize? _->' '? - else { - otherStringBuf.append(newLine()); - otherStringBuf.append(bold(capitalize(type.getName()))).append(": "); - appendLink(otherStringBuf,isChild,link); - } -// if (isChild) -// termBuf.append(termLink(link.getChild())); -// else -// termBuf.append(termLink(link.getParent())); } - sb.append(isaStringBuf).append(partofStringBuf); - sb.append(devFromStringBuf).append(otherStringBuf); + if (countIsa>0) + sb.append(makeRow(makeLeftCol(italic( isChild ? "Subclass (is_a)" : "Superclass (is_a)"))+makeRightCol(isaStringBuf.toString()))); + if (countPartof>0) + sb.append(makeRow(makeLeftCol(italic( isChild ? "Has part" : "Part of"))+makeRightCol(partofStringBuf.toString()))); + if (countDevfrom>0) + sb.append(makeRow(makeLeftCol(italic( isChild ? "Develops into" : "Develops from"))+makeRightCol(devFromStringBuf.toString()))); + if (countOther>0) + sb.append(makeRow(makeLeftCol(otherStringBuf.toString()))); return sb; } private static void appendLink(StringBuffer sb, boolean isChild, Link link) { - if (isChild) - sb.append(termLink(link.getChild())); - else - sb.append(termLink(link.getParent())); - } + if (isChild) + sb.append(termLink(link.getChild())+"<br>"); + else + sb.append(termLink(link.getParent())+"<br>"); + // if (isChild) + //sb.append(makeRightCol(termLink(link.getChild()))); + //else + //sb.append(makeRightCol(termLink(link.getParent()))); + } private static String termLink(LinkedObject term) { String clickString = getClickString(term.getID(),term.getName()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-22 19:50:44
|
Revision: 381 http://svn.sourceforge.net/obo/?rev=381&view=rev Author: nlw Date: 2007-02-22 11:50:38 -0800 (Thu, 22 Feb 2007) Log Message: ----------- little changes Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/howtos/customize.shtml Modified: phenote/trunk/doc/phenote-website/content/howtos/customize.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/customize.shtml 2007-02-22 19:33:51 UTC (rev 380) +++ phenote/trunk/doc/phenote-website/content/howtos/customize.shtml 2007-02-22 19:50:38 UTC (rev 381) @@ -17,11 +17,7 @@ <h2>The basics</h2> -<p>Make sure you've already tried running the webstart edition of phenote. Running this once should leave a directory on your computer called ".phenote". On a PC this will be under C:/Documents and Settings/UserName/.phenote. On a mac it will be in your home dir (easiest to get to via a terminal window). -</p> - -<h2>Location of your configuation file</h2> -<p> The configuration files used by Phenote are located in the ".phenote/conf" directory. +<p>Make sure you've already tried running the webstart edition of phenote. Running this once should leave a directory on your computer called ".phenote". <ul> <li>On a Mac, you will find this located under the MacintoshHD:Users:YourAccount directory, although you probably will not see it in a "finder" window. You do have access to it if you run a "terminal" window. It will be located in your user directory. </li> @@ -29,6 +25,10 @@ </li> </ul> </p> + +<h2>Location of your configuation file</h2> +<p> The configuration files used by Phenote are located in the ".phenote/conf" directory. +</p> <p> Within this directory you can store any number of configuration files. The default files that come with the webstart versions are named "flybase.cfg", "zfin-standalone.cfg", or "human.cfg", depending on which version you've used in the past. Any file you create/modify should be placed in this directory. </p> @@ -46,14 +46,10 @@ 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 notes</h2> -<p>To get a custom ontology that is local and not on SF, you'll have to copy it into ".phenote/obo-files/". Any reference to this ontology within your configuration file must match the filename. -</p> - -<br /> - <h2>Other topics under construction:</h2> <h2>Location to put your personal obo files</h2> +<p>To get a custom ontology that is local and not on SF, you'll have to copy it into ".phenote/obo-files/". Any reference to this ontology within your configuration file must match the filename. +</p> <h2>Anatomy of the config file</h2> <h2>Fields, types</h2> <h2>Making edits to a config file</h2> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-22 19:33:52
|
Revision: 380 http://svn.sourceforge.net/obo/?rev=380&view=rev Author: nlw Date: 2007-02-22 11:33:51 -0800 (Thu, 22 Feb 2007) Log Message: ----------- added more instructions to the customize page Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/howtos/customize.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-02-22 19:06:36 UTC (rev 379) +++ phenote/trunk/doc/phenote-website/content/howtos/customize.shtml 2007-02-22 19:33:51 UTC (rev 380) @@ -8,36 +8,51 @@ <h1><a name="config">How-To: Customize Phenote</a></h1> + +<h2>Background</h2> +<p>Phenote can be customized to your specifications, including the input fields you desire, the ontologies from which those fields are populated with, and the output format used. Currently (v1.1) this configuration must be done by hand-editing a text file, but we are currently spec-ing out a GUI to achieve the same results. This page explains the location of and the process of editing the configuration file used when Phenote loads. +</p> + +<p>This site is being updated with new content on a fairly regular basis. Please check back often for new information. In the mean time, if you have questions, you can <a href="/content/about/"> contact us </a> with questions.</p> + +<h2>The basics</h2> + +<p>Make sure you've already tried running the webstart edition of phenote. Running this once should leave a directory on your computer called ".phenote". On a PC this will be under C:/Documents and Settings/UserName/.phenote. On a mac it will be in your home dir (easiest to get to via a terminal window). +</p> + +<h2>Location of your configuation file</h2> +<p> The configuration files used by Phenote are located in the ".phenote/conf" directory. + <ul> + <li>On a Mac, you will find this located under the MacintoshHD:Users:YourAccount directory, although you probably will not see it in a "finder" window. You do have access to it if you run a "terminal" window. It will be located in your user directory. + </li> + <li>On a PC, this is located in the C:/Documents and Settings/YourAccount/ + </li> + </ul> +</p> <p> -Phenote can be customized in the following ways: +Within this directory you can store any number of configuration files. The default files that come with the webstart versions are named "flybase.cfg", "zfin-standalone.cfg", or "human.cfg", depending on which version you've used in the past. Any file you create/modify should be placed in this directory. </p> -<ul> - <li><a href="#input">specify input fields</a> and their types</li> - <li><a href="#data_adapter">adding a custom data adapter</a></li> - <li><a href="#ontologies">specify ontologies</a></li> - <li><a href="#post-comp">specify if an ontology field allows for post-composition</a></li> - <li><a href="#ontology-updating">turn on/off ontology-updating</a></li> -</ul> +<h2>How to set up a custom configuration in Phenote</h2> <p> -Some basics on customizing phenote: +Once you have placed or modified your configuration file in the ".phenote/conf" directory, you need to tell Phenote to use that particular file. </p> -<p>Make sure you've already tried running the webstart edition of phenote. Running this once should leave a directory on your computer called ".phenote". On a PC this will be under C:/Documents and Settings/UserName/.phenote. On a mac it will be in your home dir (easiest to get to via a terminal window). -</p> <p> -Open up the file "my-phenote.cfg" from ".phenote/conf/". It should have one line of text that says "zfin-standalone.cfg". If it doesn't, change this to the name of the file that contains your custom phenote configuration. +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". </p> <p> -Next, copy your custom configuration file into the ".phenote/conf/" directory. +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 notes</h2> <p>To get a custom ontology that is local and not on SF, you'll have to copy it into ".phenote/obo-files/". Any reference to this ontology within your configuration file must match the filename. </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" or somesuch. -</p> -<p>More info to come...</p> -<h2>Location of your configuation file</h2> +<br /> + +<h2>Other topics under construction:</h2> <h2>Location to put your personal obo files</h2> <h2>Anatomy of the config file</h2> <h2>Fields, types</h2> Modified: phenote/trunk/doc/phenote-website/content/software/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-02-22 19:06:36 UTC (rev 379) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-02-22 19:33:51 UTC (rev 380) @@ -22,7 +22,7 @@ <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/how-tos/customize.shtml">how-to:customize</a> documentation.) + <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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-22 19:06:38
|
Revision: 379 http://svn.sourceforge.net/obo/?rev=379&view=rev Author: nlw Date: 2007-02-22 11:06:36 -0800 (Thu, 22 Feb 2007) Log Message: ----------- added some more description of the phenote dev ver 1.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-02-22 17:37:15 UTC (rev 378) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-02-22 19:06:36 UTC (rev 379) @@ -19,8 +19,16 @@ <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> <ul> -<li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-zfin.jnlp">Zebrafish</a></li> +<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/how-tos/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> </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: <nl...@us...> - 2007-02-22 17:48:56
|
Revision: 378 http://svn.sourceforge.net/obo/?rev=378&view=rev Author: nlw Date: 2007-02-22 09:37:15 -0800 (Thu, 22 Feb 2007) Log Message: ----------- removing fly/human 1.1 configs from the website...since they aren't actually this version. 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-02-21 01:47:05 UTC (rev 377) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-02-22 17:37:15 UTC (rev 378) @@ -19,9 +19,7 @@ <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> <ul> -<li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-flybase.jnlp">Fly</a></li> <li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-zfin.jnlp">Zebrafish</a></li> -<li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-human.jnlp">Human</a></li> </ul> <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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-21 01:47:04
|
Revision: 377 http://svn.sourceforge.net/obo/?rev=377&view=rev Author: nlw Date: 2007-02-20 17:47:05 -0800 (Tue, 20 Feb 2007) Log Message: ----------- changing filename of customize links Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/howtos/index.shtml phenote/trunk/doc/phenote-website/ssi/navi_howtos.html Modified: phenote/trunk/doc/phenote-website/content/howtos/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-02-21 01:44:50 UTC (rev 376) +++ phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-02-21 01:47:05 UTC (rev 377) @@ -49,7 +49,7 @@ Phenote can be customized to allow data entry fields of your choosing, as well as the ontologies that are desired to be included for any of those fields. </p> <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.html">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. +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> <h3><a name="annotation">Making Annotations</a></h3> Modified: phenote/trunk/doc/phenote-website/ssi/navi_howtos.html =================================================================== --- phenote/trunk/doc/phenote-website/ssi/navi_howtos.html 2007-02-21 01:44:50 UTC (rev 376) +++ phenote/trunk/doc/phenote-website/ssi/navi_howtos.html 2007-02-21 01:47:05 UTC (rev 377) @@ -20,7 +20,7 @@ <a href="#software">Software</a> </li> <li> - <a href="/content/howtos/customize.html">Customization</a> + <a href="/content/howtos/customize.shtml">Customization</a> </li> <li> <a href="#annotation">Annotation</a> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-21 01:44:49
|
Revision: 376 http://svn.sourceforge.net/obo/?rev=376&view=rev Author: nlw Date: 2007-02-20 17:44:50 -0800 (Tue, 20 Feb 2007) Log Message: ----------- changing this to an shtml file Added Paths: ----------- phenote/trunk/doc/phenote-website/content/howtos/customize.shtml Removed Paths: ------------- phenote/trunk/doc/phenote-website/content/howtos/customize.html Deleted: phenote/trunk/doc/phenote-website/content/howtos/customize.html =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/customize.html 2007-02-21 01:42:26 UTC (rev 375) +++ phenote/trunk/doc/phenote-website/content/howtos/customize.html 2007-02-21 01:44:50 UTC (rev 376) @@ -1,48 +0,0 @@ -<!--#include virtual="/ssi/header.html" --> - -<div id="page_body"> - -<!--#include virtual="/ssi/navi_howtos.html" --> - -<div id="main_content"> - - -<h1><a name="config">How-To: Customize Phenote</a></h1> -<p> -Phenote can be customized in the following ways: -</p> -<ul> - <li><a href="#input">specify input fields</a> and their types</li> - <li><a href="#data_adapter">adding a custom data adapter</a></li> - <li><a href="#ontologies">specify ontologies</a></li> - <li><a href="#post-comp">specify if an ontology field allows for post-composition</a></li> - <li><a href="#ontology-updating">turn on/off ontology-updating</a></li> -</ul> - -<p> -Some basics on customizing phenote: -</p> -<p>Make sure you've already tried running the webstart edition of phenote. Running this once should leave a directory on your computer called ".phenote". On a PC this will be under C:/Documents and Settings/UserName/.phenote. On a mac it will be in your home dir (easiest to get to via a terminal window). -</p> -<p> -Open up the file "my-phenote.cfg" from ".phenote/conf/". It should have one line of text that says "zfin-standalone.cfg". If it doesn't, change this to the name of the file that contains your custom phenote configuration. -</p> -<p> -Next, copy your custom configuration file into the ".phenote/conf/" directory. -</p> -<p>To get a custom ontology that is local and not on SF, you'll have to copy it into ".phenote/obo-files/". Any reference to this ontology within your configuration file must match the filename. -</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" or somesuch. -</p> - -<p>More info to come...</p> -<h2>Location of your configuation file</h2> -<h2>Location to put your personal obo files</h2> -<h2>Anatomy of the config file</h2> -<h2>Fields, types</h2> -<h2>Making edits to a config file</h2> -</div> -</div> - -<!--#include virtual="/ssi/footer.shtml" --> Copied: phenote/trunk/doc/phenote-website/content/howtos/customize.shtml (from rev 375, phenote/trunk/doc/phenote-website/content/howtos/customize.html) =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/customize.shtml (rev 0) +++ phenote/trunk/doc/phenote-website/content/howtos/customize.shtml 2007-02-21 01:44:50 UTC (rev 376) @@ -0,0 +1,48 @@ +<!--#include virtual="/ssi/header.html" --> + +<div id="page_body"> + +<!--#include virtual="/ssi/navi_howtos.html" --> + +<div id="main_content"> + + +<h1><a name="config">How-To: Customize Phenote</a></h1> +<p> +Phenote can be customized in the following ways: +</p> +<ul> + <li><a href="#input">specify input fields</a> and their types</li> + <li><a href="#data_adapter">adding a custom data adapter</a></li> + <li><a href="#ontologies">specify ontologies</a></li> + <li><a href="#post-comp">specify if an ontology field allows for post-composition</a></li> + <li><a href="#ontology-updating">turn on/off ontology-updating</a></li> +</ul> + +<p> +Some basics on customizing phenote: +</p> +<p>Make sure you've already tried running the webstart edition of phenote. Running this once should leave a directory on your computer called ".phenote". On a PC this will be under C:/Documents and Settings/UserName/.phenote. On a mac it will be in your home dir (easiest to get to via a terminal window). +</p> +<p> +Open up the file "my-phenote.cfg" from ".phenote/conf/". It should have one line of text that says "zfin-standalone.cfg". If it doesn't, change this to the name of the file that contains your custom phenote configuration. +</p> +<p> +Next, copy your custom configuration file into the ".phenote/conf/" directory. +</p> +<p>To get a custom ontology that is local and not on SF, you'll have to copy it into ".phenote/obo-files/". Any reference to this ontology within your configuration file must match the filename. +</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" or somesuch. +</p> + +<p>More info to come...</p> +<h2>Location of your configuation file</h2> +<h2>Location to put your personal obo files</h2> +<h2>Anatomy of the config file</h2> +<h2>Fields, types</h2> +<h2>Making edits to a config file</h2> +</div> +</div> + +<!--#include virtual="/ssi/footer.shtml" --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-21 01:42:27
|
Revision: 375 http://svn.sourceforge.net/obo/?rev=375&view=rev Author: nlw Date: 2007-02-20 17:42:26 -0800 (Tue, 20 Feb 2007) Log Message: ----------- adding content on adding a custom config file Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/howtos/index.shtml phenote/trunk/doc/phenote-website/ssi/navi_howtos.html Added Paths: ----------- phenote/trunk/doc/phenote-website/content/howtos/customize.html Added: phenote/trunk/doc/phenote-website/content/howtos/customize.html =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/customize.html (rev 0) +++ phenote/trunk/doc/phenote-website/content/howtos/customize.html 2007-02-21 01:42:26 UTC (rev 375) @@ -0,0 +1,48 @@ +<!--#include virtual="/ssi/header.html" --> + +<div id="page_body"> + +<!--#include virtual="/ssi/navi_howtos.html" --> + +<div id="main_content"> + + +<h1><a name="config">How-To: Customize Phenote</a></h1> +<p> +Phenote can be customized in the following ways: +</p> +<ul> + <li><a href="#input">specify input fields</a> and their types</li> + <li><a href="#data_adapter">adding a custom data adapter</a></li> + <li><a href="#ontologies">specify ontologies</a></li> + <li><a href="#post-comp">specify if an ontology field allows for post-composition</a></li> + <li><a href="#ontology-updating">turn on/off ontology-updating</a></li> +</ul> + +<p> +Some basics on customizing phenote: +</p> +<p>Make sure you've already tried running the webstart edition of phenote. Running this once should leave a directory on your computer called ".phenote". On a PC this will be under C:/Documents and Settings/UserName/.phenote. On a mac it will be in your home dir (easiest to get to via a terminal window). +</p> +<p> +Open up the file "my-phenote.cfg" from ".phenote/conf/". It should have one line of text that says "zfin-standalone.cfg". If it doesn't, change this to the name of the file that contains your custom phenote configuration. +</p> +<p> +Next, copy your custom configuration file into the ".phenote/conf/" directory. +</p> +<p>To get a custom ontology that is local and not on SF, you'll have to copy it into ".phenote/obo-files/". Any reference to this ontology within your configuration file must match the filename. +</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" or somesuch. +</p> + +<p>More info to come...</p> +<h2>Location of your configuation file</h2> +<h2>Location to put your personal obo files</h2> +<h2>Anatomy of the config file</h2> +<h2>Fields, types</h2> +<h2>Making edits to a config file</h2> +</div> +</div> + +<!--#include virtual="/ssi/footer.shtml" --> Modified: phenote/trunk/doc/phenote-website/content/howtos/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-02-16 21:52:49 UTC (rev 374) +++ phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-02-21 01:42:26 UTC (rev 375) @@ -44,12 +44,14 @@ </p> -<h4><a name="config">Customizing Input</a></h4> +<h4><a name="customize">Customizing Phenote</a></h4> <p> -Phenote can be customized for data entry fields, and the ontologies that are desired to be included. +Phenote can be customized to allow data entry fields of your choosing, as well as the ontologies that are desired to be included for any of those fields. </p> +<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.html">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> - <h3><a name="annotation">Making Annotations</a></h3> <p> </p> Modified: phenote/trunk/doc/phenote-website/ssi/navi_howtos.html =================================================================== --- phenote/trunk/doc/phenote-website/ssi/navi_howtos.html 2007-02-16 21:52:49 UTC (rev 374) +++ phenote/trunk/doc/phenote-website/ssi/navi_howtos.html 2007-02-21 01:42:26 UTC (rev 375) @@ -14,12 +14,15 @@ <a href="/content/software/">Downloads</a> </li> <li> - <a href="/phenote/content/howtos/">How-tos</a> + <a href="/content/howtos/">How-tos</a> <ul> <li> <a href="#software">Software</a> </li> <li> + <a href="/content/howtos/customize.html">Customization</a> + </li> + <li> <a href="#annotation">Annotation</a> </li> </ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-16 21:52:54
|
Revision: 374 http://svn.sourceforge.net/obo/?rev=374&view=rev Author: nlw Date: 2007-02-16 13:52:49 -0800 (Fri, 16 Feb 2007) Log Message: ----------- added hacky way to access the 1.1 version...through the old toy...until we get the webstarts over to lsc 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-02-16 21:34:45 UTC (rev 373) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-02-16 21:52:49 UTC (rev 374) @@ -19,9 +19,9 @@ <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> <ul> -<li><a href="/phenote/1.1/phenote-flybase.jnlp">Fly</a></li> -<li><a href="/phenote/1.1/phenote-zfin.jnlp">Zebrafish</a></li> -<li><a href="/phenote/1.1/phenote-human.jnlp">Human</a></li> +<li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-flybase.jnlp">Fly</a></li> +<li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-zfin.jnlp">Zebrafish</a></li> +<li><a href="http://toy.lbl.gov:9010/phenote/1.1/phenote-human.jnlp">Human</a></li> </ul> <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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-16 21:34:50
|
Revision: 373 http://svn.sourceforge.net/obo/?rev=373&view=rev Author: nlw Date: 2007-02-16 13:34:45 -0800 (Fri, 16 Feb 2007) Log Message: ----------- adding in a software download page, and listing "development" versions of phenote Modified Paths: -------------- phenote/trunk/doc/phenote-website/content/howtos/index.shtml phenote/trunk/doc/phenote-website/content/info/index.shtml phenote/trunk/doc/phenote-website/ssi/navi_about.html phenote/trunk/doc/phenote-website/ssi/navi_home.html phenote/trunk/doc/phenote-website/ssi/navi_howtos.html phenote/trunk/doc/phenote-website/ssi/navi_info.html Added Paths: ----------- phenote/trunk/doc/phenote-website/content/software/ phenote/trunk/doc/phenote-website/content/software/index.shtml Modified: phenote/trunk/doc/phenote-website/content/howtos/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-02-16 21:15:57 UTC (rev 372) +++ phenote/trunk/doc/phenote-website/content/howtos/index.shtml 2007-02-16 21:34:45 UTC (rev 373) @@ -12,13 +12,17 @@ <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> <p> -Three configurations of Phenote have been created to include the ontologies most appropriate for use by those communities: +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> + +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> + + <h4>Configuring your browser for Webstart</h4> <p> You must have Java 1.5 or later installed on your computer. Modified: phenote/trunk/doc/phenote-website/content/info/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/info/index.shtml 2007-02-16 21:15:57 UTC (rev 372) +++ phenote/trunk/doc/phenote-website/content/info/index.shtml 2007-02-16 21:34:45 UTC (rev 373) @@ -30,6 +30,10 @@ </li> </ul> +<p> +Visit our <a href="/content/software/">Downloads</a> page to get the latest version of Phenote. +</p> + <h3><a name="web_users">Websites Utilizing Phenote Software Components</a></h3> <p>The Dictyostelium Genome Database, <a href="http://dictybase.org"> DictyBase</a>, has a web-based Added: phenote/trunk/doc/phenote-website/content/software/index.shtml =================================================================== --- phenote/trunk/doc/phenote-website/content/software/index.shtml (rev 0) +++ phenote/trunk/doc/phenote-website/content/software/index.shtml 2007-02-16 21:34:45 UTC (rev 373) @@ -0,0 +1,40 @@ +<!--#include virtual="/ssi/header.html" --> + +<div id="page_body"> + +<!--#include virtual="/ssi/navi_home.html" --> + +<div id="main_content"> + +<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="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> +<ul> +<li><a href="/phenote/1.1/phenote-flybase.jnlp">Fly</a></li> +<li><a href="/phenote/1.1/phenote-zfin.jnlp">Zebrafish</a></li> +<li><a href="/phenote/1.1/phenote-human.jnlp">Human</a></li> +</ul> +<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> +<p> +For instructions on running Phenote, or downloading the sourcecode, visit our <a href="/content/howtos">How-to pages</a>. +</p> + + + +<br /> +</p> +</div> +</div> + +<!--#include virtual="/ssi/footer.shtml" --> Modified: phenote/trunk/doc/phenote-website/ssi/navi_about.html =================================================================== --- phenote/trunk/doc/phenote-website/ssi/navi_about.html 2007-02-16 21:15:57 UTC (rev 372) +++ phenote/trunk/doc/phenote-website/ssi/navi_about.html 2007-02-16 21:34:45 UTC (rev 373) @@ -11,7 +11,7 @@ <a href="/content/info/">Software Info</a> </li> <li> - <a href="/content/under_construction.shtml">Downloads</a> + <a href="/content/software/">Downloads</a> </li> <li> <a href="/content/howtos/">How-tos</a> Modified: phenote/trunk/doc/phenote-website/ssi/navi_home.html =================================================================== --- phenote/trunk/doc/phenote-website/ssi/navi_home.html 2007-02-16 21:15:57 UTC (rev 372) +++ phenote/trunk/doc/phenote-website/ssi/navi_home.html 2007-02-16 21:34:45 UTC (rev 373) @@ -11,7 +11,7 @@ <a href="/content/info/">Software Info</a> </li> <li> - <a href="/content/under_construction.shtml">Downloads</a> + <a href="/content/software/">Downloads</a> </li> <li> <a href="/content/howtos/">How-tos</a> Modified: phenote/trunk/doc/phenote-website/ssi/navi_howtos.html =================================================================== --- phenote/trunk/doc/phenote-website/ssi/navi_howtos.html 2007-02-16 21:15:57 UTC (rev 372) +++ phenote/trunk/doc/phenote-website/ssi/navi_howtos.html 2007-02-16 21:34:45 UTC (rev 373) @@ -11,7 +11,7 @@ <a href="/content/info/">Software Info</a> </li> <li> - <a href="/content/under_construction.shtml">Downloads</a> + <a href="/content/software/">Downloads</a> </li> <li> <a href="/phenote/content/howtos/">How-tos</a> Modified: phenote/trunk/doc/phenote-website/ssi/navi_info.html =================================================================== --- phenote/trunk/doc/phenote-website/ssi/navi_info.html 2007-02-16 21:15:57 UTC (rev 372) +++ phenote/trunk/doc/phenote-website/ssi/navi_info.html 2007-02-16 21:34:45 UTC (rev 373) @@ -27,7 +27,7 @@ </ul> </li> <li> - <a href="/content/under_construction.shtml">Downloads</a> + <a href="/content/software/">Downloads</a> </li> <li> <a href="/content/howtos/">How-tos</a> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-02-16 21:15:59
|
Revision: 372 http://svn.sourceforge.net/obo/?rev=372&view=rev Author: mgibson Date: 2007-02-16 13:15:57 -0800 (Fri, 16 Feb 2007) Log Message: ----------- fixed bug where post comp wasnt being read in - woops! from pheno syntax pheno xml i dont think does post comp yet - its lagging behind a little - todo todo Modified Paths: -------------- phenote/trunk/conf/flybase.cfg phenote/trunk/conf/zfin-standalone.cfg phenote/trunk/src/java/phenote/datamodel/CharField.java phenote/trunk/src/java/phenote/datamodel/OntologyManager.java Modified: phenote/trunk/conf/flybase.cfg =================================================================== --- phenote/trunk/conf/flybase.cfg 2007-02-16 18:41:38 UTC (rev 371) +++ phenote/trunk/conf/flybase.cfg 2007-02-16 21:15:57 UTC (rev 372) @@ -23,6 +23,7 @@ <ontology file="relationship.obo" is-postcomp-rel="true" repos-subdir="OBO_REL"/> <ontology name="Fly" file="fly_anatomy.obo" repos-subdir="anatomy/gross_anatomy/animal_gross_anatomy/fly"/> + <ontology name="Human Anatomy" file="fma_obo.obo"/> <ontology name="GO" file="gene_ontology.obo" repos-subdir="genomic-proteomic"/> <ontology name="SP" file="spatial.obo"/> </field> Modified: phenote/trunk/conf/zfin-standalone.cfg =================================================================== --- phenote/trunk/conf/zfin-standalone.cfg 2007-02-16 18:41:38 UTC (rev 371) +++ phenote/trunk/conf/zfin-standalone.cfg 2007-02-16 21:15:57 UTC (rev 372) @@ -21,6 +21,7 @@ <postcomp relationship-ontology="relationship.obo" repos-subdir="OBO_REL"/> <ontology name="ZF" file="zebrafish_anatomy.obo" filter-out="ZFS:" repos-subdir="anatomy/gross_anatomy/animal_gross_anatomy/fish"/> + <ontology name="Human Anatomy" file="fma_obo.obo"/> <ontology name="GO" file="gene_ontology.obo" repos-subdir="genomic-proteomic"/> <ontology name="SP" file="spatial.obo"/> </field> Modified: phenote/trunk/src/java/phenote/datamodel/CharField.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-02-16 18:41:38 UTC (rev 371) +++ phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-02-16 21:15:57 UTC (rev 372) @@ -115,17 +115,34 @@ 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 */ + id and searches ontologies for id, throws ontologyException if not found + this needs to deal with post comp!!!! */ public CharFieldValue makeValue(Character c, String valueString) throws TermNotFoundException { + + // FREE TEXT FIELD if (!hasOntologies()) return new CharFieldValue(valueString,c,this); + + // ONTOLOGY else { + OBOClass oboClass=null; - for (Ontology ont : ontologyList) { - try { oboClass = ont.getTerm(valueString); } + + // CHECK FOR POST COMP - could probably move this to char field but right now just + // trying to get this working before i split town... + if (OntologyManager.inst().isPostComp(valueString)) { + try { oboClass = OntologyManager.inst().getPostComp(valueString); } catch (TermNotFoundException e) {} // move on to next ontology + } + + else { + for (Ontology ont : ontologyList) { + try { oboClass = ont.getTerm(valueString); } + catch (TermNotFoundException e) {} // move on to next ontology + } + } if (oboClass != null) return new CharFieldValue(oboClass,c,this); else Modified: phenote/trunk/src/java/phenote/datamodel/OntologyManager.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/OntologyManager.java 2007-02-16 18:41:38 UTC (rev 371) +++ phenote/trunk/src/java/phenote/datamodel/OntologyManager.java 2007-02-16 21:15:57 UTC (rev 372) @@ -115,13 +115,13 @@ } - private boolean isPostComp(String id) { + boolean isPostComp(String id) { if (id == null) return false; return id.contains("^"); } /** parse string GO:123^part_of(AO:345) into post comp obo class */ - private OBOClass getPostComp(String id) throws TermNotFoundException { + OBOClass getPostComp(String id) throws TermNotFoundException { Pattern pat = Pattern.compile("([^\\^]+)\\^([^\\(]*)\\(([^\\)]*)\\)"); Matcher m = pat.matcher(id); boolean found = m.find(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-02-16 18:41:38
|
Revision: 371 http://svn.sourceforge.net/obo/?rev=371&view=rev Author: mgibson Date: 2007-02-16 10:41:38 -0800 (Fri, 16 Feb 2007) Log Message: ----------- fixed layout problem - when more fields were configged in - nicole.cfg - the free text fields would collapse - gee whiz - so put in a min size for free text - also switched over to grid bag layout in many places to get more control over layout - basically the simpler layout managers dont cut it once the gui gets complicated the field panel really needs to figure out its minimum size from number of fields it has - todo todo - and hopefully grid bag layout would respect that - not sure it would actually - hmmmmm - this sis good for now with weighted filling Modified Paths: -------------- phenote/trunk/phenote phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java phenote/trunk/src/java/phenote/gui/GridBagUtil.java phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java phenote/trunk/src/java/phenote/gui/field/FieldPanel.java phenote/trunk/src/java/phenote/gui/field/FreeTextField.java phenote/trunk/src/java/phenote/main/Phenote.java phenote/trunk/src/java/phenote/util/FileUtil.java Modified: phenote/trunk/phenote =================================================================== --- phenote/trunk/phenote 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/phenote 2007-02-16 18:41:38 UTC (rev 371) @@ -8,6 +8,6 @@ fi; done -java -Xmx700M -classpath ${PHENOTE_CLASSPATH} phenote.main.Phenote $@ +java -Xmx810M -classpath ${PHENOTE_CLASSPATH} phenote.main.Phenote $@ ##java -Xmx300M -classpath classfiles:jars/oboedit.jar:jars/org.geneontology.jar:jars/BrowserLauncher2-10rc4.jar:jars/junit-4.0.jar:jars/tomcat-servlet.jar:jars/xbean.jar:jars/jsr173_1.0_api.jar:jars/phenoxmlbeans.jar:jars/phenoteconfigbeans.jar:jars/log4j-1.2.13.jar:jars/te-common.jar phenote.main.Phenote $@ Modified: phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java =================================================================== --- phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/dataadapter/OntologyDataAdapter.java 2007-02-16 18:41:38 UTC (rev 371) @@ -179,7 +179,9 @@ // if ontCfg.hasSynchUrl() ? // URL synchUrl = ontCfg.getSynchUrl - startTimer("checking with repos... loading obo session "+filename); + long mem = Runtime.getRuntime().totalMemory()/1000000; + LOG.debug(url+" checking with repos... loading obo session mem "+mem+"\n"); + startTimer(url+" checked against repos... obo session loaded"); // printed at stopTime if (oc.hasReposUrl()) { try { URL reposUrl = oc.getReposUrl();//new URL("http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/evidence_code.obo"); @@ -195,6 +197,12 @@ loadOboSessionFromUrl(o,url,filename); stopTimer(); + mem = Runtime.getRuntime().totalMemory()/1000000; + System.out.println("mem after load "+mem+" max "+Runtime.getRuntime().maxMemory()/1000000); + //System.gc(); + //mem = Runtime.getRuntime().totalMemory()/1000000; + //System.out.println("\n\nmem after garbage collection "+mem+"\n"); + } /** url is either local file or repos url */ @@ -311,7 +319,9 @@ // } //stopTimer(); r.close(); + is.close(); // ?? w.close(); + fos.close(); // ?? } catch (IOException e) { throw new OntologyException(e); } } Modified: phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java =================================================================== --- phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/gui/CharacterTablePanel.java 2007-02-16 18:41:38 UTC (rev 371) @@ -4,7 +4,9 @@ import java.util.List; import java.awt.Dimension; -import java.awt.GridLayout; +//import java.awt.GridLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -67,9 +69,11 @@ } private void init() { - setLayout(new GridLayout(2,1)); // row,col + //setBorder(new javax.swing.border.LineBorder(java.awt.Color.RED)); debug + //setLayout(new GridLayout(2,1)); // row,col + setLayout(new GridBagLayout()); setPreferredSize(new Dimension(1800,800)); - setMinimumSize(new Dimension(1400,630)); + setMinimumSize(new Dimension(1400,630)); // 630 characterTableModel = new CharacterTableModel(); charJTable = new JTable(characterTableModel); @@ -85,12 +89,14 @@ // wierd - changes to scrollbar seem to happen on own thread? verticalScrollBar.getModel().addChangeListener(new ScrollChangeListener()); // width config? 150 * # of cols? set column width? column width config? - charJTable.setPreferredScrollableViewportSize(new Dimension(500, 150)); + charJTable.setPreferredScrollableViewportSize(new Dimension(500, 600));//150 - add(tableScroll); + GridBagConstraints gbc = GridBagUtil.makeFillingConstraint(0,0); + add(tableScroll,gbc); // add in buttons JPanel buttonPanel = new JPanel(); + //buttonPanel.setBorder(new javax.swing.border.LineBorder(java.awt.Color.BLUE)); ActionListener al = new ButtonActionListener(); @@ -107,7 +113,9 @@ if (Config.inst().uvicGraphIsEnabled()) graphWindow = addButton("Graph",al,buttonPanel); - add(buttonPanel); + // non filling + gbc = GridBagUtil.makeAnchorConstraint(0,1,GridBagConstraints.CENTER); + add(buttonPanel,gbc); EditManager.inst().addCharChangeListener(new TableCharChangeListener()); Modified: phenote/trunk/src/java/phenote/gui/GridBagUtil.java =================================================================== --- phenote/trunk/src/java/phenote/gui/GridBagUtil.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/gui/GridBagUtil.java 2007-02-16 18:41:38 UTC (rev 371) @@ -7,19 +7,41 @@ public class GridBagUtil { + public static GridBagConstraints makeConstraint(int x,int y) { + return makeConstraint(x,y,3,3,GridBagConstraints.WEST); + } + public static GridBagConstraints makeConstraint(int x,int y,int horizPad,int vertPad) { return makeConstraint(x,y,horizPad,vertPad,GridBagConstraints.WEST); } + + static GridBagConstraints makeAnchorConstraint(int x, int y, int anchor) { + return makeConstraint(x,y,3,3,anchor); + } + + // defaults wieghty to 0 and fill to 0 - not great defaults really + // well actually weighty means dont expand which is what you want for fields static GridBagConstraints makeConstraint(int x, int y, int horizPad, int vertPad, int anchor) { - return makeConstraint(x,y,1,1,0,horizPad,vertPad,0,anchor); + double weightY = 0; // 1?? + return makeConstraint(x,y,1,1,weightY,horizPad,vertPad,0,anchor); } public static GridBagConstraints makeWidthConstraint(int x, int y, int horPad, int verPad, int width) { - return makeConstraint(x,y,width,1,0,horPad,verPad,0,GridBagConstraints.WEST); + double weightY = 0; // 1???? + return makeConstraint(x,y,width,1,weightY,horPad,verPad,0,GridBagConstraints.WEST); } + /** Fils up vert & hor with weight 1 */ + public static GridBagConstraints makeFillingConstraint(int x, int y) { + double weightY = 1; + int fill = GridBagConstraints.BOTH; + int anchor = GridBagConstraints.WEST; + int pad = 3; // presumptious??? + return makeConstraint(x,y,1,1,weightY,pad,pad,fill,anchor); + } + private static GridBagConstraints makeConstraint(int x, int y, int width, int height, double weighty, int horizPad, int vertPad, Modified: phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java 2007-02-16 18:41:38 UTC (rev 371) @@ -53,6 +53,7 @@ //private AutoTextFieldEditor autoTextFieldEditor; private AutoTextField autoTextField; private CharField charField; + //private CharFieldGui charFieldGui; // should it be ISA not HASA? ///** Whether differentia of a post composed term */ //private boolean isDifferentia = false; /** if false then model is not edited */ @@ -68,11 +69,13 @@ // this will probably throw errors if non metal look & feel is used setUI(new MetalListComboUI()); setEditable(true); - setPreferredSize(new Dimension(390,20)); - setMaximumSize(new Dimension(390,20)); + //charFieldGui = cfg; + setCharField(cf); + setPreferredSize(CharFieldGui.inputSize); //new Dimension(390,20)); + setMaximumSize(CharFieldGui.inputSize); //new Dimension(390,20)); // this is super critical - fixes bug where layout goes to hell if string are long // in completion - dont ask me why???? - setMinimumSize(new Dimension(390,20)); + setMinimumSize(CharFieldGui.inputSize); AutoTextFieldEditor autoTextFieldEditor = new AutoTextFieldEditor(); this.setEditor(autoTextFieldEditor); // dont know why by setting fonts this seem to get worse not better in terms of @@ -86,7 +89,6 @@ setFont(new Font("Monospaced",Font.PLAIN,10)); //setOntology(ontology); //searchParams = sp; // singleton access? part of ontology? - setCharField(cf); compListSearcher = s; //enableTermInfoListening(true); // default - hardwired in rel & term subclasses //addCompletionListListener(compList); Modified: phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-02-16 18:41:38 UTC (rev 371) @@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.Container; +import java.awt.Dimension; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; @@ -53,6 +54,8 @@ private boolean addCompButton = true; /** if true then set gui but not model, for clearing on multi, default false */ private boolean updateGuiOnly = false; + static int fieldHeight = 17; + static Dimension inputSize = new Dimension(390,fieldHeight); // size of user input box CharFieldGui(CharField charField, FieldPanel tp) {/*Container parent,*/ Modified: phenote/trunk/src/java/phenote/gui/field/FieldPanel.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/FieldPanel.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/gui/field/FieldPanel.java 2007-02-16 18:41:38 UTC (rev 371) @@ -46,7 +46,7 @@ } private void initGui() { - // should figure y from # of fields really + // should figure y from # of fields really!!! yes!!! // width of ontology labels effects x this.setMinimumSize(new Dimension(730,490));//690,490)); //this.setPreferredSize(new Dimension(2000,750)); // irrelevant in box layout Modified: phenote/trunk/src/java/phenote/gui/field/FreeTextField.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/FreeTextField.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/gui/field/FreeTextField.java 2007-02-16 18:41:38 UTC (rev 371) @@ -30,7 +30,8 @@ //private void initTextField(String label) { FreeTextField(CharFieldGui cfg) { charFieldGui = cfg; - textField = new JTextField(25); + textField = new JTextField(35); + textField.setMinimumSize(CharFieldGui.inputSize); textField.setEditable(true); textField.getDocument().addDocumentListener(new TextFieldDocumentListener()); textField.addFocusListener(new FreeFocusListener()); Modified: phenote/trunk/src/java/phenote/main/Phenote.java =================================================================== --- phenote/trunk/src/java/phenote/main/Phenote.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/main/Phenote.java 2007-02-16 18:41:38 UTC (rev 371) @@ -125,62 +125,7 @@ } } -// /** for now just looking for '-c configFile.cfg', use command line package -// if we need to get more sophisticated -// so if user has personal config file should override this - however maybe -// there should be a distinction between initial config file and user made configs -// well really the initials are db/species specific - so could be -// --initialConfig zf|fb|obd - actually da heck with that with entity chooser just -// put all 3 ontologies in one which is then the default (unspecified on cmd line) -// and -c file.cfg will load/overwrite that cfg into .phenote/my-phenote.cfg -// (if it exists) - we can always add --init later if we need it -// -c overwrites, -i doesnt -i is for initial startup of phenote */ -// private void doCommandLineOld(String[] args) { -// String configFile = getConfigFileFromCommandLine(args); -// // if no config file specified then set default initial config file. this will be -// // overridden by a personal config file if it exists -// //if (configFile == null) configFile = Config.DEFAULT_CONFIG_FILE; stored in file -// try { -// if (isOverwriteConfigFile(args)) //causes wipeout move of app file to .phenote -// Config.inst().setOverwriteConfigFile(configFile); -// else if (isInitialConfigFile(args)) -// Config.inst().setInitialConfigFile(configFile); -// //else if update... -// else // no command line config file specified - use last one specified (cache) -// Config.inst().loadDefaultConfigFile(); -// } catch (ConfigException e) { -// //LOG.fatal("EXITING! Fatal error in config file: "+e.getMessage()); -// LOG.error("Error in config file! "+e.getMessage()); -// e.printStackTrace(); // log? -// //System.exit(1); // isnt this a bit extreme? -// System.out.println("Yikes! config exception "+e+" gonna try loading default" -// +" config"); -// try { Config.inst().loadDefaultConfigFile(); } -// catch (ConfigException ce) { -// System.out.println("bummer - even default config fails. we're hosed! "+ce); -// } -// } -// } -// // change to -m for merge?? - move to CommandLine! -// private boolean isInitialConfigFile(String args[]) { -// if (args == null || args.length < 2) return false; -// return args[0].equals("-i"); -// } -// private boolean isOverwriteConfigFile(String args[]) { -// if (args == null || args.length < 2) return false; -// return args[0].equals("-c"); -// } - -// private String getConfigFileFromCommandLine(String args[]) { -// // need 2 args -// if (args == null || args.length < 2) return null; -// //String firstArg = args[0]; -// if (!isInitialConfigFile(args) && !isOverwriteConfigFile(args)) return null; -// String configFile = args[1]; -// return configFile; -// } - public Frame getFrame() { return frame; } private void makeWindow() { @@ -225,12 +170,19 @@ //mainPanel.add(termInfo.getComponent(),gbc); - GridBagConstraints gbc = GridBagUtil.makeConstraint(0,0,5,5); + //GridBagConstraints gbc = GridBagUtil.makeConstraint(0,0,4,4); // x,y,hPad,vPad +// double weightY = 1; +// int fill = GridBagConstraints.BOTH; +// int anchor = GridBagConstraints.WEST; +// GridBagConstraints gbc = GridBagUtil.makeConstraint(0,0,1,1,weightY,4,4,fill,anchor); + GridBagConstraints gbc = GridBagUtil.makeFillingConstraint(0,0); + gbc.weighty = 10; mainPanel.add(upperPanel,gbc); characterTablePanel = new CharacterTablePanel(); //termAndTablePanel.add(characterTablePanel); ++gbc.gridy; // ? + gbc.weighty = 17; mainPanel.add(characterTablePanel,gbc); return mainPanel; @@ -247,6 +199,59 @@ } -// SearchPanel searchPanel = new SearchPanel(fieldPanel); -// mainPanel.add(searchPanel); -// fieldPanel.setSearchPanel(searchPanel); +// /** for now just looking for '-c configFile.cfg', use command line package +// if we need to get more sophisticated +// so if user has personal config file should override this - however maybe +// there should be a distinction between initial config file and user made configs +// well really the initials are db/species specific - so could be +// --initialConfig zf|fb|obd - actually da heck with that with entity chooser just +// put all 3 ontologies in one which is then the default (unspecified on cmd line) +// and -c file.cfg will load/overwrite that cfg into .phenote/my-phenote.cfg +// (if it exists) - we can always add --init later if we need it +// -c overwrites, -i doesnt -i is for initial startup of phenote */ +// private void doCommandLineOld(String[] args) { +// String configFile = getConfigFileFromCommandLine(args); +// // if no config file specified then set default initial config file. this will be +// // overridden by a personal config file if it exists +// //if (configFile == null) configFile = Config.DEFAULT_CONFIG_FILE; stored in file +// try { +// if (isOverwriteConfigFile(args)) //causes wipeout move of app file to .phenote +// Config.inst().setOverwriteConfigFile(configFile); +// else if (isInitialConfigFile(args)) +// Config.inst().setInitialConfigFile(configFile); +// //else if update... +// else // no command line config file specified - use last one specified (cache) +// Config.inst().loadDefaultConfigFile(); +// } catch (ConfigException e) { +// //LOG.fatal("EXITING! Fatal error in config file: "+e.getMessage()); +// LOG.error("Error in config file! "+e.getMessage()); +// e.printStackTrace(); // log? +// //System.exit(1); // isnt this a bit extreme? +// System.out.println("Yikes! config exception "+e+" gonna try loading default" +// +" config"); +// try { Config.inst().loadDefaultConfigFile(); } +// catch (ConfigException ce) { +// System.out.println("bummer - even default config fails. we're hosed! "+ce); +// } +// } +// } + +// // change to -m for merge?? - move to CommandLine! +// private boolean isInitialConfigFile(String args[]) { +// if (args == null || args.length < 2) return false; +// return args[0].equals("-i"); +// } +// private boolean isOverwriteConfigFile(String args[]) { +// if (args == null || args.length < 2) return false; +// return args[0].equals("-c"); +// } + +// private String getConfigFileFromCommandLine(String args[]) { +// // need 2 args +// if (args == null || args.length < 2) return null; +// //String firstArg = args[0]; +// if (!isInitialConfigFile(args) && !isOverwriteConfigFile(args)) return null; +// String configFile = args[1]; +// return configFile; +// } + Modified: phenote/trunk/src/java/phenote/util/FileUtil.java =================================================================== --- phenote/trunk/src/java/phenote/util/FileUtil.java 2007-02-14 23:49:17 UTC (rev 370) +++ phenote/trunk/src/java/phenote/util/FileUtil.java 2007-02-16 18:41:38 UTC (rev 371) @@ -81,8 +81,10 @@ public static URL findUrl(String filename) throws FileNotFoundException { List<URL> possibleUrls = getPossibleUrls(filename); - for (URL u : possibleUrls) + for (URL u : possibleUrls) { + //System.out.println(u+" url exists "+urlExists(u)); if (urlExists(u)) return u; + } System.out.println("Failed to find file "+filename); //LOG.error("Failed to find file "+filename); throw new FileNotFoundException(filename+" not found"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nl...@us...> - 2007-02-14 23:27:41
|
Revision: 369 http://svn.sourceforge.net/obo/?rev=369&view=rev Author: nlw Date: 2007-02-14 15:27:42 -0800 (Wed, 14 Feb 2007) Log Message: ----------- Nicole's working version of phenote configuration Added Paths: ----------- phenote/trunk/conf/nicole.cfg Added: phenote/trunk/conf/nicole.cfg =================================================================== --- phenote/trunk/conf/nicole.cfg (rev 0) +++ phenote/trunk/conf/nicole.cfg 2007-02-14 23:27:42 UTC (rev 369) @@ -0,0 +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"/> + + <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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cmu...@us...> - 2007-02-14 23:25:32
|
Revision: 368 http://svn.sourceforge.net/obo/?rev=368&view=rev Author: cmungall Date: 2007-02-14 15:25:33 -0800 (Wed, 14 Feb 2007) Log Message: ----------- initial Added Paths: ----------- obo-database/ obo-database/trunk/ obo-database/trunk/ABOUT obo-database/trunk/README obo-database/trunk/bin/ obo-database/trunk/bin/obd-load-db-from-obo.pl obo-database/trunk/sql/ obo-database/trunk/sql/obd-core-schema.sql obo-database/trunk/sql/obd-core-views.sql obo-database/trunk/sql/stag-sql-templates/ obo-database/trunk/sql/stag-sql-templates/obd-annotation.stg obo-database/trunk/sql/stag-sql-templates/obd-defined-class.stg obo-database/trunk/sql/stag-sql-templates/obd-genus-diff.stg obo-database/trunk/xml/ obo-database/trunk/xml/Makefile obo-database/trunk/xml/xmlspec/ obo-database/trunk/xml/xmlspec/obd-core-xsd.html obo-database/trunk/xml/xmlspec/obd-core.rnc obo-database/trunk/xml/xmlspec/obd-core.rng obo-database/trunk/xml/xmlspec/obd-core.xsd obo-database/trunk/xml/xsl/ obo-database/trunk/xml/xsl/xsd2html.xsl Added: obo-database/trunk/ABOUT =================================================================== --- obo-database/trunk/ABOUT (rev 0) +++ obo-database/trunk/ABOUT 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,41 @@ +The Open Biomedical Ontology Database (OBD) is a flexible system for storing ontology-based +annotations covering a wide variety of biological and biomedical domains . The term "annotation" is used +and abused in a number of different ways in biology, biomedicine and information science, ranging from +annotation of raw data and images, annotation of textual entities through to annotation of structured +representations of bio-entities. This document describes these use cases and discusses patterns for storing +these annotations in OBD. + +The end product of annotation can range from anything as simple as textual notes or ontology-based +markup all the through to the generation of new complex, inter-related structured representations of bio- +entities. We refer to this end product data as the propositions resulting from the annotation process. These +propositions make reference to a variety of bio-entities: annotation involving electronic health records, +scientific documents and clinical trials may reference individual organism instances, populations of +organisms, individual instances of dependent continuants such as diseases \xD0 which may in turn reference +types drawn from ontologies or scientific databases; functional annotation generates propositions that +reference associations between bio-entity types, such as between a gene and a process, function, phenotype +or disease type. + +The advantages of basing annotation on ontologies is that data is amenable to ontology-based search, +deductive reasoning and other inference techniques that are dependent on the logical relationships we find +encoded in ontologies. As has been shown in the Gene Ontology (GO), ontology-based indexing of +annotations enhances statistical analysis and modeling [ref: Sorin]. + +The wide variety of datatypes and domains covered makes the design of OBD particularly challenging. A +traditional software modeling approach, in which the bio-domain is directly modeled using UML and +similar object-oriented modeling languages is both unworkable and to some extent at odds with the goal of +representing bio-entities using ontologies . Instead, OBD uses an ontology-oriented metamodel that is both +highly expressive and adaptable to any bio-domain. This metamodel is based on standard knowledge- +representation formalisms, description logics and semantic web standards (such as RDF and OWL-DL). +This means the metamodel will be interoperable with both NCBO technology (insofar as it adheres to these +standards) and technology/standards produced by the wider community involved with ontological +engineering. + +The generic nature of the metamodel approach means that the ontologies themselves are the primary +representation of the bio-domain, rather than any domain-specific UML model or schema. Broadly +speaking, 'the ontologies are the schema'. This places a certain amount of importance on coherent +reference ontologies for core domains \xD0 although OBD is also usable in domains for which only loose +terminologies exist, through the use of bridge ontologies. OBD may retain the ability to represent certain +bio-domains through domain-specific schemata and communicate via their corresponding exchange formats; +the details of this are expanded upon later in this document. + + Added: obo-database/trunk/README =================================================================== --- obo-database/trunk/README (rev 0) +++ obo-database/trunk/README 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,12 @@ +OBD: A Database for OBO + +See ABOUT for details + +Contents of this repository are + +obo-database/ + sql/ -- SQL DDL and related code + xml/ -- XML Spec of OBD formalism + bin/ -- executables for database loading + +More code is currently being migrated from the old repository Added: obo-database/trunk/bin/obd-load-db-from-obo.pl =================================================================== --- obo-database/trunk/bin/obd-load-db-from-obo.pl (rev 0) +++ obo-database/trunk/bin/obd-load-db-from-obo.pl 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,86 @@ +#!/usr/bin/perl + +my $d; +my $use_reasoner = 1; +my $dump; +my $split; +my $delete; +while ($ARGV[0] =~ /^\-/) { + my $opt = shift @ARGV; + if ($opt eq '-d' || $opt eq '--database') { + $d = shift @ARGV; + } + elsif ($opt eq '--noreasoner') { + $use_reasoner = 0; + } + elsif ($opt eq '--dump') { + $dump = 1; + } + elsif ($opt eq '--delete') { + $delete = 1; + } + elsif ($opt eq '--split') { + $split = shift @ARGV; + } + else { + die $opt; + } +} +if (!$d) { + $d = shift @ARGV; +} +my @files = @ARGV; +print STDERR "Loading\n"; + +foreach my $file (@files) { + if ($delete) { + clear_previous($file); + } + print STDERR "Converting File: $file\n"; + my $ifile = "$file.implied.obo"; + if ($use_reasoner) { + run("obo2obo -o -saveallimpliedlinks $ifile $file"); + } + else { + $ifile = $file; + } + print STDERR "Loading File: $ifile\n"; + if ($split) { + run("obo-split.pl -s $split -x go2fmt.pl -x 'oboxml_to_obd_prestore - | stag-storenode.pl -p xml -cache node=1 -d $d -' \\; $ifile"); + } + else { + run("go2fmt.pl -x oboxml_to_obd_prestore $ifile | stag-storenode.pl -p xml -cache node=1 -d $d -"); + } + print STDERR "Loaded File: $ifile\n"; +} +if ($dump) { + my $dumpfile = "$d-obd-sql.sql"; + print STDERR "Dumping $dumpfile\n"; + run('pg_dump `stag-connect-parameters.pl '.$d.'` > '.$dumpfile." && gzip --force $dumpfile"); +} +exit 0; + +sub run { + print STDERR "Running: @_\n"; + system("@_"); +} + +sub clear_previous { + my $f = shift; + print STDERR "Clearing: $f\n"; + my %ns = (); + open(F,$f); + while(<F>) { + chomp; + if (/^namespace:\s*(\S+)/) { + $ns{$1} = 1; + } + if (/^default-namespace:\s*(\S+)/) { + $ns{$1} = 1; + } + } + close(F); + foreach (keys %ns) { + run('psql `stag-connect-parameters.pl '.$d.'` -c "DELETE FROM node WHERE uid=\''.$_.'\'"'); + } +} Property changes on: obo-database/trunk/bin/obd-load-db-from-obo.pl ___________________________________________________________________ Name: svn:executable + Added: obo-database/trunk/sql/obd-core-schema.sql =================================================================== --- obo-database/trunk/sql/obd-core-schema.sql (rev 0) +++ obo-database/trunk/sql/obd-core-schema.sql 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,173 @@ + +CREATE SEQUENCE node_node_uid_seq; +CREATE TABLE node ( + node_id SERIAL PRIMARY KEY, + uid VARCHAR NOT NULL DEFAULT '__internal:_' || nextval('node_node_uid_seq'), + label VARCHAR, + uri VARCHAR, + -- one of: C, R or I. Can also be unknown + metatype CHAR(1), + is_anonymous BOOLEAN NOT NULL DEFAULT 'f', + is_transitive BOOLEAN NOT NULL DEFAULT 'f', + is_obsolete BOOLEAN NOT NULL DEFAULT 'f', + is_reiflink BOOLEAN NOT NULL DEFAULT 'f', + + UNIQUE(uid) +); +ALTER TABLE node add source_id INTEGER REFERENCES node(node_id) ON DELETE CASCADE; +COMMENT ON TABLE node IS 'An element of a graph. A graph consists of a collection of nodes n1, n2, ... and a collection of edges between nodes. Nodes can represent Instances, Relations, and Types. RDF: typically corresponds to a resource'; +COMMENT ON COLUMN node.uid IS 'A unique identifier for this node. Must be EITHER a valid URI OR a valid OBO ID.'; +COMMENT ON COLUMN node.uri IS 'See W3 specs for definition of URI'; +COMMENT ON COLUMN node.label IS 'A piece of text intended for display for humans. Should follow preferred term conventions'; +COMMENT ON COLUMN node.metatype IS 'Enumeration that determines what kind of entity this node represents. Choices are: I=instance (aka token, individual, particular). R=relation (aka linktype, relationship type. roughly equivalent to slots, owl properties, DL role names). C=class (universal, type, pattern, term)'; +COMMENT ON COLUMN node.is_anonymous IS 'true if the node represents an entity that does not have a unique handle. RDF: corresponds to bNodes'; +COMMENT ON COLUMN node.is_transitive IS 'If metatype=R, and this node represents a relation, then normal transitivity rules hold'; +COMMENT ON COLUMN node.is_obsolete IS 'Does this node identify a historical record of what was once considered a valid instance, type or relation?'; +COMMENT ON COLUMN node.is_reiflink IS 'Does this node identify an instance of a statement or other narrative entity concerning other entities? If so, there should be a row R in the link table with R.reiflink_node_id equal to the primary key of this row. RDF: reification'; +COMMENT ON COLUMN node.source_id IS 'TODO: decide on whether the source should be equivalent to the obo namespace. should also be compatible with named graphs'; + +CREATE INDEX node_source_indx ON node(source_id); +CREATE INDEX node_label ON node(label); + +CREATE TABLE link ( + link_id SERIAL PRIMARY KEY, + reiflink_node_id INTEGER, + FOREIGN KEY (reiflink_node_id) REFERENCES node(node_id) ON DELETE CASCADE, + node_id INTEGER NOT NULL, + FOREIGN KEY (node_id) REFERENCES node(node_id) ON DELETE CASCADE, + predicate_id INTEGER NOT NULL, + FOREIGN KEY (predicate_id) REFERENCES node(node_id) ON DELETE CASCADE, + object_id INTEGER NOT NULL, + FOREIGN KEY (object_id) REFERENCES node(node_id) ON DELETE CASCADE, + when_id INTEGER NOT NULL, + FOREIGN KEY (when_id) REFERENCES node(node_id) ON DELETE CASCADE, + is_inferred BOOLEAN NOT NULL DEFAULT 'f', + is_instantiation BOOLEAN NOT NULL DEFAULT 'f', + combinator CHAR(1) NOT NULL DEFAULT '', + source_id INTEGER REFERENCES node(node_id) ON DELETE CASCADE, + + --- should reiflink_node_id also be part of key? multiple statements. YES + CONSTRAINT link_unique_c UNIQUE(reiflink_node_id, predicate_id, object_id) +); +COMMENT ON TABLE link IS 'An element of a graph. Edges link nodes. Edges have labels (predicates)'; +COMMENT ON COLUMN link.when_id IS 'some relations are time-index; this points to a time point or interval instance for when the link statement holds. Note this is real time, not database time. RDF: does not correpond. If this column is non-null, special transforms must be applied to turn the OBD graph into an RDF graph'; +COMMENT ON COLUMN link.reiflink_node_id IS 'A reference to a node that represents a statement or other narrative entity asserting this link. If this reference is NULL then the reification context is considered to be the whole database. All Annotations (sensu biomedical curation) are narrative entities positing links. RDF: if this is non-NULL, there is an implicit SPO reification quad'; +COMMENT ON COLUMN link.node_id IS 'The entity for which the link directly applies. Can refer to a C, R or I. RDF: subject'; +COMMENT ON COLUMN link.node_id IS 'The relation that holds between the node and the object. Must refer to a R node. RDF: predicate'; +COMMENT ON COLUMN link.object_id IS 'The entity for which the node stands in some relation R to (where R is the predicate_id). Any node metatype. RDF: object'; +COMMENT ON COLUMN link.is_inferred IS 'True if this link is implied/entailed via some other link. TODO: reasoning provenance chain'; +COMMENT ON COLUMN link.is_instantiation IS 'True if this link is a relation of type OBO_REL:instance_of (or rdf:type). Note this is redundant, but it can speed queries'; +COMMENT ON COLUMN link.combinator IS ' +A means of logically grouping links from the same node. If this is non-blank, the semantics of the link table is changed. +one of: + I - equivalent to intersection + U - equivalent to union + blank - disjunctive +each set of links is grouped by combinator and treated as a distinct set, +so it is possible to have all of: + a collection of necessary conditions ('') + a collection of necessary+sufficient conditions by set-intersection (I) + a collection of necessary+sufficient conditions by set-union (U) +specified directly for a node + ## +for other combinations, use equivalentClass link to anon class'; + +CREATE INDEX link_predicate_indx ON link(predicate_id); +CREATE INDEX link_object_indx ON link(object_id); +CREATE INDEX link_node_indx ON link(node_id); +CREATE INDEX link_node_predicate_indx ON link(node_id,predicate_id); +CREATE INDEX link_predicate_object_indx ON link(predicate_id,object_id); +CREATE INDEX link_reiflink_node_indx ON link(reiflink_node_id); +CREATE INDEX link_triple_indx ON link(node_id,predicate_id,object_id); + + +CREATE TABLE sameas ( + node_id INTEGER NOT NULL, + FOREIGN KEY (node_id) REFERENCES node(node_id) ON DELETE CASCADE, + object_id INTEGER NOT NULL, + FOREIGN KEY (object_id) REFERENCES node(node_id) ON DELETE CASCADE, + is_inferred BOOLEAN NOT NULL DEFAULT 'f', + source_id INTEGER REFERENCES node(node_id) ON DELETE CASCADE, + + CONSTRAINT link_unique_c UNIQUE(node_id, object_id, source_id) +); +COMMENT ON TABLE sameas IS 'STATUS: under discussion'; + +CREATE TABLE tagval ( + node_id INTEGER NOT NULL, + FOREIGN KEY (node_id) REFERENCES node(node_id) ON DELETE CASCADE, + tag_id INTEGER NOT NULL, + FOREIGN KEY (tag_id) REFERENCES node (node_id) ON DELETE CASCADE, + val TEXT NOT NULL +); +COMMENT ON TABLE tagval IS 'Atomic attribute of a node. A pair (T,V) where T is a relation node and V is an atomic piece of data (RDF: literal). Note: as opposed to RDF we do not treat literals as nodes in the graph. This table can be seen to correspond to slots'; +CREATE INDEX tagval_nt_index ON tagval(node_id, tag_id); +CREATE INDEX tagval_label_indx ON tagval(val); + +CREATE TABLE alias ( + node_id INTEGER NOT NULL, + FOREIGN KEY (node_id) REFERENCES node(node_id) ON DELETE CASCADE, + scope VARCHAR, -- ? + type_id INTEGER, + FOREIGN KEY (type_id) REFERENCES node(node_id) ON DELETE CASCADE, + label VARCHAR NOT NULL +); +COMMENT ON TABLE alias IS 'Alternate label for node, intended for humans'; +CREATE INDEX alias_nt_indx ON alias(node_id, type_id); +CREATE INDEX alias_label_indx ON alias(label); + +CREATE TABLE description ( + description_id SERIAL PRIMARY KEY, + node_id INTEGER NOT NULL, + FOREIGN KEY (node_id) REFERENCES node(node_id) ON DELETE CASCADE, + scope VARCHAR, --? + type_id INTEGER, + FOREIGN KEY (type_id) REFERENCES node(node_id) ON DELETE CASCADE, + label VARCHAR NOT NULL +); +COMMENT ON TABLE alias IS 'Narrative text intended for humans describing what entity the node represents'; +CREATE INDEX description_nt_indx ON description(node_id,type_id); +CREATE INDEX description_label_indx ON description(label); + +-- ? +-- depcrate in favour of seeAlso links? +CREATE TABLE node_xref ( + node_id INTEGER NOT NULL, + FOREIGN KEY (node_id) REFERENCES node(node_id) ON DELETE CASCADE, + xref_id INTEGER NOT NULL, + FOREIGN KEY (xref_id) REFERENCES node(node_id) ON DELETE CASCADE, + context_id INTEGER, + FOREIGN KEY (context_id) REFERENCES node(node_id) ON DELETE CASCADE, + + UNIQUE(node_id, xref_id) +); + +CREATE TABLE description_xref ( + description_id INTEGER NOT NULL, + FOREIGN KEY (description_id) REFERENCES description(description_id) ON DELETE CASCADE, + xref_id INTEGER NOT NULL, + FOREIGN KEY (xref_id) REFERENCES node(node_id) ON DELETE CASCADE, + context_id INTEGER, + FOREIGN KEY (context_id) REFERENCES node(node_id) ON DELETE CASCADE, + + UNIQUE(description_id, xref_id) +); + +CREATE TABLE node_audit ( + node_id INTEGER NOT NULL, + FOREIGN KEY (node_id) REFERENCES node(node_id) ON DELETE CASCADE, + infonode_id INTEGER NOT NULL, + FOREIGN KEY (infonode_id) REFERENCES node(node_id) ON DELETE CASCADE, + loadtime TIMESTAMP default 'now' +); +COMMENT ON TABLE node_audit IS 'An load/update operation on a node that happened at some point in human existence'; + +CREATE TABLE link_audit ( + link_id INTEGER NOT NULL, + FOREIGN KEY (link_id) REFERENCES link(link_id) ON DELETE CASCADE, + infonode_id INTEGER NOT NULL, + FOREIGN KEY (infonode_id) REFERENCES node(node_id) ON DELETE CASCADE, + loadtime TIMESTAMP default 'now' +); +COMMENT ON TABLE link_audit IS 'An load/update operation on a node that happened at some point in human existence'; + Added: obo-database/trunk/sql/obd-core-views.sql =================================================================== --- obo-database/trunk/sql/obd-core-views.sql (rev 0) +++ obo-database/trunk/sql/obd-core-views.sql 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,159 @@ + +CREATE OR REPLACE VIEW link_with_pred_uid AS + SELECT link.*, + pred.uid AS pred_uid + FROM link INNER JOIN node AS pred ON (predicate_id=pred.node_id); + +CREATE OR REPLACE VIEW instance_of_link AS + SELECT link.* FROM link INNER JOIN node AS pred ON (predicate_id=pred.node_id) WHERE pred.uid='OBO_REL:instance_of'; + +CREATE OR REPLACE VIEW posits_link AS + SELECT pl.* + FROM link_with_pred_uid AS pl + WHERE pred_uid='oban:posits'; + +CREATE OR REPLACE VIEW annotation_node AS + SELECT * FROM node + WHERE node_id IN + (SELECT instance_of_link.node_id + FROM instance_of_link INNER JOIN node AS c ON (c.node_id=instance_of_link.object_id) + WHERE c.uid='oban:Annotation'); + +CREATE OR REPLACE VIEW annotation_node_J_link AS + SELECT + node.*, + link.node_id AS subject_id + FROM annotation_node AS n + INNER JOIN link ON (n.node_id=link.reiflink_node_id); + + +--CREATE OR REPLACE VIEW composite_annotation_node AS +-- SELECT * FROM annotation_node x y z; + +-- an annotation is an entity that posits something +CREATE OR REPLACE VIEW posited_link AS + SELECT link.*, + pl.node_id AS annotation_node_id + FROM posits_link AS pl + INNER JOIN link ON (pl.object_id=link.reiflink_node_id); + + + +CREATE OR REPLACE VIEW statement_node AS + SELECT + node.*, + link.node_id AS subject_id, + link.predicate_id, + link.object_id, + link.is_inferred, +wp link.combinator + FROM + node + INNER JOIN link ON (link.reiflink_node_id=node.node_id); + +CREATE OR REPLACE VIEW statementcount_by_source AS + SELECT source.uid,source.label, count(sn.node_id) + FROM statement_node AS sn + INNER JOIN node AS source ON (sn.source_id=source.node_id) + GROUP BY source.uid,source.label; + +CREATE OR REPLACE VIEW node_j_source AS + SELECT node.*,source.label AS source_label, source.uid AS source_uid + FROM node LEFT OUTER JOIN node AS source ON (node.source_id=source.node_id); + +CREATE OR REPLACE VIEW nodecount_by_source AS + SELECT source.uid,source.label, count(node.node_id) + FROM node LEFT OUTER JOIN node AS source ON (node.source_id=source.node_id) + GROUP BY source.uid,source.label; + +CREATE OR REPLACE VIEW linkcount_by_source AS + SELECT source.uid,source.label, count(link.link_id) + FROM link + INNER JOIN node USING (node_id) + LEFT OUTER JOIN node AS source ON (node.source_id=source.node_id) + GROUP BY source.uid,source.label; + +CREATE OR REPLACE VIEW implied_linkcount_by_source AS + SELECT source.uid,source.label, count(link.link_id) + FROM link + INNER JOIN node USING (node_id) + LEFT OUTER JOIN node AS source ON (node.source_id=source.node_id) + WHERE link.is_inferred='t' + GROUP BY source.uid,source.label; + +CREATE OR REPLACE VIEW nodecount_by_metatype_and_source AS + SELECT node.metatype,source.uid,source.label, count(node.node_id) + FROM node LEFT OUTER JOIN node AS source ON (node.source_id=source.node_id) + GROUP BY node.metatype,source.uid,source.label; + +CREATE OR REPLACE VIEW implied_link AS SELECT * FROM link WHERE is_inferred='t'; +CREATE OR REPLACE VIEW asserted_link AS SELECT * FROM link WHERE is_inferred='f'; + +CREATE OR REPLACE VIEW class_node AS SELECT * FROM node WHERE metatype='C'; +CREATE OR REPLACE VIEW relation_node AS SELECT * FROM node WHERE metatype='R'; +CREATE OR REPLACE VIEW instance_node AS SELECT * FROM node WHERE metatype='I'; + +CREATE OR REPLACE VIEW transitive_relation_node AS SELECT * FROM node WHERE metatype='R' AND is_transitive='t'; + + +CREATE OR REPLACE VIEW intersection_link AS SELECT * FROM link WHERE combinator='I'; +CREATE OR REPLACE VIEW union_link AS SELECT * FROM link WHERE combinator='U'; + +CREATE OR REPLACE VIEW link_J_predicate AS + SELECT link.*, + node.uid AS node_uid, + node.label AS node_label, + node.source AS node_source + FROM link INNER JOIN node ON (predicate_id=node.node_id); + + + + + +CREATE OR REPLACE VIEW is_a AS SELECT * FROM node WHERE uid='OBO_REL:is_a'; + +CREATE OR REPLACE VIEW is_a_link AS + SELECT link.* + FROM link INNER JOIN is_a ON (predicate_id=is_a.node_id) + WHERE combinator=''; + +CREATE OR REPLACE VIEW genus_link AS + SELECT link.* + FROM link INNER JOIN is_a ON (predicate_id=is_a.node_id) + WHERE combinator='I'; + +CREATE OR REPLACE VIEW differentium_link AS + SELECT link.* + FROM link INNER JOIN node ON (predicate_id=node.node_id) + WHERE combinator='I' + AND node.uid='is_a'; + +---use plural to avoid our user type defined for function and easy to remember it is a view +---using views write query to get pheno data is much slower (18 sec) compared with using functions (8 sec) +---however, using view we could write where-clause like in template where-element +---in case when you have to use where-clause from function result, it is slower than using view +CREATE OR REPLACE VIEW linkers AS + SELECT DISTINCT link.node_id AS subject_id, link.predicate_id, r.uid AS predicate, link.object_id + FROM link INNER JOIN node r ON (r.node_id=link.predicate_id); + +CREATE OR REPLACE VIEW statements AS + SELECT DISTINCT + subj.node_id AS subject_id, subj.uid AS subject_uid, subj.label AS subject_label, subjt.uid AS subject_type, + link.predicate_id, r.uid AS predicate, + obj.node_id AS object_id, obj.uid AS object_uid, obj.label AS object_label, objt.uid AS object_type + FROM node subj INNER JOIN link ON (subj.node_id=link.node_id) + INNER JOIN node subjt ON (subj.metatype_id=subjt.node_id) + INNER JOIN node obj ON (obj.node_id=link.object_id) + INNER JOIN node objt ON (obj.metatype_id=objt.node_id) + INNER JOIN node r ON (r.node_id=link.predicate_id); + +CREATE OR REPLACE VIEW descendants AS + SELECT DISTINCT + subj.node_id AS subject_id, subj.uid AS subject_uid, subj.label AS subject_label,subjt.uid AS subject_type, + link.predicate_id, r.uid AS predicate, + obj.node_id AS object_id, obj.uid AS object_uid, obj.label AS object_label, objt.uid AS object_type + FROM node subj INNER JOIN link_path link ON (subj.node_id=link.node_id) + INNER JOIN node subjt ON (subj.metatype_id=subjt.node_id) + INNER JOIN node obj ON (obj.node_id=link.object_id) + INNER JOIN node objt ON (obj.metatype_id=objt.node_id) + INNER JOIN node r ON (r.node_id=link.predicate_id); Added: obo-database/trunk/sql/stag-sql-templates/obd-annotation.stg =================================================================== --- obo-database/trunk/sql/stag-sql-templates/obd-annotation.stg (rev 0) +++ obo-database/trunk/sql/stag-sql-templates/obd-annotation.stg 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,16 @@ +:SELECT + * +:FROM + link + INNER JOIN node AS annotation_node ON (link.reiflink_node_id=annotation_node.node_id) + INNER JOIN node AS predicate ON (link.predicate_id=predicate.node_id) + INNER JOIN node AS subject_node ON (link.node_id=subject_node.node_id) + INNER JOIN node AS object_node ON (link.object_id=object_node.node_id) +:WHERE + [node.uid => &uid&] + [node.label => &label&] +:USE NESTING (set(annotation_node(link(subject_node)(predicate)(object_node)))) + +// +schema: obd +desc: Added: obo-database/trunk/sql/stag-sql-templates/obd-defined-class.stg =================================================================== --- obo-database/trunk/sql/stag-sql-templates/obd-defined-class.stg (rev 0) +++ obo-database/trunk/sql/stag-sql-templates/obd-defined-class.stg 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,16 @@ +:SELECT + * +:FROM + node + INNER JOIN link USING (node_id) + INNER JOIN node AS predicate ON (link.predicate_id=predicate.node_id) + INNER JOIN node AS object_node ON (link.object_id=object_node.node_id) +:WHERE + [link.combinator='I'] + [node.uid => &uid&] + [node.label => &label&] +:USE NESTING (set(node(link(predicate)(object_node)))) + +// +schema: obd +desc: Added: obo-database/trunk/sql/stag-sql-templates/obd-genus-diff.stg =================================================================== --- obo-database/trunk/sql/stag-sql-templates/obd-genus-diff.stg (rev 0) +++ obo-database/trunk/sql/stag-sql-templates/obd-genus-diff.stg 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,17 @@ +:SELECT + * +:FROM + node + INNER JOIN genus_link USING (node_id) + INNER JOIN differentium_link USING (node_id) + INNER JOIN node AS genus ON (genus_link.object_id=genus.node_id) + INNER JOIN node AS diff ON (differentium_link.object_id=diff.node_id) + +:WHERE + [node.uid => &uid&] + [node.label => &label&] +:USE NESTING (set(node(genus_link(genus))(differentium_link(diff)))) + +// +schema: obd +desc: Added: obo-database/trunk/xml/Makefile =================================================================== --- obo-database/trunk/xml/Makefile (rev 0) +++ obo-database/trunk/xml/Makefile 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,14 @@ +TRANG = java -jar $(HOME)/Java/trang/trang.jar + +specs: xmlspec/obd-core.rng xmlspec/obd-core.xsd xmlspec/obd-core-xsd.html + +xmlspec/%.rng: xmlspec/%.rnc + $(TRANG) $< $@ +.PRECIOUS: xmlspec/%.rng + +xmlspec/%.xsd: xmlspec/%.rng + $(TRANG) $< $@ + +xmlspec/%-xsd.html: xmlspec/%.xsd + xsltproc xsl/xsd2html.xsl $< > $@ + Added: obo-database/trunk/xml/xmlspec/obd-core-xsd.html =================================================================== --- obo-database/trunk/xml/xmlspec/obd-core-xsd.html (rev 0) +++ obo-database/trunk/xml/xmlspec/obd-core-xsd.html 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,438 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title></title> +<style> + body { background: white; + color: black; } + h2 { border-top: black solid 1px; + margin-top: 2em; + padding-top: 1em; } + </style> +</head> +<body> +<h2>Table of Contents</h2> +<h3>Elements</h3> +<ul> +<li><a href="#element-type-alias">alias</a></li> +<li><a href="#element-type-description">description</a></li> +<li><a href="#element-type-graph">graph</a></li> +<li><a href="#element-type-graphset">graphset</a></li> +<li><a href="#element-type-idspace">idspace</a></li> +<li><a href="#element-type-instance_of">instance_of</a></li> +<li><a href="#element-type-is_a">is_a</a></li> +<li><a href="#element-type-label">label</a></li> +<li><a href="#element-type-link">link</a></li> +<li><a href="#element-type-metadata">metadata</a></li> +<li><a href="#element-type-node">node</a></li> +<li><a href="#element-type-object">object</a></li> +<li><a href="#element-type-predicate">predicate</a></li> +<li><a href="#element-type-source">source</a></li> +<li><a href="#element-type-subject">subject</a></li> +<li><a href="#element-type-tagval">tagval</a></li> +<li><a href="#element-type-val">val</a></li> +<li><a href="#element-type-xref">xref</a></li> +</ul> + <h2 id="element-type-graphset">Element Type: graphset</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<table border="1"> +<caption>Attributes</caption> +<tr valign="baseline"> +<th align="left" rowspan="2">version</th> +<td>Built-in type string</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>: File format version : + should match this schema version (eg 0.01)</p> + </td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">id</th> +<td>Simple type <a href="#simple-type-o:identifier_Type">o:identifier_Type</a> +</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>identifier for this document or data stream </p> + </td></tr> +</table> +<h3>Content Model</h3> + <p>Optional repeatable choice of:</p> +<ul> + <li>Exactly 1 <a href="#element-type-o:metadata">o:metadata</a> +</li> + <li>Exactly 1 <a href="#element-type-o:graph">o:graph</a> +</li> + </ul> + + + + <h2 id="element-type-graph">Element Type: graph</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<table border="1"> +<caption>Attributes</caption> +<tr valign="baseline"> +<th align="left" rowspan="2">id</th> +<td>Simple type <a href="#simple-type-o:identifier_Type">o:identifier_Type</a> +</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>identifier for this graph</p> + </td></tr> +</table> +<h3>Content Model</h3> + <p>Optional repeatable choice of:</p> +<ul> + <li>Exactly 1 <a href="#element-type-o:node">o:node</a> +</li> + <li>Exactly 1 <a href="#element-type-o:link">o:link</a> +</li> + </ul> + + + <h2 id="element-type-metadata">Element Type: metadata</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>TODO - not complete +also include some way of binding variables in graph query results</p> + <h3>Content Model</h3> + <p>Exactly 1 sequences of:</p> +<ol> + <li>Optional repeatable <a href="#element-type-o:idspace">o:idspace</a> +</li> + </ol> + + <h2 id="element-type-idspace">Element Type: idspace</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<table border="1"> +<caption>Attributes</caption> +<tr valign="baseline"> +<th align="left" rowspan="2">id</th> +<td>Built-in type NMTOKEN</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"></td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">uri_base</th> +<td>Built-in type string</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"></td></tr> +</table> +<h3>Content Model</h3> + <p>Exactly 1 sequences of:</p> +<ol> + <h2 id="element-type-label">Element Type: label</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<h3>Content Model</h3> +<p>Built-in type string</p> + </ol> + + + + <h2 id="element-type-link">Element Type: link</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>equivalent to an RDF triple</p> + <table border="1"> +<caption>Attributes</caption> +<tr valign="baseline"> +<th align="left" rowspan="2">id</th> +<td>Simple type <a href="#simple-type-o:identifier_Type">o:identifier_Type</a> +</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"></td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">is_inferred</th> +<td>Built-in type boolean</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>by default, links are asserted rather than inferred +example of inferred link: X is_a Z, inferred from X is_a Y, Y is_a Z</p> + </td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">is_object_reified</th> +<td>Built-in type boolean</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>most links are between nodes (default) +a link can also point to another link - in this +case we say the object is a reified link, in +accordance with RDF terminology</p> + </td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">is_sufficient</th> +<td>Built-in type boolean</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>DEPRECATED!! use combinator instead +valid for class-level links only +all links comprise *necessary* conditions. +links can be flagged as *sufficient*. If a link is N+S then +it provides an *equivalent class*, or a *class definition*</p> + </td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">is_complement</th> +<td>Built-in type boolean</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>it provides an *equivalent class*, or a *class definition*</p> + </td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">combinator</th> +<td> + <p>Built-in type token</p> +<p>Enumeration:</p> +<ul> +<li><code></code></li> +<li><code>I</code></li> +<li><code>U</code></li> +</ul> + </td> +<td>required</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>simple logical grouping +one of: + I - equivalent to intersection + U - equivalent to union + blank - disjunctive +each set of links is grouped by combinator and treated as a distinct set, +so it is possible to have all of: + a collection of necessary conditions ('') + a collection of necessary+sufficient conditions by set-intersection (I) + a collection of necessary+sufficient conditions by set-union (U) +specified directly for a node + +for other combinations, use equivalentClass link to anon class</p> + </td></tr> +</table> +<h3>Content Model</h3> + <p>Exactly 1 sequences of:</p> +<ol> + <li>An optional <a href="#element-type-o:subject">o:subject</a> +</li> + <li>Exactly 1 <a href="#element-type-o:predicate">o:predicate</a> +</li> + <li>Exactly 1 <a href="#element-type-o:object">o:object</a> +</li> + </ol> + + + + + + + + <h2 id="element-type-subject">Element Type: subject</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:linkref">o:linkref</a></p> + <h2 id="element-type-predicate">Element Type: predicate</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:linkref">o:linkref</a></p> + <h2 id="element-type-object">Element Type: object</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:linkref">o:linkref</a></p> + + <p>Exactly 1 sequences of:</p> +<ol> + <li>An optional <a href="#element-type-o:node">o:node</a> +</li> + </ol> + + + <h2 id="element-type-node">Element Type: node</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>equivalent to an RDF resource. can represent instances, relations/slots and universals</p> + <table border="1"> +<caption>Attributes</caption> +<tr valign="baseline"> +<th align="left" rowspan="2">id</th> +<td>Simple type <a href="#simple-type-o:identifier_Type">o:identifier_Type</a> +</td> +<td>required</td> +</tr> +<tr valign="baseline"><td colspan="2"></td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">metatype</th> +<td> + <p>Built-in type token</p> +<p>Enumeration:</p> +<ul> +<li><code>class</code></li> +<li><code>relation</code></li> +<li><code>instance</code></li> +</ul> + </td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>Change to enum? </p> + </td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">is_anonymous</th> +<td>Built-in type boolean</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>corresponds to rdf bNode</p> + </td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">is_transitive</th> +<td>Built-in type boolean</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>relations only. corresponds to owl:TransitiveProperty</p> + </td></tr> +</table> +<h3>Content Model</h3> + <p>Optional repeatable choice of:</p> +<ul> + <h2 id="element-type-label">Element Type: label</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>corresponds to rdfs:label</p> + <h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:literal">o:literal</a></p> + <li>Exactly 1 <a href="#element-type-o:is_a">o:is_a</a> +</li> + <li>Exactly 1 <a href="#element-type-o:instance_of">o:instance_of</a> +</li> + <li>Exactly 1 <a href="#element-type-o:source">o:source</a> +</li> + <li>Exactly 1 <a href="#element-type-o:tagval">o:tagval</a> +</li> + <li>Exactly 1 <a href="#element-type-o:alias">o:alias</a> +</li> + <li>Exactly 1 <a href="#element-type-o:description">o:description</a> +</li> + <li>Exactly 1 <a href="#element-type-o:xref">o:xref</a> +</li> + </ul> + + + + + + <h2 id="element-type-is_a">Element Type: is_a</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>corresponds to rdfs:subclass +TBD: treat like any other link?</p> + <h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:linkref">o:linkref</a></p> + <h2 id="element-type-instance_of">Element Type: instance_of</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>corresponds to rdf:type +TBD: treat like any other link?</p> + <h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:linkref">o:linkref</a></p> + <h2 id="element-type-source">Element Type: source</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>if this node is from an ontology, the id of the ontology +if the node is from a dataset, the id/name of the dataset</p> + <h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:linkref">o:linkref</a></p> + <h2 id="element-type-tagval">Element Type: tagval</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>extensible properties +equivalent to triples for datatype values in RDF/OWL</p> + <table border="1"> +<caption>Attributes</caption> +<tr valign="baseline"> +<th align="left" rowspan="2">tag</th> +<td>Simple type <a href="#simple-type-o:identifier_Type">o:identifier_Type</a> +</td> +<td>required</td> +</tr> +<tr valign="baseline"><td colspan="2"></td></tr> +<tr valign="baseline"> +<th align="left" rowspan="2">datatype</th> +<td>Simple type <a href="#simple-type-o:identifier_Type">o:identifier_Type</a> +</td> +<td>required</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>must be some xsd type: eg xsd:int</p> + </td></tr> +</table> +<h3>Content Model</h3> + <p>Exactly 1 sequences of:</p> +<ol> + <li>Exactly 1 <a href="#element-type-o:val">o:val</a> +</li> + </ol> + + + + <h2 id="element-type-val">Element Type: val</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:literal">o:literal</a></p> + <h2 id="element-type-alias">Element Type: alias</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>synonyms and other terminological entities</p> + <h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:structured_info_Type">o:structured_info_Type</a></p> + <h2 id="element-type-xref">Element Type: xref</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<table border="1"> +<caption>Attributes</caption> +<tr valign="baseline"> +<th align="left" rowspan="2">context</th> +<td>Simple type <a href="#simple-type-o:identifier_Type">o:identifier_Type</a> +</td> +<td>optional</td> +</tr> +<tr valign="baseline"><td colspan="2"> + <p>optional - TBD</p> + </td></tr> +</table> +<h3>Content Model</h3> + + + + + + + + + <p>Built-in type anyType</p> + + + <h2 id="element-type-description">Element Type: description</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> + <p>an optionally-attributed textual description</p> + <h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:structured_info_Type">o:structured_info_Type</a></p> + + + <p>Optional repeatable choice of:</p> +<ul> + <li>Exactly 1 <a href="#element-type-o:label">o:label</a> +</li> + <li>Exactly 1 <a href="#element-type-o:xref">o:xref</a> +</li> + </ul> + + + + + <h2 id="element-type-label">Element Type: label</h2> +<p>Namespace: <code>http://www.bioontology.org/obd/schema/obd-generic</code></p> +<h3>Content Model</h3> +<p>Simple type <a href="#simple-type-o:literal">o:literal</a></p> + + <p>Built-in type string</p> + + + <p>Built-in type string</p> + +</body> +</html> Added: obo-database/trunk/xml/xmlspec/obd-core.rnc =================================================================== --- obo-database/trunk/xml/xmlspec/obd-core.rnc (rev 0) +++ obo-database/trunk/xml/xmlspec/obd-core.rnc 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,192 @@ +default namespace = "http://www.bioontology.org/obd/schema/obd-generic" + +## Can be viewed as alternate serialisation of RDF +## Rationale: +## - ease of use with XML processors +## - directly realisation of RDFS and OWL properties in classes in the XML schema +## - ease of use with nested/structured data field +## (general rule: annotation properties to non-literals get nested in the xml) +## - built-in support for reification, which is required for science +## (eg publication X states that gene A has_function B) +## can also be used for qualified, contextual links (eg time) +## - simpler layering of OWL class-level relations that is more akin +## to the OBO relations model, the oboedit model and databases like Chado +## - the need to identify and name different graphs +## see also: http://www.w3.org/2004/03/trix/Overview.html +## + +start = + element graphset { + + ## : File format version : + ## should match this schema version (eg 0.01) + attribute version { xsd:string }? & + + ## identifier for this document or data stream + attribute id { identifier_Type }? & + metadata? & + graph+ + } + +graph = + element graph { + + ## identifier for this graph + attribute id { identifier_Type }? & + + node* & + link* + } + +metadata = + ## TODO - not complete + ## also include some way of binding variables in graph query results + element metadata { + element idspace { + attribute id {xsd:NMTOKEN }?, + attribute uri_base {xsd:string}?, + element label {xsd:string} + }* + } + +link = + ## equivalent to an RDF triple +element link { + attribute id {identifier_Type }?, + + ## by default, links are asserted rather than inferred + ## example of inferred link: X is_a Z, inferred from X is_a Y, Y is_a Z + attribute is_inferred {xsd:boolean}?, + + ## most links are between nodes (default) + ## a link can also point to another link - in this + ## case we say the object is a reified link, in + ## accordance with RDF terminology + attribute is_object_reified {xsd:boolean}?, + + ## it provides an *equivalent class*, or a *class definition* + attribute is_complement {xsd:boolean}?, + + ## simple logical grouping + ## one of: + ## I - equivalent to intersection + ## U - equivalent to union + ## blank - disjunctive + ## each set of links is grouped by combinator and treated as a distinct set, + ## so it is possible to have all of: + ## a collection of necessary conditions ('') + ## a collection of necessary+sufficient conditions by set-intersection (I) + ## a collection of necessary+sufficient conditions by set-union (U) + ## specified directly for a node + ## + ## for other combinations, use equivalentClass link to anon class + attribute combinator { "" | "I" | "U" }, + + # SOURCE + # subject is optional if embedded in a node [TODO: ban this?] + element subject {linkref}?, + + # predicate is the relationship type + element predicate {linkref}, + + # TARGET + element object {linkref} +} + +linkref = attribute about {identifier_Type}, + # the node can optionally be embedded. is this too much freedom? + node? + +node = + ## equivalent to an RDF resource. can represent instances, relations/slots and universals +element node { + attribute id {identifier_Type }& + + ## Change to enum? + attribute metatype { "class" | "relation" | "instance" }?& + + ## corresponds to rdf bNode + attribute is_anonymous {xsd:boolean}?& + + ## relations only. corresponds to owl:TransitiveProperty + attribute is_transitive {xsd:boolean}?& + + ## corresponds to rdfs:label + element label {literal}?& + + ## corresponds to rdfs:subclass + ## TBD: treat like any other link? + element is_a {linkref}*& + + ## corresponds to rdf:type + ## TBD: treat like any other link? + element instance_of {linkref}*& + + ## if this node is from an ontology, the id of the ontology + ## if the node is from a dataset, the id/name of the dataset + element source {linkref}?& + + tagval*& + alias*& + description*& + xref* +} + +tagval = + ## extensible properties + ## equivalent to triples for datatype values in RDF/OWL + element tagval { + attribute tag {identifier_Type}, + + ## must be some xsd type: eg xsd:int + attribute datatype {identifier_Type}, + + element val {literal} + } + + +alias = + ## synonyms and other terminological entities +element alias { structured_info_Type} + +xref = + element xref { + ## optional - TBD + attribute context {identifier_Type}?, + ## can potentially be an ID in the same graph + linkref + } + + +literal = + ## rare - for referencing the *occurrence* of this literal + attribute id {identifier_Type}?, + + ## eg xsd:string + attribute datatype {identifier_Type}?, + + ## the literal itself + xsd:string + + +description = +## an optionally-attributed textual description +element description {structured_info_Type} + + +# ++ basic types ++ + +structured_info_Type = + ## equivalent to triples for datatype values in RDF + attribute id {identifier_Type}? & + attribute scope {identifier_Type}? & + attribute type {identifier_Type}? & + element label {literal} & + ## where this synonym is used + xref* + + +identifier_Type = xsd:string +label_Type = xsd:string + + Added: obo-database/trunk/xml/xmlspec/obd-core.rng =================================================================== --- obo-database/trunk/xml/xmlspec/obd-core.rng (rev 0) +++ obo-database/trunk/xml/xmlspec/obd-core.rng 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,335 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" ns="http://www.bioontology.org/obd/schema/obd-generic" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> + <start> + <a:documentation>Can be viewed as alternate serialisation of RDF + Rationale: + - ease of use with XML processors + - directly realisation of RDFS and OWL properties in classes in the XML schema + - ease of use with nested/structured data field + (general rule: annotation properties to non-literals get nested in the xml) + - built-in support for reification, which is required for science + (eg publication X states that gene A has_function B) + can also be used for qualified, contextual links (eg time) + - simpler layering of OWL class-level relations that is more akin + to the OBO relations model, the oboedit model and databases like Chado + - the need to identify and name different graphs + see also: http://www.w3.org/2004/03/trix/Overview.html +</a:documentation> + <element name="graphset"> + <interleave> + <optional> + <attribute name="version"> + <a:documentation>: File format version : + should match this schema version (eg 0.01)</a:documentation> + <data type="string"/> + </attribute> + </optional> + <optional> + <attribute name="id"> + <a:documentation>identifier for this document or data stream </a:documentation> + <ref name="identifier_Type"/> + </attribute> + </optional> + <optional> + <ref name="metadata"/> + </optional> + <oneOrMore> + <ref name="graph"/> + </oneOrMore> + </interleave> + </element> + </start> + <define name="graph"> + <element name="graph"> + <interleave> + <optional> + <attribute name="id"> + <a:documentation>identifier for this graph</a:documentation> + <ref name="identifier_Type"/> + </attribute> + </optional> + <zeroOrMore> + <ref name="node"/> + </zeroOrMore> + <zeroOrMore> + <ref name="link"/> + </zeroOrMore> + </interleave> + </element> + </define> + <define name="metadata"> + <element name="metadata"> + <a:documentation>TODO - not complete +also include some way of binding variables in graph query results</a:documentation> + <zeroOrMore> + <element name="idspace"> + <optional> + <attribute name="id"> + <data type="NMTOKEN"/> + </attribute> + </optional> + <optional> + <attribute name="uri_base"> + <data type="string"/> + </attribute> + </optional> + <element name="label"> + <data type="string"/> + </element> + </element> + </zeroOrMore> + </element> + </define> + <define name="link"> + <element name="link"> + <a:documentation>equivalent to an RDF triple</a:documentation> + <optional> + <attribute name="id"> + <ref name="identifier_Type"/> + </attribute> + </optional> + <optional> + <attribute name="is_inferred"> + <a:documentation>by default, links are asserted rather than inferred +example of inferred link: X is_a Z, inferred from X is_a Y, Y is_a Z</a:documentation> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="is_object_reified"> + <a:documentation>most links are between nodes (default) +a link can also point to another link - in this +case we say the object is a reified link, in +accordance with RDF terminology</a:documentation> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="is_sufficient"> + <a:documentation>DEPRECATED!! use combinator instead +valid for class-level links only +all links comprise *necessary* conditions. +links can be flagged as *sufficient*. If a link is N+S then +it provides an *equivalent class*, or a *class definition*</a:documentation> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="is_complement"> + <a:documentation>it provides an *equivalent class*, or a *class definition*</a:documentation> + <data type="boolean"/> + </attribute> + </optional> + <attribute name="combinator"> + <a:documentation>simple logical grouping +one of: + I - equivalent to intersection + U - equivalent to union + blank - disjunctive +each set of links is grouped by combinator and treated as a distinct set, +so it is possible to have all of: + a collection of necessary conditions ('') + a collection of necessary+sufficient conditions by set-intersection (I) + a collection of necessary+sufficient conditions by set-union (U) +specified directly for a node + +for other combinations, use equivalentClass link to anon class</a:documentation> + <choice> + <value/> + <value>I</value> + <value>U</value> + </choice> + </attribute> + <optional> + <!-- + SOURCE + subject is optional if embedded in a node [TODO: ban this?] + --> + <element name="subject"> + <ref name="linkref"/> + </element> + </optional> + <!-- predicate is the relationship type --> + <element name="predicate"> + <ref name="linkref"/> + </element> + <!-- TARGET --> + <element name="object"> + <ref name="linkref"/> + </element> + </element> + </define> + <define name="linkref"> + <attribute name="about"> + <ref name="identifier_Type"/> + </attribute> + <optional> + <!-- the node can optionally be embedded. is this too much freedom? --> + <ref name="node"/> + </optional> + </define> + <define name="node"> + <element name="node"> + <a:documentation>equivalent to an RDF resource. can represent instances, relations/slots and universals</a:documentation> + <interleave> + <attribute name="id"> + <ref name="identifier_Type"/> + </attribute> + <optional> + <attribute name="metatype"> + <a:documentation>Change to enum? </a:documentation> + <choice> + <value>class</value> + <value>relation</value> + <value>instance</value> + </choice> + </attribute> + </optional> + <optional> + <attribute name="is_anonymous"> + <a:documentation>corresponds to rdf bNode</a:documentation> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="is_transitive"> + <a:documentation>relations only. corresponds to owl:TransitiveProperty</a:documentation> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <element name="label"> + <a:documentation>corresponds to rdfs:label</a:documentation> + <ref name="literal"/> + </element> + </optional> + <zeroOrMore> + <element name="is_a"> + <a:documentation>corresponds to rdfs:subclass +TBD: treat like any other link?</a:documentation> + <ref name="linkref"/> + </element> + </zeroOrMore> + <zeroOrMore> + <element name="instance_of"> + <a:documentation>corresponds to rdf:type +TBD: treat like any other link?</a:documentation> + <ref name="linkref"/> + </element> + </zeroOrMore> + <optional> + <element name="source"> + <a:documentation>if this node is from an ontology, the id of the ontology +if the node is from a dataset, the id/name of the dataset</a:documentation> + <ref name="linkref"/> + </element> + </optional> + <zeroOrMore> + <ref name="tagval"/> + </zeroOrMore> + <zeroOrMore> + <ref name="alias"/> + </zeroOrMore> + <zeroOrMore> + <ref name="description"/> + </zeroOrMore> + <zeroOrMore> + <ref name="xref"/> + </zeroOrMore> + </interleave> + </element> + </define> + <define name="tagval"> + <element name="tagval"> + <a:documentation>extensible properties +equivalent to triples for datatype values in RDF/OWL</a:documentation> + <attribute name="tag"> + <ref name="identifier_Type"/> + </attribute> + <attribute name="datatype"> + <a:documentation>must be some xsd type: eg xsd:int</a:documentation> + <ref name="identifier_Type"/> + </attribute> + <element name="val"> + <ref name="literal"/> + </element> + </element> + </define> + <define name="alias"> + <element name="alias"> + <a:documentation>synonyms and other terminological entities</a:documentation> + <ref name="structured_info_Type"/> + </element> + </define> + <define name="xref"> + <element name="xref"> + <optional> + <attribute name="context"> + <a:documentation>optional - TBD</a:documentation> + <ref name="identifier_Type"/> + </attribute> + </optional> + <ref name="linkref"> + <a:documentation>can potentially be an ID in the same graph</a:documentation> + </ref> + </element> + </define> + <define name="literal"> + <optional> + <attribute name="id"> + <a:documentation>rare - for referencing the *occurrence* of this literal</a:documentation> + <ref name="identifier_Type"/> + </attribute> + </optional> + <optional> + <attribute name="datatype"> + <a:documentation>eg xsd:string</a:documentation> + <ref name="identifier_Type"/> + </attribute> + </optional> + <data type="string"> + <a:documentation>the literal itself</a:documentation> + </data> + </define> + <define name="description"> + <element name="description"> + <a:documentation>an optionally-attributed textual description</a:documentation> + <ref name="structured_info_Type"/> + </element> + </define> + <!-- ++ basic types ++ --> + <define name="structured_info_Type"> + <interleave> + <optional> + <attribute name="id"> + <a:documentation>equivalent to triples for datatype values in RDF</a:documentation> + <ref name="identifier_Type"/> + </attribute> + </optional> + <optional> + <attribute name="scope"> + <ref name="identifier_Type"/> + </attribute> + </optional> + <optional> + <attribute name="type"> + <ref name="identifier_Type"/> + </attribute> + </optional> + <element name="label"> + <ref name="literal"/> + </element> + <zeroOrMore> + <ref name="xref"> + <a:documentation>where this synonym is used</a:documentation> + </ref> + </zeroOrMore> + </interleave> + </define> + <define name="identifier_Type"> + <data type="string"/> + </define> + <define name="label_Type"> + <data type="string"/> + </define> +</grammar> Added: obo-database/trunk/xml/xmlspec/obd-core.xsd =================================================================== --- obo-database/trunk/xml/xmlspec/obd-core.xsd (rev 0) +++ obo-database/trunk/xml/xmlspec/obd-core.xsd 2007-02-14 23:25:33 UTC (rev 368) @@ -0,0 +1,276 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.bioontology.org/obd/schema/obd-generic" xmlns:o="http://www.bioontology.org/obd/schema/obd-generic"> + <xs:element name="graphset"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="o:metadata"/> + <xs:element ref="o:graph"/> + </xs:choice> + <xs:attribute name="version" type="xs:string"> + <xs:annotation> + <xs:documentation>: File format version : + should match this schema version (eg 0.01)</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:a... [truncated message content] |
From: <mg...@us...> - 2007-02-12 18:01:47
|
Revision: 367 http://svn.sourceforge.net/obo/?rev=367&view=rev Author: mgibson Date: 2007-02-12 10:01:31 -0800 (Mon, 12 Feb 2007) Log Message: ----------- got ALL working for ontology chooser - woopee! so you can now search all ontologies if you want there are some issues sorting - currently list one ontology after another - i think we will ultimately want to mix the ontologies in some way(nicole?) tagging - i think we will want an indication of what ontology the term came from [GO] in the completion list - as well as in term info - term info shows the id which shows the prefix of the ontology so theres something limited there to indicate but may as well give the full ontology name loads comp list searcher initially with all ontologies as it assumes that ALL is the initial state - may want to be more sophisticated less presumtious about this - explicitly set changed combo box datamodel to take lists insetead of default vectors Modified Paths: -------------- phenote/trunk/src/java/phenote/datamodel/CharField.java phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java phenote/trunk/src/java/phenote/gui/field/CompListSearcher.java phenote/trunk/src/java/phenote/gui/field/RelationCompList.java phenote/trunk/src/java/phenote/gui/field/TermCompList.java phenote/trunk/src/java/phenote/servlet/PhenoteController.java Modified: phenote/trunk/src/java/phenote/datamodel/CharField.java =================================================================== --- phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-02-08 16:31:43 UTC (rev 366) +++ phenote/trunk/src/java/phenote/datamodel/CharField.java 2007-02-12 18:01:31 UTC (rev 367) @@ -84,16 +84,18 @@ } public boolean hasOntology(String ontologyName) { - return getOntologyForName(ontologyName) != null; + try { getOntologyForName(ontologyName); } + catch (OntologyException e) { return false; } + return true; // ? } - /** Returns Ontology with name ontologyName (ignores case), null if dont have it */ - public Ontology getOntologyForName(String ontologyName) { + /** Returns Ontology with name ontologyName (ignores case), ont ex if dont have it */ + public Ontology getOntologyForName(String ontologyName) throws OntologyException { for (Ontology o : getOntologyList()) { if (o.getName().equalsIgnoreCase(ontologyName)) return o; } - return null; + throw new OntologyException(ontologyName+" not found for field "+getName()); } // set whether post composition allowed (from config) */ @@ -134,75 +136,3 @@ public String toString() { return "CharField: "+getName(); } } - // is this getting silly? abstract? --> char field value i think - //public void setOboClass(CharacterI c, OBOClass o) {} - //public OBOClass getOBOClass(CharacterI c) { return null; } -// public CharField(CharFieldEnum c, Ontology o) { -// charFieldEnum = c; -// ontologyList.add(o); -// } - -// public CharField(CharFieldEnum c, String n) { -// charFieldEnum = c; -// name = n; -// } - -// hmmmmmm.... wrap String & OBOClass in one class -// public class CharFieldValue { -// OBOClass oboClassValue -// String stringValue -// CharFieldValue(String) -// CharFieldValue(OBOClass) -// getName() { if isObo return obo.getName; else return string -// getid, .... -// } - -// above would be setValue(CharFieldValue) -// getValue(CharFieldValue) - // separate class? labels? methods? subclasses? - // is this taking enums too far? or a good use of them? - // would it be nice to have a class that wrapped String and OBOClass? - // and all possible field values? or would that be annoying? -// public enum CharFieldEnum { - -// PUB("Pub") { -// public void setValue(CharacterI c, CharFieldValue v) { -// c.setPub(v.getName()); -// } -// public CharFieldValue getValue(CharacterI c) { -// return new CharFieldValue(c.getPub(),c,this); -// } -// }, -// LUMP("Genotype") { // genotype? default? -// public void setValue(CharacterI c, CharFieldValue v) { -// c.setGenotype(v.getName()); -// } -// public CharFieldValue getValue(CharacterI c) { -// return new CharFieldValue(c.getGenotype(),c,this); -// } -// }, -// GENETIC_CONTEXT("Genetic Context") { -// public void setValue(CharacterI c, CharFieldValue v) { -// c.setGeneticContext(v.getOboClass()); -// } -// public CharFieldValue getValue(CharacterI c) { -// return new CharFieldValue(c.getGeneticContext(),c,this); -// } -// }, -// ENTITY("Entity") { -// public void setValue(CharacterI c, CharFieldValue v) { -// c.setEntity(v.getOboClass()); -// } -// public CharFieldValue getValue(CharacterI c) { -// return new CharFieldValue(c.getEntity(),c,this); -// } -// }, -// QUALITY("Quality") { -// public void setValue(CharacterI c, CharFieldValue v) { -// c.setQuality(v.getOboClass()); -// } -// public CharFieldValue getValue(CharacterI c) { -// return new CharFieldValue(c.getQuality(),c,this); -// } -// }; - Modified: phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java 2007-02-08 16:31:43 UTC (rev 366) +++ phenote/trunk/src/java/phenote/gui/field/AbstractAutoCompList.java 2007-02-12 18:01:31 UTC (rev 367) @@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; +import java.util.List; import java.util.Vector; import javax.swing.ComboBoxEditor; import javax.swing.JComboBox; @@ -14,6 +15,8 @@ import javax.swing.event.DocumentListener; //import javax.swing.event.ListSelectionEvent; //import javax.swing.event.ListSelectionListener; +import javax.swing.event.ListDataListener; +import javax.swing.ComboBoxModel; import javax.swing.DefaultComboBoxModel; import javax.swing.text.Document; import javax.swing.plaf.basic.BasicComboBoxEditor; @@ -43,7 +46,8 @@ // default combo box.getSelectedItem sortof does this imperfectly //private OBOClass currentOboClass=null; //private OBOProperty currentRel=null; - private DefaultComboBoxModel defaultComboBoxModel; + //private DefaultComboBoxModel defaultComboBoxModel; + private CompComboBoxModel compComboBoxModel; //private SearchParamsI searchParams; private boolean inTestMode = false; //private AutoTextFieldEditor autoTextFieldEditor; @@ -156,9 +160,11 @@ setText(""); } + /** this is funny for TermCompList this is a CompletionTerm, for RelationCompList this + is a RelationTerm */ protected Object getSelectedObject() throws OboException { - if (defaultComboBoxModel == null) throw new OboException(); // ?? - Object obj = defaultComboBoxModel.getSelectedItem(); + if (compComboBoxModel == null) throw new OboException(); // ?? + Object obj = compComboBoxModel.getSelectedItem(); if (obj == null) throw new OboException(); return obj; } @@ -286,14 +292,18 @@ // i think ultimately we will need to wrap the OBOClass to be able to // have more control over the string - cut off w ... & [syn][obs] tags // returns a vector of CompletionTerms (checks if relations) - Vector v = getSearchItems(input); // abstract method + //Vector v = getSearchItems(input); // abstract method + List<CompletionTerm> l = getSearchItems(input); //if (isRelationshipList()) v = ontology.getStringMatchRelations(input); //else v = getTerms(input); // throws IllegalStateException, Attempt to mutate in notification // this tries to change text field amidst notification hmmmm..... changingCompletionList = true; - defaultComboBoxModel = new DefaultComboBoxModel(v); - setModel(defaultComboBoxModel); + //defaultComboBoxModel = new DefaultComboBoxModel(v); + // could just do comboBoxModel.setList(l); ??? + compComboBoxModel = new CompComboBoxModel(l); + //setModel(defaultComboBoxModel); + setModel(compComboBoxModel); changingCompletionList = false; // showPopup can hang during test but not during real run - bizarre showPopup(); // only show popup on key events - actually only do comp w key @@ -335,7 +345,7 @@ // } // Vector<CompletionTerm>? CompletionItem? - protected abstract Vector getSearchItems(String input); + protected abstract List<CompletionTerm> getSearchItems(String input); // if (isRelationshipList()) return termSearcher.getStringMatchRelations(input); // else return termSearcher.getStringMatchTerms(input);} @@ -472,8 +482,21 @@ autoTextField.processKeyEvent(k); } + private class CompComboBoxModel implements ComboBoxModel { + //private List<CompletionTerm> list; cant do - may also be CompletionRelation! + private List list; + private Object selectedItem; + private CompComboBoxModel(List l) { list = l; } + public Object getSelectedItem() { return selectedItem; } + public void setSelectedItem(Object anItem) { selectedItem = anItem; } + public void addListDataListener(ListDataListener l) {} + public Object getElementAt(int index) { return list.get(index); } + public int getSize() { return list.size(); } + public void removeListDataListener(ListDataListener l) {} + } } +// its own file? class OboException extends Exception { OboException() { super(); } OboException(String s) { super(s); } @@ -508,134 +531,3 @@ // UpdateTransaction ut = new UpdateTransaction(c,cfe,oboClass); // EditManager.inst().updateModel(this,ut); // } -// /** Listens for UseTermEvents from term info,if editModel is true then edits model*/ -// private class ComboUseTermListener implements UseTermListener { -// public void useTerm(UseTermEvent e) { -// setOboClass(e.getTerm()); -// if (editModel) editModel(); -// } -// } -// /** This is touchy stuff - so i want to be able to display info about term in -// TermInfo when user mouses over terms in combo boxes JList. This is not -// explicitly supported by JComboBox. have to dig into its UI to get JList. -// The combo box ui selects items in JList on mouse over, this listener -// will listen for those mouse over selections -// should this be done with a selection event - or is that -// overkill, i guess the question will anyone besides term info -// ever care about these mouse over selection - if so make generic */ -// // void addCompletionListListener(ListSelectionListener lsl) { -// // if (!canGetUIJList()) return; -// // getUIJList().addListSelectionListener(lsl); } -// void enableTermInfoListening(boolean enable) { -// if (!canGetUIJList()) -// return; -// if (enable) -// getUIJList().addListSelectionListener(compListListener); -// else -// getUIJList().removeListSelectionListener(compListListener); -// } - -// /** this is for MOUSE OVER TERM INFO - changes selection */ -// private class CompletionListListener implements ListSelectionListener { -// public void valueChanged(ListSelectionEvent e) { -// Object source = e.getSource(); -// // hate to cast but it is handy here... and it is in fact a JList -// if (!(source instanceof JList)) { -// System.out.println("source of combo box mouse over event is not JList "+ -// source.getClass()); -// return; -// } -// JList jList = (JList)source; -// Object selectedValue = jList.getSelectedValue(); -// if (selectedValue == null) -// return; -// //System.out.println("sel val "+selectedValue.getClass()+" name "+selectedValue); -// // the selected item should be an OBOClass -// if (!(selectedValue instanceof OBOClass)) { -// System.out.println("selected completion term is not obo class " -// +selectedValue.getClass()); -// return; -// } -// OBOClass oboClass = (OBOClass)selectedValue; -// Object src = AbstractAutoCompList.this; -// getSelectionManager().selectTerm(src,oboClass,getUseTermListener()); -// //setTextFromOboClass(oboClass); -// } -// } // end of CompletionListListener inner class - -// private UseTermListener useTermListener; -// private UseTermListener getUseTermListener() { -// if (useTermListener == null) useTermListener = new ComboUseTermListener(); -// return useTermListener; -// } -// CharacterI c = getSelectedCharacter(); // from selectionManager -// CharFieldEnum cfe = charField.getCharFieldEnum(); -// UpdateTransaction ut = new UpdateTransaction(c,cfe,oboClass); -// EditManager.inst().updateModel(this,ut); - //private Ontology getOntology() { return ontology; } - - /** Return true if input String matches name of OBOClass in - * defaultComboBoxModel - rename this? this isnt used anymore - delete? - */ -// boolean isInCompletionList(String input) { -// if (defaultComboBoxModel == null) -// return false; -// if (input == null) { -// return false; -// } -// // this is wrong as it holds OBOClasses not Strings! -// //return defaultComboBoxModel.getIndexOf(input) != -1; -// // have to go through all OBOClasses and extract there names - bummer -// // most likely input is selected one check that first -// OBOClass selectedClass = getSelectedOboClass(); -// if (selectedClass != null && input.equals(selectedClass.getName())) -// return true; -// // selected failed(is this possible?) - try everything in the list then... -// for (int i=0; i<defaultComboBoxModel.getSize(); i++) { -// if (input.equals(getCompListOboClass(i).getName())) -// return true; -// } -// return false; -// } - - // mac bug workaround where list covers up textfield on < 12 items no scroll - // from http://www.orbital-computer.de/JComboBox/#usage - // it does note this may cause class cast excpetions?? - // it does cause exception when down arror is typed... hmmm... - //setUI(new BasicComboBoxUI()); // now setting metal look & feel for whole app -//String ontology,AutoComboBox cb) { - //private String previousModelValue=null; - //this.ontology = ontology; - //comboBox = cb; - //setTableFromField(ontology); - //t.editModel(); // or charField.editModel? - // CharacterChangeEvent e = new CharacterChangeEvent(t); - // OR CharEditManager.inst().updateModel(c,cfe,input,previousModelValue); - // CEM.handleTransaction(new UT), CEM.updateModel(UT) - // fireChangeEvent(e); - - // check if input is a real term - i think we can get away with checking - // if in present term completion list - not sure - // i think this is replaced by check above - make sure does the same... -// boolean valid = isInCompletionList(oboClass); //input); -// if (!valid) -// return; - - -// doesnt work - would need to subclass editor component i thing - hassle -// // for TestPhenote -// void simulateBackspace() { -// KeyEvent ke = new KeyEvent(this,KeyEvent.VK_DELETE,java.util.Calendar.getInstance().getTimeInMillis(),0,KeyEvent.VK_UNDEFINED,KeyEvent.CHAR_UNDEFINED); -// //patoComboBox.processKeyEvent(ke); -// getEditor().getEditorComponent().processKeyEvent(ke); - -// } -// Document d = e.getDocument(); -// String input; -// try { -// input = d.getText(0,d.getLength()); -// } -// catch (javax.swing.text.BadLocationException ex) { -// System.out.println(ex); -// return; -// } Modified: phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-02-08 16:31:43 UTC (rev 366) +++ phenote/trunk/src/java/phenote/gui/field/CharFieldGui.java 2007-02-12 18:01:31 UTC (rev 367) @@ -228,7 +228,8 @@ //fieldPanel.getSearchParams(),enableListeners); // enableListeners - if false then ACB wont directly edit model (post comp) compListSearcher = - new CompListSearcher(charField.getFirstOntology(),fieldPanel.getSearchParams()); + new CompListSearcher(charField.getOntologyList(),fieldPanel.getSearchParams()); + //new CompListSearcher(charField.getFirstOntology(),fieldPanel.getSearchParams()); if (isRelationshipList()) { relCompList = new RelationCompList(compListSearcher,enableListeners,charField); } Modified: phenote/trunk/src/java/phenote/gui/field/CompListSearcher.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/CompListSearcher.java 2007-02-08 16:31:43 UTC (rev 366) +++ phenote/trunk/src/java/phenote/gui/field/CompListSearcher.java 2007-02-12 18:01:31 UTC (rev 367) @@ -5,7 +5,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import java.util.Vector; +//import java.util.Vector; import org.geneontology.oboedit.datamodel.OBOClass; import org.geneontology.oboedit.datamodel.OBOProperty; @@ -21,121 +21,88 @@ for syns & obsoletes & to cut off long terms */ public class CompListSearcher { - private Ontology ontology; + //private Ontology ontology; + //private boolean searchAll=false; + private List<Ontology> ontologyList = new ArrayList<Ontology>(3); private SearchParamsI searchParams; + /** Ontology - the initial ontology to search, setOntology changes this, + initially only searches the one ontology (not ALL) - used by servlet which + currently doesnt do ALL */ public CompListSearcher(Ontology o,SearchParamsI sp) { setOntology(o); searchParams = sp; } + /** l - initial list of ontologies to search, as in ALL. used by CharFieldGui + to set list to all ontols in field as initial setting is ALL - is this funny? */ + public CompListSearcher(List<Ontology> l,SearchParamsI sp) { + setOntologies(l); + searchParams = sp; + } + + //void setSearchAll(boolean s) { searchAll = s; } + /** Set the ontology to search. Ontology chooser may set this */ - void setOntology(Ontology o) { ontology = o; } + void setOntology(Ontology o) { + //setSearchAll(false); // ?? + //ontology = o; + // re init or else will modify list passed in in setOntologies + ontologyList = new ArrayList<Ontology>(3); + ontologyList.add(o); + } - public Vector<CompletionRelation> getStringMatchRelations(String input) { - Vector<CompletionRelation> matches = new Vector<CompletionRelation>(); - for (OBOProperty rel : ontology.getSortedRelations()) { - if (rel.toString().contains(input)) - matches.add(new CompletionRelation(rel)); + void setOntologies(List<Ontology> l) { + ontologyList = l; // (List<Ontology>)l.clone(); cant clone interfaces + } + +// public Vector<CompletionRelation> getStringMatchRelations(String input) { +// Vector<CompletionRelation> matches = new Vector<CompletionRelation>(); +// for (OBOProperty rel : ontology.getSortedRelations()) { +// if (rel.toString().contains(input)) +// matches.add(new CompletionRelation(rel)); +// } +// return matches; +// } + public List<CompletionRelation> getStringMatchRelations(String input) { + List<CompletionRelation> matches = new ArrayList<CompletionRelation>(); + // most likely only 1 relation ontology, but no harm being general + for (Ontology ontology : ontologyList) { + for (OBOProperty rel : ontology.getSortedRelations()) { + if (rel.toString().contains(input)) + matches.add(new CompletionRelation(rel)); + } } return matches; } - /** Returns a Vector of OBOClass from ontology that contain input string + /** Returns a List of CompletionTerms from ontology that contain input string constrained by compParams. compParams specifies syns,terms,defs,& obs - should input be just part of search params? - its a vector as thats what ComboBox requires - put in separate class? */ + should input be just part of search params? called by servlet & standalone now */ public List<CompletionTerm> getStringMatchTermList(String input) { List<CompletionTerm> searchTerms = new ArrayList<CompletionTerm>(); if (input == null || input.equals("")) return searchTerms; - // gets term set for currently selected ontology + // gets term set for currently selected ontology(s) //Set ontologyTermList = getCurrentOntologyTermSet(); - List<OBOClass> ontologyTermList = ontology.getSortedTerms(); // non obsolete - searchTerms = getSearchTermList(input,ontologyTermList); - - // if obsoletes set then add them in addition to regulars - if (searchParams.searchObsoletes()) { - ontologyTermList = ontology.getSortedObsoleteTerms(); - List obsoletes = getSearchTermList(input,ontologyTermList); - searchTerms.addAll(obsoletes); + // THIS IS WRONG! or is it? + for (Ontology ontology : ontologyList) { + List<OBOClass> ontologyTermList = ontology.getSortedTerms(); // non obsolete + searchTerms.addAll(getSearchTermList(input,ontologyTermList)); + + // if obsoletes set then add them in addition to regulars + if (searchParams.searchObsoletes()) { + ontologyTermList = ontology.getSortedObsoleteTerms(); + List obsoletes = getSearchTermList(input,ontologyTermList); + searchTerms.addAll(obsoletes); + } } return searchTerms; } - /** Returns a Vector of OBOClass from ontology that contain input string - constrained by compParams. compParams specifies syns,terms,defs,& obs - should input be just part of search params? - its a vector as thats what ComboBox requires - put in separate class? */ - public Vector<CompletionTerm> getStringMatchTerms(String input) { - Vector<CompletionTerm> searchTerms = new Vector<CompletionTerm>(); - if (input == null || input.equals("")) - return searchTerms; - // gets term set for currently selected ontology - //Set ontologyTermList = getCurrentOntologyTermSet(); - List<OBOClass> ontologyTermList = ontology.getSortedTerms(); // non obsolete - searchTerms = getSearchTerms(input,ontologyTermList); - - // if obsoletes set then add them in addition to regulars - if (searchParams.searchObsoletes()) { - ontologyTermList = ontology.getSortedObsoleteTerms(); - Vector obsoletes = getSearchTerms(input,ontologyTermList); - searchTerms.addAll(obsoletes); - } - return searchTerms; - } - /** helper fn for getSearchTerms(String,SearhParamsI) */ - private Vector<CompletionTerm> getSearchTerms(String input, - List<OBOClass> ontologyTermList) { - SearchTermList searchTermList = new SearchTermList(); - if (ontologyTermList == null) - return searchTermList.getVector(); - - //boolean ignoreCase = true; // param? //if (ignoreCase) - //input = input.toLowerCase(); // done in CompletionTerm - - // i think iterators are more efficient than get(i) ?? - Iterator<OBOClass> iter = ontologyTermList.iterator(); - while (iter.hasNext()) { - - OBOClass oboClass = iter.next(); - - CompletionTerm ct = new CompletionTerm(oboClass); - if (ct.matches(input,searchParams)) { - searchTermList.addTerm(ct); - } - -// String originalTerm = oboClass.getName();//toString(); -// boolean termAdded = false; -// if (searchParams.searchTerms()) { -// // adds originalTerm to searchTerms if match (1st if exact) -// termAdded = compareAndAddTerm(input,originalTerm,oboClass,searchTermList); -// if (termAdded) continue;} -// if (searchParams.searchSynonyms()) { -// Set synonyms = oboClass.getSynonyms(); -// for (Iterator i = synonyms.iterator(); i.hasNext() &&!termAdded; ) { -// String syn = i.next().toString(); -// //log().debug("syn "+syn+" for "+originalTerm); -// termAdded = compareAndAddTerm(input,syn,oboClass,searchTermList); -// //if (termAdded) continue; // woops continues this for not the outer! -// } -// } -// if (termAdded) continue; -// if (searchParams.searchDefinitions()) { -// String definition = oboClass.getDefinition(); -// if (definition != null & !definition.equals("")) -// termAdded = compareAndAddTerm(input,definition,oboClass,searchTermList); -// if (termAdded) continue; // not really necesary as its last } - } - return searchTermList.getVector(); - } - - /** helper fn for getSearchTerms(String,SearhParamsI) */ private List<CompletionTerm> getSearchTermList(String input, List<OBOClass> ontologyTermList) { SearchTermList searchTermList = new SearchTermList(); @@ -172,46 +139,10 @@ can be syn obs term or def and its lost here i think these methods need to be moved to gui.TermSearcher that utilizes Ontology but produces CompListTerms */ -// private boolean compareAndAddTerm(String input, String compareTerm, OBOClass oboClass, -// SearchTermList searchTermList) { - -// //String oboTerm = oboClass.getName(); - -// String lowerComp = compareTerm; -// boolean ignoreCase = true; // discard? param for? -// if (ignoreCase) -// lowerComp = compareTerm.toLowerCase(); - -// //boolean doContains = true; // discard? param for? -// // exact match goes first in list -// if (lowerComp.equals(input)) { -// searchTermList.addTermFirst(oboClass); // adds if not present -// return true; -// } -// // new paradigm - put starts with first -// else if (lowerComp.startsWith(input)) { -// searchTermList.addTerm(oboClass); -// return true; -// } -// // Contains -// else if (contains(lowerComp,input)) { // && !termFilter(lowerComp) -> Ont -// searchTermList.addContainsTerm(oboClass); -// return true; -// } -// return false; -// } - - // 1.5 has a contains! use when we shift private boolean contains(String term, String input) { return term.contains(input); // 1.5!! - //return term.indexOf(input) != -1; } - // now done in Ontology.filterList() so dont have to check every time -// /** Oboedit getTerms returns some terms with obo: prefix that should be filtered -// * out. Returns true if starts with obo: */ -// private boolean termFilter(String term) { -// return term.startsWith("obo:"); // take these out of ontology? -// } + /** this data structure is handy for putting starts with before contains! UniqueTermList -> SearchTermList*/ private class SearchTermList { @@ -245,17 +176,17 @@ contains.add(ct); } - private Vector<CompletionTerm> getVector() { - //startsWithTerms.addAll(containTerms); return startsWithTerms; - Vector<CompletionTerm> sortedTerms = new Vector<CompletionTerm>(); - sortedTerms.addAll(startsWithTerms); - sortedTerms.addAll(containTerms); - sortedTerms.addAll(startsWithSyns); - sortedTerms.addAll(containSyns); - sortedTerms.addAll(definitions); - sortedTerms.addAll(obsoletes); - return sortedTerms; - } +// private Vector<CompletionTerm> getVector() { +// //startsWithTerms.addAll(containTerms); return startsWithTerms; +// Vector<CompletionTerm> sortedTerms = new Vector<CompletionTerm>(); +// sortedTerms.addAll(startsWithTerms); +// sortedTerms.addAll(containTerms); +// sortedTerms.addAll(startsWithSyns); +// sortedTerms.addAll(containSyns); +// sortedTerms.addAll(definitions); +// sortedTerms.addAll(obsoletes); +// return sortedTerms; +// } private List<CompletionTerm> getList() { //startsWithTerms.addAll(containTerms); return startsWithTerms; @@ -271,6 +202,110 @@ } } + // now done in Ontology.filterList() so dont have to check every time +// /** Oboedit getTerms returns some terms with obo: prefix that should be filtered +// * out. Returns true if starts with obo: */ +// private boolean termFilter(String term) { +// return term.startsWith("obo:"); // take these out of ontology? +// } + // finally got rid of default vector model for AbstractAutoCompList! +// /** Returns a Vector of OBOClass from ontology that contain input string +// constrained by compParams. compParams specifies syns,terms,defs,& obs +// should input be just part of search params? +// its a vector as thats what ComboBox/TermCompList requires */ +// public Vector<CompletionTerm> getStringMatchTerms(String input) { +// Vector<CompletionTerm> searchTerms = new Vector<CompletionTerm>(); +// if (input == null || input.equals("")) +// return searchTerms; + +// // gets term set for currently selected ontology +// //Set ontologyTermList = getCurrentOntologyTermSet(); +// List<OBOClass> ontologyTermList = ontology.getSortedTerms(); // non obsolete +// searchTerms = getSearchTerms(input,ontologyTermList); + +// // if obsoletes set then add them in addition to regulars +// if (searchParams.searchObsoletes()) { +// ontologyTermList = ontology.getSortedObsoleteTerms(); +// Vector obsoletes = getSearchTerms(input,ontologyTermList); +// searchTerms.addAll(obsoletes); +// } +// return searchTerms; +// } + +// /** helper fn for getSearchTerms(String,SearhParamsI) */ +// private Vector<CompletionTerm> getSearchTerms(String input, +// List<OBOClass> ontologyTermList) { +// SearchTermList searchTermList = new SearchTermList(); +// if (ontologyTermList == null) +// return searchTermList.getVector(); + +// //boolean ignoreCase = true; // param? //if (ignoreCase) +// //input = input.toLowerCase(); // done in CompletionTerm + +// // i think iterators are more efficient than get(i) ?? +// Iterator<OBOClass> iter = ontologyTermList.iterator(); +// while (iter.hasNext()) { + +// OBOClass oboClass = iter.next(); + +// CompletionTerm ct = new CompletionTerm(oboClass); +// if (ct.matches(input,searchParams)) { +// searchTermList.addTerm(ct); +// } + +// } +// return searchTermList.getVector(); +// } + +// private boolean compareAndAddTerm(String input, String compareTerm, OBOClass oboClass, +// SearchTermList searchTermList) { + +// //String oboTerm = oboClass.getName(); + +// String lowerComp = compareTerm; +// boolean ignoreCase = true; // discard? param for? +// if (ignoreCase) +// lowerComp = compareTerm.toLowerCase(); + +// //boolean doContains = true; // discard? param for? +// // exact match goes first in list +// if (lowerComp.equals(input)) { +// searchTermList.addTermFirst(oboClass); // adds if not present +// return true; +// } +// // new paradigm - put starts with first +// else if (lowerComp.startsWith(input)) { +// searchTermList.addTerm(oboClass); +// return true; +// } +// // Contains +// else if (contains(lowerComp,input)) { // && !termFilter(lowerComp) -> Ont +// searchTermList.addContainsTerm(oboClass); +// return true; +// } +// return false; +// } +// String originalTerm = oboClass.getName();//toString(); +// boolean termAdded = false; +// if (searchParams.searchTerms()) { +// // adds originalTerm to searchTerms if match (1st if exact) +// termAdded = compareAndAddTerm(input,originalTerm,oboClass,searchTermList); +// if (termAdded) continue;} +// if (searchParams.searchSynonyms()) { +// Set synonyms = oboClass.getSynonyms(); +// for (Iterator i = synonyms.iterator(); i.hasNext() &&!termAdded; ) { +// String syn = i.next().toString(); +// //log().debug("syn "+syn+" for "+originalTerm); +// termAdded = compareAndAddTerm(input,syn,oboClass,searchTermList); +// //if (termAdded) continue; // woops continues this for not the outer! +// } +// } +// if (termAdded) continue; +// if (searchParams.searchDefinitions()) { +// String definition = oboClass.getDefinition(); +// if (definition != null & !definition.equals("")) +// termAdded = compareAndAddTerm(input,definition,oboClass,searchTermList); +// if (termAdded) continue; // not really necesary as its last } // private void addTerm(OBOClass oboClass) { // addTerm(oboClass,false); // } Modified: phenote/trunk/src/java/phenote/gui/field/RelationCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/RelationCompList.java 2007-02-08 16:31:43 UTC (rev 366) +++ phenote/trunk/src/java/phenote/gui/field/RelationCompList.java 2007-02-12 18:01:31 UTC (rev 367) @@ -1,6 +1,7 @@ package phenote.gui.field; -import java.util.Vector; +import java.util.List; +//import java.util.Vector; import org.apache.log4j.Logger; @@ -100,10 +101,14 @@ /** Returns a vector of CompletionRelations for auto completion which contain input, using search params */ - protected Vector getSearchItems(String input) { +// protected Vector getSearchItems(String input) { +// return getCompListSearcher().getStringMatchRelations(input); +// } + protected List getSearchItems(String input) { return getCompListSearcher().getStringMatchRelations(input); } + private Logger log; private Logger log() { if (log == null) log = Logger.getLogger(getClass()); Modified: phenote/trunk/src/java/phenote/gui/field/TermCompList.java =================================================================== --- phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2007-02-08 16:31:43 UTC (rev 366) +++ phenote/trunk/src/java/phenote/gui/field/TermCompList.java 2007-02-12 18:01:31 UTC (rev 367) @@ -32,6 +32,7 @@ // only term comp lists need ontology choosers - if that changes move to AACL private JComboBox ontologyChooserCombo; private CharFieldGui charFieldGui; + private static final String ALL = "ALL"; TermCompList(CompListSearcher s,boolean editModel,CharFieldGui cfg) { super(s,editModel,cfg.getCharField()); @@ -39,7 +40,6 @@ enableTermInfoListening(); if (hasMoreThanOneOntology()) // super AACL initOntologyChooser(getCharField()); - } @@ -75,8 +75,8 @@ } } - protected Vector getSearchItems(String input) { - return getCompListSearcher().getStringMatchTerms(input); + protected List<CompletionTerm> getSearchItems(String input) { + return getCompListSearcher().getStringMatchTermList(input); } /** The user has selected a term from the list, validate and set current obo class @@ -227,6 +227,7 @@ private void initOntologyChooser(CharField charField) { ontologyChooserCombo = new JComboBox(); // need to add in ALL + ontologyChooserCombo.addItem(ALL); for (Ontology o : charField.getOntologyList()) { ontologyChooserCombo.addItem(o.getName()); } @@ -243,9 +244,18 @@ private class OntologyChooserListener implements ActionListener { public void actionPerformed(ActionEvent e) { String s = ontologyChooserCombo.getSelectedItem().toString(); + + // ALL + if (isAll(s)) { + //getCompListSearcher().setSearchAll(true); + getCompListSearcher().setOntologies(getCharField().getOntologyList()); + return; + } + + // SINGLE ONTOLOGY try { - Ontology o = OntologyManager.inst().getOntologyForName(s); - //getCompList().setOntology(o); // termComp? + //Ontology o = OntologyManager.inst().getOntologyForName(s); + Ontology o = getCharField().getOntologyForName(s); getCompListSearcher().setOntology(o); } catch (OntologyException ex) { @@ -253,6 +263,7 @@ return; } } + private boolean isAll(String s) { return s.equals(ALL); } } } Modified: phenote/trunk/src/java/phenote/servlet/PhenoteController.java =================================================================== --- phenote/trunk/src/java/phenote/servlet/PhenoteController.java 2007-02-08 16:31:43 UTC (rev 366) +++ phenote/trunk/src/java/phenote/servlet/PhenoteController.java 2007-02-12 18:01:31 UTC (rev 367) @@ -103,24 +103,25 @@ * @param ontologyName * @param field */ - private String getHtmlCompletionList(String userInput, String ontologyName, String field) { - StringBuffer sb = new StringBuffer("<ul>"); - try { - Vector<CompletionTerm> v = getCompListSearcher(ontologyName).getStringMatchTerms(userInput); - //Vector<OBOClass> v = ontology.getStringMatchTerms(userInput, getSearchParams()); - // a tad cheesy but if hit no terms then auto comp shows nothing - // add an empty item should show then an empty list? - if (v.isEmpty()) - sb.append("<li></li>"); - for (CompletionTerm ct : v) - sb.append(makeCompListHtmlItem(ct, ontologyName, field)); - } - catch (OntologyException e) { - sb.append(e.getMessage()); - } - sb.append("</ul>"); - return sb.toString(); - } +// @SuppressWarnings("unused") +// private String { +// StringBuffer sb = new StringBuffer("<ul>"); +// try { +// Vector<CompletionTerm> v = getCompListSearcher(ontologyName).getStringMatchTerms(userInput); +// //Vector<OBOClass> v = ontology.getStringMatchTerms(userInput, getSearchParams()); +// // a tad cheesy but if hit no terms then auto comp shows nothing +// // add an empty item should show then an empty list? +// if (v.isEmpty()) +// sb.append("<li></li>"); +// for (CompletionTerm ct : v) +// sb.append(makeCompListHtmlItem(ct, ontologyName, field)); +// } +// catch (OntologyException e) { +// sb.append(e.getMessage()); +// } +// sb.append("</ul>"); +// return sb.toString(); +// } private String makeCompListHtmlItem(CompletionTerm term, String ontol, String field) { String id = term.getID(); @@ -135,6 +136,8 @@ } private CompListSearcher getCompListSearcher(String ontologyName) throws OntologyException { + // This is currently rigged for 1 ontology, eventually may want to search all ontologies + // in a field as standalone does - with ALL option return new CompListSearcher(getOntology(ontologyName), getSearchParams()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-02-08 16:32:03
|
Revision: 366 http://svn.sourceforge.net/obo/?rev=366&view=rev Author: mgibson Date: 2007-02-08 08:31:43 -0800 (Thu, 08 Feb 2007) Log Message: ----------- change jnlps to new command line param -i to -u Modified Paths: -------------- phenote/trunk/doc/phenote-website/phenote-flybase.jnlp phenote/trunk/doc/phenote-website/phenote-human.jnlp phenote/trunk/doc/phenote-website/phenote-zfin.jnlp Modified: phenote/trunk/doc/phenote-website/phenote-flybase.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-flybase.jnlp 2007-02-07 23:05:32 UTC (rev 365) +++ phenote/trunk/doc/phenote-website/phenote-flybase.jnlp 2007-02-08 16:31:43 UTC (rev 366) @@ -38,7 +38,7 @@ <jar href="jars/log4j-1.2.13.jar" /> </resources> <application-desc main-class="phenote.main.Phenote"> - <argument>-c</argument> + <argument>-u</argument> <argument>/flybase.cfg</argument> </application-desc> </jnlp> Modified: phenote/trunk/doc/phenote-website/phenote-human.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-human.jnlp 2007-02-07 23:05:32 UTC (rev 365) +++ phenote/trunk/doc/phenote-website/phenote-human.jnlp 2007-02-08 16:31:43 UTC (rev 366) @@ -38,7 +38,7 @@ <jar href="jars/log4j-1.2.13.jar" /> </resources> <application-desc main-class="phenote.main.Phenote"> - <argument>-c</argument> + <argument>-u</argument> <argument>/human.cfg</argument> </application-desc> </jnlp> Modified: phenote/trunk/doc/phenote-website/phenote-zfin.jnlp =================================================================== --- phenote/trunk/doc/phenote-website/phenote-zfin.jnlp 2007-02-07 23:05:32 UTC (rev 365) +++ phenote/trunk/doc/phenote-website/phenote-zfin.jnlp 2007-02-08 16:31:43 UTC (rev 366) @@ -38,7 +38,7 @@ <jar href="jars/log4j-1.2.13.jar" /> </resources> <application-desc main-class="phenote.main.Phenote"> - <argument>-c</argument> + <argument>-u</argument> <argument>/zfin-standalone.cfg</argument> </application-desc> </jnlp> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mg...@us...> - 2007-02-07 23:22:13
|
Revision: 365 http://svn.sourceforge.net/obo/?rev=365&view=rev Author: mgibson Date: 2007-02-07 15:05:32 -0800 (Wed, 07 Feb 2007) Log Message: ----------- if all other config loading fails then flybase.cfg is loaded - like if my-phenote.cfg gets corrupted or whatever - this shouldnt happen but ya never know - at least it does something in these cases Modified Paths: -------------- phenote/trunk/src/java/phenote/config/Config.java phenote/trunk/src/java/phenote/main/CommandLine.java phenote/trunk/src/java/phenote/main/Phenote.java Modified: phenote/trunk/src/java/phenote/config/Config.java =================================================================== --- phenote/trunk/src/java/phenote/config/Config.java 2007-02-07 22:46:44 UTC (rev 364) +++ phenote/trunk/src/java/phenote/config/Config.java 2007-02-07 23:05:32 UTC (rev 365) @@ -29,9 +29,9 @@ public class Config { - public final static String DEFAULT_CONFIG_FILE = "flybase.cfg"; + public final static String FLYBASE_DEFAULT_CONFIG_FILE = "flybase.cfg"; private static Config singleton = new Config(); - private String configFile = DEFAULT_CONFIG_FILE; + private String configFile = FLYBASE_DEFAULT_CONFIG_FILE; private List<DataAdapterConfig> dataAdapConfList; /** only enabled fields */ private List<FieldConfig> enabledFields = new ArrayList<FieldConfig>(); @@ -81,6 +81,11 @@ setConfigFile(getDefaultFile(),true,false,false); } + /** if all else fails revert to flybase which should be there */ + public void loadDefaultFlybaseConfigFile() throws ConfigException { + setConfigFile(FLYBASE_DEFAULT_CONFIG_FILE,true,false,false); + } + /** default file should be in .phenote/conf/my-phenote.cfg. if not set yet then just do good ol flybase.cfg */ private String getDefaultFile() { @@ -90,7 +95,7 @@ file = r.readLine(); } catch (IOException e) {} if (file == null || file.equals("")) - file = DEFAULT_CONFIG_FILE; + file = FLYBASE_DEFAULT_CONFIG_FILE; return file; } @@ -139,6 +144,9 @@ // this is the "species" conf file - eg ~/.phenote/conf/flybase.cfg File dotConfFile = new File(getDotPhenoteConfDir(),nameOfFile); + if (!passedInExists && !dotConfFile.exists()) + throw new ConfigException("Cfg file doesnt exist in app nor .phenote/conf"); + if (mergeConfigs && passedInExists) { mergeNewWithOld(passedInUrl,dotConfFile); } Modified: phenote/trunk/src/java/phenote/main/CommandLine.java =================================================================== --- phenote/trunk/src/java/phenote/main/CommandLine.java 2007-02-07 22:46:44 UTC (rev 364) +++ phenote/trunk/src/java/phenote/main/CommandLine.java 2007-02-07 23:05:32 UTC (rev 365) @@ -153,7 +153,7 @@ +"loading default config"); try { Config.inst().loadDefaultConfigFile(); } catch (ConfigException ce) { - System.out.println("bummer - even default config fails. we're hosed! "+ce); + System.out.println("bummer - even default config fails. uh oh "+ce); } } Modified: phenote/trunk/src/java/phenote/main/Phenote.java =================================================================== --- phenote/trunk/src/java/phenote/main/Phenote.java 2007-02-07 22:46:44 UTC (rev 364) +++ phenote/trunk/src/java/phenote/main/Phenote.java 2007-02-07 23:05:32 UTC (rev 365) @@ -116,7 +116,11 @@ if (!Config.inst().isInitialized()) { try { Config.inst().loadDefaultConfigFile(); } catch (ConfigException ce) { - System.out.println("default config has failed. we're hosed! "+ce); + System.out.println("default config has failed. "+ce+" loading flybase default"); + try { Config.inst().loadDefaultFlybaseConfigFile(); } + catch (ConfigException c) { + System.out.println("flybase default config has failed. We're hosed! "+c); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |