tag:blogger.com,1999:blog-69504345608232901642024-02-20T02:44:55.536-08:00phylr gsocdjiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-6950434560823290164.post-83439121651737873842009-07-30T13:46:00.001-07:002009-07-31T08:26:21.777-07:00Postgres 8.3: Many ways to join a table<div xmlns='http://www.w3.org/1999/xhtml'>In BioSQL, PhyloDB module, there are tables like this:<br/><br/><textarea name='code' language='sql'><br/>CREATE TABLE tree_qualifier_value<br/>(<br/> tree_id integer NOT NULL, -- The tree with which the metadata is being associated.<br/> term_id integer NOT NULL, -- The name of the metadate element as a term from a controlled vocabulary (or ontology).<br/> "value" text, -- The value of the metadata element.<br/> rank integer NOT NULL DEFAULT 0, -- The index of the metadata value if there is more than one value for the same metadata element. If there is only one value, this may be left at the default of zero.<br/> CONSTRAINT tree_qualifier_value_pkey PRIMARY KEY (tree_id, term_id, rank),<br/> CONSTRAINT fkterm_treequal FOREIGN KEY (term_id)<br/> REFERENCES term (term_id) MATCH SIMPLE<br/> ON UPDATE NO ACTION ON DELETE NO ACTION,<br/> CONSTRAINT fktree_treequal FOREIGN KEY (tree_id)<br/> REFERENCES tree (tree_id) MATCH SIMPLE<br/> ON UPDATE NO ACTION ON DELETE CASCADE<br/>)<br/></textarea><br/><br/>This becomes a problem when I want to retrieve values that are related to one tree. For example, here are some data from the table<br/><br/><table width='500' padding='5'><tbody><tr align='center'><td>tree_id</td><td>term_id</td><td>value</td><td>rank</td></tr><tr><td>2</td><td>1</td><td>"Wagner78"</td><td>0</td></tr><tr><td>2</td><td>2</td><td>"Single Tree"</td><td>0</td></tr><tr><td>2</td><td>3</td><td>"Wagner78"</td><td>0</td></tr><tr><td>2</td><td>5</td><td>"885"</td><td>0</td></tr><tr><td>2</td><td>6</td><td>"Ladiges, P. Y.; Humphries, C. J."</td><td>0</td></tr><tr><td>2</td><td>7</td><td>"A cladistic study of Arillastrum, Angophora, and Eucalyptus (Myrtaceae). "</td><td>0</td></tr><tr><td>2</td><td>8</td><td>"Transformed cladistic; character compatibility; branch and bound, and Farris-Wagner methods ...</td><td>0</td></tr></tbody></table><br/><br/>There is another table <i>term</i> that has term_id, and name. For example, the term (term_id=2) has the name 'dc.title'<br/>I found a few ways to join the data and create a tabular format that each row belongs to one tree_id. <br/><br/>First, I can use what is called <i>self join</i> :<br/><br/><textarea name='code' language='sql'>select t1.tree_id, t1.value as dc_title, t2.value as dc_identifier, t3.value as dc_abstract<br/>FROM tree_qualifier_value t1, tree_qualifier_value t2, tree_qualifier_value t3, term te1, term te2, term te3<br/>where t1.tree_id = t2.tree_id and t2.tree_id = t3.tree_id and t1.term_id = te1.term_id and te1.name='dc.title' and t2.term_id = te2.term_id and te2.name='dc.identifier'<br/>and t3.term_id = te3.term_id and te3.name='dc.abstract'</textarea><br/><br/>Here I used different table aliases for the same table, and each alias represents a different instance of the table. <br/><br/>Another way is to use <i>FULL OUTER JOIN</i>:<br/><textarea name='code' language='sql'>select * from <br/>(SELECT tree_id, tq.value as dc_identifier FROM tree_qualifier_value tq, term te WHERE tq.term_id = te.term_id and te.name='dc.identifier') as ide<br/>FULL OUTER JOIN<br/>(SELECT tree_id, tq.value as dc_title FROM tree_qualifier_value tq, term te WHERE tq.term_id = te.term_id and te.name='dc.title' ) as title<br/>using (tree_id)<br/>FULL OUTER JOIN<br/>(SELECT tree_id, tq.value as dc_abstract FROM tree_qualifier_value tq, term te WHERE tq.term_id = te.term_id and te.name='dc.abstract' ) as abstract<br/>USING (tree_id)<br/></textarea><br/><br/>Interestingly, I also tried to use the PostgreSQL XML support to generate a piece of XML from that table. Here instead of using JOIN, I used UNION: <br/><br/><textarea name='code' language='sql'>SELECT tree_id, xmlagg(xvalue) as xml FROM (<br/>SELECT tree_id, xmlforest(tq.value as "dc:identifier") as xvalue <br/>FROM tree_qualifier_value tq, term te <br/>WHERE tq.term_id = te.term_id and te.name='dc.identifier' <br/>UNION ALL <br/>SELECT tq.tree_id, xmlforest(tq.value as "dc:title") as xvalue <br/>FROM tree_qualifier_value tq, term te <br/>WHERE tq.term_id = te.term_id and te.name='dc.title' <br/>UNION ALL <br/>SELECT tq.tree_id, xmlforest(tq.value as "dc:abstract") as xvalue <br/>FROM tree_qualifier_value tq, term te <br/>WHERE tq.term_id = te.term_id and te.name='dc.abstract'<br/>) AS tab GROUP BY tree_id</textarea><br/><br/>This will produce some thing like: <br/><br/><textarea name='code' language='xml'><br/>"<dc:identifier>885</dc:identifier><dc:title>A cladistic study of Arillastrum, Angophora, and Eucalyptus (Myrtaceae). </dc:title><dc:abstract>Transformed cladistic; character compatibility; branch and bound, and Farris-Wagner methods ...</dc:abstract>"<br/></textarea><br/><br/>For a table with 5287 different tree_id, and a total of 42320 rows, the three method takes 1080ms, 1136ms, 1338ms (average of three tests). With no surprise that the last method takes longer as it puts the XML together. <br/><br/><div class='zemanta-pixie'><img src='http://img.zemanta.com/pixy.gif?x-id=a4c361b8-438e-874d-9d66-4b56d5e2140e' alt='' class='zemanta-pixie-img'/></div></div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0tag:blogger.com,1999:blog-6950434560823290164.post-75173476322381243862009-07-21T10:26:00.001-07:002009-07-23T07:22:52.306-07:00Setting up BioSQL 1.0.1 on Postgresql 8.3, ubuntu 9.04<div xmlns='http://www.w3.org/1999/xhtml'><a href='http://www.biosql.org'>BioSQL</a> is a relational model that covers many kinds of data models in biology. The core schema has models for sequences, features, annotations, taxonomy (focused on NCBI taxonomy), and ontologies. It also has a PhyloDB extension module. <br/>In this post, I'll record how I setup BioSQL on a Postgresql database on Ubuntu Jaunty (9.04)<br/><big>Install PostgreSQL</big><br/>There is a very good step-by-step instruction on how to install PostgreSQL on Ubuntu. Here is the link:<br/>https://help.ubuntu.com/community/PostgreSQL<br/>Even though it doesn't cover Ubuntu version after 8.04, and it says it's for PostgreSQL 8.1, I can still follow all the steps to install PostgreSQL 8.3 on Jaunty.<br/><big>Install BioSQL</big><br/>The BioSQL website has detailed installation instructions. But it is also very verbose, and the page has instructions for MySQL, PostgreSQL, and Oracle, even steps on how to install the databases. I wish there were separate pages for each database, though. Anyway, creating a BioSQL database on PostgreSQL is very straight forward. Here is what you all need to do:<br/><pre>> createdb biosql <br />> psql biosql < biosqldb-pg.sql</pre><br/>To add the PhyloDB extension, <a href='http://www.biosql.org/wiki/Extensions'>first follow the instruction to check it out from SVN</a>. Then do<br/><pre>> psql biosql < biosql-phylodb-pg.sql</pre><br/><big>Import NCBI Taxonomy into BioSQL</big><br/>BioSQL has several scripts to import data into the database. Here I am just explaining how to import the NCBI taxonomy into the database. <br/>First bioperl and bioperl-db need to be installed. Again, these steps are included in <a href='http://code.open-bio.org/svnweb/index.cgi/biosql/view/biosql-schema/trunk/INSTALL'>the BioSQL installation page</a>. However, it's much easier to do it the Ubuntu way. <br/><pre>> sudo apt-get install bioperl</pre><br/>That'll install bioperl 1.5.2, with bioperl-db. <br/>Then simply run (suppose you have already setup the PostgreSQL and you can run it with your username. <br/><pre>> load_ncbi_taxonomy.pl --diver Pg --download yes<br /><br />Update: 7/23/2009<br />Hilmar has pointed out that the bioperl in my post is only 1.5.2, and it seems in Karmic (9.10), ubuntu will have BioPERL 1.6.0 available in universe.<br /> <br /><br /><br /></pre><br/><br/><div class='zemanta-pixie'><img src='http://img.zemanta.com/pixy.gif?x-id=78263804-e5c1-8bbe-be79-a14d54ed7cae' alt='' class='zemanta-pixie-img'/></div></div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com2tag:blogger.com,1999:blog-6950434560823290164.post-2865602183339704312009-07-13T12:45:00.001-07:002009-07-20T06:58:08.531-07:00install postgresql on ubuntu<div xmlns='http://www.w3.org/1999/xhtml'><font face='sans-serif'>It turns out that I have to create database myself. I decided to install postgresql on my ubuntu server, and dump treebase data into it. <br/><br/>To install postgresql 8.3 on Ubuntu 9.04, basically I followed the steps in this article. Although the author was addressing an earlier version of Ubuntu (8.04), I found the steps are still correct. <br/><br/></font><a href='http://hocuspokus.net/2008/05/install-postgresql-on-ubuntu-804'>http://hocuspokus.net/2008/05/install-postgresql-on-ubuntu-804</a><br/><br/>This post is based on postgresql 8.1. It also shows how to make the current user a superuser. <br/><a href='https://help.ubuntu.com/community/PostgreSQL'><br/>https://help.ubuntu.com/community/PostgreSQL</a><br/><br/>I also installed pgadmin3 on another ubuntu box where I have a ubuntu desktop installed. I found that in order to access the server remotely, I have to do the following on the server: <br/><br/>1. Add port 5432 to the allowed list<br/>2. Give user a password. Do something like<br/><pre><code>sudo su postgres -c psql <br />=# ALTER USER myusername WITH PASSWORD 'password';<br />=# \q<br /></code></pre><br/><br/><br/><br/><div class='zemanta-pixie'><img src='http://img.zemanta.com/pixy.gif?x-id=c3152c9c-ace4-895e-850a-8fa426b12811' class='zemanta-pixie-img'/></div></div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0tag:blogger.com,1999:blog-6950434560823290164.post-331171775040154112009-06-28T21:10:00.001-07:002009-06-28T21:10:40.211-07:00Nice XPath API article<div xmlns='http://www.w3.org/1999/xhtml'>There is a nice XPath API article on IBM developerworks site. <br/>"XPath expressions are much easier to write than detailed Document Object Model (DOM) navigation code. When you need to extract information from an XML document, the quickest and simplest way is to embed an XPath expression inside your Java™ program. Java 5 introduces the javax.xml.xpath package, an XML object-model independent library for querying documents with XPath."<br/><a href='http://www.ibm.com/developerworks/library/x-javaxpathapi.html'>The Java XPath API</a><br/><br/>In Phylr, I am using XPath to get information from nexml, and put them into a lucene index. The tutorial if very helpful. I also found out that namespace makes things very complicated. If the XML has namespaces, then the NamespaceContext implementation has to use the same namespaces. But the NamespaceContext is acutally used to define namespaces in the xpaths. Therefore, they have to corresponds to the correct prefix used in the xpaths, not in the XML. <br/><br/><br/><blockquote/><br/><br/></div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0tag:blogger.com,1999:blog-6950434560823290164.post-65045337455554063412009-06-09T19:59:00.001-07:002009-06-09T19:59:22.247-07:00Maven eclipse plugin<div xmlns='http://www.w3.org/1999/xhtml'>m2eclipse is a nice plugin to have to run maven inside eclipse. After struggling with command line maven for a while, I started to look at m2eclipse and fall in love with it very quickly. <br/><br/>Here are some links:<br/><br/>1. How to start a maven webapp, integrated with eclipse WTP: <a href='http://docs.codehaus.org/display/M2ECLIPSE/WTP+mini+howto#WTPminihowto-Launchwebapplicationontheserver'>http://docs.codehaus.org/display/M2ECLIPSE/WTP+mini+howto#WTPminihowto-Launchwebapplicationontheserver</a><br/>2. Use Nexus indexer inside eclipse: <a href='http://docs.codehaus.org/display/M2ECLIPSE/Maven+Indexes+view'>http://docs.codehaus.org/display/M2ECLIPSE/Maven+Indexes+view</a><br/>3. An article about using maven to create a webapp project, based on the command line tool: <br/><a href='http://www.burlesontech.com/wiki/display/btg/How+to+create+a+Maven+web+app+and+deploy+to+Tomcat+-+fast'>http://www.burlesontech.com/wiki/display/btg/How+to+create+a+Maven+web+app+and+deploy+to+Tomcat+-+fast</a><br/>4. The nexus maven repository manager (integrated in m2eclipse): <a href='http://nexus.sonatype.org/'>http://nexus.sonatype.org/</a><br/></div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0tag:blogger.com,1999:blog-6950434560823290164.post-62562333096104119682009-06-02T12:19:00.001-07:002009-06-02T12:22:50.825-07:00Setting up an internal maven repository on google code<div xmlns='http://www.w3.org/1999/xhtml'>A maven repository can be setup on google code. The following post explains how (thanks lucie). <br/><br/>I will setup one for phylr (nexmlLuceneIndexer for now, more accurately), since it uses maven to build. <br/><br/><a href='http://www.thewebsemantic.com/2009/04/11/your-very-own-google-code-maven-repo/'>Your Very Own Google Code Maven Repo - The Web Semantic</a><br/><blockquote/></div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0tag:blogger.com,1999:blog-6950434560823290164.post-45837897565163248482009-05-30T11:44:00.001-07:002009-06-02T12:20:01.575-07:00Phylr Testing Report (Week1)<div xmlns='http://www.w3.org/1999/xhtml'>Today, I deployed the phylr following the README, and tested it with the <a href='http://alcme.oclc.org/srw/SRUServerTester.html'>OCLC SRU Service Test service</a>. <br/><br/>Here are the results (<br/>1 warnings given, <br/>84 tests given, <br/>6 tests failed):<br/><br/>The first two errors are not really errors. The XSLT in the response is not using full URL, but a relative path, and the OCLC service tester can't process it. A browser can correctly process the XSLT, however.<br/><br/>The last few errors are concerning SRU diagnostics, here is the page that contains list of all SRU diagnostics:<br/>http://www.loc.gov/standards/sru/resources/diagnostics-list.html<br/><br/><br/>running SRU tests for baseURL: http://jinan.ads.iu.edu:8080/SRW/search/treebase<br/>tests of Explain<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase<br/> reading stylesheet: /SRW/explainResponse.xsl<br/> from source: http://jinan.ads.iu.edu:8080/SRW/search/treebase<br/>unable to load stylesheet: javax.xml.transform.TransformerConfigurationException: <br/>javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File "file:///SRW/explainResponse.xsl" not found.<br/> successfully parsed Explain record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?operation=explain<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?operation=explain&version=1.1<br/><br/> trying: http://localhost:8080/SRW/search/treebase?<br/> ** Warning: Content-Type not set to text/xml or application/xml<br/> Content-type: null<br/>test failed: opening URL: Connection refused<br/> ** Error: the URL created by combining your host, port and database name<br/> ** resulted in a bad URL<br/> ** Comparing the URL I was given to your Explain record:<br/> ** original host: jinan.ads.iu.edu, Explain host: localhost<br/> ** original port: 8080, Explain port: 8080<br/> ** original database: /SRW/search/treebase, Explain database: SRW/search/treebase<br/>tests of Scan<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.authors+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> reading stylesheet: /SRW/scanResponse.xsl<br/> from source: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.authors+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/>unable to load stylesheet: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File "file:///SRW/scanResponse.xsl" not found.<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.authors+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.identifier+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.identifier+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.datatype+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.datatype+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=cql.serverChoice+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=cql.serverChoice+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.abstract+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.abstract+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.otus+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.otus+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.datatype+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.datatype+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.subject+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.subject+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.hasbranchlengths+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.hasbranchlengths+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.scientificName+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.scientificName+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.keywords+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.keywords+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.creator+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.creator+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treesize+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treesize+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.description+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=dc.description+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treeid+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=local.treeid+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.treesize+=+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&scanClause=phylo.treesize+exact+dog&operation=scan&responsePosition=3&maximumTerms=5<br/> successfully parsed Scan record<br/> Diagnostic: info:srw/diagnostic/1/120, details=3<br/><br/>tests of searchRetrieve<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.authors+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> reading stylesheet: /SRW/searchRetrieveResponse.xsl<br/> from source: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.authors+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/>unable to load stylesheet: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File "file:///SRW/searchRetrieveResponse.xsl" not found.<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.authors++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.identifier+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.identifier++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.datatype+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.datatype++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=cql.serverChoice+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=cql.serverChoice++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.abstract+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.abstract++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.otus+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.otus++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.datatype+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.datatype++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.subject+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.subject++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.hasbranchlengths+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.hasbranchlengths++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.scientificName+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.scientificName++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.keywords+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.keywords++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.creator+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.creator++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treesize+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treesize++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.description+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=dc.description++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treeid+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=local.treeid++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.treesize+=+%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&query=phylo.treesize++exact++%22dog%22&operation=searchRetrieve&maximumRecords=1<br/> successfully parsed searchRetrieve record<br/><br/>tests to generate diagnostics<br/><br/> trying for info:srw/diagnostic/1/5 (unsupported version)<br/> sending version=9.9<br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=9.9&query=phylo.treesize+=+%22dog%22&operation=searchRetrieve&maximumRecords=1&startRecord=1<br/> successfully parsed searchRetrieve record<br/> ** Error: expected diagnostic info:srw/diagnostic/1/5<br/> trying for info:srw/diagnostic/1/6 (unsupported parameter value)<br/> sending a bad maximumRecords value<br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=phylo.treesize+=+%22dog%22&maximumRecords=a&startRecord=1<br/> successfully parsed searchRetrieve record<br/> info:srw/diagnostic/1/6<br/><br/> trying for info:srw/diagnostic/1/7 (Mandatory parameter not supplied)<br/> omitted the query parameter on the search<br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve<br/> successfully parsed searchRetrieve record<br/> info:srw/diagnostic/1/7<br/><br/> trying for info:srw/diagnostic/1/8 (Unsupported parameter)<br/> sending the parameter diagnosticTest=true<br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=phylo.treesize+=+%22dog%22&diagnosticTest=true<br/> successfully parsed searchRetrieve record<br/> ** Error: expected diagnostic info:srw/diagnostic/1/8<br/> trying for info:srw/diagnostic/1/10 (Query syntax error)<br/> sending &query=%22dog%22+=<br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=%22dog%22+=<br/> successfully parsed searchRetrieve record<br/> info:srw/diagnostic/1/1<br/> ** Error: expected diagnostic info:srw/diagnostic/1/10 but got info:srw/diagnostic/1/1<br/> trying for info:srw/diagnostic/1/16 (Unsupported index)<br/> sending &query=badIndex=%22doh%22<br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=badIndex=%22doh%22<br/> successfully parsed searchRetrieve record<br/> ** Error: expected diagnostic info:srw/diagnostic/1/16<br/> trying for info:srw/diagnostic/1/61 (First record position out of range)<br/> sending startRecord=9999999<br/> trying: http://jinan.ads.iu.edu:8080/SRW/search/treebase?version=1.1&operation=searchRetrieve&query=phylo.treesize+=+%22dog%22&maximumRecords=1&startRecord=9999999<br/> successfully parsed searchRetrieve record<br/> ** Error: expected diagnostic info:srw/diagnostic/1/61<br/>1 warnings given<br/>84 tests given<br/>6 tests failed<br/>problems detected!</div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0tag:blogger.com,1999:blog-6950434560823290164.post-61733397355843143562009-05-26T13:49:00.001-07:002009-05-26T13:50:53.005-07:00Setting up mylyn with Google Code<div xmlns='http://www.w3.org/1999/xhtml'>For tracking the tasks for my GSoC, I decided to use the <a href='http://code.google.com/p/phylr/issues/list'>Google Code Issues </a>. I also want to use Mylyn to manage these issues, right on my eclipse. Here is a blog on how to hook up mylyn with google code:<br/><a href='http://www.jroller.com/alexRuiz/entry/using_mylyn_with_google_code1'>Using mylyn with Google Code - Updated for Eclipse 3.4 (Ganymede)</a>. The blog is a little out-of-date (step 8, 9 are not necessary any more). <br/><br/>Here is a look after the setup. <br/><br/><img src='http://lh5.ggpht.com/_1ejOZMQ2mKQ/ShxVlXLbYsI/AAAAAAAAASc/joN8glbwDmo/%5BUNSET%5D.png?imgmax=800'/></div>djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0tag:blogger.com,1999:blog-6950434560823290164.post-73164750583345456452009-05-13T08:33:00.000-07:002009-05-13T08:50:41.619-07:00Enhance the searching functionality of PhylrThis blog is about my work on the phylr project for 2009 Google Summer of Code (GSoC). <br /><br />Abstract: <br />PhyloWS is an emerging standard for interacting with phylogenetic data via web services. Phylr, is an initial implementation of the SRU search in PhyloWS. The goals of this project are to enhance the Java code that translates between the SRU server and a Lucene index and make it fully conform to the PhyloWS specs, modify the XSL stylesheets to present a more intuitive interface to the users, and write a new Java adapter that translates between the SRU server and a relational database.djiaohttp://www.blogger.com/profile/06486651456900333839noreply@blogger.com0