From senger at dev.open-bio.org Mon Oct 2 13:55:33 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:55:33 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021755.k92HtXrK025557@dev.open-bio.org>
senger
Mon Oct 2 13:55:32 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/meta
In directory dev.open-bio.org:/tmp/cvs-serv25539/meta
Log Message:
Directory /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/meta added to the repository
moby-live/Java/src/main/org/biomoby/registry/meta - New directory
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvndN025613@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv25596/docs
Modified Files:
ChangeLog Dashboard-dev.html
Log Message:
selectable registries in Dashboard
moby-live/Java/docs ChangeLog,1.71,1.72 Dashboard-dev.html,1.2,1.3
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92Hvn5n025644@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/Perl/MOBY/Cache
Modified Files:
Registries.pm
Log Message:
selectable registries in Dashboard
moby-live/Java/src/Perl/MOBY/Cache Registries.pm,1.2,1.3
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvnjV025701@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/meta
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/main/org/biomoby/registry/meta
Added Files:
ExampleList.java Registries.java RegistriesList.java
Registry.java
Log Message:
selectable registries in Dashboard
moby-live/Java/src/main/org/biomoby/registry/meta ExampleList.java,NONE,1.1 Registries.java,NONE,1.1 RegistriesList.java,NONE,1.1 Registry.java,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92Hvnce025664@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/config/dashboard/META-INF/services
Added Files:
org.biomoby.registry.meta.Registries
Log Message:
selectable registries in Dashboard
moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.registry.meta.Registries,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvnIW025685@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/config/dashboard/org/biomoby/service/dashboard
Modified Files:
dashboard.txt
Log Message:
selectable registries in Dashboard
moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,1.3,1.4
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvneC025722@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/main/org/biomoby/service/dashboard
Modified Files:
Dashboard.java DashboardProperties.java RegistryPanel.java
Log Message:
selectable registries in Dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard Dashboard.java,1.29,1.30 DashboardProperties.java,1.24,1.25 RegistryPanel.java,1.27,1.28
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvnXo025627@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs/images
In directory dev.open-bio.org:/tmp/cvs-serv25596/docs/images
Added Files:
regs-after.png regs-before.png
Log Message:
selectable registries in Dashboard
moby-live/Java/docs/images regs-after.png,NONE,1.1 regs-before.png,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 13:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvneZ025739@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/main/org/biomoby/service/dashboard/help
Modified Files:
RegistryPanel.html
Log Message:
selectable registries in Dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard/help RegistryPanel.html,1.2,1.3
From kawas at dev.open-bio.org Mon Oct 2 14:21:41 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 14:21:41 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021821.k92ILfVM026790@dev.open-bio.org>
kawas
Mon Oct 2 14:21:41 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv26758/Java/docs
Modified Files:
RDFAgent.html
Log Message:
modified the user documentation for the agent
moby-live/Java/docs RDFAgent.html,1.3,1.4
From senger at dev.open-bio.org Mon Oct 2 17:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCj61027241@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv27224/docs
Modified Files:
ChangeLog Dashboard.html
Log Message:
call rdf agent from dashboard
moby-live/Java/docs ChangeLog,1.72,1.73 Dashboard.html,1.6,1.7
From senger at dev.open-bio.org Mon Oct 2 17:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCjeh027257@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv27224/src/main/org/biomoby/service/dashboard
Modified Files:
RegistrationPanel.java RegistrationServiceSubPanel.java
Log Message:
call rdf agent from dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationPanel.java,1.20,1.21 RegistrationServiceSubPanel.java,1.11,1.12
From senger at dev.open-bio.org Mon Oct 2 17:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCjcs027286@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images
In directory dev.open-bio.org:/tmp/cvs-serv27224/src/main/org/biomoby/service/dashboard/images
Added Files:
smallAgent.gif smallAgent_dis.gif
Log Message:
call rdf agent from dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard/images smallAgent.gif,NONE,1.1 smallAgent_dis.gif,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 17:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCjk7027272@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help
In directory dev.open-bio.org:/tmp/cvs-serv27224/src/main/org/biomoby/service/dashboard/help
Modified Files:
RegistrationPanel.html
Log Message:
call rdf agent from dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard/help RegistrationPanel.html,1.3,1.4
From kawas at dev.open-bio.org Mon Oct 2 17:42:35 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 17:42:35 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022142.k92LgZc2027445@dev.open-bio.org>
kawas
Mon Oct 2 17:42:35 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv27413
Modified Files:
Central.pm
Log Message:
made the call to system() array based
moby-live/Perl/MOBY Central.pm,1.256,1.257
From mwilkinson at dev.open-bio.org Mon Oct 2 19:08:08 2006
From: mwilkinson at dev.open-bio.org (Mark Wilkinson)
Date: Mon, 2 Oct 2006 19:08:08 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022308.k92N88Ug028401@dev.open-bio.org>
mwilkinson
Mon Oct 2 19:08:08 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory dev.open-bio.org:/tmp/cvs-serv28385/MOBY/Client
Modified Files:
SimpleArticle.pm
Log Message:
nasty bug in MOBY::Client::SimpleArticle. It was shifting the namespace encapsulated array ref, instead of shifting a copied list. Probably shouldn't shift anyway, but... it wont destroy the namespace now just by looking at it
moby-live/Perl/MOBY/Client SimpleArticle.pm,1.14,1.15
From kawas at dev.open-bio.org Mon Oct 2 19:19:26 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 19:19:26 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022319.k92NJQer031181@dev.open-bio.org>
kawas
Mon Oct 2 19:19:26 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv31150/Java/docs
Added Files:
ConfigureRDFAgent.html
Log Message:
unfinished documentation on setting up your own RDF agent.
moby-live/Java/docs ConfigureRDFAgent.html,NONE,1.1
From kawas at dev.open-bio.org Mon Oct 2 19:20:07 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 19:20:07 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022320.k92NK7TR031281@dev.open-bio.org>
kawas
Mon Oct 2 19:20:07 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv31249/Java/docs
Modified Files:
RDFAgent.html
Log Message:
moby-live/Java/docs RDFAgent.html,1.4,1.5
From mwilkinson at dev.open-bio.org Mon Oct 2 19:31:20 2006
From: mwilkinson at dev.open-bio.org (Mark Wilkinson)
Date: Mon, 2 Oct 2006 19:31:20 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022331.k92NVKl3031435@dev.open-bio.org>
mwilkinson
Mon Oct 2 19:31:20 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory dev.open-bio.org:/tmp/cvs-serv31419/MOBY/Client
Modified Files:
SimpleArticle.pm
Log Message:
decided it was better not to shift at all
moby-live/Perl/MOBY/Client SimpleArticle.pm,1.15,1.16
From kawas at dev.open-bio.org Wed Oct 4 14:43:11 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 4 Oct 2006 14:43:11 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610041843.k94IhBW0009439@dev.open-bio.org>
kawas
Wed Oct 4 14:43:11 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv9407
Modified Files:
Central.pm
Log Message:
added some return values for the agent
moby-live/Perl/MOBY Central.pm,1.257,1.258
From kawas at dev.open-bio.org Wed Oct 4 14:43:53 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 4 Oct 2006 14:43:53 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610041843.k94Ihr7v009495@dev.open-bio.org>
kawas
Wed Oct 4 14:43:53 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory dev.open-bio.org:/tmp/cvs-serv9462/Java/src/main/org/biomoby/registry/rdfagent/verifier
Modified Files:
Processor.java Main.java
Log Message:
added some return values for the agent when invoked via the -url option
moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Processor.java,1.27,1.28 Main.java,1.18,1.19
From kawas at dev.open-bio.org Wed Oct 4 15:46:18 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 4 Oct 2006 15:46:18 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610041946.k94JkIn4009859@dev.open-bio.org>
kawas
Wed Oct 4 15:46:18 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv9827
Modified Files:
Central.pm
Log Message:
agent called a different way without shell scripts.
moby-live/Perl/MOBY Central.pm,1.258,1.259
From kawas at dev.open-bio.org Thu Oct 5 11:17:34 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 5 Oct 2006 11:17:34 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610051517.k95FHYJI012473@dev.open-bio.org>
kawas
Thu Oct 5 11:17:33 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv12440/Java/docs
Modified Files:
ConfigureRDFAgent.html
Log Message:
moby-live/Java/docs ConfigureRDFAgent.html,1.1,1.2
From kawas at dev.open-bio.org Thu Oct 5 11:18:13 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 5 Oct 2006 11:18:13 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610051518.k95FIDgH012510@dev.open-bio.org>
kawas
Thu Oct 5 11:18:13 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv12478/Java/docs
Modified Files:
RDFAgent.html
Log Message:
moby-live/Java/docs RDFAgent.html,1.5,1.6
From kawas at dev.open-bio.org Thu Oct 5 11:32:47 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 5 Oct 2006 11:32:47 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610051532.k95FWl6a012550@dev.open-bio.org>
kawas
Thu Oct 5 11:32:47 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv12518/Java/docs
Modified Files:
ConfigureRDFAgent.html
Log Message:
moby-live/Java/docs ConfigureRDFAgent.html,1.2,1.3
From kawas at dev.open-bio.org Fri Oct 6 12:39:20 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 12:39:20 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061639.k96GdKBa016254@dev.open-bio.org>
kawas
Fri Oct 6 12:39:20 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util
In directory dev.open-bio.org:/tmp/cvs-serv16222/Java/src/main/org/biomoby/registry/rdfagent/util
Modified Files:
SignatureURLConnection.java
Log Message:
moby-live/Java/src/main/org/biomoby/registry/rdfagent/util SignatureURLConnection.java,1.13,1.14
From kawas at dev.open-bio.org Fri Oct 6 13:42:57 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 13:42:57 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061742.k96HgvIn016380@dev.open-bio.org>
kawas
Fri Oct 6 13:42:57 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory dev.open-bio.org:/tmp/cvs-serv16348/Java/src/main/org/biomoby/registry/rdfagent/verifier
Modified Files:
Processor.java
Log Message:
moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Processor.java,1.28,1.29
From kawas at dev.open-bio.org Fri Oct 6 13:47:33 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 13:47:33 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061747.k96HlXXk016567@dev.open-bio.org>
kawas
Fri Oct 6 13:47:33 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory dev.open-bio.org:/tmp/cvs-serv16535/Java/src/main/org/biomoby/registry/rdfagent/verifier
Modified Files:
Processor.java
Log Message:
moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Processor.java,1.29,1.30
From kawas at dev.open-bio.org Fri Oct 6 13:51:50 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 13:51:50 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061751.k96Hpovl016643@dev.open-bio.org>
kawas
Fri Oct 6 13:51:50 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv16611
Modified Files:
Central.pm
Log Message:
added a more precise message when the agent is called on a url that used to exist but no longer does.
moby-live/Perl/MOBY Central.pm,1.259,1.260
From kawas at dev.open-bio.org Fri Oct 6 17:38:06 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 17:38:06 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610062138.k96Lc5ko016953@dev.open-bio.org>
kawas
Fri Oct 6 17:38:05 EDT 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv16922
Added Files:
castor-0.9.5.jar
Log Message:
jars-archive/current castor-0.9.5.jar,NONE,1.1
From kawas at dev.open-bio.org Fri Oct 6 17:39:01 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 17:39:01 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610062139.k96Ld17b017033@dev.open-bio.org>
kawas
Fri Oct 6 17:39:01 EDT 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv17002
Added Files:
dnsjava-1.3.2.jar
Log Message:
jars-archive/current dnsjava-1.3.2.jar,NONE,1.1
From kawas at dev.open-bio.org Mon Oct 9 14:55:09 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 9 Oct 2006 14:55:09 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610091855.k99It9Ni020067@dev.open-bio.org>
kawas
Mon Oct 9 14:55:09 EDT 2006
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv20032/Java/xmls
Modified Files:
libraries.xml
Log Message:
moby-live/Java/xmls libraries.xml,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2006/08/28 13:42:10 1.13
+++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2006/10/09 18:55:09 1.14
@@ -34,6 +34,10 @@
From kawas at dev.open-bio.org Tue Oct 10 12:59:10 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 10 Oct 2006 12:59:10 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610101659.k9AGxA5O023206@dev.open-bio.org> kawas Tue Oct 10 12:59:10 EDT 2006 Update of /home/repository/moby/moby-live/Java/docs/taverna/guide In directory dev.open-bio.org:/tmp/cvs-serv23175/Java/docs/taverna/guide Added Files: favicon.ico animated_favicon1.gif Log Message: moby-live/Java/docs/taverna/guide favicon.ico,NONE,1.1 animated_favicon1.gif,NONE,1.1 From kawas at dev.open-bio.org Tue Oct 10 13:01:27 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 10 Oct 2006 13:01:27 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610101701.k9AH1Rm1023251@dev.open-bio.org> kawas Tue Oct 10 13:01:26 EDT 2006 Update of /home/repository/moby/moby-live/Java/docs/taverna/guide In directory dev.open-bio.org:/tmp/cvs-serv23216/Java/docs/taverna/guide Modified Files: index.html Log Message: moby-live/Java/docs/taverna/guide index.html,1.13,1.14 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/taverna/guide/index.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- /home/repository/moby/moby-live/Java/docs/taverna/guide/index.html 2006/10/10 14:02:12 1.13 +++ /home/repository/moby/moby-live/Java/docs/taverna/guide/index.html 2006/10/10 17:01:26 1.14 @@ -3,6 +3,8 @@ + +Table of Contents
-Introduction - - - -New Features - - - -Tutorial+-What's Next - - -FAQ - - -Comments / QuestionsCreating a BioMoby Scavenger -Creating a workflow -Obtaining information on a Moby Datatype -Obtaining information on a Moby Service -Using secondary parameters -Obtaining the 'data' from a Moby service -+
+- Introduction
+- + New Features
+- Tutorial
++
++- Creating a BioMoby Scavenger
+- Creating a workflow
+- Obtaining information on a Moby Datatype
+- Obtaining information on a Moby Service
+- Using secondary parameters
+- Obtaining the 'data' from a Moby service
++
- What's Next
+- FAQ
+- + + + Comments / Questions
+Introduction
@@ -206,10 +208,10 @@
- Find Services that Consume NCBI_BLAST_Text('blast') - brief search:
-
Searches for all services that consume NCBI_BLAST_Text+Searches for all services that consume NCBI_BLAST_TextFind Services that Consume NCBI_BLAST_Text('blast') - semantic search -Searches for all services that either consume NCBI_BLAST_Text +Searches for all services that either consume NCBI_BLAST_Text or it parent datatype. For more infomation on this behaviour, click here.@@ -295,15 +297,15 @@
There are 3 different types of output ports that Moby services utilize and 2 different types of input ports (excluding the legacy ports
'input' and 'output'.
-+Moby Service Output ----Connects to ---> Moby Service Input - 1 Simple SimpleA Simple is a datatype that is not contained within a collection, i.e. do not have a name that contains '(Collection -'.
- 2 Simple Collection
- 3 Collection Simple
- 4 Collection Collection
- 5 CollectionAsSimples Simples
- 6 CollectionAsSimples Collection
+ 1 Simple Simple + 2 Simple Collection + 3 Collection Simple + 4 Collection Collection + 5 CollectionAsSimples Simples + 6 CollectionAsSimples Collection
A CollectionAsSimples is an output port that contains a Taverna style List of the individuals in a Moby Collection.
@@ -325,7 +327,7 @@Why do some services have have '_ANON_' or 'Collection - MobyCollection' in there name?
These are names automatically generated for services that incorrectly registered with a Mobycentral registry.
- You should attempt to contact the service provider so that they may fix this service.
+ You should attempt to contact the service provider so that they may fix and proplerly register these services.
If all I want to do is run a Moby service, do I have to specify article names?
@@ -346,8 +348,7 @@If you have any suggestions regarding new features or you would like to report a bug,
-
please let me know.-
+
For questions, comments, or bugs *
email me at edward.kawas at gmail.com */ + at SuppressWarnings("unchecked") public class MobyProperties { private static Properties properties = new Properties(); @@ -53,15 +54,17 @@ * @return A Properties object with either the properties obtained from the environment or an empty map. */ public final static Properties PROPERTIES() { - Map map = RegistryOS.getEnv(); - // + Map map = new HashMap(); + // if (System.getProperty("MOBY_CENTRAL_CONFIG") != null && !System.getProperty("MOBY_CENTRAL_CONFIG").equals("")) map.put("MOBY_CENTRAL_CONFIG" , System.getProperty("MOBY_CENTRAL_CONFIG")); if (System.getProperty("MOBY_SERVER") != null && !System.getProperty("MOBY_SERVER").equals("")) map.put("MOBY_SERVER" , System.getProperty("MOBY_SERVER")); if (System.getProperty("MOBY_URI") != null && !System.getProperty("MOBY_URI").equals("")) map.put("MOBY_URI" , System.getProperty("MOBY_URI")); - properties.putAll(map); + // did we fail to populate the map? + if (map.isEmpty()) + properties.putAll(RegistryOS.getEnv()); return properties; } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/properties/MobyCentralConfig.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/properties/MobyCentralConfig.java 2005/12/02 20:40:18 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/properties/MobyCentralConfig.java 2006/10/11 01:54:50 1.5 @@ -15,6 +15,9 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.biomoby.shared.MobyException; /** @@ -25,12 +28,15 @@ *
For questions, comments, or bugs *
email me at edward.kawas at gmail.com */ + at SuppressWarnings("unchecked") public class MobyCentralConfig { - private final static String location = MobyProperties.PROPERTIES().getProperty("MOBY_CENTRAL_CONFIG"); //use the environment variables you set with your own registry + private static Log log = LogFactory.getLog(MobyCentralConfig.class); + + private final static String location = getLocation(); private final static String regexp = "^(\\w+)\\s*=\\s*(.*)$"; - + /** * A method that retrieves the mySQL connection details for the database mobycentral. *
PRE: The property config is specified and configured correctly in the file biomoby.properties. @@ -45,7 +51,19 @@ return map; } - /** + private static String getLocation() { + if (System.getProperty("MOBY_CENTRAL_CONFIG")==null) { + log.debug("getting MOBY_CENTRAL_CONFIG using MobyProperties()"); + return MobyProperties.PROPERTIES().getProperty("MOBY_CENTRAL_CONFIG"); + } + else { + // use the environment variables you set with your own registry + log.debug("getting MOBY_CENTRAL_CONFIG using System.getProperty()"); + return System.getProperty("MOBY_CENTRAL_CONFIG"); + } + } + + /** * A method that retrieves the mySQL connection details for the database mobynamespace. *
PRE: The property config is specified and configured correctly in the file biomoby.properties. *
POST: Map consists of the mySQL connection information for the database mobynamespace or MobyException is thrown. @@ -105,9 +123,8 @@ throws MobyException { if (location == null) throw new MobyException( - "Error - " - + location - + " environment variable found. Make sure that MOBY_CENTRAL_CONFIG is set correctly in the environment"); + "Error - MOBY_CENTRAL_CONFIG == null;" + + " Make sure that MOBY_CENTRAL_CONFIG is set correctly in the environment"); File file = new File(location); BufferedReader br = null; try { From kawas at dev.open-bio.org Tue Oct 10 21:54:50 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 10 Oct 2006 21:54:50 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610110154.k9B1sox4025288@dev.open-bio.org> kawas Tue Oct 10 21:54:50 EDT 2006 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms Modified Files: Lsid_resolver.java CallableServicesServlet.java GetSignatureRDFResponse.java GetSignatureRDFForm.java RDFAgentValidator.java LSID_ResolverClient.java LSIDComplete.java Added Files: GetServiceRDF.java Log Message: moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms GetServiceRDF.java,NONE,1.1 Lsid_resolver.java,1.3,1.4 CallableServicesServlet.java,1.2,1.3 GetSignatureRDFResponse.java,1.8,1.9 GetSignatureRDFForm.java,1.4,1.5 RDFAgentValidator.java,1.2,1.3 LSID_ResolverClient.java,1.1,1.2 LSIDComplete.java,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/Lsid_resolver.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/Lsid_resolver.java 2006/05/24 18:48:31 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/Lsid_resolver.java 2006/10/11 01:54:50 1.4 @@ -93,21 +93,21 @@ String str = resolveLSID(lsid_to_use, "soap"); return str; } catch (MobyException e) { - e.printStackTrace(); + log.debug("Couldn't resolve " + lsid_to_use + " to metadata using SOAP."); } try { String str = resolveLSID(lsid_to_use, "http"); return str; } catch (MobyException e) { - e.printStackTrace(); + log.debug("Couldn't resolve " + lsid_to_use + " to metadata using HTTP."); } try { String str = resolveLSID(lsid_to_use, "ftp"); return str; } catch (MobyException e) { - e.printStackTrace(); + log.debug("Couldn't resolve " + lsid_to_use + " to metadata using FTP."); } - return "Couldn't resolve your lsid. I tried the protocols SOAP, HTTP, and FTP. If we are missing one, let us know."; + return "Couldn't resolve your lsid to metadata (perhaps there is none?). I tried the protocols SOAP, HTTP, and FTP. If we are missing one, let us know."; } /** =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java 2006/08/30 23:15:17 1.2 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java 2006/10/11 01:54:50 1.3 @@ -18,16 +18,18 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.discovery.tools.DiscoverSingleton; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.biomoby.client.CentralImpl; +import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader; import org.biomoby.client.ui.graphical.servlet.utilities.ServiceTester; import org.biomoby.shared.MobyException; import org.biomoby.shared.MobyService; /** - * @author Eddie Kawas - * This class was created to call out to all registered services and see which ones are alive. + * @author Eddie Kawas This class was created to call out to all registered + * services and see which ones are alive. */ public class CallableServicesServlet extends HttpServlet { @@ -45,13 +47,27 @@ public void init(ServletConfig arg0) throws ServletException { super.init(arg0); + + ContextLoader cLoader = null; + try { + cLoader = (ContextLoader) DiscoverSingleton.find(Class + .forName((String) ContextLoader.class.getCanonicalName()), Class.forName( + (String) ContextLoader.class.getCanonicalName()).getName()); + log + .warn((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!" + : "ContextLoader has loaded successfully.")); + } catch (Exception e) { + log.warn("ContextLoader is null and is therefore not loaded. This is BAD!" + + System.getProperty("line.separator") + e.getStackTrace()); + } + log.info("initializing CallableServiceServlet"); scheduler = new ServiceTesterRunner(); Timer timer = new Timer(); Calendar calendar = Calendar.getInstance(); Date time = calendar.getTime(); log.info("Scheduling on going task."); - timer.scheduleAtFixedRate(scheduler, time, 1000 * 60 * 60 ); + timer.scheduleAtFixedRate(scheduler, time, 1000 * 60 * 60); } /* @@ -156,7 +172,11 @@ public ServiceTesterRunner() { try { // TODO make this generic so that others can use it - t = new ServiceTester(CentralImpl.DEFAULT_ENDPOINT, CentralImpl.DEFAULT_NAMESPACE); + t = new ServiceTester( + System.getProperty("MOBY_SERVER") == null ? CentralImpl.DEFAULT_ENDPOINT + : System.getProperty("MOBY_SERVER"), + System.getProperty("MOBY_URI") == null ? CentralImpl.DEFAULT_NAMESPACE + : System.getProperty("MOBY_URI")); } catch (MobyException e) { log.error("Couldn't instantiate a ServiceTester object", e); } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFResponse.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFResponse.java 2006/08/30 16:55:02 1.8 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFResponse.java 2006/10/11 01:54:50 1.9 @@ -1,20 +1,27 @@ package org.biomoby.client.ui.graphical.servlet.forms; -import java.io.BufferedReader; import java.io.IOException; -import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.MalformedURLException; import java.net.URL; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.sql.DataSource; +import org.apache.commons.dbcp.BasicDataSource; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.biomoby.client.rdf.builder.ServiceInstanceRDF; +import org.biomoby.registry.properties.MobyProperties; + +import java.sql.Connection; /* * Created on Jan 14, 2005
@@ -38,7 +45,9 @@ final private String newline = System.getProperty("line.separator"); - final static private String error = "" + System.getProperty("line.separator") + "" + private String SERVER_NAME = ""; + final static private String getErrorString() { + return "" + System.getProperty("line.separator") + "" + "
" + System.getProperty("line.separator") + "" + "" + System.getProperty("line.separator") + "" + "" + System.getProperty("line.separator") + "" + "" + System.getProperty("line.separator") + "" + "" + System.getProperty("line.separator") + "" + ""; + } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + SERVER_NAME = request.getServerName(); String domain = filter(request.getParameter("domain")); String serviceName = filter(request.getParameter("serviceName")); String sigURL = filter(request.getParameter("sigURL")); @@ -71,7 +82,7 @@ if (sigURL.equals("") || !isValidSig(sigURL)) { response.setContentType("text/html"); PrintWriter out = response.getWriter(); - out.println(error); + out.println(getErrorString()); return; } @@ -81,7 +92,7 @@ // update failed response.setContentType("text/html"); PrintWriter out = response.getWriter(); - out.println(error); + out.println(getErrorString()); return; } /*get the rdf*/ @@ -104,31 +115,112 @@ return; } - /* - * TODO you need place the updateSignatureURL in the cgi-bin directory - */ private boolean updateMobyCentralDatabase(String domain, String sigURL, String name) throws MalformedURLException { String con; if (name.equals("")) { - log.info("empty name"); - con = "http://mobycentral.icapture.ubc.ca/cgi-bin/updateSignatureURL.cgi?authURI=" - + domain + "&URL=" + sigURL; + log.info("Updating all services for " + domain + "."); + String sql = "select authority_id from authority where authority_uri=?"; + String updateSQL = "update service_instance set signatureURL = ? where authority_id=?"; + int authID = -1; + PreparedStatement preparedStatement = null; + try { + preparedStatement = getConnection().prepareStatement(sql); + preparedStatement.setString(1,domain); + ResultSet results = preparedStatement.executeQuery(); + if (results.next()) + authID = results.getInt(1); + else { + // clean up and return + if (preparedStatement != null) + preparedStatement.close(); + return false; + } + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + return false; + } finally { + try { + if (preparedStatement != null) + preparedStatement.close(); + } catch (SQLException e) { + return false; + } + } + + preparedStatement = null; + int updatedRowCount = -1; + try { + preparedStatement = getConnection().prepareStatement(updateSQL); + preparedStatement.setString(1,sigURL); + preparedStatement.setInt(2, authID); + updatedRowCount = preparedStatement.executeUpdate(); + return updatedRowCount > -1; + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + return updatedRowCount > -1; + } finally { + try { + if (preparedStatement != null) + preparedStatement.close(); + } catch (SQLException e) { + return updatedRowCount > -1; + } + } } else { - con = "http://mobycentral.icapture.ubc.ca/cgi-bin/updateSignatureURL.cgi?authURI=" - + domain + "&URL=" + sigURL + "&serviceName=" + name; + // update 1 service + log.info("Updating the service, " + name+ ", for " + domain + "."); + String sql = "select authority_id from authority where authority_uri=?"; + String updateSQL = "update service_instance set signatureURL = ? where authority_id= ? and servicename= ?"; + int authID = -1; + PreparedStatement preparedStatement = null; + try { + preparedStatement = getConnection().prepareStatement(sql); + preparedStatement.setString(1,domain); + ResultSet results = preparedStatement.executeQuery(); + if (results.next()) + authID = results.getInt(1); + else { + // clean up and return + if (preparedStatement != null) + preparedStatement.close(); + return false; + } + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + return false; + } finally { + try { + if (preparedStatement != null) + preparedStatement.close(); + } catch (SQLException e) { + return false; + } + } + + preparedStatement = null; + int updatedRowCount = -1; + try { + preparedStatement = getConnection().prepareStatement(updateSQL); + preparedStatement.setString(1,sigURL); + preparedStatement.setInt(2, authID); + preparedStatement.setString(3,name); + updatedRowCount = preparedStatement.executeUpdate(); + return updatedRowCount == 1; + } catch (SQLException e) { + log.error(e.getLocalizedMessage()); + return updatedRowCount == 1; + } finally { + try { + if (preparedStatement != null) + preparedStatement.close(); + } catch (SQLException e) { + return updatedRowCount == 1; + } + } + } - URL url = new URL(con); - try { - BufferedReader in = new BufferedReader(new InputStreamReader(url - .openStream())); - if (in.readLine().equals("good")) { - return true; - } - } catch (IOException ex) {} - return false; - } /** @@ -138,19 +230,55 @@ * @return */ private boolean isValidSig(String sigURL) { - /*final String URL = "(^(http:\\/\\/www\\.|HTTP:\\/\\/www\\.|http:\\/\\/|HTTP:\\/\\/)[\\w]+\\.[\\w].*(\\/\\w+(\\.{1}\\w+)*)$)"; - Pattern p = Pattern.compile(URL); - Matcher m = p.matcher(sigURL); - return m.matches();*/ + try { URL url = new URL(sigURL); return true; } catch (MalformedURLException e) { - return false; } } + private Connection connection = null; + private DataSource datasource = null; + private Properties props = MobyProperties.SERVICE_INSTANCE_PROPERTIES();; + + private Connection getConnection() { + if (this.datasource == null) { + // get certain properties from mobycentral.config + String serverName = props.get("url") + ":" + props.get("port");// localhost:3306"; + String mydatabase = (String) props.get("dbname");// "mobyobject"; + String url = "jdbc:mysql://" + serverName + "/" + mydatabase; + String username = (String) props.get("username");// "moby_external"; + String password = (String) props.get("password");// ""; + DataSource datasource = setupDataSource(url, username, password); + this.datasource = datasource; + } + try { + return this.datasource.getConnection(); + } catch (SQLException e) { + log.error("Error getting connection to db..." + newline + e); + return null; + } + + } + + private DataSource setupDataSource(String connectURI, String user, String pass) { + BasicDataSource ds = new BasicDataSource(); + try { + ds.setLoginTimeout(30); + } catch (SQLException e) { + log.equals("Couldn't set login timeout " + e.getLocalizedMessage()); + } + ds.setMaxWait(1000 * 60*5); + ds.setTimeBetweenEvictionRunsMillis(1000 * 60 * 5); + ds.setDriverClassName("com.mysql.jdbc.Driver"); + ds.setUsername(user); + ds.setPassword(pass); + ds.setUrl(connectURI); + return ds; + } + private static String filter(String input) { if (input == null) return null; @@ -172,4 +300,9 @@ } return (filtered.toString()); } + + public static void main(String[] args) throws MalformedURLException { + GetSignatureRDFResponse g = new GetSignatureRDFResponse(); + System.out.println(g.updateMobyCentralDatabase("blah.blah.bah", "http://www.eddie.com/signatureURLs","Echo_test2")); + } } \ No newline at end of file =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFForm.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFForm.java 2005/09/30 14:48:22 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFForm.java 2006/10/11 01:54:50 1.5 @@ -7,178 +7,225 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.Arrays; +import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.discovery.tools.DiscoverSingleton; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.biomoby.client.CentralImpl; +import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader; +import org.biomoby.registry.properties.RegistryOS; import org.biomoby.shared.Central; import org.biomoby.shared.MobyException; +import org.biomoby.shared.Utils; /** * @author Eddie Kawas - *Make sure that you specify a valid signature url! This field looks like the following: http://myAuthority.domain/path/to/rdf/for/service. Also make sure that you have specified the right case-sensitive service name, if applicable.
" + System.getProperty("line.separator") + "" - + " " + System.getProperty("line.separator") + "" + + " " + System.getProperty("line.separator") + "" + "
Created for - *
This class was created to ... - *
For questions, comments, or bugs - *
email me at edward.kawas at gmail.com + *
+ * Created for + *
+ * This class was created to ... + *
+ * For questions, comments, or bugs + *
+ * email me at edward.kawas at gmail.com */ public class GetSignatureRDFForm extends HttpServlet { - /** - * - */ - private static final long serialVersionUID = 1L; - - // some useful variables - private final String newline = System.getProperty("line.separator"); - - private static final String DOMAIN = "mobycentral.icapture.ubc.ca"; - - /* (non-Javadoc) - * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) - */ - protected void doGet(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException { - // set the content type - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - // get a list of domains - Central central = null; - String[] domains = null; - // initialize central - try { - //TODO - enter the endpoint here - central = new CentralImpl(); - domains = central.getProviders(); - } catch (MobyException e) { - out.println("Please try again later."); - return; - } - // sort the array - Arrays.sort(domains); - StringBuffer sb = new StringBuffer(""); - for (int x = 0; x < domains.length; x++) { - sb.append("\t\t" + newline); - } - - String page = "" - + newline - + "" - + newline - + "
" - + newline - + "
@@ -46,44 +45,17 @@
public final void init() throws ServletException {
// super.init();
- // try to load environment variables set in context.xml
+ ContextLoader cLoader = null;
try {
- Context c = new InitialContext();
-
- try {
- String MOBY_CENTRAL_CONFIG = null;
- MOBY_CENTRAL_CONFIG = (String) c.lookup("java:comp/env/MOBY_CENTRAL_CONFIG");
- if (MOBY_CENTRAL_CONFIG != null && !MOBY_CENTRAL_CONFIG.equals("")) {
- // set MOBY_CENTRAL_CONFIG
- log.info("init(setting MOBY_CENTRAL_CONFIG)");
- System.setProperty("MOBY_CENTRAL_CONFIG", MOBY_CENTRAL_CONFIG);
- }
-
- } catch (Exception ex) {
- }
- try {
- String MOBY_SERVER = null;
- MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER");
- if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) {
- // set MOBY_SERVER
- log.info("init(setting MOBY_SERVER)");
- System.setProperty("MOBY_SERVER", MOBY_SERVER);
- }
- } catch (Exception ex) {
- }
-
- try {
- String MOBY_URI = null;
- MOBY_URI = (String) c.lookup("java:comp/env/MOBY_URI");
- if (MOBY_URI != null && !MOBY_URI.equals("")) {
- // set MOBY_URI
- log.info("init(setting MOBY_URI)");
- System.setProperty("MOBY_URI", MOBY_URI);
- }
- } catch (Exception ex) {
- }
-
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .warn((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
} catch (Exception e) {
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getStackTrace());
}
}
@@ -122,8 +94,8 @@
return;
}
Process p;
-
- String[] com = new String[] { rdfagent, "-test", url };
+ //TODO may need to place JAVA_HOME in the mobycentral part of the config files.
+ String[] com = new String[] { "java","-DRDFagent.home="+rdfagent,"-jar", rdfagent+"/RDFagent.jar", "-test", url };
p = Runtime.getRuntime().exec(com);
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
StringBuffer sb = new StringBuffer();
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSID_ResolverClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSID_ResolverClient.java 2006/08/30 17:11:25 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSID_ResolverClient.java 2006/10/11 01:54:50 1.2
@@ -108,19 +108,19 @@
String str = resolveLSID(lsid_to_use, "soap");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using SOAP.");
}
try {
String str = resolveLSID(lsid_to_use, "http");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using HTTP.");
}
try {
String str = resolveLSID(lsid_to_use, "ftp");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using FTP.");
}
return "Couldn't resolve your lsid. I tried the protocols SOAP, HTTP, and FTP. If we are missing one, let us know.";
}
@@ -131,19 +131,19 @@
String str = resolveLSID2Data(lsid_to_use, "soap");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to data using SOAP.");
}
try {
String str = resolveLSID2Data(lsid_to_use, "http");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to data using HTTP.");
}
try {
String str = resolveLSID2Data(lsid_to_use, "ftp");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to data using FTP.");
}
return "Couldn't resolve your lsid to Data.";
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSIDComplete.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSIDComplete.java 2006/08/30 17:11:25 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSIDComplete.java 2006/10/11 01:54:50 1.2
@@ -21,8 +21,10 @@
import javax.sql.DataSource;
import org.apache.commons.dbcp.BasicDataSource;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
import org.biomoby.registry.properties.MobyProperties;
/*
@@ -33,6 +35,7 @@
/**
* @author Eddie Kawas
*/
+ at SuppressWarnings("unchecked")
public class LSIDComplete extends HttpServlet {
/**
@@ -45,14 +48,33 @@
final private String newline = System.getProperty("line.separator");
private Map datas = Collections.synchronizedMap(new HashMap());
+
public void init() throws ServletException {
super.init();
+
+
+ ContextLoader cLoader = null;
+ try {
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .warn((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
+ } catch (Exception e) {
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getStackTrace());
+ }
+
log.debug("Initializing the Timer that will invoke the StatWriter");
Timer timer = new Timer();
timer.scheduleAtFixedRate(new StatWriter(this), new java.util.Date(), 1000 * 60 * 60);
}
+ // an array of properties objects created initialized once for more efficient running
+ private Properties[] properties = new Properties[]{null,null, null, null};
+
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String lsid = filter(request.getParameter("lsid"));
@@ -74,20 +96,24 @@
String object = parts[4];
Properties p = null;
// check if the 3rd component is biomoby.org
- if (parts[2].equalsIgnoreCase("biomoby.org")
+ if ((parts[2].equalsIgnoreCase("biomoby.org") || parts[2].equalsIgnoreCase(request.getServerName()))
&& parts[0].equalsIgnoreCase("urn")
&& parts[1].equalsIgnoreCase("lsid")) {
// check if they are typing in
// namespacetype
if (parts[3].equals("namespacetype")) {
- p = MobyProperties.NAMESPACE_PROPERTIES();
+ if (properties[0] == null)
+ properties[0] = MobyProperties.NAMESPACE_PROPERTIES();
+ p = properties[0];
String lsids = getLSIDs(p, object, "namespace");
if (!lsids.equals(""))
lsid = lsids;
}
// objectclass
else if (parts[3].equals("objectclass")) {
- p = MobyProperties.OBJECT_PROPERTIES();
+ if (properties[1] == null)
+ properties[1] = MobyProperties.OBJECT_PROPERTIES();
+ p = properties[1];
String lsids = getLSIDs(p, object, "object");
if (!lsids.equals("")) {
lsid = lsids;
@@ -96,7 +122,9 @@
}
// servicetype
else if (parts[3].equals("servicetype")) {
- p = MobyProperties.SERVICE_PROPERTIES();
+ if (properties[2] == null)
+ properties[2] = MobyProperties.SERVICE_PROPERTIES();
+ p = properties[2];
String lsids = getLSIDs(p, object, "service");
if (!lsids.equals(""))
lsid = lsids;
@@ -104,7 +132,9 @@
// serviceinstance
else if (parts[3].equals("serviceinstance")) {
// weird case, because object is authURI,servicename
- p = MobyProperties.SERVICE_INSTANCE_PROPERTIES();
+ if (properties[3] == null)
+ properties[3] = MobyProperties.SERVICE_INSTANCE_PROPERTIES();
+ p = properties[3];
String lsids = getLSIDs(p, object, "service_instance");
if (!lsids.equals(""))
lsid = lsids;
From kawas at dev.open-bio.org Tue Oct 10 21:54:50 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 21:54:50 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610110154.k9B1soIP025350@dev.open-bio.org>
kawas
Tue Oct 10 21:54:50 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
Modified Files:
ServiceTester.java
Added Files:
ContextLoader.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities ContextLoader.java,NONE,1.1 ServiceTester.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/08/30 23:15:17 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/11 01:54:50 1.4
@@ -126,6 +126,7 @@
}
}
log.info("service testing complete.");
+ setResultMap(theMap);
return theMap;
}
@@ -272,10 +273,8 @@
try {
output = doCall(s.getName(),
new Object[] { "
* email me at edward.kawas at gmail.com */ + at SuppressWarnings("unchecked") public final class JServicesSqlImpl implements JServiceI { private static final String sql = "SELECT ot1.service_type, rt.relationship_type, ot2.service_type, ot1.description " + "FROM service as ot1, service_term2term as rt, service as ot2 " @@ -53,12 +54,6 @@ String username = (String) map.get("username");// "moby_external"; String password = (String) map.get("password");// ""; - /* - * String serverName = "mobycentral.icapture.ubc.ca:3306"; String - * mydatabase = "mobyservice"; String url = "jdbc:mysql://" + - * serverName + "/" + mydatabase; String username = "moby_external"; - * String password = ""; - */ this.connection = DriverManager.getConnection(url, username, password); } catch (ClassNotFoundException e) { throw new MobyException( =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JObjectsSqlImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JObjectsSqlImpl.java 2006/03/23 15:16:56 1.3 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JObjectsSqlImpl.java 2006/10/11 01:54:51 1.4 @@ -20,6 +20,7 @@ *
* email me at edward.kawas at gmail.com */ + at SuppressWarnings("unchecked") public final class JObjectsSqlImpl implements JObjectsI { private static final String sql = "SELECT ot1.object_type, rt.relationship_type, ot2.object_type, rt.object2_articlename, ot1.description " + "FROM object as ot1, object_term2term as rt, object as ot2 " @@ -51,21 +52,11 @@ Map map = MobyCentralConfig.getMobyObject(); // Create a connection to the database String serverName = map.get("url") + ":" + map.get("port");// localhost:3306"; - // //TODO - // - make - // this a - // property String mydatabase = (String) map.get("dbname");// "mobyobject"; String url = "jdbc:mysql://" + serverName + "/" + mydatabase; String username = (String) map.get("username");// "moby_external"; String password = (String) map.get("password");// ""; - /* - * String serverName = "mobycentral.icapture.ubc.ca:3306"; String - * mydatabase = "mobyobject"; String url = "jdbc:mysql://" + - * serverName + "/" + mydatabase; String username = "moby_external"; - * String password = ""; - */ this.connection = DriverManager.getConnection(url, username, password); } catch (ClassNotFoundException e) { throw new MobyException( =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JNamespacesSqlImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JNamespacesSqlImpl.java 2006/03/15 16:22:37 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JNamespacesSqlImpl.java 2006/10/11 01:54:51 1.5 @@ -20,6 +20,7 @@ *
* email me at edward.kawas at gmail.com */ + at SuppressWarnings("unchecked") public final class JNamespacesSqlImpl implements JNamespaceI { private static final String sql = "SELECT namespace_type, description FROM namespace ORDER BY namespace_type asc"; From kawas at dev.open-bio.org Tue Oct 10 21:54:51 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 10 Oct 2006 21:54:51 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610110154.k9B1spgS025380@dev.open-bio.org> kawas Tue Oct 10 21:54:50 EDT 2006 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority Modified Files: LSIDDataLookup.java Test.java MobyAuthority.java Log Message: moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority LSIDDataLookup.java,1.12,1.13 Test.java,1.4,1.5 MobyAuthority.java,1.7,1.8 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/LSIDDataLookup.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/LSIDDataLookup.java 2006/05/24 18:48:31 1.12 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/LSIDDataLookup.java 2006/10/11 01:54:50 1.13 @@ -108,7 +108,7 @@ int result = UNKNOWN; String authority = lsid.getAuthority().getAuthority(); - log.info("lsidType: " + ns + " " + id + " " + ver + " " + authority); + log.debug("lsidType: " + ns + " " + id + " " + ver + " " + authority); if (ns.equalsIgnoreCase(mobynamespace.getProperty("lsid_namespace"))) { if (!authority.equals(mobynamespace.getProperty("lsid_authority"))) { =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/Test.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/Test.java 2005/12/02 20:40:18 1.4 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/Test.java 2006/10/11 01:54:50 1.5 @@ -34,7 +34,8 @@ */ public static void main(String[] args) throws LSIDException { //String lsid_to_use = "urn:lsid:ncbi.nlm.nih.gov.lsid.biopathways.org:genbank_gi:30350027"; - String lsid_to_use = "urn:lsid:biomoby.org:serviceinstance:www.illuminae.com,getSHound3DNeighboursFromGi"; + // TODO insert your LSID here + String lsid_to_use = "urn:lsid:localhost:serviceinstance:test.test.test,breakString:2006-09-19T20-08-36Z"; LSID lsid = new LSID(lsid_to_use); LSIDResolver resolver = new LSIDResolver(lsid); resolver.setUseLocalCache(false); =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/MobyAuthority.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/MobyAuthority.java 2006/09/15 18:28:23 1.7 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/MobyAuthority.java 2006/10/11 01:54:50 1.8 @@ -1,12 +1,12 @@ package org.biomoby.client.ui.graphical.servlet.lsid.authority; import java.net.URL; -import java.util.Properties; - -import javax.naming.Context; -import javax.naming.InitialContext; +import org.apache.commons.discovery.tools.DiscoverSingleton; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.biomoby.client.CentralImpl; +import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader; import org.biomoby.shared.MobyService; import com.ibm.lsid.ExpiringResponse; @@ -39,10 +39,13 @@ * email me at edward.kawas at gmail.com */ public class MobyAuthority extends SimpleAuthority { - private LSIDDataLookup lookup = null; + private Log log = LogFactory.getLog(this.getClass()); - private Properties properties = new Properties(); + private LSIDDataLookup lookup = null; + // NOTE: This class assumes that you have set system properties for + // lsid_domain and lsid_port - if they are not set, then exceptions are + // thrown public LSIDMetadataPort[] getMetadataLocations(LSID lsid, String url) { if (lookup == null) @@ -57,16 +60,18 @@ } if (lsType == LSIDDataLookup.UNKNOWN) return null; - + return new LSIDMetadataPort[] { new SOAPLocation("BioMOBYMetadataSOAPPort", "http://" - + properties.getProperty("lsid_domain") + ":" - + properties.getProperty("lsid_port") + "/authority/metadata"), - new HTTPLocation("BioMOBYMetadataHTTPPort", properties.getProperty("lsid_domain"), - Integer.parseInt(properties.getProperty("lsid_port")), - "/authority/metadata") }; + + System.getProperty("lsid_domain") + ":" + System.getProperty("lsid_port") + + "/authority/metadata"), + new HTTPLocation("BioMOBYMetadataHTTPPort", System.getProperty("lsid_domain"), + Integer.parseInt(System.getProperty("lsid_port")), "/authority/metadata") }; } + // NOTE: This class assumes that you have set system properties for + // lsid_domain and lsid_port - if they are not set, then exceptions are + // thrown public LSIDDataPort[] getDataLocations(LSID lsid, String url) { if (lookup == null) @@ -78,10 +83,10 @@ return new LSIDDataPort[] { new SOAPLocation("BioMOBYDataSOAPPort", "http://" - + properties.getProperty("lsid_domain") + ":" - + properties.getProperty("lsid_port") + "/authority/data"), - new HTTPLocation("BioMOBYDataHTTPPort", properties.getProperty("lsid_domain"), - Integer.parseInt(properties.getProperty("lsid_port")), "/authority/data") }; + + System.getProperty("lsid_domain") + ":" + System.getProperty("lsid_port") + + "/authority/data"), + new HTTPLocation("BioMOBYDataHTTPPort", System.getProperty("lsid_domain"), Integer + .parseInt(System.getProperty("lsid_port")), "/authority/data") }; } /* @@ -149,57 +154,17 @@ */ public void initService(LSIDServiceConfig config) throws LSIDServerException { lookup = new LSIDDataLookup(); + ContextLoader cLoader = null; try { - - Context c = new InitialContext(); - try { - String LSID_SERVER = (String) c.lookup("java:comp/env/LSID_SERVER"); - - if (LSID_SERVER != null && !LSID_SERVER.equals("")) { - properties.setProperty("lsid_domain", LSID_SERVER); - } - } catch (Exception ex) { - System.err.println(ex.getLocalizedMessage()); - } - - try { - String LSID_PORT = (String) c.lookup("java:comp/env/LSID_PORT"); - if (LSID_PORT != null && !LSID_PORT.equals("")) { - properties.setProperty("lsid_port", LSID_PORT); - } - } catch (Exception ex) { - System.err.println(ex.getLocalizedMessage()); - } - try { - String CONFIG = (String) c.lookup("java:comp/env/MOBY_CENTRAL_CONFIG"); - if (CONFIG != null && !CONFIG.equals("")) { - System.setProperty("MOBY_CENTRAL_CONFIG", CONFIG); - properties.setProperty("MOBY_CENTRAL_CONFIG", CONFIG); - } - } catch (Exception ex) { - System.err.println(ex.getLocalizedMessage()); - } - try { - String CONFIG = (String) c.lookup("java:comp/env/MOBY_SERVER"); - if (CONFIG != null && !CONFIG.equals("")) { - properties.setProperty("MOBY_SERVER", CONFIG); - System.setProperty("MOBY_SERVER", CONFIG); - } - } catch (Exception ex) { - System.err.println(ex.getLocalizedMessage()); - } - try { - String CONFIG = (String) c.lookup("java:comp/env/MOBY_URI"); - if (CONFIG != null && !CONFIG.equals("")) { - System.setProperty("MOBY_URI", CONFIG); - properties.setProperty("MOBY_URI", CONFIG); - } - } catch (Exception ex) { - System.err.println(ex.getLocalizedMessage()); - } - + cLoader = (ContextLoader) DiscoverSingleton.find(Class + .forName((String) ContextLoader.class.getCanonicalName()), Class.forName( + (String) ContextLoader.class.getCanonicalName()).getName()); + log + .info((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!" + : "ContextLoader has loaded successfully.")); } catch (Exception e) { - System.err.println(e.getLocalizedMessage()); + log.warn("ContextLoader is null and is therefore not loaded. This is BAD!" + + System.getProperty("line.separator") + e.getStackTrace()); } } } \ No newline at end of file From kawas at dev.open-bio.org Tue Oct 10 21:54:51 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 10 Oct 2006 21:54:51 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610110154.k9B1spNL025436@dev.open-bio.org> kawas Tue Oct 10 21:54:51 EDT 2006 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/rdf/builder Modified Files: ServiceInstanceRDF.java RDFConfigure.java Log Message: moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.30,1.31 RDFConfigure.java,1.21,1.22 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2006/08/30 16:55:02 1.30 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2006/10/11 01:54:51 1.31 @@ -9,19 +9,14 @@ import java.net.URL; import java.util.HashMap; import java.util.Map; -import java.util.Properties; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; +import org.apache.commons.discovery.tools.DiscoverSingleton; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.biomoby.client.CentralImpl; import org.biomoby.client.rdf.vocabulary.DC_PROTEGE; import org.biomoby.client.rdf.vocabulary.FetaVocabulary; - -import org.biomoby.registry.properties.MobyProperties; +import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader; import org.biomoby.registry.properties.RegistryOS; import org.biomoby.shared.Central; import org.biomoby.shared.MobyData; @@ -29,7 +24,6 @@ import org.biomoby.shared.MobyNamespace; import org.biomoby.shared.MobyPrimaryDataSet; import org.biomoby.shared.MobyPrimaryDataSimple; -import org.biomoby.shared.MobyResourceRef; import org.biomoby.shared.MobySecondaryData; import org.biomoby.shared.MobyService; import org.biomoby.shared.data.MobyDataSecondaryInstance; @@ -79,92 +73,42 @@ private static final String DCP = DC_PROTEGE.getURI(); - private static final String OBJ;// = - - // "http://biomoby.org/RESOURCES/MOBY-S/Objects#"; - - private static final String SRV;// = - - // "http://biomoby.org/RESOURCES/MOBY-S/Services#"; - - private static final String NS;// = - - // "http://biomoby.org/RESOURCES/MOBY-S/Namespaces#"; - - private static final String MP;// = - - // "http://biomoby.org/RESOURCES/MOBY-S/Predicates#"; - - private static final String SI;// = - // "http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#"; + private static final String OBJ; + private static final String SRV; + private static final String NS; + private static final String MP; + private static final String SI; + + private static final String SERVER; static { - boolean __success = false; - // attempt 1 - servlet context - Context c; + ContextLoader cLoader = null; try { - c = new InitialContext(); - String MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER"); - if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) { - System.setProperty("MOBY_SERVER", MOBY_SERVER); - try { - Central central = new CentralImpl(MOBY_SERVER); - MobyResourceRef[] refs = central.getResourceRefs(); - for (int i = 0; i < refs.length; i++) { - String url = refs[i].getResourceLocation().toExternalForm(); - if (url.lastIndexOf("#") < 0) - url = url + "#"; - URI_MAP.put(refs[i].getResourceName(), url); - } - } catch (Exception ex) { + cLoader = (ContextLoader) DiscoverSingleton.find(Class + .forName((String) ContextLoader.class.getCanonicalName()), Class.forName( + (String) ContextLoader.class.getCanonicalName()).getName()); + log + .info((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!" + : "ContextLoader has loaded successfully.")); + } catch (Exception e) { + log.warn("ContextLoader is null and is therefore not loaded. This is BAD!" + + System.getProperty("line.separator") + e.getMessage()); + } + + log.info("Setting RDF ResourceLocations (RDFConfigure) for current registry..."); - } - __success = true; - } - String MOBY_URI = (String) c.lookup("java:comp/env/MOBY_URI"); - if (MOBY_URI != null && !MOBY_URI.equals("")) { - System.setProperty("MOBY_URI", MOBY_URI); - __success = true; - } - } catch (NamingException e) { + + OBJ = (String) cLoader.getURI_MAP().get("Object"); - // e.printStackTrace(); - } + SRV = (String) cLoader.getURI_MAP().get("Service"); - // attempt 2 - environment variables - if (!__success) { - // maybe try for environment variables - Properties p = MobyProperties.PROPERTIES(); - String MOBY_SERVER = (String) p.get("MOBY_SERVER"); - if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) { - System.setProperty("MOBY_SERVER", MOBY_SERVER); - try { - Central central = new CentralImpl(MOBY_SERVER); - MobyResourceRef[] refs = central.getResourceRefs(); - for (int i = 0; i < refs.length; i++) { - String url = refs[i].getResourceLocation().toExternalForm(); - if (url.lastIndexOf("#") < 0) - url = url + "#"; - URI_MAP.put(refs[i].getResourceName(), url); - } - } catch (Exception ex) { + NS = (String) cLoader.getURI_MAP().get("Namespace"); - } - } - String MOBY_URI = (String) p.get("MOBY_URI"); - if (MOBY_URI != null && !MOBY_URI.equals("")) { - System.setProperty("MOBY_URI", MOBY_URI); - } - } - OBJ = (URI_MAP.get("Object") != null ? (String) URI_MAP.get("Object") - : "http://biomoby.org/RESOURCES/MOBY-S/Objects#"); - SRV = (URI_MAP.get("Service") != null ? (String) URI_MAP.get("Service") - : "http://biomoby.org/RESOURCES/MOBY-S/Services#"); - NS = (URI_MAP.get("Namespace") != null ? (String) URI_MAP.get("Namespace") - : "http://biomoby.org/RESOURCES/MOBY-S/Namespaces#"); MP = "http://biomoby.org/RESOURCES/MOBY-S/Predicates#"; - SI = (URI_MAP.get("ServiceInstance") != null ? (String) URI_MAP.get("ServiceInstance") - : "http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#"); + + SI = (String) cLoader.getURI_MAP().get("ServiceInstance"); + + SERVER = cLoader.getFULL_SERVER_URL(); } /** @@ -274,7 +218,7 @@ try { central = new CentralImpl(url, uri); } catch (MobyException e) { - System.err.println("Could not connect to " + url + " in findService."); + log.error("Could not connect to " + url + " in findService."); return empty; } // set up the query service @@ -284,7 +228,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("Could not find service:\n" + e1.getMessage()); + log.error("Could not find service:\n" + e1.getMessage()); return empty; } // only one service should be returned! @@ -304,7 +248,7 @@ try { central = new CentralImpl(url, uri); } catch (MobyException e) { - System.err.println("Could not connect to " + url + " in findService."); + log.error("Could not connect to " + url + " in findService."); return empty; } // set up the query service @@ -314,7 +258,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("Could not find service:\n" + e1.getMessage()); + log.error("Could not find service:\n" + e1.getMessage()); return empty; } // get the rdf @@ -358,7 +302,7 @@ try { central = new CentralImpl(url, uri); } catch (MobyException e) { - System.err.println("Could not connect to " + url + " in findService."); + log.error("Could not connect to " + url + " in findService."); return empty; } // set up the query service @@ -368,7 +312,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("Could not find service:\n" + e1.getMessage()); + log.error("Could not find service:\n" + e1.getMessage()); return empty; } // only one service should be returned! @@ -388,7 +332,7 @@ try { central = new CentralImpl(url, uri); } catch (MobyException e) { - System.err.println("Could not connect to " + url + " in findService."); + log.error("Could not connect to " + url + " in findService."); return empty; } // set up the query service @@ -398,7 +342,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("Could not find service:\n" + e1.getMessage()); + log.error("Could not find service:\n" + e1.getMessage()); return empty; } // get the rdf @@ -421,50 +365,13 @@ // initialize central try { if (!useTestMachine) { - String registryURL = null; - String registryNamespace = null; - Map map = RegistryOS.getEnv(); - if (!map.isEmpty()) { - registryURL = (String) map.get("MOBY_SERVER"); - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - log.info("Using URL: " + registryURL + " URI: " + registryNamespace); - if (registryURL == null) { - // use default registry, since we dont have a local one - central = new CentralImpl(); - } else if (registryNamespace == null) { - // use default namespace since one isnt defined - central = new CentralImpl(registryURL); - } else { - // use defined url and namespacce - central = new CentralImpl(registryURL, registryNamespace); - } - } else { - // perhaps the System propery was set earlier. - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - - // use the default central if we have no other choice - if (registryURL != null) - if (registryNamespace != null) - central = new CentralImpl(registryURL, registryNamespace); - else - central = new CentralImpl(registryURL); - else - central = new CentralImpl(); - } + central = getCentralImpl(); } else { // use test machine no longer supported return empty; } } catch (MobyException e) { - System.err.println("error in getAllServices 1:\n" + e.getMessage()); + log.error("error in getAllServices 1:\n" + e.getMessage()); return empty; } // set up the query service @@ -474,7 +381,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("error in getAllServices 2:\n" + e1.getMessage()); + log.error("error in getAllServices 2:\n" + e1.getMessage()); return empty; } // should have >= 1 service returned @@ -487,6 +394,42 @@ return str; } + /** + * @return + * @throws MobyException + */ + private static Central getCentralImpl() throws MobyException { + Central central; + String registryURL = null; + String registryNamespace = null; + + // are they set in the system? + registryURL = System.getProperty("MOBY_SERVER"); + registryNamespace = System.getProperty("MOBY_URI"); + + // if we didnt set them check the environment + if (registryURL == null) { + Map map = RegistryOS.getEnv(); + if (!map.isEmpty()) { + registryURL = (String) map.get("MOBY_SERVER"); + registryNamespace = (String) map.get("MOBY_URI"); + } + } + + log.info("Using URL: " + (registryURL == null ? CentralImpl.DEFAULT_ENDPOINT : registryURL) + " URI: " + (registryNamespace == null ? CentralImpl.DEFAULT_NAMESPACE: registryNamespace)); + if (registryURL == null) { + // use default registry, since we dont have a local one + central = new CentralImpl(); + } else if (registryNamespace == null) { + // use default namespace since one isnt defined + central = new CentralImpl(registryURL); + } else { + // use defined url and namespacce + central = new CentralImpl(registryURL, registryNamespace); + } + return central; + } + /* * a method that retrieves all of the service instances based on an @@ -500,50 +443,13 @@ // initialize central try { if (!useTestMachine) { - String registryURL = null; - String registryNamespace = null; - Map map = RegistryOS.getEnv(); - if (!map.isEmpty()) { - registryURL = (String) map.get("MOBY_SERVER"); - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - log.info("Using URL: " + registryURL + " URI: " + registryNamespace); - if (registryURL == null) { - // use default registry, since we dont have a local one - central = new CentralImpl(); - } else if (registryNamespace == null) { - // use default namespace since one isnt defined - central = new CentralImpl(registryURL); - } else { - // use defined url and namespacce - central = new CentralImpl(registryURL, registryNamespace); - } - } else { - // perhaps the System propery was set earlier. - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - - // use the default central if we have no other choice - if (registryURL != null) - if (registryNamespace != null) - central = new CentralImpl(registryURL, registryNamespace); - else - central = new CentralImpl(registryURL); - else - central = new CentralImpl(); - } + central = getCentralImpl(); } else { // use test machine no longer supported return empty; } } catch (MobyException e) { - System.err.println("error in getAllServices 1:\n" + e.getMessage()); + log.error("error in getAllServices 1:\n" + e.getMessage()); return empty; } // set up the query service @@ -553,7 +459,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("error in getAllServices 2:\n" + e1.getMessage()); + log.error("error in getAllServices 2:\n" + e1.getMessage()); return empty; } // should have >= 1 service returned @@ -578,50 +484,13 @@ // initialize central try { if (!useTestMachine) { - String registryURL = null; - String registryNamespace = null; - Map map = RegistryOS.getEnv(); - if (!map.isEmpty()) { - registryURL = (String) map.get("MOBY_SERVER"); - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - log.info("Using URL: " + registryURL + " URI: " + registryNamespace); - if (registryURL == null) { - // use default registry, since we dont have a local one - central = new CentralImpl(); - } else if (registryNamespace == null) { - // use default namespace since one isnt defined - central = new CentralImpl(registryURL); - } else { - // use defined url and namespacce - central = new CentralImpl(registryURL, registryNamespace); - } - } else { - // use default registry since we cant determine if local one - // exists - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - - if (registryURL != null) - if (registryNamespace != null) - central = new CentralImpl(registryURL, registryNamespace); - else - central = new CentralImpl(registryURL); - else - central = new CentralImpl(); - } + central = getCentralImpl(); } else { // use test machine no longer supported return empty; } } catch (MobyException e) { - System.err.println("error in getService 1:\n" + e.getMessage()); + log.error("error in getService 1:\n" + e.getMessage()); return empty; } // set up the query service @@ -631,7 +500,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("error in getService 2:\n" + e1.getMessage()); + log.error("error in getService 2:\n" + e1.getMessage()); return empty; } // only one service should be returned! @@ -657,50 +526,13 @@ // initialize central try { if (!useTestMachine) { - String registryURL = null; - String registryNamespace = null; - Map map = RegistryOS.getEnv(); - if (!map.isEmpty()) { - registryURL = (String) map.get("MOBY_SERVER"); - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - log.info("Using URL: " + registryURL + " URI: " + registryNamespace); - if (registryURL == null) { - // use default registry, since we dont have a local one - central = new CentralImpl(); - } else if (registryNamespace == null) { - // use default namespace since one isnt defined - central = new CentralImpl(registryURL); - } else { - // use defined url and namespacce - central = new CentralImpl(registryURL, registryNamespace); - } - } else { - // use default registry since we cant determine if local one - // exists - if (registryURL == null) - registryURL = System.getProperty("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryNamespace == null) - registryNamespace = System.getProperty("MOBY_URI"); - - if (registryURL != null) - if (registryNamespace != null) - central = new CentralImpl(registryURL, registryNamespace); - else - central = new CentralImpl(registryURL); - else - central = new CentralImpl(); - } + central = getCentralImpl(); } else { // use test machine no longer supported return empty; } } catch (MobyException e) { - System.err.println("error in getService 1:\n" + e.getMessage()); + log.error("error in getService 1:\n" + e.getMessage()); return empty; } // set up the query service @@ -710,7 +542,7 @@ try { services = central.findService(service); } catch (MobyException e1) { - System.err.println("error in getService 2:\n" + e1.getMessage()); + log.error("error in getService 2:\n" + e1.getMessage()); return empty; } // only one service should be returned! @@ -794,9 +626,10 @@ { // add meta information on whether or not this service is // callable (i.e. times out or not) + if (useLSIDs) try { URL _url_ = new URL( - "http://mobycentral.icapture.ubc.ca:8090/servlets/ValidateService?authority=" + SERVER + "ValidateService?authority=" + services[i].getAuthority() + "&service=" + services[i].getName()); BufferedReader in = new BufferedReader( @@ -1016,7 +849,7 @@ // should not be here, but ... } else { // ERROR - System.err.println("Secondary input was not of known subtype (Secondary)"); + log.error("Secondary input was not of known subtype (Secondary)"); return null; } } @@ -1170,28 +1003,7 @@ MobyService[] services = null; // initialize central try { - String registryURL; - String registryNamespace; - Map map = RegistryOS.getEnv(); - if (!map.isEmpty()) { - registryURL = (String) map.get("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - log.info("Using URL: " + registryURL + " URI: " + registryNamespace); - if (registryURL == null) { - // use default registry, since we dont have a local one - central = new CentralImpl(); - } else if (registryNamespace == null) { - // use default namespace since one isnt defined - central = new CentralImpl(registryURL); - } else { - // use defined url and namespacce - central = new CentralImpl(registryURL, registryNamespace); - } - } else { - // use default registry since we cant determine if local one - // exists - central = new CentralImpl(); - } + central = getCentralImpl(); } catch (MobyException e) { return false; } @@ -1213,28 +1025,7 @@ MobyService[] services = null; // initialize central try { - String registryURL; - String registryNamespace; - Map map = RegistryOS.getEnv(); - if (!map.isEmpty()) { - registryURL = (String) map.get("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - log.info("Using URL: " + registryURL + " URI: " + registryNamespace); - if (registryURL == null) { - // use default registry, since we dont have a local one - central = new CentralImpl(); - } else if (registryNamespace == null) { - // use default namespace since one isnt defined - central = new CentralImpl(registryURL); - } else { - // use defined url and namespacce - central = new CentralImpl(registryURL, registryNamespace); - } - } else { - // use default registry since we cant determine if local one - // exists - central = new CentralImpl(); - } + central = getCentralImpl(); } catch (MobyException e) { return false; } @@ -1262,32 +1053,7 @@ MobyService[] services = null; // initialize central try { - String registryURL; - String registryNamespace; - Map map = RegistryOS.getEnv(); - if (!map.isEmpty()) { - registryURL = (String) map.get("MOBY_SERVER"); - registryNamespace = (String) map.get("MOBY_URI"); - if (registryURL == null) { - // use default registry, since we dont have a local one - central = new CentralImpl(); - } else if (registryNamespace == null) { - // use default namespace since one isnt defined - central = new CentralImpl(registryURL); - } else { - // use defined url and namespacce - central = new CentralImpl(registryURL, registryNamespace); - } - log.info("Using URL: " - + (registryURL == null ? CentralImpl.DEFAULT_ENDPOINT : registryURL) - + " URI: " - + (registryNamespace == null ? CentralImpl.DEFAULT_NAMESPACE - : registryNamespace)); - } else { - // use default registry since we cant determine if local one - // exists - central = new CentralImpl(); - } + central = getCentralImpl(); } catch (MobyException e) { return ""; } @@ -1324,7 +1090,7 @@ // false)); // log.info(findService("bioinfo.icapture.ubc.ca","MOBYSHoundGetGenBankGFF", // false)); - log.info(findService("genome.imim.es", null, false)); + log.info(findService("blah.blah.blah", "Echo_test", "http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl", "http://bioinfo.icapture.ubc.ca/MOBY/Central", false)); // log.info(findService("", "", false)); } } =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java 2006/08/28 13:50:13 1.21 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java 2006/10/11 01:54:51 1.22 @@ -5,19 +5,15 @@ import java.io.IOException; import java.io.OutputStream; import java.net.URL; -import java.util.HashMap; import java.util.Map; -import java.util.Properties; -import javax.naming.Context; -import javax.naming.InitialContext; - -import org.biomoby.client.CentralImpl; +import org.apache.commons.discovery.tools.DiscoverSingleton; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.biomoby.client.rdf.vocabulary.DC_PROTEGE; import org.biomoby.client.rdf.vocabulary.Predicates; -import org.biomoby.registry.properties.MobyProperties; -import org.biomoby.shared.Central; -import org.biomoby.shared.MobyResourceRef; +import org.biomoby.client.ui.graphical.servlet.jresources.RESOURCE; +import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; @@ -54,84 +50,53 @@ */ @SuppressWarnings("unchecked") public class RDFConfigure { + private static Log log = LogFactory.getLog(RESOURCE.class); + + final private static String newline = System.getProperty("line.separator"); + final public static String URI_OBJECT; + + final public static String URI_SERVICE; + + final public static String URI_NAMESPACE; + + final public static String URI_PREDICATE; + + final public static String URI_ServiceINSTANCE; /* * Some constants for use in the rdfs */ - private static Map URI_MAP = new HashMap(); + static { - boolean __success = false; - // attempt 1 - servlet context + ContextLoader cLoader = null; try { - Context c = new InitialContext(); - String MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER"); - if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) { - Central central = new CentralImpl(MOBY_SERVER); - MobyResourceRef[] refs = central.getResourceRefs(); - for (int i = 0; i < refs.length; i++) { - String url = refs[i].getResourceLocation().toExternalForm(); - if (url.lastIndexOf("#") < 0) - url = url + "#"; - URI_MAP.put(refs[i].getResourceName(), url); - } - __success = true; - } - + cLoader = (ContextLoader) DiscoverSingleton.find(Class + .forName((String) ContextLoader.class.getCanonicalName()), Class.forName( + (String) ContextLoader.class.getCanonicalName()).getName()); + log + .info((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!" + : "ContextLoader has loaded successfully.")); } catch (Exception e) { - e.printStackTrace(); + log.warn("ContextLoader is null and is therefore not loaded. This is BAD!" + + System.getProperty("line.separator") + e.getMessage()); } - // attempt 2 - environment variables - if (!__success) { - // maybe try for environment variables - Properties p = MobyProperties.PROPERTIES(); - String MOBY_SERVER = (String) p.get("MOBY_SERVER"); - try { - if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) { - Central central = new CentralImpl(MOBY_SERVER); - MobyResourceRef[] refs = central.getResourceRefs(); - for (int i = 0; i < refs.length; i++) { - String url = refs[i].getResourceLocation().toExternalForm(); - if (url.lastIndexOf("#") < 0) - url = url + "#"; - URI_MAP.put(refs[i].getResourceName(), url); - } - __success = true; - } - } catch (Exception ex) { - // die here? - ex.printStackTrace(); - } - } - // attempt 3 - default to mobycentral - if (!__success) { - // default to mobycentral - try { - Central central = new CentralImpl(); - MobyResourceRef[] refs = central.getResourceRefs(); - for (int i = 0; i < refs.length; i++) { - String url = refs[i].getResourceLocation().toExternalForm(); - if (url.lastIndexOf("#") < 0) - url = url + "#"; - URI_MAP.put(refs[i].getResourceName(), url); - } - __success = true; - } catch (Exception ex) { - // die here? - ex.printStackTrace(); - } - } - } + + log.info("Setting RDF ResourceLocations (RDFConfigure) for current registry..."); - final public static String URI_OBJECT = (String) URI_MAP.get("Object"); // "http://biomoby.org/RESOURCES/MOBY-S/Objects#"; + + URI_OBJECT = (String) cLoader.getURI_MAP().get("Object"); - final public static String URI_SERVICE = (String) URI_MAP.get("Service"); // "http://biomoby.org/RESOURCES/MOBY-S/Services#"; + URI_SERVICE = (String) cLoader.getURI_MAP().get("Service"); - final public static String URI_NAMESPACE = (String) URI_MAP.get("Namespace"); // "http://biomoby.org/RESOURCES/MOBY-S/Namespaces#"; + URI_NAMESPACE = (String) cLoader.getURI_MAP().get("Namespace"); - final public static String URI_PREDICATE = "http://biomoby.org/RESOURCES/MOBY-S/Predicates#"; + URI_PREDICATE = "http://biomoby.org/RESOURCES/MOBY-S/Predicates#"; + + URI_ServiceINSTANCE = (String) cLoader.getURI_MAP().get("ServiceInstance"); + } - final public static String URI_ServiceINSTANCE = (String) URI_MAP.get("ServiceInstance"); // "http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#"; + private Model model = null; From kawas at dev.open-bio.org Tue Oct 10 21:55:44 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 10 Oct 2006 21:55:44 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610110155.k9B1thpg025500@dev.open-bio.org> kawas Tue Oct 10 21:55:43 EDT 2006 Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes In directory dev.open-bio.org:/tmp/cvs-serv25465/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes Modified Files: Types.java Log Message: moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes Types.java,1.6,1.7 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes/Types.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes/Types.java 2006/05/24 18:48:31 1.6 +++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes/Types.java 2006/10/11 01:55:43 1.7 @@ -5,8 +5,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.naming.Context; -import javax.naming.InitialContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -32,46 +30,7 @@ * @see javax.servlet.GenericServlet#init() */ public final void init() throws ServletException { - // super.init(); - // try to load environment variables set in context.xml - try { - Context c = new InitialContext(); - - try { - String MOBY_CENTRAL_CONFIG = null; - MOBY_CENTRAL_CONFIG = (String) c.lookup("java:comp/env/MOBY_CENTRAL_CONFIG"); - if (MOBY_CENTRAL_CONFIG != null && !MOBY_CENTRAL_CONFIG.equals("")) { - // set MOBY_CENTRAL_CONFIG - log.info("init(setting MOBY_CENTRAL_CONFIG)"); - System.setProperty("MOBY_CENTRAL_CONFIG", MOBY_CENTRAL_CONFIG); - } - - } catch (Exception ex) { - } - try { - String MOBY_SERVER = null; - MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER"); - if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) { - // set MOBY_SERVER - log.info("init(setting MOBY_SERVER)"); - System.setProperty("MOBY_SERVER", MOBY_SERVER); - } - } catch (Exception ex) { - } - - try { - String MOBY_URI = null; - MOBY_URI = (String) c.lookup("java:comp/env/MOBY_URI"); - if (MOBY_URI != null && !MOBY_URI.equals("")) { - // set MOBY_URI - log.info("init(setting MOBY_URI)"); - System.setProperty("MOBY_URI", MOBY_URI); - } - } catch (Exception ex) { - } - - } catch (Exception e) { - } + } /* (non-Javadoc) @@ -87,7 +46,7 @@ Pattern p ; Matcher m ; if (path == null) { - response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Please specify which definitions you are looking for (Objects, Services, or Namespaces)."); + response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Please specify which definitions you are looking for (i.e., Objects, Services, or Namespaces)."); return; } p = Pattern.compile("/Services\\S*"); From kawas at dev.open-bio.org Wed Oct 11 16:39:32 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 11 Oct 2006 16:39:32 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610112039.k9BKdWVK027958@dev.open-bio.org> kawas Wed Oct 11 16:39:31 EDT 2006 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv27923/Java/docs Modified Files: RegistryServlets.html Log Message: Added some configuration information. moby-live/Java/docs RegistryServlets.html,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/RegistryServlets.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/10 18:51:50 1.1 +++ /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/11 20:39:31 1.2 @@ -4,6 +4,11 @@
Installing the servlets is extremely straight-forward and quite easy.
java -jar install.jar+
A GUI should result that will guide you through the installation process.
+Once you have those values, you will have to modify the servlets configuration file that is located at /path/to/tomcat/webapps/authority/META-INF/context.xml
+++How to Configure
+ +
Once you have those values, you will have to modify the servlets configuration file that is located at /path/to/tomcat/webapps/authority/META-INF/context.xml
The file context.xml is written in XML and contains numerous entries that look like this:
@@ -115,12 +133,14 @@suffix The file name suffix -- +For a more precise explanation of how to configure this aspect of the servlets, please refer to http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html -+++For a more precise explanation of how to configure this aspect of the servlets, please refer to
+
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.htmlOnce you have modified these parameters in this file, you may close the file.
-Next, you will have to open the file mobycentral.config and add or modify a couple of configuration parameters:
+Next, you will have to open the file mobycentral.config and add or modify a couple of configuration parameters:
-
lsid_authority | @@ -183,7 +203,7 @@
-
lsid_authority | @@ -201,16 +221,50 @@
Once these values have been added or modified, make sure to save the configuration files and restart the server. Your changes should be reflected in your registry.
++
To enable the LSID authority servlets, you will have to perform up to 2 more tasks:
+Setting up DNS (excerpt)
+++All that you - or your system administrator - must do, is to add a service record for the machine that will run the authority.
+Suppose the machine is authority.company.net and that it will serve as the authority named company.net. Further suppose that the service will be on port 8080. The record that must be added should go into the master zone file for company.net's DNS server (perhaps a file named /var/named/company.net.zone on company.net):
+_lsid._tcp IN SRV 1 0 8080 authority.company.net.+If the authority name is supposed to be authority.company.net rather than company.net, the record in company.net's zone file should look like:
+_lsid._tcp.authority IN SRV 1 0 8080 authority.company.net.+
++Enabling ProxyPass Apache Directives
+++For those of you that are running Tomcat on a non-standard port, you may find that users of your registry cannot access those ports due to firewall restrictions. One way around this is to set up ProxyPass directives in your web server.
+Before you begin, it is highly recommended that you backup any files mentioned here that you will be updating.
+Open up your Apache servers httpd.conf file and make sure that following line is uncommented:
+LoadModule proxy_module modules/mod_proxy.so+Then add the following to the bottom of the file
++ProxyPass /authority http://localhost:8080/authority +ProxyPass /authority/ http://localhost:8080/authority/ +ProxyPass authority http://localhost:8080/authority +ProxyPass authority/ http://localhost:8080/authority/+ Now requests made to localhost/authority will be sent to localhost:8080/authority and your users should not have any problems accessing the URLs.
Once these values have been added or modified, make sure to save the configuration files and restart the server. Your changes should be reflected in your registry.
+
Once you have installed and configured the servlets, you can determine if the install was successful by attempting to resolve the following URL:
+++http://your.domain.com:your_port/authority/moby.jsp
+
where your.domain.com is the domain name of the server that the servlets were installed on and your_port is the server port.
+The resulting page will outline those servlets that are included in this distribution and will provide you with links to test them.
#----------------------------------------------------------------- -# MOBY::Data::GenericSequence +# MOSES::MOBY::Data::GenericSequence # Generated: 30-Jul-2006 14:55:09 BST # Contact: Martin Senger <martin.senger at gmail.com> or # Edward Kawas <edward.kawas at gmail.com> #----------------------------------------------------------------- -package MOBY::Data::GenericSequence; +package MOSES::MOBY::Data::GenericSequence; no strict; use vars qw( @ISA ); - at ISA = qw( MOBY::Data::VirtualSequence ); + at ISA = qw( MOSES::MOBY::Data::VirtualSequence ); use strict; -use MOBY::Data::Object; +use MOSES::MOBY::Data::Object; #----------------------------------------------------------------- # accessible attributes @@ -630,7 +631,7 @@ { my %_allowed = ( - 'SequenceString' => {type => 'MOBY::Data::String'}, + 'SequenceString' => {type => 'MOSES::MOBY::Data::String'}, ); sub _accessible { @@ -721,11 +722,11 @@ # This is a mandatory section - but you can still choose one of # the two options (keep one and commented out the other): #----------------------------------------------------------------- -use MOBY::Base; +use MOSES::MOBY::Base; # --- (1) this option loads dynamically everything BEGIN { - use MOBY::Generators::GenServices; - new MOBY::Generators::GenServices->load + use MOSES::MOBY::Generators::GenServices; + new MOSES::MOBY::Generators::GenServices->load (authority => 'samples.jmoby.net', service_names => ['Mabuhay']); } @@ -741,8 +742,8 @@ # (this to stay here with any of the options above) use vars qw( @ISA ); @ISA = qw( net::jmoby::samples::MabuhayBase ); -use MOBY::Package; -use MOBY::ServiceException; +use MOSES::MOBY::Package; +use MOSES::MOBY::ServiceException; use strict;@@ -771,7 +772,7 @@ # EDIT: PUT REAL VALUES INTO THE RESPONSE # fill the response foreach my $elem (0..2) { - my $hello = new MOBY::Data::simple_key_value_pair + my $hello = new MOSES::MOBY::Data::simple_key_value_pair ( value => "this is a 'value $elem'", # TO BE EDITED key => "this is a 'key $elem'", # TO BE EDITED @@ -867,7 +868,7 @@
Perl-MoSeS VERSION: 0.8 @@ -950,13 +951,13 @@An obvious question is "where are the data types generated to"?2006/07/30 23:00:33 (492) INFO> [[undef]] GenTypes.pm:125 - Data types will be generated into: '/home/senger/moby-live/Java/src/scripts/../Perl/generated' -2006/07/30 23:00:33 (493) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::BasicGFFSequenceFeature will be generated -2006/07/30 23:00:33 (665) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::DNASequence will be generated -2006/07/30 23:00:33 (669) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::DNASequenceWithGFFFeatures will be generated -2006/07/30 23:00:33 (673) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::GenericSequence will be generated -2006/07/30 23:00:33 (676) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::NucleotideSequence will be generated -2006/07/30 23:00:33 (680) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::VirtualSequence will be generated -2006/07/30 23:00:33 (684) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::multi_key_value_pair will be generated+2006/07/30 23:00:33 (493) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::BasicGFFSequenceFeature will be generated +2006/07/30 23:00:33 (665) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::DNASequence will be generated +2006/07/30 23:00:33 (669) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::DNASequenceWithGFFFeatures will be generated +2006/07/30 23:00:33 (673) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::GenericSequence will be generated +2006/07/30 23:00:33 (676) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::NucleotideSequence will be generated +2006/07/30 23:00:33 (680) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::VirtualSequence will be generated +2006/07/30 23:00:33 (684) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::multi_key_value_pair will be generated
@@ -997,14 +998,14 @@ senger at sherekhan:~/jMoby/src/Perl$ ../scripts/generate-datatypes.pl Generating all data types. Done. -senger at sherekhan:~/jMoby/src/Perl$ for n in generated/MOBY/Data/*.pm ; do perl -c $n ; done -generated/MOBY/Data/ABI_Encoded.pm syntax OK -generated/MOBY/Data/Ace_Text.pm syntax OK -generated/MOBY/Data/Alignment.pm syntax OK +senger at sherekhan:~/jMoby/src/Perl$ for n in generated/MOSES/MOBY/Data/*.pm ; do perl -c $n ; done +generated/MOSES/MOBY/Data/ABI_Encoded.pm syntax OK +generated/MOSES/MOBY/Data/Ace_Text.pm syntax OK +generated/MOSES/MOBY/Data/Alignment.pm syntax OK ... -generated/MOBY/Data/WU_BLAST_Text.pm syntax OK -generated/MOBY/Data/xdom_flatfile.pm syntax OK -generated/MOBY/Data/zPDB.pm syntax OK +generated/MOSES/MOBY/Data/WU_BLAST_Text.pm syntax OK +generated/MOSES/MOBY/Data/xdom_flatfile.pm syntax OK +generated/MOSES/MOBY/Data/zPDB.pm syntax OK senger at sherekhan:~/jMoby/src/Perl$ @@ -1016,7 +1017,7 @@ script).
Usually, you generate code for one or only several -services. And because all services belong to some authority you need +services. And because each service belongs to an authority you need to tell both:
@@ -1111,7 +1112,7 @@
IRRI, MIPS, default, iCAPTURE, testing @@ -1161,7 +1162,7 @@ } };
- This script does not have any options. + This script does not have any options (nor the help).
../scripts/local-cache.pl -t DNASequence
--> MOBY::Def::DataType=HASH(0x86026b8) +-> MOSES::MOBY::Def::DataType=HASH(0x86026b8) 'authority' => 'www.illuminae.com' 'children' => ARRAY(0x86028b0) empty array 'description' => 'Lightweight representation a DNA sequence' 'email' => 'markw at illuminae.com' 'lsid' => 'urn:lsid:biomoby.org:objectclass:DNASequence:2001-09-21T16-00-00Z' - 'module_name' => 'MOBY::Data::DNASequence' - 'module_parent' => 'MOBY::Data::NucleotideSequence' + 'module_name' => 'MOSES::MOBY::Data::DNASequence' + 'module_parent' => 'MOSES::MOBY::Data::NucleotideSequence' 'name' => 'DNASequence' 'parent' => 'NucleotideSequence'@@ -1196,16 +1197,16 @@
All children of 'DNASequence': --> MOBY::Def::Relationship=HASH(0x860e608) +-> MOSES::MOBY::Def::Relationship=HASH(0x860e608) 'datatype' => 'String' 'memberName' => 'SequenceString' - 'module_datatype' => 'MOBY::Data::String' + 'module_datatype' => 'MOSES::MOBY::Data::String' 'original_memberName' => 'SequenceString' 'relationship' => 'HASA' --> MOBY::Def::Relationship=HASH(0x863a3bc) +-> MOSES::MOBY::Def::Relationship=HASH(0x863a3bc) 'datatype' => 'Integer' 'memberName' => 'Length' - 'module_datatype' => 'MOBY::Data::Integer' + 'module_datatype' => 'MOSES::MOBY::Data::Integer' 'original_memberName' => 'Length' 'relationship' => 'HASA'@@ -1299,8 +1300,8 @@ XML. It always takes an XML file name as a parameter:
-../scripts/testing-parser.pl jMoby/data/parser-test-input2.xml -../scripts/testing-parser.pl -r jMoby/data/parser-test-input2.xml+../scripts/testing-parser.pl ~/jMoby/data/parser-test-input2.xml +../scripts/testing-parser.pl -r ~/jMoby/data/parser-test-input2.xml An interesting is the -b parameter. It has the form:
@@ -1347,9 +1348,9 @@
../scripts/testing-service.pl -d Service::HelloBiomobyWorld- The output of this call was already shown -in the documentation (even though it was an example of the full, -SOAP-based call). Therefore, just look what debug messages were logged -(notice the -d option used): + The output of this call was already shown +in this documentation. Therefore, just look what debug messages were +logged (notice the -d option used):
2006/07/31 02:19:37 (561) INFO> [23856] HelloBiomobyWorldBase.pm:92 - *** REQUEST START *** @@ -1379,7 +1379,7 @@
../scripts/testing-service.pl \ -e http://localhost/cgi-bin/MobyServer.cgi HelloBiomobyWorld+
+ + There are also few other behavioral differences between these +two modes: If an input parsing error occurs (e.g. when an input has an +unknown article name), it is reported directly to the standard error +in the testing mode, but in a real mode it is properly included in the +response as an exception. Or (and only if the logging is set to record +debug messages), in testing mode the full input raw (not yet parsed) +are logged, whereas in the real mode only the first 1000 characters +are logged.
The Perl Moses internally uses Config::Simple CPAN module, -but wraps it into its own MOBY::Config. This allows expansion +but wraps it into its own MOSES::MOBY::Config. This allows expansion later, or even changing the underlying configuration system. The Config::Simple is simple (thus the name, and thus we selected it) but has few drawbacks that may be worth to work on later.
@@ -1720,16 +1730,16 @@ You can also change or add parameters during the run-time. For example, the script universal-testing.pl needs to overwrite existing parameters because it wants to create everything in a -separate space, in temporary directory, and within a 'Testing' +separate space, in a temporary directory, and within the 'Testing' package. Because the generators read from the configuration files, it is necessary to change it there:
my $outdir = File::Spec->catfile ($tmpdir, 'generated-services'); -MOBY::Config->param ('generators.impl.outdir', $outdir); -MOBY::Config->param ('generators.impl.package.prefix', 'Testing'); +MOSES::MOBY::Config->param ('generators.impl.outdir', $outdir); +MOSES::MOBY::Config->param ('generators.impl.package.prefix', 'Testing'); unshift (@INC, $MOBYCFG::GENERATORS_IMPL_OUTDIR); -my $generator = new MOBY::Generators::GenServices; +my $generator = new MOSES::MOBY::Generators::GenServices;More about how to communicate pragmatically with the configuration can @@ -1752,10 +1762,10 @@ How does it work in Perl Moses?
The logging is available from the moment when Perl Moses knows about -the MOBY::Base module. All generated service implementations -inherit from this class, so all of them has immediate access to the -logging system. By default, the MOBY::Base creates a -logger named $LOG. Which means that in your service +the MOSES::MOBY::Base module. All generated service implementations +inherit from this class, so all of them have immediate access to the +logging system. By default, the MOSES::MOBY::Base creates a +logger in a variable $LOG. Which means that in your service implementation you can log events in five different log levels:
@@ -1772,7 +1782,7 @@ You can create your own logger. Which may be good if you wish to have, for example, a different logging level for a particular service, or for a part of it (an example of such situation is in -MOBY::Parser.pm where the parser creates its own +MOSES::MOBY::Parser.pm where the parser creates its own $PLOG logger). Here is what you need to do:@@ -1794,14 +1804,14 @@ If Perl Moses cannot find a log4perl.properties file, and if there are no logging options in moby-services.cfg, it -assumes some defaults (check them in MOBY::Base, in its BEGIN +assumes some defaults (check them in MOSES::MOBY::Base, in its BEGIN section, if you need-to-know).The better way is to use log4perl.properties file. The file name can be actually different - it is specified by an option log.config in the moby-services.cfg configuration file. This is what PerlMoses installation creates there (of course, -with your own path): +using your own path):
[log] @@ -1844,7 +1854,7 @@ To change the log level to DEBUG, replace INFo by DEBUG in the first line.-The message format (in Perl Moses default way) means: +The message format (unless you change the Perl Moses default way) means:
%d (%r ) %p > [%x ] %F{1} :%L - %m %n @@ -2037,11 +2047,11 @@ # This is a mandatory section - but you can still choose one of # the two options (keep one and commented out the other): #----------------------------------------------------------------- -use MOBY::Base; +use MOSES::MOBY::Base; # --- (1) this option loads dynamically everything BEGIN { - use MOBY::Generators::GenServices; - new MOBY::Generators::GenServices->load + use MOSES::MOBY::Generators::GenServices; + new MOSES::MOBY::Generators::GenServices->load (authority => 'samples.jmoby.net', service_names => ['Mabuhay']); } @@ -2062,13 +2072,13 @@ called jobs). Your service implementation has to implement method process_it that is called for every individual job contained within every incoming request. The MOBY/Service/ServiceBase +href="MOSES/MOBY/Service/ServiceBase.html"> -->MOSES/MOBY/Service/ServiceBase has details about this method (what parameters it gets, how to deal with exceptions, etc.).-In the beginning of the generated process_it method is code -that tells you what methods are available for reading inputs, and at -the end of the same method is the code showing how to fill the +In the beginning of the generated process_it method is the +code that tells you what methods are available for reading inputs, and +at the end of the same method is the code showing how to fill the response. Feel free to remove the code, extend it, fill it, turn it upside-down, whatever. This is, after all, your implementation. And Perl Moses generator is clever enough not to overwrite the code once @@ -2077,21 +2087,32 @@
Perhaps the best way how to close this section is to show a full -implementation of (so often mentioned) service Mabuhay: +implementation of (so often mentioned) service Mabuhay (the code +is also available in jMoby/src/Perl/samples):
sub process_it { my ($self, $request, $response, $context) = @_; + # read (some) input data + # (use eval to protect against missing data) + my $language = eval { $request->language }; + my $regex = eval { $language->regex->value }; + my $ignore_cases = eval { $language->case_insensitive->value }; + + # set an exception if data are not complete + unless ($language and $regex) { + $response->record_error ( { code => INPUTS_INVALID, + msg => 'Input regular expression is missing.' } ); + return; + } - my $regex = $request->language->regex->value; - my $ignore_cases = $request->language->case_insensitive->value; - + # creating an answer (this is the "business logic" of this service) my @result_hellos = (); my @result_langs = (); open HELLO, $MOBYCFG::MABUHAY_RESOURCE_FILE - or $self->throw ('Mabuhay resource file not found.'); - while (+When you go through the code above you notice how to do basic things +that almost every service has to do. Which are: + +) { + or $self->throw ('Mabuhay resource file not found.'); + while (<HELLO>) { chomp; my ($lang, $hello) = split (/\t+/, $_, 2); if ( $ignore_cases ? @@ -2104,7 +2125,7 @@ close HELLO; foreach my $idx (0 .. $#result_hellos) { - $response->add_hello (new MOBY::Data::simple_key_value_pair + $response->add_hello (new MOSES::MOBY::Data::simple_key_value_pair ( key => $self->as_uni_string ($result_langs[$idx]), value => $self->as_uni_string ($result_hellos[$idx]) )); @@ -2112,6 +2133,119 @@ }
+ + What was not pre-generated are the methods accessing +ID and NAMESPACE. Their names are, not surprisingly, +id and namespace. For example, the Mabuhay input is +named language (as seen in the code above), so you can call: + +
+$language->id; +$language->namespace;+ + The question is what to do if input (or anything else) is not +complete or valid. This brings us to...
+ +
+open HELLO, $MOBYCFG::MABUHAY_RESOURCE_FILE + or $self->throw ('Mabuhay resource file not found.');+ + This immediately stops the processing of the input request +(ignoring all remaining jobs if they are some still there), the text +of the error message is put into the response as an exception with the +code 600 ("INTERNAL_PROCESSING_ERROR"), the same message is logged as +an error, and the response is sent back to the client.
+ + Note, however, that the response may already contain some +outputs from the previously processed jobs. If you do not like it, you +can remove it (find them in the $context parameter).
+ + Another, less drastic, option is to record an +exception (and, usually, return): + +
+$response->record_error ( { code => INPUTS_INVALID, + msg => 'Input regular expression is missing.' } );+ + This creates an exception in the response - you choose what +code to use -, and it does not prevent processing of the remaining (if +any) jobs.
+ + In addition to using an eval{} block to handle +exceptions (as shown above), you can also use a +try-catch-finally block structure if Error.pm has +been installed in your system. See documentation of +MOSES::MOBY::Base for details and examples.
+ + +
+ + Again here you can also set the ID and +NAMESPACE. For example, the code above can be extended so the +MOSES::MOBY::Data::simple_key_value_pair data type will have +also an ID and NAMESPACE: + +
+$response->add_hello (new MOSES::MOBY::Data::simple_key_value_pair + ( key => $self->as_uni_string ($result_langs[$idx]), + value => $self->as_uni_string ($result_hellos[$idx]), + id => 'this is an ID', + namespace => 'this is a NAMESPACE' + ));+ +
+# create a simple cross-reference + my $simple_xref = new MOSES::MOBY::Data::Xref + ( id => 'At263644', + namespace => 'TIGR' + ); + + # create an advanced cross-reference + my $advanced_xref = new MOSES::MOBY::Data::Xref + ( id => 'X112345', + namespace => 'EMBL', + service => 'getEMBLRecord', + authority => 'www.illuminae.com', + evidenceCode => 'IEA', + xrefType => 'transform' + ); + +# add them to the output object (which has an article name 'greeting') +$response->greeting->add_xrefs ($simple_xref); +$response->greeting->add_xrefs ($advanced_xref); ++ +
+$context->serviceNotes ("This is my note...");+
+ + +
MOBY/Base
-
And there are features (and known) bugs that should or could be -implemented (or fixed). Here are those we am aware of (B = bug, N = not yet implemented, F = potential future feature):
@@ -2327,7 +2461,7 @@ it expands hints how to write your own service implementation.
@@ -2371,7 +2505,7 @@
"; + String pre = "" + + "" + + "" + + "" + + "" + + "" + ""; Properties prop = MobyProperties.SERVICE_INSTANCE_PROPERTIES(); String rdfagent = (String) prop.get("rdfagent"); From kawas at dev.open-bio.org Mon Oct 16 13:39:49 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 16 Oct 2006 13:39:49 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610161739.k9GHdnrq016916@dev.open-bio.org> kawas Mon Oct 16 13:39:49 EDT 2006 Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY In directory dev.open-bio.org:/tmp/cvs-serv16881/Java/src/Perl/MOSES/MOBY Modified Files: Parser.pm Log Message: moby-live/Java/src/Perl/MOSES/MOBY Parser.pm,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/13 21:51:16 1.1 +++ /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/16 17:39:49 1.2 @@ -649,7 +649,7 @@ $actor->$methodName($parameter); } }; - if ($@) { + if ($@ and ($insubstitution == 0)) { $PLOG->error("Method '$methodName' was not found in the object ". $actor->mobyname); $self->error( "Method '$methodName' was not found in the object " . $actor->mobyname); } From kawas at dev.open-bio.org Mon Oct 16 14:07:15 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 16 Oct 2006 14:07:15 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610161807.k9GI7FlU017130@dev.open-bio.org> kawas Mon Oct 16 14:07:15 EDT 2006 Update of /home/repository/moby/moby-live/Java/src/scripts In directory dev.open-bio.org:/tmp/cvs-serv17095/Java/src/scripts Modified Files: install.pl Log Message: added the module Unicode::String to the list of required modules. Every time (2 to be exact ;-) that i ran the install on a linux machine, the installer failed after it reported that I had all the correct modules installed. It seems that Unicode::String was always missing. moby-live/Java/src/scripts install.pl,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/scripts/install.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Java/src/scripts/install.pl 2006/10/13 22:08:39 1.5 +++ /home/repository/moby/moby-live/Java/src/scripts/install.pl 2006/10/16 18:07:15 1.6 @@ -60,6 +60,7 @@ Config::Simple IO::Scalar IO::Prompt + Unicode::String ) ) { check_module ($module); } From kawas at dev.open-bio.org Mon Oct 16 14:37:14 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Mon, 16 Oct 2006 14:37:14 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610161837.k9GIbEjG017325@dev.open-bio.org> kawas Mon Oct 16 14:37:14 EDT 2006 Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY In directory dev.open-bio.org:/tmp/cvs-serv17290/Java/src/Perl/MOSES/MOBY Modified Files: Parser.pm Log Message: moby-live/Java/src/Perl/MOSES/MOBY Parser.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/16 17:39:49 1.2 +++ /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/16 18:37:14 1.3 @@ -649,7 +649,7 @@ $actor->$methodName($parameter); } }; - if ($@ and ($insubstitution == 0)) { + if ($@ and not $insubstitution) { $PLOG->error("Method '$methodName' was not found in the object ". $actor->mobyname); $self->error( "Method '$methodName' was not found in the object " . $actor->mobyname); } From kawas at dev.open-bio.org Tue Oct 17 09:42:54 2006 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 17 Oct 2006 09:42:54 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200610171342.k9HDgsb4019946@dev.open-bio.org> kawas Tue Oct 17 09:42:53 EDT 2006 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv19911/Java/docs Modified Files: RegistryServlets.html Log Message: added a blurb on the rdf_generator property in the [mobycentral] section moby-live/Java/docs RegistryServlets.html,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/RegistryServlets.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/11 20:39:31 1.2 +++ /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/17 13:42:53 1.3 @@ -163,6 +163,10 @@RDF Agent Validator Output " + + "" + + "" + + " " + url + ""; - String post = "\n" + ""; + String post = "
The URL that would return the RDF describing all ontologies in your registry.
This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/FULL
The location of the RDFGenerator included with the Registry Servlet that you are currently installing, i.e.
http://your.domain/authority/RDFGenerator
$> cvs -d :pserver:cvs at cvs.open-bio.org:/home/repository/moby login
$> cvs -d :pserver:cvs at cvs.open-bio.org:/home/repository/moby checkout moby-live
$> cvs update -dP- (the 'P' flag for the update will clean-up your checkout and get rid of unused directories) - + (the 'P' flag for the update will clean-up your checkout and get rid of unused directories)
$> cd ~/moby-live/PerlTo install in default path for Perl modules (root privileges required): @@ -248,8 +247,7 @@
root $> rcmysql start
@@ -263,6 +261,7 @@ lsid_namespace = serviceinstance resourceURL = http://your.host.name/RESOURCES/MOBY-S/ServiceInstances allResources = http://your.host.name/RESOURCES/MOBY-S/FULL + rdf_generator = http://mobycentral.icapture.ubc.ca/authority/RDFGenerator [mobyobject] username = mysql_username @@ -314,8 +313,7 @@
~/moby-live/Perl/scripts/CloneCentralDatabases.plscript. This will create the databases, set privileges, fetch all data from THE central BioMOBY Central - and load it into your local central. -
~/moby-live/Perl/scripts/CloneCentralDatabases.pl- script. -
$> su@@ -392,27 +388,23 @@
<Listener className="org.apache.jk.config.ApacheConfig" modJk="/usr/lib/apache2/mod_jk.so" workersConfig="$CATALINA_HOME/conf/jk/workers.properties" />to the <Server> section. - Change the modJk and workersConfig path according to your setup. -
for Sun's java $> java -jar install.jar
for IBM's java $> java install.jar- You should get a graphical interface that will guide you through the installation process... -
MOBY_CENTRAL_CONFIG - the path to your mobycentral.config file created above-
MOBY_SERVER - the endpoint of your local registry (see below, Configure your clients)-
MOBY_URI - the namespace of your local registry (see below, Configure your clients)- - And if you installed the servlets outside the the default webapps folder, make sure Tomcat knows where to find them. - The easiest way to do this is to make the following three config files in $CATALINA_HOME/conf/Catalina/localhost/ : -
- <?xml version='1.0' encoding='utf-8'?> - <!-- Example authority.xml file --> - <Context docBase="/path/to/your/webapps/authority" path="/authority"> - <Environment name="MOBY_CENTRAL_CONFIG" - value="/path/to/your/mobycentral.config" - type="java.lang.String"/> - <Environment name="MOBY_SERVER" - value="http://your.host.name/biomoby/central/cgi-bin/MOBY-Central.pl" - type="java.lang.String"/> - <Environment name="MOBY_URI" - value="http://your.host.name/MOBY/Central" - type="java.lang.String"/> - </Context> --
- <?xml version='1.0' encoding='utf-8'?> - <!-- Example RESOURCES.xml file --> - <Context docBase="/path/to/your/webapps/RESOURCES" path="/RESOURCES"> - <Environment name="MOBY_CENTRAL_CONFIG" - value="/path/to/your/mobycentral.config" - type="java.lang.String"/> - <Environment name="MOBY_SERVER" - value="http://your.host.name/biomoby/central/cgi-bin/MOBY-Central.pl" - type="java.lang.String"/> - <Environment name="MOBY_URI" - value="http://your.host.name/MOBY/Central" - type="java.lang.String"/> - </Context> --
- <?xml version='1.0' encoding='utf-8'?> - <!-- Example types.xml file --> - <Context docBase="/path/to/your/webapps/types" path="/types"> - <Environment name="MOBY_CENTRAL_CONFIG" - value="/path/to/your/mobycentral.config" - type="java.lang.String"/> - <Environment name="MOBY_SERVER" - value="http://your.host.name/biomoby/central/cgi-bin/MOBY-Central.pl" - type="java.lang.String"/> - <Environment name="MOBY_URI" - value="http://your.host.name/MOBY/Central" - type="java.lang.String"/> - </Context> -+ You should get a graphical interface that will guide you through the installation process...
root $> rctomcat restart@@ -522,14 +466,12 @@
~/moby-live/Perl/scripts/OntologyServer.cgi- CGI script into your webserver cgi-bin folder. -
host => ["http://mobycentral.icapture.ubc.ca/cgi-bin/OntologyServer.cgi",'read/write']- to point to the URL of your OntologyServer.cgi that you just set up. -
+ *
+ * @param serviceNotes a piece of XML
+ * <serviceNotes>...</serviceNotes>
+ *
+ * @return an array, potentially an empty array, of all exceptions
+ * extracted from the 'serviceNotes'
+ *************************************************************************/
+ public static ServiceException[] extractExceptions (Element serviceNotes) {
+ if (serviceNotes == null)
+ return new ServiceException[] {};
+
+ Vector v = new Vector();
+ for (Iterator it =
+ serviceNotes.getChildren (MobyTags.MOBYEXCEPTION).iterator();
+ it.hasNext(); ) {
+ ServiceException ex = extractException ((Element)it.next());
+ if (ex != null)
+ v.addElement (ex);
+ }
+ for (Iterator it =
+ serviceNotes.getChildren (MobyTags.MOBYEXCEPTION, JDOMUtils.MOBY_NS).iterator();
+ it.hasNext(); ) {
+ ServiceException ex = extractException ((Element)it.next());
+ if (ex != null)
+ v.addElement (ex);
+ }
+ ServiceException[] result = new ServiceException [v.size()];
+ v.copyInto (result);
+ return result;
+ }
+
+ /**************************************************************************
+ * Extract one exception from an XML element 'mobyException'.
+ *************************************************************************/
+ protected static ServiceException extractException (Element elem) {
+ ServiceException ex = new ServiceException();
+ String severity = elem.getAttributeValue (MobyTags.SEVERITY);
+ if (severity == null)
+ severity = elem.getAttributeValue (MobyTags.SEVERITY, JDOMUtils.MOBY_NS);
+ ex.setSeverity (severity);
+ String codeStr = JDOMUtils.getChildText (elem, MobyTags.EXCEPTIONCODE);
+ try {
+ ex.setErrorCode (new Integer (codeStr).intValue());
+ } catch (Exception e) {
+ }
+ ex.setMessage (JDOMUtils.getChildText (elem, MobyTags.EXCEPTIONMESSAGE));
+ return ex;
+ }
+
+ /**************************************************************************
* Turns a PIB Object into a JDOM representation.
*************************************************************************/
public static Element toXMLElement(MobyProvisionInfo mpi) {
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/ServiceException.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/ServiceException.java 2006/07/07 04:12:40 1.9
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/ServiceException.java 2006/10/25 02:33:23 1.10
@@ -492,7 +492,7 @@
xml.append(" The MOBY data is:
- The applet can be launched from the following Web site: http://moby.ucalgary.ca/seahawk/ The applet can be launched from the following Web site: http://moby.ucalgary.ca/seahawk/. If you are a programmer, you can run it with a checked out version of the jMOBY CVS: ./build.sh seahawk/tt> The jar (Java archive) file containing all of the required classes (including those from
Axis, Jena, Xalan, Xerces, etc.) is available
- here. Note that this JAR
+ here. Note that this JAR
is signed by the University of Calgary Bioinformatics Lab. This jar file
can be used as an application with the command:
Or it can be launched from within another Java application with the following code (and assuming seahawk.jar is in the classpath):
If you have any suggestions regarding new features or you would like to report a bug, For questions, comments, or bugs
* email me at edward.kawas at gmail.com
*/
+ at SuppressWarnings("unchecked")
public class MobyProperties {
private static Properties properties = new Properties();
@@ -53,15 +54,17 @@
* @return A Properties object with either the properties obtained from the environment or an empty map.
*/
public final static Properties PROPERTIES() {
- Map map = RegistryOS.getEnv();
- //
+ Map map = new HashMap();
+ //
if (System.getProperty("MOBY_CENTRAL_CONFIG") != null && !System.getProperty("MOBY_CENTRAL_CONFIG").equals(""))
map.put("MOBY_CENTRAL_CONFIG" , System.getProperty("MOBY_CENTRAL_CONFIG"));
if (System.getProperty("MOBY_SERVER") != null && !System.getProperty("MOBY_SERVER").equals(""))
map.put("MOBY_SERVER" , System.getProperty("MOBY_SERVER"));
if (System.getProperty("MOBY_URI") != null && !System.getProperty("MOBY_URI").equals(""))
map.put("MOBY_URI" , System.getProperty("MOBY_URI"));
- properties.putAll(map);
+ // did we fail to populate the map?
+ if (map.isEmpty())
+ properties.putAll(RegistryOS.getEnv());
return properties;
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/properties/MobyCentralConfig.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/properties/MobyCentralConfig.java 2005/12/02 20:40:18 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/properties/MobyCentralConfig.java 2006/10/11 01:54:50 1.5
@@ -15,6 +15,9 @@
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.biomoby.shared.MobyException;
/**
@@ -25,12 +28,15 @@
* For questions, comments, or bugs
* email me at edward.kawas at gmail.com
*/
+ at SuppressWarnings("unchecked")
public class MobyCentralConfig {
- private final static String location = MobyProperties.PROPERTIES().getProperty("MOBY_CENTRAL_CONFIG"); //use the environment variables you set with your own registry
+ private static Log log = LogFactory.getLog(MobyCentralConfig.class);
+
+ private final static String location = getLocation();
private final static String regexp = "^(\\w+)\\s*=\\s*(.*)$";
-
+
/**
* A method that retrieves the mySQL connection details for the database mobycentral.
* PRE: The property config is specified and configured correctly in the file biomoby.properties.
@@ -45,7 +51,19 @@
return map;
}
- /**
+ private static String getLocation() {
+ if (System.getProperty("MOBY_CENTRAL_CONFIG")==null) {
+ log.debug("getting MOBY_CENTRAL_CONFIG using MobyProperties()");
+ return MobyProperties.PROPERTIES().getProperty("MOBY_CENTRAL_CONFIG");
+ }
+ else {
+ // use the environment variables you set with your own registry
+ log.debug("getting MOBY_CENTRAL_CONFIG using System.getProperty()");
+ return System.getProperty("MOBY_CENTRAL_CONFIG");
+ }
+ }
+
+ /**
* A method that retrieves the mySQL connection details for the database mobynamespace.
* PRE: The property config is specified and configured correctly in the file biomoby.properties.
* POST: Map consists of the mySQL connection information for the database mobynamespace or MobyException is thrown.
@@ -105,9 +123,8 @@
throws MobyException {
if (location == null)
throw new MobyException(
- "Error - "
- + location
- + " environment variable found. Make sure that MOBY_CENTRAL_CONFIG is set correctly in the environment");
+ "Error - MOBY_CENTRAL_CONFIG == null;"
+ + " Make sure that MOBY_CENTRAL_CONFIG is set correctly in the environment");
File file = new File(location);
BufferedReader br = null;
try {
From kawas at dev.open-bio.org Wed Oct 11 01:54:50 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 21:54:50 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610110154.k9B1sox4025288@dev.open-bio.org>
kawas
Tue Oct 10 21:54:50 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms
In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms
Modified Files:
Lsid_resolver.java CallableServicesServlet.java
GetSignatureRDFResponse.java GetSignatureRDFForm.java
RDFAgentValidator.java LSID_ResolverClient.java
LSIDComplete.java
Added Files:
GetServiceRDF.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms GetServiceRDF.java,NONE,1.1 Lsid_resolver.java,1.3,1.4 CallableServicesServlet.java,1.2,1.3 GetSignatureRDFResponse.java,1.8,1.9 GetSignatureRDFForm.java,1.4,1.5 RDFAgentValidator.java,1.2,1.3 LSID_ResolverClient.java,1.1,1.2 LSIDComplete.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/Lsid_resolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/Lsid_resolver.java 2006/05/24 18:48:31 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/Lsid_resolver.java 2006/10/11 01:54:50 1.4
@@ -93,21 +93,21 @@
String str = resolveLSID(lsid_to_use, "soap");
return str;
} catch (MobyException e) {
- e.printStackTrace();
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using SOAP.");
}
try {
String str = resolveLSID(lsid_to_use, "http");
return str;
} catch (MobyException e) {
- e.printStackTrace();
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using HTTP.");
}
try {
String str = resolveLSID(lsid_to_use, "ftp");
return str;
} catch (MobyException e) {
- e.printStackTrace();
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using FTP.");
}
- return "Couldn't resolve your lsid. I tried the protocols SOAP, HTTP, and FTP. If we are missing one, let us know.";
+ return "Couldn't resolve your lsid to metadata (perhaps there is none?). I tried the protocols SOAP, HTTP, and FTP. If we are missing one, let us know.";
}
/**
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java 2006/08/30 23:15:17 1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java 2006/10/11 01:54:50 1.3
@@ -18,16 +18,18 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.biomoby.client.CentralImpl;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
import org.biomoby.client.ui.graphical.servlet.utilities.ServiceTester;
import org.biomoby.shared.MobyException;
import org.biomoby.shared.MobyService;
/**
- * @author Eddie Kawas
- * This class was created to call out to all registered services and see which ones are alive.
+ * @author Eddie Kawas This class was created to call out to all registered
+ * services and see which ones are alive.
*/
public class CallableServicesServlet extends HttpServlet {
@@ -45,13 +47,27 @@
public void init(ServletConfig arg0) throws ServletException {
super.init(arg0);
+
+ ContextLoader cLoader = null;
+ try {
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .warn((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
+ } catch (Exception e) {
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getStackTrace());
+ }
+
log.info("initializing CallableServiceServlet");
scheduler = new ServiceTesterRunner();
Timer timer = new Timer();
Calendar calendar = Calendar.getInstance();
Date time = calendar.getTime();
log.info("Scheduling on going task.");
- timer.scheduleAtFixedRate(scheduler, time, 1000 * 60 * 60 );
+ timer.scheduleAtFixedRate(scheduler, time, 1000 * 60 * 60);
}
/*
@@ -156,7 +172,11 @@
public ServiceTesterRunner() {
try {
// TODO make this generic so that others can use it
- t = new ServiceTester(CentralImpl.DEFAULT_ENDPOINT, CentralImpl.DEFAULT_NAMESPACE);
+ t = new ServiceTester(
+ System.getProperty("MOBY_SERVER") == null ? CentralImpl.DEFAULT_ENDPOINT
+ : System.getProperty("MOBY_SERVER"),
+ System.getProperty("MOBY_URI") == null ? CentralImpl.DEFAULT_NAMESPACE
+ : System.getProperty("MOBY_URI"));
} catch (MobyException e) {
log.error("Couldn't instantiate a ServiceTester object", e);
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFResponse.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFResponse.java 2006/08/30 16:55:02 1.8
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFResponse.java 2006/10/11 01:54:50 1.9
@@ -1,20 +1,27 @@
package org.biomoby.client.ui.graphical.servlet.forms;
-import java.io.BufferedReader;
import java.io.IOException;
-import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URL;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Properties;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
+import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.biomoby.client.rdf.builder.ServiceInstanceRDF;
+import org.biomoby.registry.properties.MobyProperties;
+
+import java.sql.Connection;
/*
* Created on Jan 14, 2005
@@ -38,7 +45,9 @@
final private String newline = System.getProperty("line.separator");
- final static private String error = "" + System.getProperty("line.separator") + ""
+ private String SERVER_NAME = "";
+ final static private String getErrorString() {
+ return "" + System.getProperty("line.separator") + ""
+ " Created for
- * This class was created to ...
- * For questions, comments, or bugs
- * email me at edward.kawas at gmail.com
+ *
+ * Created for
+ *
+ * This class was created to ...
+ *
+ * For questions, comments, or bugs
+ *
+ * email me at edward.kawas at gmail.com
*/
public class GetSignatureRDFForm extends HttpServlet {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- // some useful variables
- private final String newline = System.getProperty("line.separator");
-
- private static final String DOMAIN = "mobycentral.icapture.ubc.ca";
-
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
- */
- protected void doGet(HttpServletRequest request,
- HttpServletResponse response) throws ServletException, IOException {
- // set the content type
- response.setContentType("text/html");
- PrintWriter out = response.getWriter();
-
- // get a list of domains
- Central central = null;
- String[] domains = null;
- // initialize central
- try {
- //TODO - enter the endpoint here
- central = new CentralImpl();
- domains = central.getProviders();
- } catch (MobyException e) {
- out.println("Please try again later.");
- return;
- }
- // sort the array
- Arrays.sort(domains);
- StringBuffer sb = new StringBuffer("");
- for (int x = 0; x < domains.length; x++) {
- sb.append("\t\t" + newline);
- }
-
- String page = ""
- + newline
- + ""
- + newline
- + "
@@ -46,44 +45,17 @@
public final void init() throws ServletException {
// super.init();
- // try to load environment variables set in context.xml
+ ContextLoader cLoader = null;
try {
- Context c = new InitialContext();
-
- try {
- String MOBY_CENTRAL_CONFIG = null;
- MOBY_CENTRAL_CONFIG = (String) c.lookup("java:comp/env/MOBY_CENTRAL_CONFIG");
- if (MOBY_CENTRAL_CONFIG != null && !MOBY_CENTRAL_CONFIG.equals("")) {
- // set MOBY_CENTRAL_CONFIG
- log.info("init(setting MOBY_CENTRAL_CONFIG)");
- System.setProperty("MOBY_CENTRAL_CONFIG", MOBY_CENTRAL_CONFIG);
- }
-
- } catch (Exception ex) {
- }
- try {
- String MOBY_SERVER = null;
- MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER");
- if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) {
- // set MOBY_SERVER
- log.info("init(setting MOBY_SERVER)");
- System.setProperty("MOBY_SERVER", MOBY_SERVER);
- }
- } catch (Exception ex) {
- }
-
- try {
- String MOBY_URI = null;
- MOBY_URI = (String) c.lookup("java:comp/env/MOBY_URI");
- if (MOBY_URI != null && !MOBY_URI.equals("")) {
- // set MOBY_URI
- log.info("init(setting MOBY_URI)");
- System.setProperty("MOBY_URI", MOBY_URI);
- }
- } catch (Exception ex) {
- }
-
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .warn((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
} catch (Exception e) {
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getStackTrace());
}
}
@@ -122,8 +94,8 @@
return;
}
Process p;
-
- String[] com = new String[] { rdfagent, "-test", url };
+ //TODO may need to place JAVA_HOME in the mobycentral part of the config files.
+ String[] com = new String[] { "java","-DRDFagent.home="+rdfagent,"-jar", rdfagent+"/RDFagent.jar", "-test", url };
p = Runtime.getRuntime().exec(com);
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
StringBuffer sb = new StringBuffer();
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSID_ResolverClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSID_ResolverClient.java 2006/08/30 17:11:25 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSID_ResolverClient.java 2006/10/11 01:54:50 1.2
@@ -108,19 +108,19 @@
String str = resolveLSID(lsid_to_use, "soap");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using SOAP.");
}
try {
String str = resolveLSID(lsid_to_use, "http");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using HTTP.");
}
try {
String str = resolveLSID(lsid_to_use, "ftp");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to metadata using FTP.");
}
return "Couldn't resolve your lsid. I tried the protocols SOAP, HTTP, and FTP. If we are missing one, let us know.";
}
@@ -131,19 +131,19 @@
String str = resolveLSID2Data(lsid_to_use, "soap");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to data using SOAP.");
}
try {
String str = resolveLSID2Data(lsid_to_use, "http");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to data using HTTP.");
}
try {
String str = resolveLSID2Data(lsid_to_use, "ftp");
return str;
} catch (MobyException e) {
- log.error(e);
+ log.debug("Couldn't resolve " + lsid_to_use + " to data using FTP.");
}
return "Couldn't resolve your lsid to Data.";
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSIDComplete.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSIDComplete.java 2006/08/30 17:11:25 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/LSIDComplete.java 2006/10/11 01:54:50 1.2
@@ -21,8 +21,10 @@
import javax.sql.DataSource;
import org.apache.commons.dbcp.BasicDataSource;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
import org.biomoby.registry.properties.MobyProperties;
/*
@@ -33,6 +35,7 @@
/**
* @author Eddie Kawas
*/
+ at SuppressWarnings("unchecked")
public class LSIDComplete extends HttpServlet {
/**
@@ -45,14 +48,33 @@
final private String newline = System.getProperty("line.separator");
private Map datas = Collections.synchronizedMap(new HashMap());
+
public void init() throws ServletException {
super.init();
+
+
+ ContextLoader cLoader = null;
+ try {
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .warn((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
+ } catch (Exception e) {
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getStackTrace());
+ }
+
log.debug("Initializing the Timer that will invoke the StatWriter");
Timer timer = new Timer();
timer.scheduleAtFixedRate(new StatWriter(this), new java.util.Date(), 1000 * 60 * 60);
}
+ // an array of properties objects created initialized once for more efficient running
+ private Properties[] properties = new Properties[]{null,null, null, null};
+
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String lsid = filter(request.getParameter("lsid"));
@@ -74,20 +96,24 @@
String object = parts[4];
Properties p = null;
// check if the 3rd component is biomoby.org
- if (parts[2].equalsIgnoreCase("biomoby.org")
+ if ((parts[2].equalsIgnoreCase("biomoby.org") || parts[2].equalsIgnoreCase(request.getServerName()))
&& parts[0].equalsIgnoreCase("urn")
&& parts[1].equalsIgnoreCase("lsid")) {
// check if they are typing in
// namespacetype
if (parts[3].equals("namespacetype")) {
- p = MobyProperties.NAMESPACE_PROPERTIES();
+ if (properties[0] == null)
+ properties[0] = MobyProperties.NAMESPACE_PROPERTIES();
+ p = properties[0];
String lsids = getLSIDs(p, object, "namespace");
if (!lsids.equals(""))
lsid = lsids;
}
// objectclass
else if (parts[3].equals("objectclass")) {
- p = MobyProperties.OBJECT_PROPERTIES();
+ if (properties[1] == null)
+ properties[1] = MobyProperties.OBJECT_PROPERTIES();
+ p = properties[1];
String lsids = getLSIDs(p, object, "object");
if (!lsids.equals("")) {
lsid = lsids;
@@ -96,7 +122,9 @@
}
// servicetype
else if (parts[3].equals("servicetype")) {
- p = MobyProperties.SERVICE_PROPERTIES();
+ if (properties[2] == null)
+ properties[2] = MobyProperties.SERVICE_PROPERTIES();
+ p = properties[2];
String lsids = getLSIDs(p, object, "service");
if (!lsids.equals(""))
lsid = lsids;
@@ -104,7 +132,9 @@
// serviceinstance
else if (parts[3].equals("serviceinstance")) {
// weird case, because object is authURI,servicename
- p = MobyProperties.SERVICE_INSTANCE_PROPERTIES();
+ if (properties[3] == null)
+ properties[3] = MobyProperties.SERVICE_INSTANCE_PROPERTIES();
+ p = properties[3];
String lsids = getLSIDs(p, object, "service_instance");
if (!lsids.equals(""))
lsid = lsids;
From kawas at dev.open-bio.org Wed Oct 11 01:54:50 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 21:54:50 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610110154.k9B1soIP025350@dev.open-bio.org>
kawas
Tue Oct 10 21:54:50 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
Modified Files:
ServiceTester.java
Added Files:
ContextLoader.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities ContextLoader.java,NONE,1.1 ServiceTester.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/08/30 23:15:17 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/11 01:54:50 1.4
@@ -126,6 +126,7 @@
}
}
log.info("service testing complete.");
+ setResultMap(theMap);
return theMap;
}
@@ -272,10 +273,8 @@
try {
output = doCall(s.getName(),
new Object[] { "
* email me at edward.kawas at gmail.com
*/
+ at SuppressWarnings("unchecked")
public final class JServicesSqlImpl implements JServiceI {
private static final String sql = "SELECT ot1.service_type, rt.relationship_type, ot2.service_type, ot1.description "
+ "FROM service as ot1, service_term2term as rt, service as ot2 "
@@ -53,12 +54,6 @@
String username = (String) map.get("username");// "moby_external";
String password = (String) map.get("password");// "";
- /*
- * String serverName = "mobycentral.icapture.ubc.ca:3306"; String
- * mydatabase = "mobyservice"; String url = "jdbc:mysql://" +
- * serverName + "/" + mydatabase; String username = "moby_external";
- * String password = "";
- */
this.connection = DriverManager.getConnection(url, username, password);
} catch (ClassNotFoundException e) {
throw new MobyException(
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JObjectsSqlImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JObjectsSqlImpl.java 2006/03/23 15:16:56 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JObjectsSqlImpl.java 2006/10/11 01:54:51 1.4
@@ -20,6 +20,7 @@
*
* email me at edward.kawas at gmail.com
*/
+ at SuppressWarnings("unchecked")
public final class JObjectsSqlImpl implements JObjectsI {
private static final String sql = "SELECT ot1.object_type, rt.relationship_type, ot2.object_type, rt.object2_articlename, ot1.description "
+ "FROM object as ot1, object_term2term as rt, object as ot2 "
@@ -51,21 +52,11 @@
Map map = MobyCentralConfig.getMobyObject();
// Create a connection to the database
String serverName = map.get("url") + ":" + map.get("port");// localhost:3306";
- // //TODO
- // - make
- // this a
- // property
String mydatabase = (String) map.get("dbname");// "mobyobject";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase;
String username = (String) map.get("username");// "moby_external";
String password = (String) map.get("password");// "";
- /*
- * String serverName = "mobycentral.icapture.ubc.ca:3306"; String
- * mydatabase = "mobyobject"; String url = "jdbc:mysql://" +
- * serverName + "/" + mydatabase; String username = "moby_external";
- * String password = "";
- */
this.connection = DriverManager.getConnection(url, username, password);
} catch (ClassNotFoundException e) {
throw new MobyException(
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JNamespacesSqlImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JNamespacesSqlImpl.java 2006/03/15 16:22:37 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JNamespacesSqlImpl.java 2006/10/11 01:54:51 1.5
@@ -20,6 +20,7 @@
*
* email me at edward.kawas at gmail.com
*/
+ at SuppressWarnings("unchecked")
public final class JNamespacesSqlImpl implements JNamespaceI {
private static final String sql = "SELECT namespace_type, description FROM namespace ORDER BY namespace_type asc";
From kawas at dev.open-bio.org Wed Oct 11 01:54:51 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 21:54:51 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610110154.k9B1spgS025380@dev.open-bio.org>
kawas
Tue Oct 10 21:54:50 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority
In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority
Modified Files:
LSIDDataLookup.java Test.java MobyAuthority.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority LSIDDataLookup.java,1.12,1.13 Test.java,1.4,1.5 MobyAuthority.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/LSIDDataLookup.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/LSIDDataLookup.java 2006/05/24 18:48:31 1.12
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/LSIDDataLookup.java 2006/10/11 01:54:50 1.13
@@ -108,7 +108,7 @@
int result = UNKNOWN;
String authority = lsid.getAuthority().getAuthority();
- log.info("lsidType: " + ns + " " + id + " " + ver + " " + authority);
+ log.debug("lsidType: " + ns + " " + id + " " + ver + " " + authority);
if (ns.equalsIgnoreCase(mobynamespace.getProperty("lsid_namespace"))) {
if (!authority.equals(mobynamespace.getProperty("lsid_authority"))) {
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/Test.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/Test.java 2005/12/02 20:40:18 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/Test.java 2006/10/11 01:54:50 1.5
@@ -34,7 +34,8 @@
*/
public static void main(String[] args) throws LSIDException {
//String lsid_to_use = "urn:lsid:ncbi.nlm.nih.gov.lsid.biopathways.org:genbank_gi:30350027";
- String lsid_to_use = "urn:lsid:biomoby.org:serviceinstance:www.illuminae.com,getSHound3DNeighboursFromGi";
+ // TODO insert your LSID here
+ String lsid_to_use = "urn:lsid:localhost:serviceinstance:test.test.test,breakString:2006-09-19T20-08-36Z";
LSID lsid = new LSID(lsid_to_use);
LSIDResolver resolver = new LSIDResolver(lsid);
resolver.setUseLocalCache(false);
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/MobyAuthority.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/MobyAuthority.java 2006/09/15 18:28:23 1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/lsid/authority/MobyAuthority.java 2006/10/11 01:54:50 1.8
@@ -1,12 +1,12 @@
package org.biomoby.client.ui.graphical.servlet.lsid.authority;
import java.net.URL;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.biomoby.client.CentralImpl;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
import org.biomoby.shared.MobyService;
import com.ibm.lsid.ExpiringResponse;
@@ -39,10 +39,13 @@
* email me at edward.kawas at gmail.com
*/
public class MobyAuthority extends SimpleAuthority {
- private LSIDDataLookup lookup = null;
+ private Log log = LogFactory.getLog(this.getClass());
- private Properties properties = new Properties();
+ private LSIDDataLookup lookup = null;
+ // NOTE: This class assumes that you have set system properties for
+ // lsid_domain and lsid_port - if they are not set, then exceptions are
+ // thrown
public LSIDMetadataPort[] getMetadataLocations(LSID lsid, String url) {
if (lookup == null)
@@ -57,16 +60,18 @@
}
if (lsType == LSIDDataLookup.UNKNOWN)
return null;
-
+
return new LSIDMetadataPort[] {
new SOAPLocation("BioMOBYMetadataSOAPPort", "http://"
- + properties.getProperty("lsid_domain") + ":"
- + properties.getProperty("lsid_port") + "/authority/metadata"),
- new HTTPLocation("BioMOBYMetadataHTTPPort", properties.getProperty("lsid_domain"),
- Integer.parseInt(properties.getProperty("lsid_port")),
- "/authority/metadata") };
+ + System.getProperty("lsid_domain") + ":" + System.getProperty("lsid_port")
+ + "/authority/metadata"),
+ new HTTPLocation("BioMOBYMetadataHTTPPort", System.getProperty("lsid_domain"),
+ Integer.parseInt(System.getProperty("lsid_port")), "/authority/metadata") };
}
+ // NOTE: This class assumes that you have set system properties for
+ // lsid_domain and lsid_port - if they are not set, then exceptions are
+ // thrown
public LSIDDataPort[] getDataLocations(LSID lsid, String url) {
if (lookup == null)
@@ -78,10 +83,10 @@
return new LSIDDataPort[] {
new SOAPLocation("BioMOBYDataSOAPPort", "http://"
- + properties.getProperty("lsid_domain") + ":"
- + properties.getProperty("lsid_port") + "/authority/data"),
- new HTTPLocation("BioMOBYDataHTTPPort", properties.getProperty("lsid_domain"),
- Integer.parseInt(properties.getProperty("lsid_port")), "/authority/data") };
+ + System.getProperty("lsid_domain") + ":" + System.getProperty("lsid_port")
+ + "/authority/data"),
+ new HTTPLocation("BioMOBYDataHTTPPort", System.getProperty("lsid_domain"), Integer
+ .parseInt(System.getProperty("lsid_port")), "/authority/data") };
}
/*
@@ -149,57 +154,17 @@
*/
public void initService(LSIDServiceConfig config) throws LSIDServerException {
lookup = new LSIDDataLookup();
+ ContextLoader cLoader = null;
try {
-
- Context c = new InitialContext();
- try {
- String LSID_SERVER = (String) c.lookup("java:comp/env/LSID_SERVER");
-
- if (LSID_SERVER != null && !LSID_SERVER.equals("")) {
- properties.setProperty("lsid_domain", LSID_SERVER);
- }
- } catch (Exception ex) {
- System.err.println(ex.getLocalizedMessage());
- }
-
- try {
- String LSID_PORT = (String) c.lookup("java:comp/env/LSID_PORT");
- if (LSID_PORT != null && !LSID_PORT.equals("")) {
- properties.setProperty("lsid_port", LSID_PORT);
- }
- } catch (Exception ex) {
- System.err.println(ex.getLocalizedMessage());
- }
- try {
- String CONFIG = (String) c.lookup("java:comp/env/MOBY_CENTRAL_CONFIG");
- if (CONFIG != null && !CONFIG.equals("")) {
- System.setProperty("MOBY_CENTRAL_CONFIG", CONFIG);
- properties.setProperty("MOBY_CENTRAL_CONFIG", CONFIG);
- }
- } catch (Exception ex) {
- System.err.println(ex.getLocalizedMessage());
- }
- try {
- String CONFIG = (String) c.lookup("java:comp/env/MOBY_SERVER");
- if (CONFIG != null && !CONFIG.equals("")) {
- properties.setProperty("MOBY_SERVER", CONFIG);
- System.setProperty("MOBY_SERVER", CONFIG);
- }
- } catch (Exception ex) {
- System.err.println(ex.getLocalizedMessage());
- }
- try {
- String CONFIG = (String) c.lookup("java:comp/env/MOBY_URI");
- if (CONFIG != null && !CONFIG.equals("")) {
- System.setProperty("MOBY_URI", CONFIG);
- properties.setProperty("MOBY_URI", CONFIG);
- }
- } catch (Exception ex) {
- System.err.println(ex.getLocalizedMessage());
- }
-
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .info((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
} catch (Exception e) {
- System.err.println(e.getLocalizedMessage());
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getStackTrace());
}
}
}
\ No newline at end of file
From kawas at dev.open-bio.org Wed Oct 11 01:54:51 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 21:54:51 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610110154.k9B1spNL025436@dev.open-bio.org>
kawas
Tue Oct 10 21:54:51 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder
In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/client/rdf/builder
Modified Files:
ServiceInstanceRDF.java RDFConfigure.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.30,1.31 RDFConfigure.java,1.21,1.22
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2006/08/30 16:55:02 1.30
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2006/10/11 01:54:51 1.31
@@ -9,19 +9,14 @@
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.biomoby.client.CentralImpl;
import org.biomoby.client.rdf.vocabulary.DC_PROTEGE;
import org.biomoby.client.rdf.vocabulary.FetaVocabulary;
-
-import org.biomoby.registry.properties.MobyProperties;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
import org.biomoby.registry.properties.RegistryOS;
import org.biomoby.shared.Central;
import org.biomoby.shared.MobyData;
@@ -29,7 +24,6 @@
import org.biomoby.shared.MobyNamespace;
import org.biomoby.shared.MobyPrimaryDataSet;
import org.biomoby.shared.MobyPrimaryDataSimple;
-import org.biomoby.shared.MobyResourceRef;
import org.biomoby.shared.MobySecondaryData;
import org.biomoby.shared.MobyService;
import org.biomoby.shared.data.MobyDataSecondaryInstance;
@@ -79,92 +73,42 @@
private static final String DCP = DC_PROTEGE.getURI();
- private static final String OBJ;// =
-
- // "http://biomoby.org/RESOURCES/MOBY-S/Objects#";
-
- private static final String SRV;// =
-
- // "http://biomoby.org/RESOURCES/MOBY-S/Services#";
-
- private static final String NS;// =
-
- // "http://biomoby.org/RESOURCES/MOBY-S/Namespaces#";
-
- private static final String MP;// =
-
- // "http://biomoby.org/RESOURCES/MOBY-S/Predicates#";
-
- private static final String SI;// =
- // "http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#";
+ private static final String OBJ;
+ private static final String SRV;
+ private static final String NS;
+ private static final String MP;
+ private static final String SI;
+
+ private static final String SERVER;
static {
- boolean __success = false;
- // attempt 1 - servlet context
- Context c;
+ ContextLoader cLoader = null;
try {
- c = new InitialContext();
- String MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER");
- if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) {
- System.setProperty("MOBY_SERVER", MOBY_SERVER);
- try {
- Central central = new CentralImpl(MOBY_SERVER);
- MobyResourceRef[] refs = central.getResourceRefs();
- for (int i = 0; i < refs.length; i++) {
- String url = refs[i].getResourceLocation().toExternalForm();
- if (url.lastIndexOf("#") < 0)
- url = url + "#";
- URI_MAP.put(refs[i].getResourceName(), url);
- }
- } catch (Exception ex) {
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .info((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
+ } catch (Exception e) {
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getMessage());
+ }
+
+ log.info("Setting RDF ResourceLocations (RDFConfigure) for current registry...");
- }
- __success = true;
- }
- String MOBY_URI = (String) c.lookup("java:comp/env/MOBY_URI");
- if (MOBY_URI != null && !MOBY_URI.equals("")) {
- System.setProperty("MOBY_URI", MOBY_URI);
- __success = true;
- }
- } catch (NamingException e) {
+
+ OBJ = (String) cLoader.getURI_MAP().get("Object");
- // e.printStackTrace();
- }
+ SRV = (String) cLoader.getURI_MAP().get("Service");
- // attempt 2 - environment variables
- if (!__success) {
- // maybe try for environment variables
- Properties p = MobyProperties.PROPERTIES();
- String MOBY_SERVER = (String) p.get("MOBY_SERVER");
- if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) {
- System.setProperty("MOBY_SERVER", MOBY_SERVER);
- try {
- Central central = new CentralImpl(MOBY_SERVER);
- MobyResourceRef[] refs = central.getResourceRefs();
- for (int i = 0; i < refs.length; i++) {
- String url = refs[i].getResourceLocation().toExternalForm();
- if (url.lastIndexOf("#") < 0)
- url = url + "#";
- URI_MAP.put(refs[i].getResourceName(), url);
- }
- } catch (Exception ex) {
+ NS = (String) cLoader.getURI_MAP().get("Namespace");
- }
- }
- String MOBY_URI = (String) p.get("MOBY_URI");
- if (MOBY_URI != null && !MOBY_URI.equals("")) {
- System.setProperty("MOBY_URI", MOBY_URI);
- }
- }
- OBJ = (URI_MAP.get("Object") != null ? (String) URI_MAP.get("Object")
- : "http://biomoby.org/RESOURCES/MOBY-S/Objects#");
- SRV = (URI_MAP.get("Service") != null ? (String) URI_MAP.get("Service")
- : "http://biomoby.org/RESOURCES/MOBY-S/Services#");
- NS = (URI_MAP.get("Namespace") != null ? (String) URI_MAP.get("Namespace")
- : "http://biomoby.org/RESOURCES/MOBY-S/Namespaces#");
MP = "http://biomoby.org/RESOURCES/MOBY-S/Predicates#";
- SI = (URI_MAP.get("ServiceInstance") != null ? (String) URI_MAP.get("ServiceInstance")
- : "http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#");
+
+ SI = (String) cLoader.getURI_MAP().get("ServiceInstance");
+
+ SERVER = cLoader.getFULL_SERVER_URL();
}
/**
@@ -274,7 +218,7 @@
try {
central = new CentralImpl(url, uri);
} catch (MobyException e) {
- System.err.println("Could not connect to " + url + " in findService.");
+ log.error("Could not connect to " + url + " in findService.");
return empty;
}
// set up the query service
@@ -284,7 +228,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("Could not find service:\n" + e1.getMessage());
+ log.error("Could not find service:\n" + e1.getMessage());
return empty;
}
// only one service should be returned!
@@ -304,7 +248,7 @@
try {
central = new CentralImpl(url, uri);
} catch (MobyException e) {
- System.err.println("Could not connect to " + url + " in findService.");
+ log.error("Could not connect to " + url + " in findService.");
return empty;
}
// set up the query service
@@ -314,7 +258,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("Could not find service:\n" + e1.getMessage());
+ log.error("Could not find service:\n" + e1.getMessage());
return empty;
}
// get the rdf
@@ -358,7 +302,7 @@
try {
central = new CentralImpl(url, uri);
} catch (MobyException e) {
- System.err.println("Could not connect to " + url + " in findService.");
+ log.error("Could not connect to " + url + " in findService.");
return empty;
}
// set up the query service
@@ -368,7 +312,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("Could not find service:\n" + e1.getMessage());
+ log.error("Could not find service:\n" + e1.getMessage());
return empty;
}
// only one service should be returned!
@@ -388,7 +332,7 @@
try {
central = new CentralImpl(url, uri);
} catch (MobyException e) {
- System.err.println("Could not connect to " + url + " in findService.");
+ log.error("Could not connect to " + url + " in findService.");
return empty;
}
// set up the query service
@@ -398,7 +342,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("Could not find service:\n" + e1.getMessage());
+ log.error("Could not find service:\n" + e1.getMessage());
return empty;
}
// get the rdf
@@ -421,50 +365,13 @@
// initialize central
try {
if (!useTestMachine) {
- String registryURL = null;
- String registryNamespace = null;
- Map map = RegistryOS.getEnv();
- if (!map.isEmpty()) {
- registryURL = (String) map.get("MOBY_SERVER");
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
- log.info("Using URL: " + registryURL + " URI: " + registryNamespace);
- if (registryURL == null) {
- // use default registry, since we dont have a local one
- central = new CentralImpl();
- } else if (registryNamespace == null) {
- // use default namespace since one isnt defined
- central = new CentralImpl(registryURL);
- } else {
- // use defined url and namespacce
- central = new CentralImpl(registryURL, registryNamespace);
- }
- } else {
- // perhaps the System propery was set earlier.
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
-
- // use the default central if we have no other choice
- if (registryURL != null)
- if (registryNamespace != null)
- central = new CentralImpl(registryURL, registryNamespace);
- else
- central = new CentralImpl(registryURL);
- else
- central = new CentralImpl();
- }
+ central = getCentralImpl();
} else {
// use test machine no longer supported
return empty;
}
} catch (MobyException e) {
- System.err.println("error in getAllServices 1:\n" + e.getMessage());
+ log.error("error in getAllServices 1:\n" + e.getMessage());
return empty;
}
// set up the query service
@@ -474,7 +381,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("error in getAllServices 2:\n" + e1.getMessage());
+ log.error("error in getAllServices 2:\n" + e1.getMessage());
return empty;
}
// should have >= 1 service returned
@@ -487,6 +394,42 @@
return str;
}
+ /**
+ * @return
+ * @throws MobyException
+ */
+ private static Central getCentralImpl() throws MobyException {
+ Central central;
+ String registryURL = null;
+ String registryNamespace = null;
+
+ // are they set in the system?
+ registryURL = System.getProperty("MOBY_SERVER");
+ registryNamespace = System.getProperty("MOBY_URI");
+
+ // if we didnt set them check the environment
+ if (registryURL == null) {
+ Map map = RegistryOS.getEnv();
+ if (!map.isEmpty()) {
+ registryURL = (String) map.get("MOBY_SERVER");
+ registryNamespace = (String) map.get("MOBY_URI");
+ }
+ }
+
+ log.info("Using URL: " + (registryURL == null ? CentralImpl.DEFAULT_ENDPOINT : registryURL) + " URI: " + (registryNamespace == null ? CentralImpl.DEFAULT_NAMESPACE: registryNamespace));
+ if (registryURL == null) {
+ // use default registry, since we dont have a local one
+ central = new CentralImpl();
+ } else if (registryNamespace == null) {
+ // use default namespace since one isnt defined
+ central = new CentralImpl(registryURL);
+ } else {
+ // use defined url and namespacce
+ central = new CentralImpl(registryURL, registryNamespace);
+ }
+ return central;
+ }
+
/*
* a method that retrieves all of the service instances based on an
@@ -500,50 +443,13 @@
// initialize central
try {
if (!useTestMachine) {
- String registryURL = null;
- String registryNamespace = null;
- Map map = RegistryOS.getEnv();
- if (!map.isEmpty()) {
- registryURL = (String) map.get("MOBY_SERVER");
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
- log.info("Using URL: " + registryURL + " URI: " + registryNamespace);
- if (registryURL == null) {
- // use default registry, since we dont have a local one
- central = new CentralImpl();
- } else if (registryNamespace == null) {
- // use default namespace since one isnt defined
- central = new CentralImpl(registryURL);
- } else {
- // use defined url and namespacce
- central = new CentralImpl(registryURL, registryNamespace);
- }
- } else {
- // perhaps the System propery was set earlier.
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
-
- // use the default central if we have no other choice
- if (registryURL != null)
- if (registryNamespace != null)
- central = new CentralImpl(registryURL, registryNamespace);
- else
- central = new CentralImpl(registryURL);
- else
- central = new CentralImpl();
- }
+ central = getCentralImpl();
} else {
// use test machine no longer supported
return empty;
}
} catch (MobyException e) {
- System.err.println("error in getAllServices 1:\n" + e.getMessage());
+ log.error("error in getAllServices 1:\n" + e.getMessage());
return empty;
}
// set up the query service
@@ -553,7 +459,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("error in getAllServices 2:\n" + e1.getMessage());
+ log.error("error in getAllServices 2:\n" + e1.getMessage());
return empty;
}
// should have >= 1 service returned
@@ -578,50 +484,13 @@
// initialize central
try {
if (!useTestMachine) {
- String registryURL = null;
- String registryNamespace = null;
- Map map = RegistryOS.getEnv();
- if (!map.isEmpty()) {
- registryURL = (String) map.get("MOBY_SERVER");
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
- log.info("Using URL: " + registryURL + " URI: " + registryNamespace);
- if (registryURL == null) {
- // use default registry, since we dont have a local one
- central = new CentralImpl();
- } else if (registryNamespace == null) {
- // use default namespace since one isnt defined
- central = new CentralImpl(registryURL);
- } else {
- // use defined url and namespacce
- central = new CentralImpl(registryURL, registryNamespace);
- }
- } else {
- // use default registry since we cant determine if local one
- // exists
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
-
- if (registryURL != null)
- if (registryNamespace != null)
- central = new CentralImpl(registryURL, registryNamespace);
- else
- central = new CentralImpl(registryURL);
- else
- central = new CentralImpl();
- }
+ central = getCentralImpl();
} else {
// use test machine no longer supported
return empty;
}
} catch (MobyException e) {
- System.err.println("error in getService 1:\n" + e.getMessage());
+ log.error("error in getService 1:\n" + e.getMessage());
return empty;
}
// set up the query service
@@ -631,7 +500,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("error in getService 2:\n" + e1.getMessage());
+ log.error("error in getService 2:\n" + e1.getMessage());
return empty;
}
// only one service should be returned!
@@ -657,50 +526,13 @@
// initialize central
try {
if (!useTestMachine) {
- String registryURL = null;
- String registryNamespace = null;
- Map map = RegistryOS.getEnv();
- if (!map.isEmpty()) {
- registryURL = (String) map.get("MOBY_SERVER");
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
- log.info("Using URL: " + registryURL + " URI: " + registryNamespace);
- if (registryURL == null) {
- // use default registry, since we dont have a local one
- central = new CentralImpl();
- } else if (registryNamespace == null) {
- // use default namespace since one isnt defined
- central = new CentralImpl(registryURL);
- } else {
- // use defined url and namespacce
- central = new CentralImpl(registryURL, registryNamespace);
- }
- } else {
- // use default registry since we cant determine if local one
- // exists
- if (registryURL == null)
- registryURL = System.getProperty("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryNamespace == null)
- registryNamespace = System.getProperty("MOBY_URI");
-
- if (registryURL != null)
- if (registryNamespace != null)
- central = new CentralImpl(registryURL, registryNamespace);
- else
- central = new CentralImpl(registryURL);
- else
- central = new CentralImpl();
- }
+ central = getCentralImpl();
} else {
// use test machine no longer supported
return empty;
}
} catch (MobyException e) {
- System.err.println("error in getService 1:\n" + e.getMessage());
+ log.error("error in getService 1:\n" + e.getMessage());
return empty;
}
// set up the query service
@@ -710,7 +542,7 @@
try {
services = central.findService(service);
} catch (MobyException e1) {
- System.err.println("error in getService 2:\n" + e1.getMessage());
+ log.error("error in getService 2:\n" + e1.getMessage());
return empty;
}
// only one service should be returned!
@@ -794,9 +626,10 @@
{ // add meta information on whether or not this service is
// callable (i.e. times out or not)
+ if (useLSIDs)
try {
URL _url_ = new URL(
- "http://mobycentral.icapture.ubc.ca:8090/servlets/ValidateService?authority="
+ SERVER + "ValidateService?authority="
+ services[i].getAuthority() + "&service="
+ services[i].getName());
BufferedReader in = new BufferedReader(
@@ -1016,7 +849,7 @@
// should not be here, but ...
} else {
// ERROR
- System.err.println("Secondary input was not of known subtype (Secondary)");
+ log.error("Secondary input was not of known subtype (Secondary)");
return null;
}
}
@@ -1170,28 +1003,7 @@
MobyService[] services = null;
// initialize central
try {
- String registryURL;
- String registryNamespace;
- Map map = RegistryOS.getEnv();
- if (!map.isEmpty()) {
- registryURL = (String) map.get("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- log.info("Using URL: " + registryURL + " URI: " + registryNamespace);
- if (registryURL == null) {
- // use default registry, since we dont have a local one
- central = new CentralImpl();
- } else if (registryNamespace == null) {
- // use default namespace since one isnt defined
- central = new CentralImpl(registryURL);
- } else {
- // use defined url and namespacce
- central = new CentralImpl(registryURL, registryNamespace);
- }
- } else {
- // use default registry since we cant determine if local one
- // exists
- central = new CentralImpl();
- }
+ central = getCentralImpl();
} catch (MobyException e) {
return false;
}
@@ -1213,28 +1025,7 @@
MobyService[] services = null;
// initialize central
try {
- String registryURL;
- String registryNamespace;
- Map map = RegistryOS.getEnv();
- if (!map.isEmpty()) {
- registryURL = (String) map.get("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- log.info("Using URL: " + registryURL + " URI: " + registryNamespace);
- if (registryURL == null) {
- // use default registry, since we dont have a local one
- central = new CentralImpl();
- } else if (registryNamespace == null) {
- // use default namespace since one isnt defined
- central = new CentralImpl(registryURL);
- } else {
- // use defined url and namespacce
- central = new CentralImpl(registryURL, registryNamespace);
- }
- } else {
- // use default registry since we cant determine if local one
- // exists
- central = new CentralImpl();
- }
+ central = getCentralImpl();
} catch (MobyException e) {
return false;
}
@@ -1262,32 +1053,7 @@
MobyService[] services = null;
// initialize central
try {
- String registryURL;
- String registryNamespace;
- Map map = RegistryOS.getEnv();
- if (!map.isEmpty()) {
- registryURL = (String) map.get("MOBY_SERVER");
- registryNamespace = (String) map.get("MOBY_URI");
- if (registryURL == null) {
- // use default registry, since we dont have a local one
- central = new CentralImpl();
- } else if (registryNamespace == null) {
- // use default namespace since one isnt defined
- central = new CentralImpl(registryURL);
- } else {
- // use defined url and namespacce
- central = new CentralImpl(registryURL, registryNamespace);
- }
- log.info("Using URL: "
- + (registryURL == null ? CentralImpl.DEFAULT_ENDPOINT : registryURL)
- + " URI: "
- + (registryNamespace == null ? CentralImpl.DEFAULT_NAMESPACE
- : registryNamespace));
- } else {
- // use default registry since we cant determine if local one
- // exists
- central = new CentralImpl();
- }
+ central = getCentralImpl();
} catch (MobyException e) {
return "";
}
@@ -1324,7 +1090,7 @@
// false));
// log.info(findService("bioinfo.icapture.ubc.ca","MOBYSHoundGetGenBankGFF",
// false));
- log.info(findService("genome.imim.es", null, false));
+ log.info(findService("blah.blah.blah", "Echo_test", "http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl", "http://bioinfo.icapture.ubc.ca/MOBY/Central", false));
// log.info(findService("", "", false));
}
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java 2006/08/28 13:50:13 1.21
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/RDFConfigure.java 2006/10/11 01:54:51 1.22
@@ -5,19 +5,15 @@
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
-import java.util.HashMap;
import java.util.Map;
-import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.biomoby.client.CentralImpl;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.biomoby.client.rdf.vocabulary.DC_PROTEGE;
import org.biomoby.client.rdf.vocabulary.Predicates;
-import org.biomoby.registry.properties.MobyProperties;
-import org.biomoby.shared.Central;
-import org.biomoby.shared.MobyResourceRef;
+import org.biomoby.client.ui.graphical.servlet.jresources.RESOURCE;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
@@ -54,84 +50,53 @@
*/
@SuppressWarnings("unchecked")
public class RDFConfigure {
+ private static Log log = LogFactory.getLog(RESOURCE.class);
+
+
final private static String newline = System.getProperty("line.separator");
+ final public static String URI_OBJECT;
+
+ final public static String URI_SERVICE;
+
+ final public static String URI_NAMESPACE;
+
+ final public static String URI_PREDICATE;
+
+ final public static String URI_ServiceINSTANCE;
/*
* Some constants for use in the rdfs
*/
- private static Map URI_MAP = new HashMap();
+
static {
- boolean __success = false;
- // attempt 1 - servlet context
+ ContextLoader cLoader = null;
try {
- Context c = new InitialContext();
- String MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER");
- if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) {
- Central central = new CentralImpl(MOBY_SERVER);
- MobyResourceRef[] refs = central.getResourceRefs();
- for (int i = 0; i < refs.length; i++) {
- String url = refs[i].getResourceLocation().toExternalForm();
- if (url.lastIndexOf("#") < 0)
- url = url + "#";
- URI_MAP.put(refs[i].getResourceName(), url);
- }
- __success = true;
- }
-
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .info((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
} catch (Exception e) {
- e.printStackTrace();
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getMessage());
}
- // attempt 2 - environment variables
- if (!__success) {
- // maybe try for environment variables
- Properties p = MobyProperties.PROPERTIES();
- String MOBY_SERVER = (String) p.get("MOBY_SERVER");
- try {
- if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) {
- Central central = new CentralImpl(MOBY_SERVER);
- MobyResourceRef[] refs = central.getResourceRefs();
- for (int i = 0; i < refs.length; i++) {
- String url = refs[i].getResourceLocation().toExternalForm();
- if (url.lastIndexOf("#") < 0)
- url = url + "#";
- URI_MAP.put(refs[i].getResourceName(), url);
- }
- __success = true;
- }
- } catch (Exception ex) {
- // die here?
- ex.printStackTrace();
- }
- }
- // attempt 3 - default to mobycentral
- if (!__success) {
- // default to mobycentral
- try {
- Central central = new CentralImpl();
- MobyResourceRef[] refs = central.getResourceRefs();
- for (int i = 0; i < refs.length; i++) {
- String url = refs[i].getResourceLocation().toExternalForm();
- if (url.lastIndexOf("#") < 0)
- url = url + "#";
- URI_MAP.put(refs[i].getResourceName(), url);
- }
- __success = true;
- } catch (Exception ex) {
- // die here?
- ex.printStackTrace();
- }
- }
- }
+
+ log.info("Setting RDF ResourceLocations (RDFConfigure) for current registry...");
- final public static String URI_OBJECT = (String) URI_MAP.get("Object"); // "http://biomoby.org/RESOURCES/MOBY-S/Objects#";
+
+ URI_OBJECT = (String) cLoader.getURI_MAP().get("Object");
- final public static String URI_SERVICE = (String) URI_MAP.get("Service"); // "http://biomoby.org/RESOURCES/MOBY-S/Services#";
+ URI_SERVICE = (String) cLoader.getURI_MAP().get("Service");
- final public static String URI_NAMESPACE = (String) URI_MAP.get("Namespace"); // "http://biomoby.org/RESOURCES/MOBY-S/Namespaces#";
+ URI_NAMESPACE = (String) cLoader.getURI_MAP().get("Namespace");
- final public static String URI_PREDICATE = "http://biomoby.org/RESOURCES/MOBY-S/Predicates#";
+ URI_PREDICATE = "http://biomoby.org/RESOURCES/MOBY-S/Predicates#";
+
+ URI_ServiceINSTANCE = (String) cLoader.getURI_MAP().get("ServiceInstance");
+ }
- final public static String URI_ServiceINSTANCE = (String) URI_MAP.get("ServiceInstance"); // "http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#";
+
private Model model = null;
From kawas at dev.open-bio.org Wed Oct 11 01:55:44 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 21:55:44 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610110155.k9B1thpg025500@dev.open-bio.org>
kawas
Tue Oct 10 21:55:43 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes
In directory dev.open-bio.org:/tmp/cvs-serv25465/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes
Modified Files:
Types.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes Types.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes/Types.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes/Types.java 2006/05/24 18:48:31 1.6
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jTypes/Types.java 2006/10/11 01:55:43 1.7
@@ -5,8 +5,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.naming.Context;
-import javax.naming.InitialContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -32,46 +30,7 @@
* @see javax.servlet.GenericServlet#init()
*/
public final void init() throws ServletException {
- // super.init();
- // try to load environment variables set in context.xml
- try {
- Context c = new InitialContext();
-
- try {
- String MOBY_CENTRAL_CONFIG = null;
- MOBY_CENTRAL_CONFIG = (String) c.lookup("java:comp/env/MOBY_CENTRAL_CONFIG");
- if (MOBY_CENTRAL_CONFIG != null && !MOBY_CENTRAL_CONFIG.equals("")) {
- // set MOBY_CENTRAL_CONFIG
- log.info("init(setting MOBY_CENTRAL_CONFIG)");
- System.setProperty("MOBY_CENTRAL_CONFIG", MOBY_CENTRAL_CONFIG);
- }
-
- } catch (Exception ex) {
- }
- try {
- String MOBY_SERVER = null;
- MOBY_SERVER = (String) c.lookup("java:comp/env/MOBY_SERVER");
- if (MOBY_SERVER != null && !MOBY_SERVER.equals("")) {
- // set MOBY_SERVER
- log.info("init(setting MOBY_SERVER)");
- System.setProperty("MOBY_SERVER", MOBY_SERVER);
- }
- } catch (Exception ex) {
- }
-
- try {
- String MOBY_URI = null;
- MOBY_URI = (String) c.lookup("java:comp/env/MOBY_URI");
- if (MOBY_URI != null && !MOBY_URI.equals("")) {
- // set MOBY_URI
- log.info("init(setting MOBY_URI)");
- System.setProperty("MOBY_URI", MOBY_URI);
- }
- } catch (Exception ex) {
- }
-
- } catch (Exception e) {
- }
+
}
/* (non-Javadoc)
@@ -87,7 +46,7 @@
Pattern p ;
Matcher m ;
if (path == null) {
- response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Please specify which definitions you are looking for (Objects, Services, or Namespaces).");
+ response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Please specify which definitions you are looking for (i.e., Objects, Services, or Namespaces).");
return;
}
p = Pattern.compile("/Services\\S*");
From kawas at dev.open-bio.org Wed Oct 11 20:39:32 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 11 Oct 2006 16:39:32 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610112039.k9BKdWVK027958@dev.open-bio.org>
kawas
Wed Oct 11 16:39:31 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv27923/Java/docs
Modified Files:
RegistryServlets.html
Log Message:
Added some configuration information.
moby-live/Java/docs RegistryServlets.html,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/RegistryServlets.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/10 18:51:50 1.1
+++ /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/11 20:39:31 1.2
@@ -4,6 +4,11 @@
Installing the servlets is extremely straight-forward and quite easy. A GUI should result that will guide you through the installation process. Once you have those values, you will have to modify the servlets configuration file that is located at /path/to/tomcat/webapps/authority/META-INF/context.xml How to Configure Once you have those values, you will have to modify the servlets configuration file that is located at /path/to/tomcat/webapps/authority/META-INF/context.xml The file context.xml is written in XML and contains numerous entries that look like this: For a more precise explanation of how to configure this aspect of the servlets, please refer to Once you have modified these parameters in this file, you may close the file. Next, you will have to open the file mobycentral.config and add or modify a couple of configuration parameters: Next, you will have to open the file mobycentral.config and add or modify a couple of configuration parameters: This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/ServiceTypes Once these values have been added or modified, make sure to save the configuration files and restart the server. Your changes should be reflected in your registry. To enable the LSID authority servlets, you will have to perform up to 2 more tasks: Setting up DNS (excerpt) All that you - or your system administrator - must do, is to add a service record for the machine that will run the authority. Suppose the machine is authority.company.net and that it will serve as the authority named company.net. Further suppose that the service will be on port 8080. The record that must be added should go into the master zone file for company.net's DNS server (perhaps a file named /var/named/company.net.zone on company.net): If the authority name is supposed to be authority.company.net rather than company.net, the record in company.net's zone file should look like: Enabling ProxyPass Apache Directives For those of you that are running Tomcat on a non-standard port, you may find that users of your registry cannot access those ports due to firewall restrictions. One way around this is to set up ProxyPass directives in your web server. Before you begin, it is highly recommended that you backup any files mentioned here that you will be updating. Open up your Apache servers httpd.conf file and make sure that following line is uncommented: Then add the following to the bottom of the file Once these values have been added or modified, make sure to save the configuration files and restart the server. Your changes should be reflected in your registry. Once you have installed and configured the servlets, you can determine if the install was successful by attempting to resolve the following URL: http://your.domain.com:your_port/authority/moby.jsp where your.domain.com is the domain name of the server that the servlets were installed on and your_port is the server port. The resulting page will outline those servlets that are included in this distribution and will provide you with links to test them.
@@ -997,14 +998,14 @@
senger at sherekhan:~/jMoby/src/Perl$ ../scripts/generate-datatypes.pl
Generating all data types.
Done.
-senger at sherekhan:~/jMoby/src/Perl$ for n in generated/MOBY/Data/*.pm ; do perl -c $n ; done
-generated/MOBY/Data/ABI_Encoded.pm syntax OK
-generated/MOBY/Data/Ace_Text.pm syntax OK
-generated/MOBY/Data/Alignment.pm syntax OK
+senger at sherekhan:~/jMoby/src/Perl$ for n in generated/MOSES/MOBY/Data/*.pm ; do perl -c $n ; done
+generated/MOSES/MOBY/Data/ABI_Encoded.pm syntax OK
+generated/MOSES/MOBY/Data/Ace_Text.pm syntax OK
+generated/MOSES/MOBY/Data/Alignment.pm syntax OK
...
-generated/MOBY/Data/WU_BLAST_Text.pm syntax OK
-generated/MOBY/Data/xdom_flatfile.pm syntax OK
-generated/MOBY/Data/zPDB.pm syntax OK
+generated/MOSES/MOBY/Data/WU_BLAST_Text.pm syntax OK
+generated/MOSES/MOBY/Data/xdom_flatfile.pm syntax OK
+generated/MOSES/MOBY/Data/zPDB.pm syntax OK
senger at sherekhan:~/jMoby/src/Perl$
@@ -1016,7 +1017,7 @@
script).
Usually, you generate code for one or only several
-services. And because all services belong to some authority you need
+services. And because each service belongs to an authority you need
to tell both:
- This script does not have any options.
+ This script does not have any options (nor the help).
+
+ There are also few other behavioral differences between these
+two modes: If an input parsing error occurs (e.g. when an input has an
+unknown article name), it is reported directly to the standard error
+in the testing mode, but in a real mode it is properly included in the
+response as an exception. Or (and only if the logging is set to record
+debug messages), in testing mode the full input raw (not yet parsed)
+are logged, whereas in the real mode only the first 1000 characters
+are logged.
The Perl Moses internally uses Config::Simple CPAN module,
-but wraps it into its own MOBY::Config. This allows expansion
+but wraps it into its own MOSES::MOBY::Config. This allows expansion
later, or even changing the underlying configuration system. The
Config::Simple is simple (thus the name, and thus we selected
it) but has few drawbacks that may be worth to work on later.
@@ -1720,16 +1730,16 @@
You can also change or add parameters during the run-time. For
example, the script universal-testing.pl needs to overwrite
existing parameters because it wants to create everything in a
-separate space, in temporary directory, and within a 'Testing'
+separate space, in a temporary directory, and within the 'Testing'
package. Because the generators read from the configuration files, it
is necessary to change it there:
The logging is available from the moment when Perl Moses knows about
-the MOBY::Base module. All generated service implementations
-inherit from this class, so all of them has immediate access to the
-logging system. By default, the MOBY::Base creates a
-logger named $LOG. Which means that in your service
+the MOSES::MOBY::Base module. All generated service implementations
+inherit from this class, so all of them have immediate access to the
+logging system. By default, the MOSES::MOBY::Base creates a
+logger in a variable $LOG. Which means that in your service
implementation you can log events in five different log levels:
The better way is to use log4perl.properties file. The
file name can be actually different - it is specified by an option
log.config in the moby-services.cfg configuration
file. This is what PerlMoses installation creates there (of course,
-with your own path):
+using your own path):
-The message format (in Perl Moses default way) means:
+The message format (unless you change the Perl Moses default way) means:
-In the beginning of the generated process_it method is code
-that tells you what methods are available for reading inputs, and at
-the end of the same method is the code showing how to fill the
+In the beginning of the generated process_it method is the
+code that tells you what methods are available for reading inputs, and
+at the end of the same method is the code showing how to fill the
response. Feel free to remove the code, extend it, fill it, turn it
upside-down, whatever. This is, after all, your implementation. And
Perl Moses generator is clever enough not to overwrite the code once
@@ -2077,21 +2087,32 @@
Perhaps the best way how to close this section is to show a full
-implementation of (so often mentioned) service Mabuhay:
+implementation of (so often mentioned) service Mabuhay (the code
+is also available in jMoby/src/Perl/samples):
+
+ What was not pre-generated are the methods accessing
+ID and NAMESPACE. Their names are, not surprisingly,
+id and namespace. For example, the Mabuhay input is
+named language (as seen in the code above), so you can call:
+
+
+
+
+
+ Note, however, that the response may already contain some
+outputs from the previously processed jobs. If you do not like it, you
+can remove it (find them in the $context parameter).
+
+ Another, less drastic, option is to record an
+exception (and, usually, return):
+
+
+
+ In addition to using an eval{} block to handle
+exceptions (as shown above), you can also use a
+try-catch-finally block structure if Error.pm has
+been installed in your system. See documentation of
+MOSES::MOBY::Base for details and examples.
+
+
+
+
+ Again here you can also set the ID and
+NAMESPACE. For example, the code above can be extended so the
+MOSES::MOBY::Data::simple_key_value_pair data type will have
+also an ID and NAMESPACE:
+
+
+
+
+
MOBY/Base
-
And there are features (and known) bugs that should or could be
-implemented (or fixed). Here are those we am aware of (B = bug, N = not yet
implemented, F = potential future feature):
@@ -2327,7 +2461,7 @@
it expands hints how to write your own service implementation.
@@ -2371,7 +2505,7 @@
The URL that would return the RDF describing all ontologies in your registry. This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/FULL The location of the RDFGenerator included with the Registry Servlet that you are currently installing, i.e.
+ *
+ * @param serviceNotes a piece of XML
+ * <serviceNotes>...</serviceNotes>
+ *
+ * @return an array, potentially an empty array, of all exceptions
+ * extracted from the 'serviceNotes'
+ *************************************************************************/
+ public static ServiceException[] extractExceptions (Element serviceNotes) {
+ if (serviceNotes == null)
+ return new ServiceException[] {};
+
+ Vector v = new Vector();
+ for (Iterator it =
+ serviceNotes.getChildren (MobyTags.MOBYEXCEPTION).iterator();
+ it.hasNext(); ) {
+ ServiceException ex = extractException ((Element)it.next());
+ if (ex != null)
+ v.addElement (ex);
+ }
+ for (Iterator it =
+ serviceNotes.getChildren (MobyTags.MOBYEXCEPTION, JDOMUtils.MOBY_NS).iterator();
+ it.hasNext(); ) {
+ ServiceException ex = extractException ((Element)it.next());
+ if (ex != null)
+ v.addElement (ex);
+ }
+ ServiceException[] result = new ServiceException [v.size()];
+ v.copyInto (result);
+ return result;
+ }
+
+ /**************************************************************************
+ * Extract one exception from an XML element 'mobyException'.
+ *************************************************************************/
+ protected static ServiceException extractException (Element elem) {
+ ServiceException ex = new ServiceException();
+ String severity = elem.getAttributeValue (MobyTags.SEVERITY);
+ if (severity == null)
+ severity = elem.getAttributeValue (MobyTags.SEVERITY, JDOMUtils.MOBY_NS);
+ ex.setSeverity (severity);
+ String codeStr = JDOMUtils.getChildText (elem, MobyTags.EXCEPTIONCODE);
+ try {
+ ex.setErrorCode (new Integer (codeStr).intValue());
+ } catch (Exception e) {
+ }
+ ex.setMessage (JDOMUtils.getChildText (elem, MobyTags.EXCEPTIONMESSAGE));
+ return ex;
+ }
+
+ /**************************************************************************
* Turns a PIB Object into a JDOM representation.
*************************************************************************/
public static Element toXMLElement(MobyProvisionInfo mpi) {
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/ServiceException.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/ServiceException.java 2006/07/07 04:12:40 1.9
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/parser/ServiceException.java 2006/10/25 02:33:23 1.10
@@ -492,7 +492,7 @@
xml.append(" The MOBY data is:
- The applet can be launched from the following Web site: http://moby.ucalgary.ca/seahawk/ The applet can be launched from the following Web site: http://moby.ucalgary.ca/seahawk/. If you are a programmer, you can run it with a checked out version of the jMOBY CVS: ./build.sh seahawk/tt> The jar (Java archive) file containing all of the required classes (including those from
Axis, Jena, Xalan, Xerces, etc.) is available
- here. Note that this JAR
+ here. Note that this JAR
is signed by the University of Calgary Bioinformatics Lab. This jar file
can be used as an application with the command:
Or it can be launched from within another Java application with the following code (and assuming seahawk.jar is in the classpath):
MOBY Data from
MOBY Data from
@@ -109,7 +110,7 @@
-
-
+
- MOBY Data for query
-
Xref:
-
+
+
+
+
-
+ Collection of
-
From gordonp at dev.open-bio.org Wed Oct 25 21:32:06 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Wed, 25 Oct 2006 21:32:06 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610260132.k9Q1W6EU015312@dev.open-bio.org>
gordonp
Wed Oct 25 21:32:06 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv15257/src/main/ca/ucalgary/seahawk/services
Modified Files:
MobyClient.java
Log Message:
Became more lenient with moby-s namespace for tags
moby-live/Java/src/main/ca/ucalgary/seahawk/services MobyClient.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java 2006/10/26 00:36:15 1.2
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java 2006/10/26 01:32:06 1.3
@@ -624,7 +624,6 @@
public void setRequiredServiceLevel(int level){
serviceLevel = level;
- System.err.println("Service level is now set to " + serviceLevel);
}
public MobyDataServiceAssocInstance getServices(MobyDataObjectSet mdos) throws MobyException{
From gordonp at dev.open-bio.org Wed Oct 25 21:32:06 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Wed, 25 Oct 2006 21:32:06 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610260132.k9Q1W6vd015374@dev.open-bio.org>
gordonp
Wed Oct 25 21:32:06 EDT 2006
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv15257/xmls
Modified Files:
seahawkBuild.xml
Log Message:
Became more lenient with moby-s namespace for tags
moby-live/Java/xmls seahawkBuild.xml,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml 2006/10/25 02:33:23 1.1
+++ /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml 2006/10/26 01:32:06 1.2
@@ -53,8 +53,8 @@
How do I launch it?
-
@@ -79,8 +79,8 @@
java -jar seahawk.jar
-import ca.ucalgary.bluejay.util.MobyUtils;
-import ca.ucalgary.bluejay.gui.MobyContentGUI;
+import ca.ucalgary.seahawk.util.MobyUtils;
+import ca.ucalgary.seahawk.gui.MobyContentGUI;
// the rest of your application code goes here...
@@ -108,7 +108,7 @@
There are 4 main mechanisms for creating Moby Data Instances in Seahawk:
@@ -41,8 +46,13 @@
ca.ucalgary.bluejay.gui.MobyContentGUI
, and
+ ca.ucalgary.seahawk.gui.MobyContentGUI
, and
this same class will create a MOBY DNASequence, RNASequence or AASequence if 95% of the characters are valid for that sequence type.
" + word);
+ lineCharCount = word.length();
+ continue;
+ }
+ result.append(" " + word);
+ lineCharCount += word.length()+1;
+
+ if(lineCharCount > maxLine){ //single word is bigger than preset width, redo layout
+ maxLine = lineCharCount;
+ break;
+ }
+ }
+ result.append("");
+ if(!st.hasMoreTokens()){ //used up all the text, didn't break previous loop abnormally
+ break;
+ }
+ } //end layout block
+
+ return result.toString();
+ }
+
public JMenu addNameDivSubMenu(JMenu parentMenu, MobyService[] services){
if(services == null || services.length == 0){
return null;
@@ -1044,7 +1084,7 @@
String menuToolTip = commonAncestorDesc + desc;
if(menuToolTip.length() > MAX_SERVICE_DESC_LEN){
// Cut down really long ancestry descs to the last part (most precise)
- menuToolTip = "..." + menuToolTip.substring(menuToolTip.length()-MAX_SERVICE_DESC_LEN);
+ menuToolTip = htmlifyToolTipText(menuToolTip);
}
menu.setToolTipText(menuToolTip);
parentMenu.add(menu);
From gordonp at dev.open-bio.org Sun Oct 29 10:26:55 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Sun, 29 Oct 2006 10:26:55 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610291526.k9TFQtbw018754@dev.open-bio.org>
gordonp
Sun Oct 29 10:26:53 EST 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv18719
Modified Files:
MobyServlet.war
Log Message:
Fixed manifest to have ServletTester as main-class. The mainfest got overwritten in the last update by mistake
jars-archive/current MobyServlet.war,1.2,1.3
===================================================================
RCS file: /home/repository/moby/jars-archive/current/MobyServlet.war,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
Binary files /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/24 17:50:14 1.2 and /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/29 15:26:53 1.3 differ
rcsdiff: /home/repository/moby/jars-archive/current/MobyServlet.war: diff failed
From gordonp at dev.open-bio.org Mon Oct 30 10:49:39 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:49:39 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301549.k9UFnde3025206@dev.open-bio.org>
gordonp
Mon Oct 30 10:49:38 EST 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv25171
Modified Files:
MobyServlet.war
Log Message:
Updates to fix issue with registering services taking Collections (which didn't support data types due to a quirk in MobyPrimaryDataSet's implementation)
jars-archive/current MobyServlet.war,1.3,1.4
===================================================================
RCS file: /home/repository/moby/jars-archive/current/MobyServlet.war,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
Binary files /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/29 15:26:53 1.3 and /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/30 15:49:37 1.4 differ
rcsdiff: /home/repository/moby/jars-archive/current/MobyServlet.war: diff failed
From gordonp at dev.open-bio.org Mon Oct 30 10:54:39 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:54:39 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301554.k9UFsdWV025311@dev.open-bio.org>
gordonp
Mon Oct 30 10:54:39 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv25276/main/org/biomoby/shared/data
Modified Files:
MobyDataObject.java
Log Message:
Checked for freak condition that no data type has been assigned to the object before printing
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObject.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java 2006/10/26 00:31:21 1.10
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java 2006/10/30 15:54:39 1.11
@@ -559,7 +559,15 @@
}
// One-tag representation, since it doesn't have any CRIB or PIB to enclose
- return "<" + getDataType().getName() +" " + getAttrXML() + "/>";
+ if(getDataType() == null){
+ // If the data type is null, there must be something wrong
+ // with fetching the ontology RDF from MOBY Central. At the very
+ // least, we know the thing must be an Object.
+ return "";
+ }
+ else{
+ return "<" + getDataType().getName() +" " + getAttrXML() + "/>";
+ }
}
else{
// Override super because article name is not actually important to us
From gordonp at dev.open-bio.org Mon Oct 30 10:55:36 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:55:36 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301555.k9UFtaHJ025354@dev.open-bio.org>
gordonp
Mon Oct 30 10:55:36 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory dev.open-bio.org:/tmp/cvs-serv25319/main/org/biomoby/shared
Modified Files:
MobyPrimaryDataSet.java
Log Message:
Added support for declaring data type of set, even if no elements are present yet. If elements are added, the data type is changed
moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2006/07/07 04:12:40 1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2006/10/30 15:55:36 1.8
@@ -25,6 +25,7 @@
extends MobyPrimaryData {
protected Vector elements = new Vector(); // elemenst are of type MobyPrimaryDataSimple
+ protected MobyDataType defaultDataType = new MobyDataType("Object");
/**************************************************************************
* Default constructor. Other characteristics are empty - which is usually
@@ -82,7 +83,7 @@
if (elements.size() > 0)
return ((MobyPrimaryDataSimple)elements.firstElement()).getDataType();
else
- return null;
+ return defaultDataType;
}
}
@@ -92,6 +93,7 @@
* data type).
*************************************************************************/
public void setDataType (MobyDataType dataType) {
+ defaultDataType = dataType;
synchronized (elements) {
for (Enumeration en = elements.elements(); en.hasMoreElements(); )
((MobyPrimaryDataSimple)en.nextElement()).setDataType (dataType);
@@ -170,6 +172,11 @@
for (Enumeration en = elements.elements(); en.hasMoreElements(); )
buf.append (((MobyPrimaryDataSimple)en.nextElement()).toXML());
}
+ else{
+ MobyPrimaryDataSimple template = new MobyPrimaryDataSimple();
+ template.setDataType(defaultDataType);
+ buf.append(template.toXML());
+ }
buf.append ("");
buf.append ("\n");
return new String (buf);
From gordonp at dev.open-bio.org Mon Oct 30 10:56:19 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:56:19 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301556.k9UFuJsX025393@dev.open-bio.org>
gordonp
Mon Oct 30 10:56:19 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util
In directory dev.open-bio.org:/tmp/cvs-serv25362/main/ca/ucalgary/seahawk/util
Added Files:
MinJarMaker.java
Log Message:
Tool used to generate Seahawk standalone JAR
moby-live/Java/src/main/ca/ucalgary/seahawk/util MinJarMaker.java,NONE,1.1
From gordonp at dev.open-bio.org Tue Oct 31 15:25:56 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Tue, 31 Oct 2006 15:25:56 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610312025.k9VKPufQ029279@dev.open-bio.org>
gordonp
Tue Oct 31 15:25:55 EST 2006
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory dev.open-bio.org:/tmp/cvs-serv29244/src/Clients
Modified Files:
ServletTester.java
Log Message:
Better error reporting if the provided 'web.xml' file is not syntactically correct
moby-live/Java/src/Clients ServletTester.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/ServletTester.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/ServletTester.java 2006/10/25 02:33:22 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/ServletTester.java 2006/10/31 20:25:55 1.2
@@ -33,7 +33,7 @@
ServletTester tester = new ServletTester();
// Open the web.xml file to determine the service name and inputs/outputs.
- java.net.URL webXmlURL = tester.getClass().getClassLoader().getResource("WEB-INF/web.xml");
+ java.net.URL webXmlURL = tester.getClass().getClassLoader().getResource("WEB-INF/web.xml");
if(webXmlURL == null){
System.err.println("Could not find \"WEB-INF/web.xml\", aborting!");
System.exit(1);
@@ -48,10 +48,18 @@
dbf.setNamespaceAware(false);
DocumentBuilder docBuilder = dbf.newDocumentBuilder();
- Element docRoot = docBuilder.parse(webXmlURL.openStream()).getDocumentElement();
- if(docRoot == null || !docRoot.getNodeName().equals("web-app")){
- System.err.println("Could not find /web-app tag in " +
- webXmlURL + ", aborting!");
+ Element docRoot = null;
+ try{
+ docRoot = docBuilder.parse(webXmlURL.openStream()).getDocumentElement();
+ if(docRoot == null || !docRoot.getNodeName().equals("web-app")){
+ System.err.println("Could not find /web-app tag in " +
+ webXmlURL + ", aborting!");
+ System.exit(1);
+ }
+ } catch(Exception e){
+ System.err.println("There appears to be a problem with the \"WEB-INF/web.xml\" file (XML syntax?)." +
+ "While parsing it I encountered the error: " + e);
+ e.printStackTrace();
System.exit(1);
}
Element servlet = getChildElement(docRoot, "servlet");
From gordonp at dev.open-bio.org Tue Oct 31 15:55:45 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Tue, 31 Oct 2006 15:55:45 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610312055.k9VKtjgb029560@dev.open-bio.org>
gordonp
Tue Oct 31 15:55:45 EST 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv29525
Modified Files:
MobyServlet.war
Log Message:
Better error reporting if the provided 'web.xml' file is not syntactically correctin test client
jars-archive/current MobyServlet.war,1.4,1.5
===================================================================
RCS file: /home/repository/moby/jars-archive/current/MobyServlet.war,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
Binary files /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/30 15:49:37 1.4 and /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/31 20:55:44 1.5 differ
rcsdiff: /home/repository/moby/jars-archive/current/MobyServlet.war: diff failed
From senger at dev.open-bio.org Mon Oct 2 17:55:33 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:55:33 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021755.k92HtXrK025557@dev.open-bio.org>
senger
Mon Oct 2 13:55:32 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/meta
In directory dev.open-bio.org:/tmp/cvs-serv25539/meta
Log Message:
Directory /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/meta added to the repository
moby-live/Java/src/main/org/biomoby/registry/meta - New directory
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvndN025613@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv25596/docs
Modified Files:
ChangeLog Dashboard-dev.html
Log Message:
selectable registries in Dashboard
moby-live/Java/docs ChangeLog,1.71,1.72 Dashboard-dev.html,1.2,1.3
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92Hvn5n025644@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/Perl/MOBY/Cache
Modified Files:
Registries.pm
Log Message:
selectable registries in Dashboard
moby-live/Java/src/Perl/MOBY/Cache Registries.pm,1.2,1.3
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvnjV025701@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/meta
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/main/org/biomoby/registry/meta
Added Files:
ExampleList.java Registries.java RegistriesList.java
Registry.java
Log Message:
selectable registries in Dashboard
moby-live/Java/src/main/org/biomoby/registry/meta ExampleList.java,NONE,1.1 Registries.java,NONE,1.1 RegistriesList.java,NONE,1.1 Registry.java,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92Hvnce025664@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/config/dashboard/META-INF/services
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/config/dashboard/META-INF/services
Added Files:
org.biomoby.registry.meta.Registries
Log Message:
selectable registries in Dashboard
moby-live/Java/src/config/dashboard/META-INF/services org.biomoby.registry.meta.Registries,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvnIW025685@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/config/dashboard/org/biomoby/service/dashboard
Modified Files:
dashboard.txt
Log Message:
selectable registries in Dashboard
moby-live/Java/src/config/dashboard/org/biomoby/service/dashboard dashboard.txt,1.3,1.4
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvneC025722@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/main/org/biomoby/service/dashboard
Modified Files:
Dashboard.java DashboardProperties.java RegistryPanel.java
Log Message:
selectable registries in Dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard Dashboard.java,1.29,1.30 DashboardProperties.java,1.24,1.25 RegistryPanel.java,1.27,1.28
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvnXo025627@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs/images
In directory dev.open-bio.org:/tmp/cvs-serv25596/docs/images
Added Files:
regs-after.png regs-before.png
Log Message:
selectable registries in Dashboard
moby-live/Java/docs/images regs-after.png,NONE,1.1 regs-before.png,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 17:57:49 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 13:57:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021757.k92HvneZ025739@dev.open-bio.org>
senger
Mon Oct 2 13:57:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help
In directory dev.open-bio.org:/tmp/cvs-serv25596/src/main/org/biomoby/service/dashboard/help
Modified Files:
RegistryPanel.html
Log Message:
selectable registries in Dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard/help RegistryPanel.html,1.2,1.3
From kawas at dev.open-bio.org Mon Oct 2 18:21:41 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 14:21:41 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610021821.k92ILfVM026790@dev.open-bio.org>
kawas
Mon Oct 2 14:21:41 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv26758/Java/docs
Modified Files:
RDFAgent.html
Log Message:
modified the user documentation for the agent
moby-live/Java/docs RDFAgent.html,1.3,1.4
From senger at dev.open-bio.org Mon Oct 2 21:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCj61027241@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv27224/docs
Modified Files:
ChangeLog Dashboard.html
Log Message:
call rdf agent from dashboard
moby-live/Java/docs ChangeLog,1.72,1.73 Dashboard.html,1.6,1.7
From senger at dev.open-bio.org Mon Oct 2 21:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCjeh027257@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv27224/src/main/org/biomoby/service/dashboard
Modified Files:
RegistrationPanel.java RegistrationServiceSubPanel.java
Log Message:
call rdf agent from dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationPanel.java,1.20,1.21 RegistrationServiceSubPanel.java,1.11,1.12
From senger at dev.open-bio.org Mon Oct 2 21:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCjcs027286@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/images
In directory dev.open-bio.org:/tmp/cvs-serv27224/src/main/org/biomoby/service/dashboard/images
Added Files:
smallAgent.gif smallAgent_dis.gif
Log Message:
call rdf agent from dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard/images smallAgent.gif,NONE,1.1 smallAgent_dis.gif,NONE,1.1
From senger at dev.open-bio.org Mon Oct 2 21:12:45 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Mon, 2 Oct 2006 17:12:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022112.k92LCjk7027272@dev.open-bio.org>
senger
Mon Oct 2 17:12:45 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/help
In directory dev.open-bio.org:/tmp/cvs-serv27224/src/main/org/biomoby/service/dashboard/help
Modified Files:
RegistrationPanel.html
Log Message:
call rdf agent from dashboard
moby-live/Java/src/main/org/biomoby/service/dashboard/help RegistrationPanel.html,1.3,1.4
From kawas at dev.open-bio.org Mon Oct 2 21:42:35 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 17:42:35 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022142.k92LgZc2027445@dev.open-bio.org>
kawas
Mon Oct 2 17:42:35 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv27413
Modified Files:
Central.pm
Log Message:
made the call to system() array based
moby-live/Perl/MOBY Central.pm,1.256,1.257
From mwilkinson at dev.open-bio.org Mon Oct 2 23:08:08 2006
From: mwilkinson at dev.open-bio.org (Mark Wilkinson)
Date: Mon, 2 Oct 2006 19:08:08 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022308.k92N88Ug028401@dev.open-bio.org>
mwilkinson
Mon Oct 2 19:08:08 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory dev.open-bio.org:/tmp/cvs-serv28385/MOBY/Client
Modified Files:
SimpleArticle.pm
Log Message:
nasty bug in MOBY::Client::SimpleArticle. It was shifting the namespace encapsulated array ref, instead of shifting a copied list. Probably shouldn't shift anyway, but... it wont destroy the namespace now just by looking at it
moby-live/Perl/MOBY/Client SimpleArticle.pm,1.14,1.15
From kawas at dev.open-bio.org Mon Oct 2 23:19:26 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 19:19:26 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022319.k92NJQer031181@dev.open-bio.org>
kawas
Mon Oct 2 19:19:26 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv31150/Java/docs
Added Files:
ConfigureRDFAgent.html
Log Message:
unfinished documentation on setting up your own RDF agent.
moby-live/Java/docs ConfigureRDFAgent.html,NONE,1.1
From kawas at dev.open-bio.org Mon Oct 2 23:20:07 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 2 Oct 2006 19:20:07 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022320.k92NK7TR031281@dev.open-bio.org>
kawas
Mon Oct 2 19:20:07 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv31249/Java/docs
Modified Files:
RDFAgent.html
Log Message:
moby-live/Java/docs RDFAgent.html,1.4,1.5
From mwilkinson at dev.open-bio.org Mon Oct 2 23:31:20 2006
From: mwilkinson at dev.open-bio.org (Mark Wilkinson)
Date: Mon, 2 Oct 2006 19:31:20 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610022331.k92NVKl3031435@dev.open-bio.org>
mwilkinson
Mon Oct 2 19:31:20 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory dev.open-bio.org:/tmp/cvs-serv31419/MOBY/Client
Modified Files:
SimpleArticle.pm
Log Message:
decided it was better not to shift at all
moby-live/Perl/MOBY/Client SimpleArticle.pm,1.15,1.16
From kawas at dev.open-bio.org Wed Oct 4 18:43:11 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 4 Oct 2006 14:43:11 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610041843.k94IhBW0009439@dev.open-bio.org>
kawas
Wed Oct 4 14:43:11 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv9407
Modified Files:
Central.pm
Log Message:
added some return values for the agent
moby-live/Perl/MOBY Central.pm,1.257,1.258
From kawas at dev.open-bio.org Wed Oct 4 18:43:53 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 4 Oct 2006 14:43:53 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610041843.k94Ihr7v009495@dev.open-bio.org>
kawas
Wed Oct 4 14:43:53 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory dev.open-bio.org:/tmp/cvs-serv9462/Java/src/main/org/biomoby/registry/rdfagent/verifier
Modified Files:
Processor.java Main.java
Log Message:
added some return values for the agent when invoked via the -url option
moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Processor.java,1.27,1.28 Main.java,1.18,1.19
From kawas at dev.open-bio.org Wed Oct 4 19:46:18 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 4 Oct 2006 15:46:18 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610041946.k94JkIn4009859@dev.open-bio.org>
kawas
Wed Oct 4 15:46:18 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv9827
Modified Files:
Central.pm
Log Message:
agent called a different way without shell scripts.
moby-live/Perl/MOBY Central.pm,1.258,1.259
From kawas at dev.open-bio.org Thu Oct 5 15:17:34 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 5 Oct 2006 11:17:34 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610051517.k95FHYJI012473@dev.open-bio.org>
kawas
Thu Oct 5 11:17:33 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv12440/Java/docs
Modified Files:
ConfigureRDFAgent.html
Log Message:
moby-live/Java/docs ConfigureRDFAgent.html,1.1,1.2
From kawas at dev.open-bio.org Thu Oct 5 15:18:13 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 5 Oct 2006 11:18:13 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610051518.k95FIDgH012510@dev.open-bio.org>
kawas
Thu Oct 5 11:18:13 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv12478/Java/docs
Modified Files:
RDFAgent.html
Log Message:
moby-live/Java/docs RDFAgent.html,1.5,1.6
From kawas at dev.open-bio.org Thu Oct 5 15:32:47 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 5 Oct 2006 11:32:47 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610051532.k95FWl6a012550@dev.open-bio.org>
kawas
Thu Oct 5 11:32:47 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv12518/Java/docs
Modified Files:
ConfigureRDFAgent.html
Log Message:
moby-live/Java/docs ConfigureRDFAgent.html,1.2,1.3
From kawas at dev.open-bio.org Fri Oct 6 16:39:20 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 12:39:20 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061639.k96GdKBa016254@dev.open-bio.org>
kawas
Fri Oct 6 12:39:20 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/util
In directory dev.open-bio.org:/tmp/cvs-serv16222/Java/src/main/org/biomoby/registry/rdfagent/util
Modified Files:
SignatureURLConnection.java
Log Message:
moby-live/Java/src/main/org/biomoby/registry/rdfagent/util SignatureURLConnection.java,1.13,1.14
From kawas at dev.open-bio.org Fri Oct 6 17:42:57 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 13:42:57 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061742.k96HgvIn016380@dev.open-bio.org>
kawas
Fri Oct 6 13:42:57 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory dev.open-bio.org:/tmp/cvs-serv16348/Java/src/main/org/biomoby/registry/rdfagent/verifier
Modified Files:
Processor.java
Log Message:
moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Processor.java,1.28,1.29
From kawas at dev.open-bio.org Fri Oct 6 17:47:33 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 13:47:33 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061747.k96HlXXk016567@dev.open-bio.org>
kawas
Fri Oct 6 13:47:33 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory dev.open-bio.org:/tmp/cvs-serv16535/Java/src/main/org/biomoby/registry/rdfagent/verifier
Modified Files:
Processor.java
Log Message:
moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Processor.java,1.29,1.30
From kawas at dev.open-bio.org Fri Oct 6 17:51:50 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 13:51:50 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610061751.k96Hpovl016643@dev.open-bio.org>
kawas
Fri Oct 6 13:51:50 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv16611
Modified Files:
Central.pm
Log Message:
added a more precise message when the agent is called on a url that used to exist but no longer does.
moby-live/Perl/MOBY Central.pm,1.259,1.260
From kawas at dev.open-bio.org Fri Oct 6 21:38:06 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 17:38:06 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610062138.k96Lc5ko016953@dev.open-bio.org>
kawas
Fri Oct 6 17:38:05 EDT 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv16922
Added Files:
castor-0.9.5.jar
Log Message:
jars-archive/current castor-0.9.5.jar,NONE,1.1
From kawas at dev.open-bio.org Fri Oct 6 21:39:01 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 6 Oct 2006 17:39:01 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610062139.k96Ld17b017033@dev.open-bio.org>
kawas
Fri Oct 6 17:39:01 EDT 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv17002
Added Files:
dnsjava-1.3.2.jar
Log Message:
jars-archive/current dnsjava-1.3.2.jar,NONE,1.1
From kawas at dev.open-bio.org Mon Oct 9 18:55:09 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 9 Oct 2006 14:55:09 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610091855.k99It9Ni020067@dev.open-bio.org>
kawas
Mon Oct 9 14:55:09 EDT 2006
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv20032/Java/xmls
Modified Files:
libraries.xml
Log Message:
moby-live/Java/xmls libraries.xml,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/libraries.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Java/xmls/libraries.xml 2006/08/28 13:42:10 1.13
+++ /home/repository/moby/moby-live/Java/xmls/libraries.xml 2006/10/09 18:55:09 1.14
@@ -34,6 +34,10 @@
How to use the BioMoby plugin in Taverna (Updated September 2006)
+How to use the BioMoby plugin in Taverna (Updated October 2006)
From kawas at dev.open-bio.org Tue Oct 10 16:59:10 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 12:59:10 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610101659.k9AGxA5O023206@dev.open-bio.org>
kawas
Tue Oct 10 12:59:10 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs/taverna/guide
In directory dev.open-bio.org:/tmp/cvs-serv23175/Java/docs/taverna/guide
Added Files:
favicon.ico animated_favicon1.gif
Log Message:
moby-live/Java/docs/taverna/guide favicon.ico,NONE,1.1 animated_favicon1.gif,NONE,1.1
From kawas at dev.open-bio.org Tue Oct 10 17:01:27 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 13:01:27 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610101701.k9AH1Rm1023251@dev.open-bio.org>
kawas
Tue Oct 10 13:01:26 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs/taverna/guide
In directory dev.open-bio.org:/tmp/cvs-serv23216/Java/docs/taverna/guide
Modified Files:
index.html
Log Message:
moby-live/Java/docs/taverna/guide index.html,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/taverna/guide/index.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Java/docs/taverna/guide/index.html 2006/10/10 14:02:12 1.13
+++ /home/repository/moby/moby-live/Java/docs/taverna/guide/index.html 2006/10/10 17:01:26 1.14
@@ -3,6 +3,8 @@
+
+
Table of Contents
-
Introduction
-
-
-
-New Features
-
-
-
-Tutorial
+
-What's Next
-
-
-FAQ
-
-
-Comments / Questions
+
+
+
+
+
+
Introduction
@@ -206,10 +208,10 @@
Searches for all services that consume NCBI_BLAST_Text
+ Searches for all services that consume NCBI_BLAST_Text
Searches for all services that either consume NCBI_BLAST_Text
+
Searches for all services that either consume NCBI_BLAST_Text
or it parent datatype.
For more infomation on this behaviour, click here.
@@ -295,15 +297,15 @@
There are 3 different types of output ports that Moby services utilize and 2 different types of input ports (excluding the legacy ports
'input' and 'output'.
-
+
Moby Service Output ----Connects to ---> Moby Service Input
- 1 Simple Simple
A Simple is a datatype that is not contained within a collection, i.e. do not have a name that contains '(Collection -'.
- 2 Simple Collection
- 3 Collection Simple
- 4 Collection Collection
- 5 CollectionAsSimples Simples
- 6 CollectionAsSimples Collection
+ 1 Simple Simple
+ 2 Simple Collection
+ 3 Collection Simple
+ 4 Collection Collection
+ 5 CollectionAsSimples Simples
+ 6 CollectionAsSimples Collection
A CollectionAsSimples is an output port that contains a Taverna style List of the individuals in a Moby Collection.
@@ -325,7 +327,7 @@
These are names automatically generated for services that incorrectly registered with a Mobycentral registry.
- You should attempt to contact the service provider so that they may fix this service.
+ You should attempt to contact the service provider so that they may fix and proplerly register these services.
@@ -346,8 +348,7 @@
please let me know.
Unable to update your information
" + System.getProperty("line.separator") + ""
+ "" + System.getProperty("line.separator") + ""
+ "
" + System.getProperty("line.separator") + "" + "" + System.getProperty("line.separator") + "" + "";
+ }
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
+ SERVER_NAME = request.getServerName();
String domain = filter(request.getParameter("domain"));
String serviceName = filter(request.getParameter("serviceName"));
String sigURL = filter(request.getParameter("sigURL"));
@@ -71,7 +82,7 @@
if (sigURL.equals("") || !isValidSig(sigURL)) {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
- out.println(error);
+ out.println(getErrorString());
return;
}
@@ -81,7 +92,7 @@
// update failed
response.setContentType("text/html");
PrintWriter out = response.getWriter();
- out.println(error);
+ out.println(getErrorString());
return;
}
/*get the rdf*/
@@ -104,31 +115,112 @@
return;
}
- /*
- * TODO you need place the updateSignatureURL in the cgi-bin directory
- */
private boolean updateMobyCentralDatabase(String domain, String sigURL,
String name) throws MalformedURLException {
String con;
if (name.equals("")) {
- log.info("empty name");
- con = "http://mobycentral.icapture.ubc.ca/cgi-bin/updateSignatureURL.cgi?authURI="
- + domain + "&URL=" + sigURL;
+ log.info("Updating all services for " + domain + ".");
+ String sql = "select authority_id from authority where authority_uri=?";
+ String updateSQL = "update service_instance set signatureURL = ? where authority_id=?";
+ int authID = -1;
+ PreparedStatement preparedStatement = null;
+ try {
+ preparedStatement = getConnection().prepareStatement(sql);
+ preparedStatement.setString(1,domain);
+ ResultSet results = preparedStatement.executeQuery();
+ if (results.next())
+ authID = results.getInt(1);
+ else {
+ // clean up and return
+ if (preparedStatement != null)
+ preparedStatement.close();
+ return false;
+ }
+ } catch (SQLException e) {
+ log.error(e.getLocalizedMessage());
+ return false;
+ } finally {
+ try {
+ if (preparedStatement != null)
+ preparedStatement.close();
+ } catch (SQLException e) {
+ return false;
+ }
+ }
+
+ preparedStatement = null;
+ int updatedRowCount = -1;
+ try {
+ preparedStatement = getConnection().prepareStatement(updateSQL);
+ preparedStatement.setString(1,sigURL);
+ preparedStatement.setInt(2, authID);
+ updatedRowCount = preparedStatement.executeUpdate();
+ return updatedRowCount > -1;
+ } catch (SQLException e) {
+ log.error(e.getLocalizedMessage());
+ return updatedRowCount > -1;
+ } finally {
+ try {
+ if (preparedStatement != null)
+ preparedStatement.close();
+ } catch (SQLException e) {
+ return updatedRowCount > -1;
+ }
+ }
} else {
- con = "http://mobycentral.icapture.ubc.ca/cgi-bin/updateSignatureURL.cgi?authURI="
- + domain + "&URL=" + sigURL + "&serviceName=" + name;
+ // update 1 service
+ log.info("Updating the service, " + name+ ", for " + domain + ".");
+ String sql = "select authority_id from authority where authority_uri=?";
+ String updateSQL = "update service_instance set signatureURL = ? where authority_id= ? and servicename= ?";
+ int authID = -1;
+ PreparedStatement preparedStatement = null;
+ try {
+ preparedStatement = getConnection().prepareStatement(sql);
+ preparedStatement.setString(1,domain);
+ ResultSet results = preparedStatement.executeQuery();
+ if (results.next())
+ authID = results.getInt(1);
+ else {
+ // clean up and return
+ if (preparedStatement != null)
+ preparedStatement.close();
+ return false;
+ }
+ } catch (SQLException e) {
+ log.error(e.getLocalizedMessage());
+ return false;
+ } finally {
+ try {
+ if (preparedStatement != null)
+ preparedStatement.close();
+ } catch (SQLException e) {
+ return false;
+ }
+ }
+
+ preparedStatement = null;
+ int updatedRowCount = -1;
+ try {
+ preparedStatement = getConnection().prepareStatement(updateSQL);
+ preparedStatement.setString(1,sigURL);
+ preparedStatement.setInt(2, authID);
+ preparedStatement.setString(3,name);
+ updatedRowCount = preparedStatement.executeUpdate();
+ return updatedRowCount == 1;
+ } catch (SQLException e) {
+ log.error(e.getLocalizedMessage());
+ return updatedRowCount == 1;
+ } finally {
+ try {
+ if (preparedStatement != null)
+ preparedStatement.close();
+ } catch (SQLException e) {
+ return updatedRowCount == 1;
+ }
+ }
+
}
- URL url = new URL(con);
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(url
- .openStream()));
- if (in.readLine().equals("good")) {
- return true;
- }
- } catch (IOException ex) {}
- return false;
-
}
/**
@@ -138,19 +230,55 @@
* @return
*/
private boolean isValidSig(String sigURL) {
- /*final String URL = "(^(http:\\/\\/www\\.|HTTP:\\/\\/www\\.|http:\\/\\/|HTTP:\\/\\/)[\\w]+\\.[\\w].*(\\/\\w+(\\.{1}\\w+)*)$)";
- Pattern p = Pattern.compile(URL);
- Matcher m = p.matcher(sigURL);
- return m.matches();*/
+
try {
URL url = new URL(sigURL);
return true;
} catch (MalformedURLException e) {
-
return false;
}
}
+ private Connection connection = null;
+ private DataSource datasource = null;
+ private Properties props = MobyProperties.SERVICE_INSTANCE_PROPERTIES();;
+
+ private Connection getConnection() {
+ if (this.datasource == null) {
+ // get certain properties from mobycentral.config
+ String serverName = props.get("url") + ":" + props.get("port");// localhost:3306";
+ String mydatabase = (String) props.get("dbname");// "mobyobject";
+ String url = "jdbc:mysql://" + serverName + "/" + mydatabase;
+ String username = (String) props.get("username");// "moby_external";
+ String password = (String) props.get("password");// "";
+ DataSource datasource = setupDataSource(url, username, password);
+ this.datasource = datasource;
+ }
+ try {
+ return this.datasource.getConnection();
+ } catch (SQLException e) {
+ log.error("Error getting connection to db..." + newline + e);
+ return null;
+ }
+
+ }
+
+ private DataSource setupDataSource(String connectURI, String user, String pass) {
+ BasicDataSource ds = new BasicDataSource();
+ try {
+ ds.setLoginTimeout(30);
+ } catch (SQLException e) {
+ log.equals("Couldn't set login timeout " + e.getLocalizedMessage());
+ }
+ ds.setMaxWait(1000 * 60*5);
+ ds.setTimeBetweenEvictionRunsMillis(1000 * 60 * 5);
+ ds.setDriverClassName("com.mysql.jdbc.Driver");
+ ds.setUsername(user);
+ ds.setPassword(pass);
+ ds.setUrl(connectURI);
+ return ds;
+ }
+
private static String filter(String input) {
if (input == null)
return null;
@@ -172,4 +300,9 @@
}
return (filtered.toString());
}
+
+ public static void main(String[] args) throws MalformedURLException {
+ GetSignatureRDFResponse g = new GetSignatureRDFResponse();
+ System.out.println(g.updateMobyCentralDatabase("blah.blah.bah", "http://www.eddie.com/signatureURLs","Echo_test2"));
+ }
}
\ No newline at end of file
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFForm.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFForm.java 2005/09/30 14:48:22 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/GetSignatureRDFForm.java 2006/10/11 01:54:50 1.5
@@ -7,178 +7,225 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
+import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.biomoby.client.CentralImpl;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
+import org.biomoby.registry.properties.RegistryOS;
import org.biomoby.shared.Central;
import org.biomoby.shared.MobyException;
+import org.biomoby.shared.Utils;
/**
* @author Eddie Kawas
- * Make sure that you specify a valid signature url! This field looks like the following: http://myAuthority.domain/path/to/rdf/for/service. Also make sure that you have specified the right case-sensitive service name, if applicable.
" + System.getProperty("line.separator") + ""
- + " " + System.getProperty("line.separator") + ""
+ + " " + System.getProperty("line.separator") + ""
+ "Retrieve an Updated RDF Document
"
- + newline
- + "
"
- + newline
- + "for your MOBY Service Instance(s)
"
- + newline
- + "This form will allow you to retrieve an updated version of the RDF
"
- + newline
- + "" + newline + "" + newline
- + "" + newline;
-
- out.println(page);
- return;
- }
-
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
- */
- protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1)
- throws ServletException, IOException {
- doGet(arg0, arg1);
- }
-
- public static void main(String[] args) {
- Central central = null;
- String[] domains = null;
- // initialize central
- try {
- central = new CentralImpl();
- domains = central.getProviders();
- } catch (MobyException e) {
- e.printStackTrace();
- return;
- }
- // sort the array
- Arrays.sort(domains);
- StringBuffer sb = new StringBuffer("");
- for (int x = 0; x < domains.length; x++) {
- sb.append("\t\t\n");
- }
- System.out.println(sb.toString());
- }
+ private static Log log = LogFactory.getLog(GetSignatureRDFForm.class);
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ // some useful variables
+ private final String newline = System.getProperty("line.separator");
+
+ private static String DOMAIN = "mobycentral.icapture.ubc.ca:8090/moby/";
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest,
+ * javax.servlet.http.HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ DOMAIN = request.getServerName() + ":" + request.getServerPort() + request.getContextPath()
+ + "/";
+
+ // set the content type
+ response.setContentType("text/html");
+ PrintWriter out = response.getWriter();
+
+ // get a list of domains
+ Central central = null;
+ String[] domains = null;
+ // initialize central
+ try {
+ String registryURL = null;
+ String registryNamespace = null;
+
+ // are they set in the system?
+ registryURL = System.getProperty("MOBY_SERVER");
+ registryNamespace = System.getProperty("MOBY_URI");
+
+ // if we didnt set them check the environment
+ if (registryURL == null) {
+ Map map = RegistryOS.getEnv();
+ if (!map.isEmpty()) {
+ registryURL = (String) map.get("MOBY_SERVER");
+ registryNamespace = (String) map.get("MOBY_URI");
+ }
+ }
+
+ log.info("Retrieving providers from URL: "
+ + (registryURL == null ? CentralImpl.DEFAULT_ENDPOINT : registryURL)
+ + " URI: "
+ + (registryNamespace == null ? CentralImpl.DEFAULT_NAMESPACE
+ : registryNamespace));
+ if (registryURL == null) {
+ // use default registry, since we dont have a local one
+ central = new CentralImpl();
+ } else if (registryNamespace == null) {
+ // use default namespace since one isnt defined
+ central = new CentralImpl(registryURL);
+ } else {
+ // use defined url and namespacce
+ central = new CentralImpl(registryURL, registryNamespace);
+ }
+ domains = central.getProviders();
+ } catch (MobyException e) {
+ out.println("Please try again later.");
+ log.error(Utils.format(newline+"There was a problem extracting all of the providers:"+newline+e.getLocalizedMessage(), 3), e);
+ return;
+ }
+ // sort the array
+ Arrays.sort(domains);
+ StringBuffer sb = new StringBuffer("");
+ for (int x = 0; x < domains.length; x++) {
+ sb.append("\t\t" + newline);
+ }
+
+ String page = ""
+ + newline
+ + ""
+ + newline
+ + ""
+ + newline
+ + "
"
- + newline
- + " document for MOBY Service Instances that you have created. In
"
- + newline
- + "addition, you will be able to update the signature url field for your service instance. Retrieve an Updated RDF Document
"
+ + newline
+ + "
"
+ + newline
+ + "for your MOBY Service Instance(s)
"
+ + newline
+ + "This form will allow you to retrieve an updated version of the RDF
"
+ + newline
+ + "" + newline + "" + newline + "" + newline;
+
+ out.println(page);
+ return;
+ }
+
+ @Override
+ public void init() throws ServletException {
+ super.init();
+ ContextLoader cLoader = null;
+ try {
+ cLoader = (ContextLoader) DiscoverSingleton.find(Class
+ .forName((String) ContextLoader.class.getCanonicalName()), Class.forName(
+ (String) ContextLoader.class.getCanonicalName()).getName());
+ log
+ .info((cLoader == null ? "ContextLoader is null and is therefore not loaded. This is BAD!"
+ : "ContextLoader has loaded successfully."));
+ } catch (Exception e) {
+ log.warn("ContextLoader is null and is therefore not loaded. This is BAD!"
+ + System.getProperty("line.separator") + e.getMessage());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest,
+ * javax.servlet.http.HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1)
+ throws ServletException, IOException {
+ doGet(arg0, arg1);
+ }
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/RDFAgentValidator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/RDFAgentValidator.java 2006/05/24 18:48:31 1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/RDFAgentValidator.java 2006/10/11 01:54:50 1.3
@@ -7,17 +7,16 @@
import java.net.URLDecoder;
import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.InitialContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.discovery.tools.DiscoverSingleton;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.biomoby.client.ui.graphical.servlet.utilities.ContextLoader;
import org.biomoby.registry.properties.MobyProperties;
-import org.biomoby.registry.rdfagent.verifier.Main;
/*
* Created on Jan 14, 2005
"
+ + newline
+ + " document for MOBY Service Instances that you have created. In
"
+ + newline
+ + "addition, you will be able to update the signature url field for your service instance. not MOBY-S
");
return;
- }
+ }
Pattern p = Pattern.compile("/MOBY\\-S/(\\S+)");
Matcher m = p.matcher(path);
if (!m.matches()) {
@@ -317,7 +167,7 @@
} catch (MobyException e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST,
"Could not get Objects");
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
return;
}
if (model == null) {
@@ -337,7 +187,7 @@
} catch (MobyException e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST,
"Could not get Namespaces");
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
return;
}
if (model == null) {
@@ -357,7 +207,7 @@
} catch (MobyException e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST,
"Could not get Services");
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
return;
}
if (model == null) {
@@ -377,8 +227,8 @@
response.setHeader("Content-Disposition",
"attachment;filename=ServiceInstances");
if (isCachableServiceInstances) {
- if (ServiceInstanceCache.isCachedMostRecent()) {
- out.write(ServiceInstanceCache.getCachedRDF());
+ if (cLoader.getServiceInstanceCache().isCachedMostRecent()) {
+ out.write(cLoader.getServiceInstanceCache().getCachedRDF());
return;
} else {
try {
@@ -401,9 +251,9 @@
writer.setProperty("showXmlDeclaration", "false");
writer.setProperty("tab", "5");
writer.write(model, stream, null);
- if (!ServiceInstanceCache.isCachedMostRecent())
- ServiceInstanceCache.cacheRDF(stream.getOutput(),
- ServiceInstanceCache.getLatestCriteria());
+ if (!cLoader.getServiceInstanceCache().isCachedMostRecent())
+ cLoader.getServiceInstanceCache().cacheRDF(stream.getOutput(),
+ cLoader.getServiceInstanceCache().getLatestCriteria());
stream = null;
// now output the RDF
writer = model.getWriter("RDF/XML-ABBREV");
@@ -417,7 +267,7 @@
} catch (Exception e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST,
"Could not get ServiceInstances");
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
return;
}
if (model == null) {
@@ -448,7 +298,7 @@
model = getAll(model);
} catch (Exception e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Could not get All");
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
return;
}
if (model == null) {
@@ -492,7 +342,7 @@
try {
model = getServiceInstances(model);
} catch (ModelException e) {
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
return null;
}
return model;
@@ -513,7 +363,7 @@
createNsMap(model);
}
- CentralDigest central = null;
+ CentralImpl central = null;
MobyService[] services = null;
try {
String registryURL;
@@ -524,26 +374,26 @@
log.info("System vars: " + registryURL + ", " + registryNamespace);
if (registryURL == null) {
// use default registry, since we dont have a local one
- central = new CentralDigestImpl();
+ central = new CentralImpl();
} else if (registryNamespace == null) {
// use default namespace since one isnt defined
- central = new CentralDigestImpl(registryURL);
+ central = new CentralImpl(registryURL);
} else {
// use defined url and namespacce
- central = new CentralDigestImpl(registryURL, registryNamespace);
+ central = new CentralImpl(registryURL, registryNamespace);
}
} else {
// use default registry since we cant determine if local one
// exists
- central = new CentralDigestImpl();
+ central = new CentralImpl();
}
- services = central.getServices();
+ services = central.findService(new MobyService(""));
} catch (MobyException e) {
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
}
if (central == null || services == null)
throw new MobyException(
- "Could not retrieve useful information from CentralDigestImpl().getServices(String)");
+ "Could not retrieve useful information from CentralImpl().findService(String)");
return ServiceInstanceRDF.createRDFModel(model, services, true);
}
@@ -762,7 +612,7 @@
}
/*
- *
+ *
*/
private final Resource _addClassResource(Model model, String uri, String label, String lsid,
String def, String authority, String email) {
@@ -788,19 +638,19 @@
try {
return new JObjectsSqlImpl().getFullObjectsAsArray();
} catch (Exception e) {
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
}
} else if (type.equalsIgnoreCase("services")) {
try {
return new JServicesSqlImpl().getFullServicesAsArray();
} catch (Exception e) {
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
}
} else if (type.equalsIgnoreCase("namespaces")) {
try {
return new JNamespacesSqlImpl().getFullNamespacesAsArray();
} catch (Exception e) {
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
}
}
return null;
@@ -858,7 +708,7 @@
try {
model = getServiceInstances(model);
} catch (Exception e) {
- e.printStackTrace();
+ log.error("Exception thrown: " + e.getMessage());
return "";
}
RDFWriter writer = model.getWriter("RDF/XML-ABBREV");
From kawas at dev.open-bio.org Wed Oct 11 01:54:51 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 10 Oct 2006 21:54:51 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610110154.k9B1spOL025410@dev.open-bio.org>
kawas
Tue Oct 10 21:54:51 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types
In directory dev.open-bio.org:/tmp/cvs-serv25229/Java/src/main/org/biomoby/registry/definitions/types
Modified Files:
JServicesSqlImpl.java JObjectsSqlImpl.java
JNamespacesSqlImpl.java
Log Message:
moby-live/Java/src/main/org/biomoby/registry/definitions/types JServicesSqlImpl.java,1.4,1.5 JObjectsSqlImpl.java,1.3,1.4 JNamespacesSqlImpl.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JServicesSqlImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JServicesSqlImpl.java 2006/07/19 23:13:48 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/definitions/types/JServicesSqlImpl.java 2006/10/11 01:54:51 1.5
@@ -20,6 +20,7 @@
* BioMOBY Registry Servlets
@@ -15,7 +20,7 @@
Installing the Servlets
-
@@ -55,7 +65,15 @@
+
+
+ java -jar install.jar
+
+
+
@@ -115,12 +133,14 @@
suffix
The file name suffix
-
-
For a more precise explanation of how to configure this aspect of the servlets, please refer to http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
-
+
+
+
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
@@ -164,7 +184,7 @@
lsid_authority
@@ -183,7 +203,7 @@
-
lsid_authority
@@ -201,16 +221,50 @@
+
+
+
+ _lsid._tcp IN SRV 1 0 8080 authority.company.net.
+ _lsid._tcp.authority IN SRV 1 0 8080 authority.company.net.
+
+
+
+
+ LoadModule proxy_module modules/mod_proxy.so
+
+ProxyPass /authority http://localhost:8080/authority
+ProxyPass /authority/ http://localhost:8080/authority/
+ProxyPass authority http://localhost:8080/authority
+ProxyPass authority/ http://localhost:8080/authority/
+ Now requests made to localhost/authority will be sent to localhost:8080/authority and your users should not have any problems accessing the URLs. Testing Your Servlets
-
+
+
+ Edward A Kawas
From kawas at dev.open-bio.org Thu Oct 12 01:55:20 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 11 Oct 2006 21:55:20 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610120155.k9C1tKjF029640@dev.open-bio.org>
kawas
Wed Oct 11 21:55:20 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
In directory dev.open-bio.org:/tmp/cvs-serv29605/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
Modified Files:
ServiceTester.java
Log Message:
services with urls that were 'localhost' caused the tester to perform inadequately ;-)
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities ServiceTester.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/11 01:54:50 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/12 01:55:20 1.5
@@ -94,16 +94,21 @@
// avoid indexing errors (we checked the length before entering loop)
if (i >= services.length)
break;
- MobyService service = services[i];
+ MobyService service = services[i++];
String authority = service.getAuthority();
String name = service.getName();
if (service.getURL().toLowerCase().startsWith("http://localhost")
|| service.getURL().toLowerCase().startsWith("http://127.0.0.1")) {
- continue;
+ Map list = null;
+ if (theMap.containsKey(authority))
+ list = (Map) theMap.get(authority);
+ else
+ list = Collections.synchronizedMap(new HashMap());
+ list.put(name, new Boolean(false));
+ theMap.put(authority, list);
}
testers[j] = new TesterThread(service);
testers[j].start();
- i++;
}
} else {
// should in theory have no more services to test ...
@@ -314,4 +319,10 @@
public void setNumThreads(int numThreads) {
this.numThreads = numThreads;
}
+ public static void main(String[] args) throws MobyException {
+ ServiceTester s = new ServiceTester("http://localhost/cgi-bin/MOBY-Central.pl","http://localhost/MOBY/Central");
+ s.testServices(s.getServices());
+ System.out.println(s.getResults());
+
+ }
}
From kawas at dev.open-bio.org Thu Oct 12 14:01:15 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 12 Oct 2006 10:01:15 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610121401.k9CE1FXd008836@dev.open-bio.org>
kawas
Thu Oct 12 10:01:14 EDT 2006
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv8801
Modified Files:
Central.pm
Log Message:
updated an address
moby-live/Perl/MOBY Central.pm,1.260,1.261
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -r1.260 -r1.261
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2006/10/06 17:51:50 1.260
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2006/10/12 14:01:14 1.261
@@ -1439,7 +1439,7 @@
sub _getServiceInstanceRDF {
my ( %args ) = @_;
my $browser = LWP::UserAgent->new;
- my $url = URI->new( 'http://mobycentral.icapture.ubc.ca/servlets/RDFGenerator' );
+ my $url = URI->new( 'http://mobycentral.icapture.ubc.ca/authority/RDFGenerator' );
# makes an object representing the URL
$url->query_form( # And here the form data pairs:
'name' => $args{name},
From kawas at dev.open-bio.org Thu Oct 12 16:57:14 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Thu, 12 Oct 2006 12:57:14 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610121657.k9CGvEeZ009629@dev.open-bio.org>
kawas
Thu Oct 12 12:57:14 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder
In directory dev.open-bio.org:/tmp/cvs-serv9593/Java/src/main/org/biomoby/client/rdf/builder
Modified Files:
ServiceInstanceRDF.java
Log Message:
update that sets isAlive to true if information is not available at the time of RDF creation
moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.31,1.32
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2006/10/11 01:54:51 1.31
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2006/10/12 16:57:14 1.32
@@ -639,13 +639,22 @@
in.close();
if (inputLine != null) {
inputLine = inputLine.trim();
- if (!inputLine.equals("")) {
+ if (!inputLine.equals("") && (inputLine.equals("true") || inputLine.equals("false"))) {
subject.addProperty(model.createProperty(FetaVocabulary.getURI()
+ "isAlive"), Boolean.valueOf(inputLine));
+ } else {
+ // defaults to true
+ subject.addProperty(model.createProperty(FetaVocabulary.getURI()
+ + "isAlive"), true);
}
+ } else {
+ subject.addProperty(model.createProperty(FetaVocabulary.getURI()
+ + "isAlive"), true);
}
} catch (Exception e) {
+ subject.addProperty(model.createProperty(FetaVocabulary.getURI()
+ + "isAlive"), true);
}
}
// create the organization node
From senger at dev.open-bio.org Fri Oct 13 21:47:09 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:47:09 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132147.k9DLl9Pr019506@dev.open-bio.org>
senger
Fri Oct 13 17:47:09 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv19488/MOSES/MOBY
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY added to the repository
moby-live/Java/src/Perl/MOSES/MOBY - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:46:58 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:46:58 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132146.k9DLkwu7019467@dev.open-bio.org>
senger
Fri Oct 13 17:46:58 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES
In directory dev.open-bio.org:/tmp/cvs-serv19449/MOSES
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES added to the repository
moby-live/Java/src/Perl/MOSES - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:48:30 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:48:30 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132148.k9DLmUCW019545@dev.open-bio.org>
senger
Fri Oct 13 17:48:29 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv19527/MOSES/MOBY/Cache
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Cache added to the repository
moby-live/Java/src/Perl/MOSES/MOBY/Cache - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Cache/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Cache/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Cache/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:48:30 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:48:30 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132148.k9DLmUQe019562@dev.open-bio.org>
senger
Fri Oct 13 17:48:30 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Data
In directory dev.open-bio.org:/tmp/cvs-serv19527/MOSES/MOBY/Data
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Data added to the repository
moby-live/Java/src/Perl/MOSES/MOBY/Data - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Data/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Data/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Data/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:48:30 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:48:30 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132148.k9DLmUlT019600@dev.open-bio.org>
senger
Fri Oct 13 17:48:30 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv19527/MOSES/MOBY/Generators
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators added to the repository
moby-live/Java/src/Perl/MOSES/MOBY/Generators - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:48:30 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:48:30 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132148.k9DLmUIQ019581@dev.open-bio.org>
senger
Fri Oct 13 17:48:30 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Def
In directory dev.open-bio.org:/tmp/cvs-serv19527/MOSES/MOBY/Def
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Def added to the repository
moby-live/Java/src/Perl/MOSES/MOBY/Def - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Def/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Def/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Def/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:48:30 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:48:30 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132148.k9DLmU1c019623@dev.open-bio.org>
senger
Fri Oct 13 17:48:30 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Service
In directory dev.open-bio.org:/tmp/cvs-serv19527/MOSES/MOBY/Service
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Service added to the repository
moby-live/Java/src/Perl/MOSES/MOBY/Service - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Service/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Service/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Service/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:50:06 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:50:06 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132150.k9DLo6m4019668@dev.open-bio.org>
senger
Fri Oct 13 17:50:05 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv19650/MOSES/MOBY/Generators/templates
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates added to the repository
moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 21:51:16 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:51:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132151.k9DLpGZE019704@dev.open-bio.org>
senger
Fri Oct 13 17:51:16 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv19689/MOSES/MOBY
Added Files:
Base.pm Config.pm Package.pm Parser.pm ServiceException.pm
Tags.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOSES/MOBY Base.pm,NONE,1.1 Config.pm,NONE,1.1 Package.pm,NONE,1.1 Parser.pm,NONE,1.1 ServiceException.pm,NONE,1.1 Tags.pm,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 21:51:16 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:51:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132151.k9DLpGhG019718@dev.open-bio.org>
senger
Fri Oct 13 17:51:16 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv19689/MOSES/MOBY/Cache
Added Files:
Central.pm Registries.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOSES/MOBY/Cache Central.pm,NONE,1.1 Registries.pm,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 21:51:17 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:51:17 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132151.k9DLpHgn019786@dev.open-bio.org>
senger
Fri Oct 13 17:51:17 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv19689/MOSES/MOBY/Generators/templates
Added Files:
datatype.tt service-base.tt service.tt
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOSES/MOBY/Generators/templates datatype.tt,NONE,1.1 service-base.tt,NONE,1.1 service.tt,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 21:51:16 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:51:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132151.k9DLpG2B019752@dev.open-bio.org>
senger
Fri Oct 13 17:51:16 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Def
In directory dev.open-bio.org:/tmp/cvs-serv19689/MOSES/MOBY/Def
Added Files:
Data.pm DataType.pm Namespace.pm Relationship.pm Service.pm
ServiceType.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOSES/MOBY/Def Data.pm,NONE,1.1 DataType.pm,NONE,1.1 Namespace.pm,NONE,1.1 Relationship.pm,NONE,1.1 Service.pm,NONE,1.1 ServiceType.pm,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 21:51:17 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:51:17 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132151.k9DLpHM3019806@dev.open-bio.org>
senger
Fri Oct 13 17:51:17 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Service
In directory dev.open-bio.org:/tmp/cvs-serv19689/MOSES/MOBY/Service
Added Files:
ServiceBase.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOSES/MOBY/Service ServiceBase.pm,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 21:51:16 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:51:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132151.k9DLpGWA019734@dev.open-bio.org>
senger
Fri Oct 13 17:51:16 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Data
In directory dev.open-bio.org:/tmp/cvs-serv19689/MOSES/MOBY/Data
Added Files:
Boolean.pm DateTime.pm Float.pm Integer.pm Object.pm
ProvisionInformation.pm String.pm Xref.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOSES/MOBY/Data Boolean.pm,NONE,1.1 DateTime.pm,NONE,1.1 Float.pm,NONE,1.1 Integer.pm,NONE,1.1 Object.pm,NONE,1.1 ProvisionInformation.pm,NONE,1.1 String.pm,NONE,1.1 Xref.pm,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 21:51:17 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 17:51:17 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132151.k9DLpHlp019772@dev.open-bio.org>
senger
Fri Oct 13 17:51:16 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv19689/MOSES/MOBY/Generators
Added Files:
GenServices.pm GenTypes.pm Utils.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOSES/MOBY/Generators GenServices.pm,NONE,1.1 GenTypes.pm,NONE,1.1 Utils.pm,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 22:07:56 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:07:56 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132207.k9DM7uxg019879@dev.open-bio.org>
senger
Fri Oct 13 18:07:56 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv19857/MOBY
Removed Files:
Base.pm Config.pm Package.pm Parser.pm ServiceException.pm
Tags.pm notes
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOBY Base.pm,1.20,NONE Config.pm,1.4,NONE Package.pm,1.8,NONE Parser.pm,1.23,NONE ServiceException.pm,1.4,NONE Tags.pm,1.3,NONE notes,1.22,NONE
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/RCS/Base.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/RCS/Config.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/RCS/Package.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/RCS/Parser.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/RCS/ServiceException.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/RCS/Tags.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/RCS/notes,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 22:07:56 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:07:56 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132207.k9DM7uuT019919@dev.open-bio.org>
senger
Fri Oct 13 18:07:56 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data
In directory dev.open-bio.org:/tmp/cvs-serv19857/MOBY/Data
Removed Files:
Boolean.pm DateTime.pm Float.pm Integer.pm Object.pm
ProvisionInformation.pm String.pm Xref.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOBY/Data Boolean.pm,1.2,NONE DateTime.pm,1.1,NONE Float.pm,1.1,NONE Integer.pm,1.1,NONE Object.pm,1.8,NONE ProvisionInformation.pm,1.3,NONE String.pm,1.1,NONE Xref.pm,1.3,NONE
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/Boolean.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/DateTime.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/Float.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/Integer.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/Object.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/ProvisionInformation.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/String.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Data/RCS/Xref.pm,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 22:07:57 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:07:57 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132207.k9DM7v0T020006@dev.open-bio.org>
senger
Fri Oct 13 18:07:57 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Service
In directory dev.open-bio.org:/tmp/cvs-serv19857/MOBY/Service
Removed Files:
ServiceBase.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOBY/Service ServiceBase.pm,1.6,NONE
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Service/RCS/ServiceBase.pm,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 22:07:56 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:07:56 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132207.k9DM7udI019939@dev.open-bio.org>
senger
Fri Oct 13 18:07:56 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Def
In directory dev.open-bio.org:/tmp/cvs-serv19857/MOBY/Def
Removed Files:
Data.pm DataType.pm Namespace.pm Relationship.pm Service.pm
ServiceType.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOBY/Def Data.pm,1.5,NONE DataType.pm,1.8,NONE Namespace.pm,1.3,NONE Relationship.pm,1.4,NONE Service.pm,1.4,NONE ServiceType.pm,1.3,NONE
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Def/RCS/Data.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Def/RCS/DataType.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Def/RCS/Namespace.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Def/RCS/Relationship.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Def/RCS/Service.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Def/RCS/ServiceType.pm,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 22:07:57 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:07:57 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132207.k9DM7vN1019979@dev.open-bio.org>
senger
Fri Oct 13 18:07:57 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv19857/MOBY/Generators/templates
Removed Files:
datatype.tt service-base.tt service.tt
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOBY/Generators/templates datatype.tt,1.4,NONE service-base.tt,1.10,NONE service.tt,1.17,NONE
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators/templates/RCS/datatype.tt,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators/templates/RCS/service-base.tt,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators/templates/RCS/service.tt,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 22:07:56 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:07:56 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132207.k9DM7uGg019895@dev.open-bio.org>
senger
Fri Oct 13 18:07:56 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv19857/MOBY/Cache
Removed Files:
Central.pm Registries.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOBY/Cache Central.pm,1.19,NONE Registries.pm,1.3,NONE
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Cache/RCS/Central.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Cache/RCS/Registries.pm,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 22:07:57 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:07:57 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132207.k9DM7vdw019960@dev.open-bio.org>
senger
Fri Oct 13 18:07:56 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv19857/MOBY/Generators
Removed Files:
GenServices.pm GenTypes.pm Utils.pm
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl/MOBY/Generators GenServices.pm,1.17,NONE GenTypes.pm,1.15,NONE Utils.pm,1.1,NONE
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators/RCS/GenServices.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators/RCS/GenTypes.pm,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/MOBY/Generators/RCS/Utils.pm,v: No such file or directory
From senger at dev.open-bio.org Fri Oct 13 22:08:22 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:08:22 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132208.k9DM8MQk020046@dev.open-bio.org>
senger
Fri Oct 13 18:08:22 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl
In directory dev.open-bio.org:/tmp/cvs-serv20031
Added Files:
notes
Log Message:
new module names for Perl Moses
moby-live/Java/src/Perl notes,NONE,1.1
From senger at dev.open-bio.org Fri Oct 13 22:08:39 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Fri, 13 Oct 2006 18:08:39 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610132208.k9DM8dhZ020118@dev.open-bio.org>
senger
Fri Oct 13 18:08:39 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/scripts
In directory dev.open-bio.org:/tmp/cvs-serv20067
Modified Files:
config-status.pl generate-datatypes.pl generate-services.pl
install.pl known-registries.pl local-cache.pl
testing-parser.pl testing-service.pl universal-testing.pl
Log Message:
new module names for Perl Moses
moby-live/Java/src/scripts config-status.pl,1.8,1.9 generate-datatypes.pl,1.5,1.6 generate-services.pl,1.6,1.7 install.pl,1.4,1.5 known-registries.pl,1.1,1.2 local-cache.pl,1.4,1.5 testing-parser.pl,1.3,1.4 testing-service.pl,1.6,1.7 universal-testing.pl,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/config-status.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/scripts/config-status.pl 2006/07/26 17:57:56 1.8
+++ /home/repository/moby/moby-live/Java/src/scripts/config-status.pl 2006/10/13 22:08:39 1.9
@@ -29,9 +29,9 @@
# -----------------------------------------------------------
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
-use MOBY::Base;
+use MOSES::MOBY::Base;
use strict;
$LOG->level ('INFO') if $opt_v;
@@ -40,20 +40,20 @@
sub say { print @_, "\n"; }
-say "Perl-MoSeS VERSION: $MOBY::Base::VERSION\n";
+say "Perl-MoSeS VERSION: $MOSES::MOBY::Base::VERSION\n";
say 'Configuration';
say '-------------';
-say "Default configuration file: $MOBY::Config::DEFAULT_CONFIG_FILE";
-say "Environment variable $MOBY::Config::ENV_CONFIG_DIR" .
- ( exists $ENV{$MOBY::Config::ENV_CONFIG_DIR} ? ": $ENV{$MOBY::Config::ENV_CONFIG_DIR}" : ' is not set');
+say "Default configuration file: $MOSES::MOBY::Config::DEFAULT_CONFIG_FILE";
+say "Environment variable $MOSES::MOBY::Config::ENV_CONFIG_DIR" .
+ ( exists $ENV{$MOSES::MOBY::Config::ENV_CONFIG_DIR} ? ": $ENV{$MOSES::MOBY::Config::ENV_CONFIG_DIR}" : ' is not set');
say 'Successfully read configuration files:';
-foreach my $file (MOBY::Config->ok_files) {
+foreach my $file (MOSES::MOBY::Config->ok_files) {
say "\t$file";
}
-my %failed = MOBY::Config->failed_files;
+my %failed = MOSES::MOBY::Config->failed_files;
if (keys %failed > 0) {
say 'Failed configuration files:';
foreach my $file (sort keys %failed) {
@@ -63,8 +63,8 @@
}
say 'All configuration parameters:';
-foreach my $name (sort MOBY::Config->param()) {
- say "\t$name => " . MOBY::Config->param ($name);
+foreach my $name (sort MOSES::MOBY::Config->param()) {
+ say "\t$name => " . MOSES::MOBY::Config->param ($name);
}
say 'All imported names (equivalent to parameters above): ';
@@ -85,7 +85,7 @@
say 'Logging';
say '-------';
-my $logger_name = $MOBY::Base::LOGGER_NAME;
+my $logger_name = $MOSES::MOBY::Base::LOGGER_NAME;
my $logger = Log::Log4perl->get_logger ($logger_name);
say "Logger name (use it in the configuration file): $logger_name";
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/generate-datatypes.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/src/scripts/generate-datatypes.pl 2006/07/08 03:52:17 1.5
+++ /home/repository/moby/moby-live/Java/src/scripts/generate-datatypes.pl 2006/10/13 22:08:39 1.6
@@ -34,19 +34,19 @@
# -----------------------------------------------------------
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
# scripts/generate-datatypes.pl
use strict;
-use MOBY::Base;
-use MOBY::Generators::GenTypes;
+use MOSES::MOBY::Base;
+use MOSES::MOBY::Generators::GenTypes;
$LOG->level ('INFO') if $opt_v;
$LOG->level ('DEBUG') if $opt_d;
sub say { print @_, "\n"; }
-my $generator = new MOBY::Generators::GenTypes;
+my $generator = new MOSES::MOBY::Generators::GenTypes;
if (@ARGV) {
say 'Generating ' . (@ARGV+0) . '+ data types.';
if ($opt_s) {
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/generate-services.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/scripts/generate-services.pl 2006/07/30 12:56:56 1.6
+++ /home/repository/moby/moby-live/Java/src/scripts/generate-services.pl 2006/10/13 22:08:39 1.7
@@ -50,12 +50,12 @@
# -----------------------------------------------------------
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
# scripts/generate-services.pl
use strict;
-use MOBY::Base;
-use MOBY::Generators::GenServices;
+use MOSES::MOBY::Base;
+use MOSES::MOBY::Generators::GenServices;
$LOG->level ('INFO') if $opt_v;
$LOG->level ('DEBUG') if $opt_d;
@@ -63,7 +63,7 @@
sub say { print @_, "\n"; }
-my $generator = new MOBY::Generators::GenServices;
+my $generator = new MOSES::MOBY::Generators::GenServices;
if ($opt_a) {
say 'Generating all services.';
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/install.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/scripts/install.pl 2006/07/30 12:56:56 1.4
+++ /home/repository/moby/moby-live/Java/src/scripts/install.pl 2006/10/13 22:08:39 1.5
@@ -72,13 +72,13 @@
}
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
# scripts/install.pl
use File::Spec;
use IO::Prompt;
-use MOBY::Base;
-use MOBY::Cache::Central;
-use MOBY::Cache::Registries;
+use MOSES::MOBY::Base;
+use MOSES::MOBY::Cache::Central;
+use MOSES::MOBY::Cache::Registries;
use English qw( -no_match_vars ) ;
use strict;
@@ -104,8 +104,8 @@
# what registry to use
sub prompt_for_registry {
- my $cache = new MOBY::Cache::Central;
- my @regs = MOBY::Cache::Registries->list;
+ my $cache = new MOSES::MOBY::Cache::Central;
+ my @regs = MOSES::MOBY::Cache::Registries->list;
my $registry = prompt ("What registry to use? [default] ",
-m => [@regs]);
$registry ||= 'default';
@@ -214,7 +214,7 @@
if ('y' eq prompt ('Should I try to fill or update the local cache [y]? ', -ynd=>'y')) {
$registry = prompt_for_registry;
my $details =
- MOBY::Cache::Registries->get ($registry);
+ MOSES::MOBY::Cache::Registries->get ($registry);
if ($details) {
my $endpoint = $details->{endpoint};
my $uri = $details->{namespace};
@@ -239,8 +239,8 @@
# configuration file (will be found and used, or created)
my $config_file = File::Spec->catfile
- ($ENV{$MOBY::Config::ENV_CONFIG_DIR} || $pmoses_home,
- $MOBY::Config::DEFAULT_CONFIG_FILE);
+ ($ENV{$MOSES::MOBY::Config::ENV_CONFIG_DIR} || $pmoses_home,
+ $MOSES::MOBY::Config::DEFAULT_CONFIG_FILE);
if (-e $config_file and ! $opt_F) {
say "Configuration file $config_file exists.";
say "It will be used and not overwritten unless you start 'install.pl -F'.\n";
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/known-registries.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/scripts/known-registries.pl 2006/07/27 17:16:07 1.1
+++ /home/repository/moby/moby-live/Java/src/scripts/known-registries.pl 2006/10/13 22:08:39 1.2
@@ -7,16 +7,16 @@
# -----------------------------------------------------------
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
# scripts/install.pl
-use MOBY::Cache::Registries;
+use MOSES::MOBY::Cache::Registries;
use Data::Dumper;
use strict;
sub say { print @_, "\n"; }
-say join (", ", MOBY::Cache::Registries->list);
-say (Data::Dumper->Dump ( [ MOBY::Cache::Registries->all ], ['Registries']));
+say join (", ", MOSES::MOBY::Cache::Registries->list);
+say (Data::Dumper->Dump ( [ MOSES::MOBY::Cache::Registries->all ], ['Registries']));
__END__
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/local-cache.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/scripts/local-cache.pl 2006/07/27 17:16:07 1.4
+++ /home/repository/moby/moby-live/Java/src/scripts/local-cache.pl 2006/10/13 22:08:39 1.5
@@ -58,28 +58,28 @@
# -----------------------------------------------------------
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
# scripts/config-status.pl
use strict;
-use MOBY::Base;
-use MOBY::Cache::Central;
-use MOBY::Cache::Registries;
+use MOSES::MOBY::Base;
+use MOSES::MOBY::Cache::Central;
+use MOSES::MOBY::Cache::Registries;
$LOG->level ('INFO') if $opt_v;
$LOG->level ('DEBUG') if $opt_d;
sub say { print @_, "\n"; }
-my $cache = new MOBY::Cache::Central;
+my $cache = new MOSES::MOBY::Cache::Central;
# --- get info
if ($opt_i) {
say 'Currently used registry: ' . $cache->registry;
- say "(it can be changed in $MOBY::Config::DEFAULT_CONFIG_FILE)\n";
+ say "(it can be changed in $MOSES::MOBY::Config::DEFAULT_CONFIG_FILE)\n";
my $details =
- MOBY::Cache::Registries->get ($cache->registry) ||
- MOBY::Cache::Registries->get ('default');
+ MOSES::MOBY::Cache::Registries->get ($cache->registry) ||
+ MOSES::MOBY::Cache::Registries->get ('default');
foreach my $key (sort keys %{ $details }) {
printf " %-12s: %-s\n", $key, $details->{$key};
}
@@ -89,9 +89,9 @@
printf
"%-13s %+13s %+13s %+10s\n",
'Registry', 'Data types', 'Authorities', 'Services';
- foreach my $reg (MOBY::Cache::Registries->list) {
+ foreach my $reg (MOSES::MOBY::Cache::Registries->list) {
next unless $cache->cache_exists ($reg);
- my $new_cache = new MOBY::Cache::Central ( registry => $reg );
+ my $new_cache = new MOSES::MOBY::Cache::Central ( registry => $reg );
my $datatypes_count = $new_cache->get_datatype_names;
my %authorities = $new_cache->get_service_names;
my $services_count = 0;
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/testing-parser.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/scripts/testing-parser.pl 2006/07/08 13:52:12 1.3
+++ /home/repository/moby/moby-live/Java/src/scripts/testing-parser.pl 2006/10/13 22:08:39 1.4
@@ -42,12 +42,12 @@
# -----------------------------------------------------------
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
# scripts/testing-parser.pl
use strict;
-use MOBY::Base;
-use MOBY::Parser;
+use MOSES::MOBY::Base;
+use MOSES::MOBY::Parser;
$LOG->level ('INFO') if $opt_v;
$LOG->level ('DEBUG') if $opt_d;
@@ -57,7 +57,7 @@
my ($input_name, $known_type) = split (/\s*:\s*/, $opt_b, 2);
push (@parser_args, ( lowestKnownDataTypes => { $input_name => $known_type }));
}
-my $parser = new MOBY::Parser (@parser_args);
+my $parser = new MOSES::MOBY::Parser (@parser_args);
my $package = $parser->parse ( method => 'file', data => $ARGV[0] );
print $package unless $opt_n;
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/testing-service.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/scripts/testing-service.pl 2006/07/31 15:23:57 1.6
+++ /home/repository/moby/moby-live/Java/src/scripts/testing-service.pl 2006/10/13 22:08:39 1.7
@@ -62,7 +62,7 @@
require lib ; lib->import ("$FindBin::Bin/../Perl/services");
require lib ; lib->import ("$FindBin::Bin/../Perl/generated");
unshift (@INC, $opt_l) if $opt_l;
- eval "use MOBY::Base; 1;";
+ eval "use MOSES::MOBY::Base; 1;";
$LOG->level ('INFO') if $opt_v;
$LOG->level ('DEBUG') if $opt_d;
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/universal-testing.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/scripts/universal-testing.pl 2006/07/26 17:57:56 1.2
+++ /home/repository/moby/moby-live/Java/src/scripts/universal-testing.pl 2006/10/13 22:08:39 1.3
@@ -36,13 +36,13 @@
use Carp;
use FindBin qw( $Bin );
-use lib "$Bin/../Perl"; # assuming: Perl/MOBY/...
+use lib "$Bin/../Perl"; # assuming: Perl/MOSES/...
# scripts/universal-testing.pl
use strict;
-use MOBY::Base;
-use MOBY::Cache::Central;
-use MOBY::Generators::GenServices;
+use MOSES::MOBY::Base;
+use MOSES::MOBY::Cache::Central;
+use MOSES::MOBY::Generators::GenServices;
use File::Spec;
$LOG->level ('INFO') if $opt_v;
@@ -50,7 +50,7 @@
sub say { print @_, "\n"; }
-my $cache = new MOBY::Cache::Central;
+my $cache = new MOSES::MOBY::Cache::Central;
my $tmpdir = File::Spec->tmpdir();
# create an empty XML input
@@ -69,10 +69,10 @@
# service generator
my $outdir = File::Spec->catfile ($tmpdir, 'generated-services');
-MOBY::Config->param ('generators.impl.outdir', $outdir);
-MOBY::Config->param ('generators.impl.package.prefix', 'Testing');
+MOSES::MOBY::Config->param ('generators.impl.outdir', $outdir);
+MOSES::MOBY::Config->param ('generators.impl.package.prefix', 'Testing');
unshift (@INC, $MOBYCFG::GENERATORS_IMPL_OUTDIR);
-my $generator = new MOBY::Generators::GenServices;
+my $generator = new MOSES::MOBY::Generators::GenServices;
# outputs
my $outputs = File::Spec->catfile ($tmpdir, 'generated-outputs');
From senger at dev.open-bio.org Sat Oct 14 16:55:13 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Sat, 14 Oct 2006 12:55:13 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610141655.k9EGtDSR021540@dev.open-bio.org>
senger
Sat Oct 14 12:55:12 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs/images
In directory dev.open-bio.org:/tmp/cvs-serv21513
Modified Files:
PerlMoses-architecture-small.jpg PerlMoses-architecture.jpg
PerlMoses-architecture.ppt
Log Message:
moby-live/Java/docs/images PerlMoses-architecture-small.jpg,1.1,1.2 PerlMoses-architecture.jpg,1.1,1.2 PerlMoses-architecture.ppt,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture-small.jpg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
Binary files /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture-small.jpg 2006/07/30 22:41:27 1.1 and /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture-small.jpg 2006/10/14 16:55:12 1.2 differ
rcsdiff: /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture-small.jpg: diff failed
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.jpg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
Binary files /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.jpg 2006/07/30 22:41:27 1.1 and /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.jpg 2006/10/14 16:55:12 1.2 differ
rcsdiff: /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.jpg: diff failed
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.ppt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
Binary files /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.ppt 2006/07/30 22:41:27 1.1 and /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.ppt 2006/10/14 16:55:12 1.2 differ
rcsdiff: /home/repository/moby/moby-live/Java/docs/images/PerlMoses-architecture.ppt: diff failed
From senger at dev.open-bio.org Sat Oct 14 18:37:38 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Sat, 14 Oct 2006 14:37:38 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610141837.k9EIbcxf021667@dev.open-bio.org>
senger
Sat Oct 14 14:37:38 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/samples
In directory dev.open-bio.org:/tmp/cvs-serv21649/samples
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/samples added to the repository
moby-live/Java/src/Perl/samples - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/samples/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/samples/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/samples/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Sat Oct 14 18:37:53 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Sat, 14 Oct 2006 14:37:53 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610141837.k9EIbrtj021706@dev.open-bio.org>
senger
Sat Oct 14 14:37:53 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/samples/Service
In directory dev.open-bio.org:/tmp/cvs-serv21688/samples/Service
Log Message:
Directory /home/repository/moby/moby-live/Java/src/Perl/samples/Service added to the repository
moby-live/Java/src/Perl/samples/Service - New directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/samples/Service/RCS/-,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/samples/Service/RCS/New,v: No such file or directory
rcsdiff: /home/repository/moby/moby-live/Java/src/Perl/samples/Service/RCS/directory,v: No such file or directory
From senger at dev.open-bio.org Sat Oct 14 18:38:36 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Sat, 14 Oct 2006 14:38:36 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610141838.k9EIcaPg021756@dev.open-bio.org>
senger
Sat Oct 14 14:38:36 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/samples/Service
In directory dev.open-bio.org:/tmp/cvs-serv21727/samples/Service
Added Files:
HelloBiomobyWorld.pm Mabuhay.pm
Log Message:
samples added
moby-live/Java/src/Perl/samples/Service HelloBiomobyWorld.pm,NONE,1.1 Mabuhay.pm,NONE,1.1
From senger at dev.open-bio.org Sat Oct 14 18:38:36 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Sat, 14 Oct 2006 14:38:36 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610141838.k9EIca4i021742@dev.open-bio.org>
senger
Sat Oct 14 14:38:36 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/samples
In directory dev.open-bio.org:/tmp/cvs-serv21727/samples
Added Files:
SERVICES_TABLE
Log Message:
samples added
moby-live/Java/src/Perl/samples SERVICES_TABLE,NONE,1.1
From senger at dev.open-bio.org Sat Oct 14 20:46:34 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Sat, 14 Oct 2006 16:46:34 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610142046.k9EKkYaS021913@dev.open-bio.org>
senger
Sat Oct 14 16:46:33 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/samples/Service
In directory dev.open-bio.org:/tmp/cvs-serv21894/samples/Service
Modified Files:
Mabuhay.pm
Log Message:
moby-live/Java/src/Perl/samples/Service Mabuhay.pm,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Perl/samples/Service/Mabuhay.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Perl/samples/Service/Mabuhay.pm 2006/10/14 18:38:36 1.1
+++ /home/repository/moby/moby-live/Java/src/Perl/samples/Service/Mabuhay.pm 2006/10/14 20:46:33 1.2
@@ -51,6 +51,7 @@
sub process_it {
my ($self, $request, $response, $context) = @_;
+
# read (some) input data
# (use eval to protect against missing data)
my $language = eval { $request->language };
@@ -81,7 +82,7 @@
foreach my $idx (0 .. $#result_hellos) {
$response->add_hello (new MOSES::MOBY::Data::simple_key_value_pair
( key => $self->as_uni_string ($result_langs[$idx]),
- value => $self->as_uni_string ($result_hellos[$idx])
+ value => $self->as_uni_string ($result_hellos[$idx]),
));
}
From senger at dev.open-bio.org Sat Oct 14 20:46:55 2006
From: senger at dev.open-bio.org (Martin Senger)
Date: Sat, 14 Oct 2006 16:46:55 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610142046.k9EKktsZ021961@dev.open-bio.org>
senger
Sat Oct 14 16:46:55 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv21934
Modified Files:
Dashboard-NOTES.txt Perl-ChangeLog PerlMoses.html
Log Message:
moby-live/Java/docs Dashboard-NOTES.txt,1.13,1.14 Perl-ChangeLog,1.1,1.2 PerlMoses.html,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/Dashboard-NOTES.txt,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Java/docs/Dashboard-NOTES.txt 2006/07/28 10:41:43 1.13
+++ /home/repository/moby/moby-live/Java/docs/Dashboard-NOTES.txt 2006/10/14 20:46:55 1.14
@@ -43,12 +43,6 @@
* ParemetersTable:
- Float field is not verified for non-numeric chars
-* to share preferences for contact-email and authority across all
- biomoby entities
-
-* DataTypeTreeTable
- - should check for cyclic definition in data types?
-
* Service Input Data
- should deal also with input Collections
- and (perhaps?) to allow entering a more specific data type
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/Perl-ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/docs/Perl-ChangeLog 2006/08/01 08:44:32 1.1
+++ /home/repository/moby/moby-live/Java/docs/Perl-ChangeLog 2006/10/14 20:46:55 1.2
@@ -1,5 +1,9 @@
+2006-10-13 Martin Senger
#-----------------------------------------------------------------
-# MOBY::Data::GenericSequence
+# MOSES::MOBY::Data::GenericSequence
# Generated: 30-Jul-2006 14:55:09 BST
# Contact: Martin Senger <martin.senger at gmail.com> or
# Edward Kawas <edward.kawas at gmail.com>
#-----------------------------------------------------------------
-package MOBY::Data::GenericSequence;
+package MOSES::MOBY::Data::GenericSequence;
no strict;
use vars qw( @ISA );
- at ISA = qw( MOBY::Data::VirtualSequence );
+ at ISA = qw( MOSES::MOBY::Data::VirtualSequence );
use strict;
-use MOBY::Data::Object;
+use MOSES::MOBY::Data::Object;
#-----------------------------------------------------------------
# accessible attributes
@@ -630,7 +631,7 @@
{
my %_allowed =
(
- 'SequenceString' => {type => 'MOBY::Data::String'},
+ 'SequenceString' => {type => 'MOSES::MOBY::Data::String'},
);
sub _accessible {
@@ -721,11 +722,11 @@
# This is a mandatory section - but you can still choose one of
# the two options (keep one and commented out the other):
#-----------------------------------------------------------------
-use MOBY::Base;
+use MOSES::MOBY::Base;
# --- (1) this option loads dynamically everything
BEGIN {
- use MOBY::Generators::GenServices;
- new MOBY::Generators::GenServices->load
+ use MOSES::MOBY::Generators::GenServices;
+ new MOSES::MOBY::Generators::GenServices->load
(authority => 'samples.jmoby.net',
service_names => ['Mabuhay']);
}
@@ -741,8 +742,8 @@
# (this to stay here with any of the options above)
use vars qw( @ISA );
@ISA = qw( net::jmoby::samples::MabuhayBase );
-use MOBY::Package;
-use MOBY::ServiceException;
+use MOSES::MOBY::Package;
+use MOSES::MOBY::ServiceException;
use strict;
@@ -771,7 +772,7 @@
# EDIT: PUT REAL VALUES INTO THE RESPONSE
# fill the response
foreach my $elem (0..2) {
- my $hello = new MOBY::Data::simple_key_value_pair
+ my $hello = new MOSES::MOBY::Data::simple_key_value_pair
(
value => "this is a 'value $elem'", # TO BE EDITED
key => "this is a 'key $elem'", # TO BE EDITED
@@ -867,7 +868,7 @@
Perl-MoSeS VERSION: 0.8
@@ -950,13 +951,13 @@
An obvious question is "where are the data types generated to"?
2006/07/30 23:00:33 (492) INFO> [[undef]] GenTypes.pm:125 - Data types will be generated into:
'/home/senger/moby-live/Java/src/scripts/../Perl/generated'
-2006/07/30 23:00:33 (493) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::BasicGFFSequenceFeature will be generated
-2006/07/30 23:00:33 (665) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::DNASequence will be generated
-2006/07/30 23:00:33 (669) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::DNASequenceWithGFFFeatures will be generated
-2006/07/30 23:00:33 (673) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::GenericSequence will be generated
-2006/07/30 23:00:33 (676) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::NucleotideSequence will be generated
-2006/07/30 23:00:33 (680) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::VirtualSequence will be generated
-2006/07/30 23:00:33 (684) DEBUG> [[undef]] GenTypes.pm:149 - MOBY::Data::multi_key_value_pair will be generated
+2006/07/30 23:00:33 (493) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::BasicGFFSequenceFeature will be generated
+2006/07/30 23:00:33 (665) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::DNASequence will be generated
+2006/07/30 23:00:33 (669) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::DNASequenceWithGFFFeatures will be generated
+2006/07/30 23:00:33 (673) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::GenericSequence will be generated
+2006/07/30 23:00:33 (676) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::NucleotideSequence will be generated
+2006/07/30 23:00:33 (680) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::VirtualSequence will be generated
+2006/07/30 23:00:33 (684) DEBUG> [[undef]] GenTypes.pm:149 - MOSES::MOBY::Data::multi_key_value_pair will be generated
@@ -1111,7 +1112,7 @@
IRRI, MIPS, default, iCAPTURE, testing
@@ -1161,7 +1162,7 @@
}
};
../scripts/local-cache.pl -t DNASequence
--> MOBY::Def::DataType=HASH(0x86026b8)
+-> MOSES::MOBY::Def::DataType=HASH(0x86026b8)
'authority' => 'www.illuminae.com'
'children' => ARRAY(0x86028b0)
empty array
'description' => 'Lightweight representation a DNA sequence'
'email' => 'markw at illuminae.com'
'lsid' => 'urn:lsid:biomoby.org:objectclass:DNASequence:2001-09-21T16-00-00Z'
- 'module_name' => 'MOBY::Data::DNASequence'
- 'module_parent' => 'MOBY::Data::NucleotideSequence'
+ 'module_name' => 'MOSES::MOBY::Data::DNASequence'
+ 'module_parent' => 'MOSES::MOBY::Data::NucleotideSequence'
'name' => 'DNASequence'
'parent' => 'NucleotideSequence'
@@ -1196,16 +1197,16 @@
All children of 'DNASequence':
--> MOBY::Def::Relationship=HASH(0x860e608)
+-> MOSES::MOBY::Def::Relationship=HASH(0x860e608)
'datatype' => 'String'
'memberName' => 'SequenceString'
- 'module_datatype' => 'MOBY::Data::String'
+ 'module_datatype' => 'MOSES::MOBY::Data::String'
'original_memberName' => 'SequenceString'
'relationship' => 'HASA'
--> MOBY::Def::Relationship=HASH(0x863a3bc)
+-> MOSES::MOBY::Def::Relationship=HASH(0x863a3bc)
'datatype' => 'Integer'
'memberName' => 'Length'
- 'module_datatype' => 'MOBY::Data::Integer'
+ 'module_datatype' => 'MOSES::MOBY::Data::Integer'
'original_memberName' => 'Length'
'relationship' => 'HASA'
@@ -1299,8 +1300,8 @@
XML. It always takes an XML file name as a parameter:
-../scripts/testing-parser.pl jMoby/data/parser-test-input2.xml
-../scripts/testing-parser.pl -r jMoby/data/parser-test-input2.xml
+../scripts/testing-parser.pl ~/jMoby/data/parser-test-input2.xml
+../scripts/testing-parser.pl -r ~/jMoby/data/parser-test-input2.xml
An interesting is the -b parameter. It has the form:
@@ -1347,9 +1348,9 @@
../scripts/testing-service.pl -d Service::HelloBiomobyWorld
- The output of this call was already shown
-in the documentation (even though it was an example of the full,
-SOAP-based call). Therefore, just look what debug messages were logged
-(notice the -d option used):
+ The output of this call was already shown
+in this documentation. Therefore, just look what debug messages were
+logged (notice the -d option used):
2006/07/31 02:19:37 (561) INFO> [23856] HelloBiomobyWorldBase.pm:92 - *** REQUEST START ***
@@ -1379,7 +1379,7 @@
../scripts/testing-service.pl \
-e http://localhost/cgi-bin/MobyServer.cgi HelloBiomobyWorld
+
my $outdir = File::Spec->catfile ($tmpdir, 'generated-services');
-MOBY::Config->param ('generators.impl.outdir', $outdir);
-MOBY::Config->param ('generators.impl.package.prefix', 'Testing');
+MOSES::MOBY::Config->param ('generators.impl.outdir', $outdir);
+MOSES::MOBY::Config->param ('generators.impl.package.prefix', 'Testing');
unshift (@INC, $MOBYCFG::GENERATORS_IMPL_OUTDIR);
-my $generator = new MOBY::Generators::GenServices;
+my $generator = new MOSES::MOBY::Generators::GenServices;
More about how to communicate pragmatically with the configuration can
@@ -1752,10 +1762,10 @@
How does it work in Perl Moses?
@@ -1772,7 +1782,7 @@
You can create your own logger. Which may be good if you wish to have,
for example, a different logging level for a particular service, or
for a part of it (an example of such situation is in
-MOBY::Parser.pm where the parser creates its own
+MOSES::MOBY::Parser.pm where the parser creates its own
$PLOG logger). Here is what you need to do:
@@ -1794,14 +1804,14 @@
If Perl Moses cannot find a log4perl.properties file, and
if there are no logging options in moby-services.cfg, it
-assumes some defaults (check them in MOBY::Base, in its BEGIN
+assumes some defaults (check them in MOSES::MOBY::Base, in its BEGIN
section, if you need-to-know).
[log]
@@ -1844,7 +1854,7 @@
To change the log level to DEBUG, replace INFo by DEBUG in the first
line.
%d (%r ) %p > [%x ] %F{1} :%L - %m %n
@@ -2037,11 +2047,11 @@
# This is a mandatory section - but you can still choose one of
# the two options (keep one and commented out the other):
#-----------------------------------------------------------------
-use MOBY::Base;
+use MOSES::MOBY::Base;
# --- (1) this option loads dynamically everything
BEGIN {
- use MOBY::Generators::GenServices;
- new MOBY::Generators::GenServices->load
+ use MOSES::MOBY::Generators::GenServices;
+ new MOSES::MOBY::Generators::GenServices->load
(authority => 'samples.jmoby.net',
service_names => ['Mabuhay']);
}
@@ -2062,13 +2072,13 @@
called jobs). Your service implementation has to implement
method process_it that is called for every individual job
contained within every incoming request. The MOBY/Service/ServiceBase
+href="MOSES/MOBY/Service/ServiceBase.html"> -->MOSES/MOBY/Service/ServiceBase
has details about this method (what parameters it gets, how to deal
with exceptions, etc.).
sub process_it {
my ($self, $request, $response, $context) = @_;
+ # read (some) input data
+ # (use eval to protect against missing data)
+ my $language = eval { $request->language };
+ my $regex = eval { $language->regex->value };
+ my $ignore_cases = eval { $language->case_insensitive->value };
+
+ # set an exception if data are not complete
+ unless ($language and $regex) {
+ $response->record_error ( { code => INPUTS_INVALID,
+ msg => 'Input regular expression is missing.' } );
+ return;
+ }
- my $regex = $request->language->regex->value;
- my $ignore_cases = $request->language->case_insensitive->value;
-
+ # creating an answer (this is the "business logic" of this service)
my @result_hellos = ();
my @result_langs = ();
open HELLO, $MOBYCFG::MABUHAY_RESOURCE_FILE
- or $self->throw ('Mabuhay resource file not found.');
- while (
+When you go through the code above you notice how to do basic things
+that almost every service has to do. Which are:
+
+
+
+
+$language->id;
+$language->namespace;
+
+ The question is what to do if input (or anything else) is not
+complete or valid. This brings us to...
+open HELLO, $MOBYCFG::MABUHAY_RESOURCE_FILE
+ or $self->throw ('Mabuhay resource file not found.');
+
+ This immediately stops the processing of the input request
+(ignoring all remaining jobs if they are some still there), the text
+of the error message is put into the response as an exception with the
+code 600 ("INTERNAL_PROCESSING_ERROR"), the same message is logged as
+an error, and the response is sent back to the client.
+$response->record_error ( { code => INPUTS_INVALID,
+ msg => 'Input regular expression is missing.' } );
+
+ This creates an exception in the response - you choose what
+code to use -, and it does not prevent processing of the remaining (if
+any) jobs.
+$response->add_hello (new MOSES::MOBY::Data::simple_key_value_pair
+ ( key => $self->as_uni_string ($result_langs[$idx]),
+ value => $self->as_uni_string ($result_hellos[$idx]),
+ id => 'this is an ID',
+ namespace => 'this is a NAMESPACE'
+ ));
+
+
+# create a simple cross-reference
+ my $simple_xref = new MOSES::MOBY::Data::Xref
+ ( id => 'At263644',
+ namespace => 'TIGR'
+ );
+
+ # create an advanced cross-reference
+ my $advanced_xref = new MOSES::MOBY::Data::Xref
+ ( id => 'X112345',
+ namespace => 'EMBL',
+ service => 'getEMBLRecord',
+ authority => 'www.illuminae.com',
+ evidenceCode => 'IEA',
+ xrefType => 'transform'
+ );
+
+# add them to the output object (which has an article name 'greeting')
+$response->greeting->add_xrefs ($simple_xref);
+$response->greeting->add_xrefs ($advanced_xref);
+
+
+
+$context->serviceNotes ("This is my note...");
+
-
-
-
-
-Last modified: Tue Aug 1 15:56:36 2006
+Last modified: Sat Oct 14 21:42:54 2006
not MOBY-S
");
return;
@@ -150,6 +151,7 @@
Pattern p = Pattern.compile("/MOBY\\-S/(\\S+)");
Matcher m = p.matcher(path);
if (!m.matches()) {
+ response.setContentType("text/html");
out
.println(" not MOBY-S
");
return;
From kawas at dev.open-bio.org Mon Oct 16 17:23:16 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 16 Oct 2006 13:23:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610161723.k9GHNG4t016529@dev.open-bio.org>
kawas
Mon Oct 16 13:23:16 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
In directory dev.open-bio.org:/tmp/cvs-serv16466/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
Modified Files:
ContextLoader.java ServiceTester.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities ContextLoader.java,1.1,1.2 ServiceTester.java,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ContextLoader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ContextLoader.java 2006/10/11 01:54:50 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ContextLoader.java 2006/10/16 17:23:16 1.2
@@ -275,14 +275,15 @@
}
} catch (Exception ex) {
// some defaults if nothing else works
- URI_MAP.put("Object", "http://biomoby.org/RESOURCES/MOBY-S/Objects#");
+ log.warn("Using hard-coded URIs for Objects, Service, Namespace and Serviceinstances.");
+ URI_MAP.put("Object", "http://biomoby.org/authority/RESOURCES/MOBY-S/Objects#");
- URI_MAP.put("Service", "http://biomoby.org/RESOURCES/MOBY-S/Services#");
+ URI_MAP.put("Service", "http://biomoby.org/authority/RESOURCES/MOBY-S/Services#");
- URI_MAP.put("Namespace", "http://biomoby.org/RESOURCES/MOBY-S/Namespaces#");
+ URI_MAP.put("Namespace", "http://biomoby.org/authority/RESOURCES/MOBY-S/Namespaces#");
URI_MAP.put("ServiceInstance",
- "http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#");
+ "http://biomoby.org/authority/RESOURCES/MOBY-S/ServiceInstances#");
}
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/12 01:55:20 1.5
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/16 17:23:16 1.6
@@ -1,5 +1,6 @@
package org.biomoby.client.ui.graphical.servlet.utilities;
+import java.text.DecimalFormat;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
@@ -15,6 +16,7 @@
import org.biomoby.shared.Central;
import org.biomoby.shared.MobyException;
import org.biomoby.shared.MobyService;
+import org.biomoby.shared.Utils;
import org.tulsoft.tools.soap.axis.AxisUtils;
public class ServiceTester {
@@ -153,6 +155,41 @@
log.info("getting results complete");
return sb.toString();
}
+
+ public String getStats() {
+ StringBuffer sb = new StringBuffer();
+ Map map = getResultMap();
+ int num_bad_authorities = 0;
+ int total_alive = 0;
+ int total_dead = 0;
+
+ sb.append("There are " + map.keySet().size() + " service providers, with at least one registered service, registered with this registry." + newline);
+ for (Iterator it = map.keySet().iterator(); it.hasNext();) {
+ String key = (String) it.next();
+ Map list = (Map) map.get(key);
+ boolean hasGoodService = false;
+ // dive into this authoritys' services
+ for (Iterator listIt = list.keySet().iterator(); listIt.hasNext();) {
+ String servicename = (String) listIt.next();
+ Boolean contents = (Boolean) list.get(servicename);
+ if (contents.booleanValue()) {
+ total_alive++;
+ hasGoodService = true;
+ } else {
+ total_dead++;
+ }
+ }
+ // increment authority counts
+ if (!hasGoodService)
+ num_bad_authorities++;
+ }
+ DecimalFormat df = new DecimalFormat("####.00");
+ sb.append("\tOf these service providers, there are " + num_bad_authorities + " that don't have at least one working service."+newline);
+ sb.append("There are "+total_alive+" services that are reachable in there current state."+newline);
+ sb.append("There are "+total_dead+" services that are not reachable."+newline);
+ sb.append(newline + "\tThat represents approximately " + df.format(((float)total_alive/(float)(total_dead+total_alive))*100) + "% in terms of alive services." );
+ return Utils.format(sb.toString(), 4);
+ }
public String getServiceInformationByAuthority(String authority) {
StringBuffer sb = new StringBuffer();
@@ -319,10 +356,4 @@
public void setNumThreads(int numThreads) {
this.numThreads = numThreads;
}
- public static void main(String[] args) throws MobyException {
- ServiceTester s = new ServiceTester("http://localhost/cgi-bin/MOBY-Central.pl","http://localhost/MOBY/Central");
- s.testServices(s.getServices());
- System.out.println(s.getResults());
-
- }
}
From kawas at dev.open-bio.org Mon Oct 16 17:23:16 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 16 Oct 2006 13:23:16 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610161723.k9GHNGK1016505@dev.open-bio.org>
kawas
Mon Oct 16 13:23:15 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms
In directory dev.open-bio.org:/tmp/cvs-serv16466/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms
Modified Files:
CallableServicesServlet.java RDFAgentValidator.java
Log Message:
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms CallableServicesServlet.java,1.3,1.4 RDFAgentValidator.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java 2006/10/11 01:54:50 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/CallableServicesServlet.java 2006/10/16 17:23:15 1.4
@@ -82,7 +82,26 @@
String authority = filter(request.getParameter("authority"));
String servicename = filter(request.getParameter("service"));
-
+ String getStats = filter(request.getParameter("getStats"));
+ if (getStats != null) {
+ response.setContentType("text/plain");
+ if (scheduler == null || scheduler.getServiceTester() == null) {
+ PrintWriter out = response.getWriter();
+ out.print("Sorry, there are no stats available at the moment. Please try again in a few minutes(x0011).");
+ return;
+ } else {
+ if (scheduler.getServiceTester().getResultMap() == null
+ || scheduler.getServiceTester().getResultMap().isEmpty()) {
+ PrintWriter out = response.getWriter();
+ out.print("Sorry, there are no stats available at the moment. Please try again in a few minutes(x0012).");
+ return;
+ }
+ PrintWriter out = response.getWriter();
+ out.print(scheduler.getServiceTester().getStats());
+ return;
+ }
+ }
+
if (scheduler == null) {
response
.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/RDFAgentValidator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/RDFAgentValidator.java 2006/10/11 01:54:50 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/forms/RDFAgentValidator.java 2006/10/16 17:23:15 1.4
@@ -72,16 +72,17 @@
url = url.trim();
url = URLDecoder.decode(url, "UTF-8");
- String pre = "\n"
- + "\n"
- + "\n"
- + "\n"
- + "";
+ String pre = ""
+ + ""
+ + ""
+ + ""
+ + ""
+ + "
" + "";
Properties prop = MobyProperties.SERVICE_INSTANCE_PROPERTIES();
String rdfagent = (String) prop.get("rdfagent");
From kawas at dev.open-bio.org Mon Oct 16 17:39:49 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 16 Oct 2006 13:39:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610161739.k9GHdnrq016916@dev.open-bio.org>
kawas
Mon Oct 16 13:39:49 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv16881/Java/src/Perl/MOSES/MOBY
Modified Files:
Parser.pm
Log Message:
moby-live/Java/src/Perl/MOSES/MOBY Parser.pm,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/13 21:51:16 1.1
+++ /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/16 17:39:49 1.2
@@ -649,7 +649,7 @@
$actor->$methodName($parameter);
}
};
- if ($@) {
+ if ($@ and ($insubstitution == 0)) {
$PLOG->error("Method '$methodName' was not found in the object ". $actor->mobyname);
$self->error( "Method '$methodName' was not found in the object " . $actor->mobyname);
}
From kawas at dev.open-bio.org Mon Oct 16 18:07:15 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 16 Oct 2006 14:07:15 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610161807.k9GI7FlU017130@dev.open-bio.org>
kawas
Mon Oct 16 14:07:15 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/scripts
In directory dev.open-bio.org:/tmp/cvs-serv17095/Java/src/scripts
Modified Files:
install.pl
Log Message:
added the module Unicode::String to the list of required modules. Every time (2 to be exact ;-) that i ran the install on a linux machine, the installer failed after it reported that I had all the correct modules installed. It seems that Unicode::String was always missing.
moby-live/Java/src/scripts install.pl,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/scripts/install.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Java/src/scripts/install.pl 2006/10/13 22:08:39 1.5
+++ /home/repository/moby/moby-live/Java/src/scripts/install.pl 2006/10/16 18:07:15 1.6
@@ -60,6 +60,7 @@
Config::Simple
IO::Scalar
IO::Prompt
+ Unicode::String
) ) {
check_module ($module);
}
From kawas at dev.open-bio.org Mon Oct 16 18:37:14 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 16 Oct 2006 14:37:14 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610161837.k9GIbEjG017325@dev.open-bio.org>
kawas
Mon Oct 16 14:37:14 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv17290/Java/src/Perl/MOSES/MOBY
Modified Files:
Parser.pm
Log Message:
moby-live/Java/src/Perl/MOSES/MOBY Parser.pm,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/16 17:39:49 1.2
+++ /home/repository/moby/moby-live/Java/src/Perl/MOSES/MOBY/Parser.pm 2006/10/16 18:37:14 1.3
@@ -649,7 +649,7 @@
$actor->$methodName($parameter);
}
};
- if ($@ and ($insubstitution == 0)) {
+ if ($@ and not $insubstitution) {
$PLOG->error("Method '$methodName' was not found in the object ". $actor->mobyname);
$self->error( "Method '$methodName' was not found in the object " . $actor->mobyname);
}
From kawas at dev.open-bio.org Tue Oct 17 13:42:54 2006
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 17 Oct 2006 09:42:54 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610171342.k9HDgsb4019946@dev.open-bio.org>
kawas
Tue Oct 17 09:42:53 EDT 2006
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv19911/Java/docs
Modified Files:
RegistryServlets.html
Log Message:
added a blurb on the rdf_generator property in the [mobycentral] section
moby-live/Java/docs RegistryServlets.html,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/RegistryServlets.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/11 20:39:31 1.2
+++ /home/repository/moby/moby-live/Java/docs/RegistryServlets.html 2006/10/17 13:42:53 1.3
@@ -163,6 +163,10 @@
";
- String post = "
\n" + "";
+ String post = "
+
+
rdf_generator
+
+
http://your.domain/authority/RDFGenerator $> cvs -d :pserver:cvs at cvs.open-bio.org:/home/repository/moby login
$> cvs -d :pserver:cvs at cvs.open-bio.org:/home/repository/moby checkout moby-live
$> cvs update -dP
- (the 'P' flag for the update will clean-up your checkout and get rid of unused directories)
-
+ (the 'P' flag for the update will clean-up your checkout and get rid of unused directories)
$> cd ~/moby-live/Perl
To install in default path for Perl modules (root privileges required):
@@ -248,8 +247,7 @@
root $> rcmysql start
@@ -263,6 +261,7 @@
lsid_namespace = serviceinstance
resourceURL = http://your.host.name/RESOURCES/MOBY-S/ServiceInstances
allResources = http://your.host.name/RESOURCES/MOBY-S/FULL
+ rdf_generator = http://mobycentral.icapture.ubc.ca/authority/RDFGenerator
[mobyobject]
username = mysql_username
@@ -314,8 +313,7 @@
~/moby-live/Perl/scripts/CloneCentralDatabases.pl
script. This will create the databases, set privileges, fetch all data from THE central BioMOBY Central
- and load it into your local central.
-
@@ -372,8 +369,7 @@
Taverna uses your BioMOBY Central endpoint to request the URLs for the RDF files, which are dynamically generated by the servlets.
Hence, using your local central with Taverna is a two step process that requires
both a working BioMOBY Central CGI script at your BioMOBY Central endpoint
- and several servlets to generate RDF files.
-
+ and several servlets to generate RDF files.
~/moby-live/Perl/scripts/CloneCentralDatabases.pl
- script.
- $> su
@@ -392,27 +388,23 @@
$CATALINA_HOME is used to refer to the directory into which you have installed Tomcat 5.
<Listener className="org.apache.jk.config.ApacheConfig"
modJk="/usr/lib/apache2/mod_jk.so"
workersConfig="$CATALINA_HOME/conf/jk/workers.properties" />
to the <Server> section.
- Change the modJk and workersConfig path according to your setup.
-
@@ -451,66 +443,18 @@
- http://bioinfo.icapture.ubc.ca/ekawas/servlets/install.jar
- for Sun's java $> java -jar install.jar
for IBM's java $> java install.jar
- You should get a graphical interface that will guide you through the installation process...
-
- Ensure that the following environment variables are available to Tomcat:
- MOBY_CENTRAL_CONFIG - the path to your mobycentral.config file created above
- MOBY_SERVER - the endpoint of your local registry (see below, Configure your clients)
- MOBY_URI - the namespace of your local registry (see below, Configure your clients)
-
- And if you installed the servlets outside the the default webapps folder, make sure Tomcat knows where to find them.
- The easiest way to do this is to make the following three config files in $CATALINA_HOME/conf/Catalina/localhost/ :
-
- <?xml version='1.0' encoding='utf-8'?>
- <!-- Example authority.xml file -->
- <Context docBase="/path/to/your/webapps/authority" path="/authority">
- <Environment name="MOBY_CENTRAL_CONFIG"
- value="/path/to/your/mobycentral.config"
- type="java.lang.String"/>
- <Environment name="MOBY_SERVER"
- value="http://your.host.name/biomoby/central/cgi-bin/MOBY-Central.pl"
- type="java.lang.String"/>
- <Environment name="MOBY_URI"
- value="http://your.host.name/MOBY/Central"
- type="java.lang.String"/>
- </Context>
-
-
- <?xml version='1.0' encoding='utf-8'?>
- <!-- Example RESOURCES.xml file -->
- <Context docBase="/path/to/your/webapps/RESOURCES" path="/RESOURCES">
- <Environment name="MOBY_CENTRAL_CONFIG"
- value="/path/to/your/mobycentral.config"
- type="java.lang.String"/>
- <Environment name="MOBY_SERVER"
- value="http://your.host.name/biomoby/central/cgi-bin/MOBY-Central.pl"
- type="java.lang.String"/>
- <Environment name="MOBY_URI"
- value="http://your.host.name/MOBY/Central"
- type="java.lang.String"/>
- </Context>
-
-
- <?xml version='1.0' encoding='utf-8'?>
- <!-- Example types.xml file -->
- <Context docBase="/path/to/your/webapps/types" path="/types">
- <Environment name="MOBY_CENTRAL_CONFIG"
- value="/path/to/your/mobycentral.config"
- type="java.lang.String"/>
- <Environment name="MOBY_SERVER"
- value="http://your.host.name/biomoby/central/cgi-bin/MOBY-Central.pl"
- type="java.lang.String"/>
- <Environment name="MOBY_URI"
- value="http://your.host.name/MOBY/Central"
- type="java.lang.String"/>
- </Context>
-
+ You should get a graphical interface that will guide you through the installation process...
+
+
+
+
+ root $> rctomcat restart
@@ -522,14 +466,12 @@
~/moby-live/Perl/scripts/OntologyServer.cgi
- CGI script into your webserver cgi-bin folder.
- host => ["http://mobycentral.icapture.ubc.ca/cgi-bin/OntologyServer.cgi",'read/write']
- to point to the URL of your OntologyServer.cgi that you just set up.
- MOBY Data from
MOBY Data from
@@ -109,7 +110,7 @@
-
-
+
- MOBY Data for query
-
Xref:
-
+
+
+
-
+ Collection of
-
From gordonp at dev.open-bio.org Thu Oct 26 01:32:06 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Wed, 25 Oct 2006 21:32:06 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610260132.k9Q1W6EU015312@dev.open-bio.org>
gordonp
Wed Oct 25 21:32:06 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv15257/src/main/ca/ucalgary/seahawk/services
Modified Files:
MobyClient.java
Log Message:
Became more lenient with moby-s namespace for tags
moby-live/Java/src/main/ca/ucalgary/seahawk/services MobyClient.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java 2006/10/26 00:36:15 1.2
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java 2006/10/26 01:32:06 1.3
@@ -624,7 +624,6 @@
public void setRequiredServiceLevel(int level){
serviceLevel = level;
- System.err.println("Service level is now set to " + serviceLevel);
}
public MobyDataServiceAssocInstance getServices(MobyDataObjectSet mdos) throws MobyException{
From gordonp at dev.open-bio.org Thu Oct 26 01:32:06 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Wed, 25 Oct 2006 21:32:06 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610260132.k9Q1W6vd015374@dev.open-bio.org>
gordonp
Wed Oct 25 21:32:06 EDT 2006
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv15257/xmls
Modified Files:
seahawkBuild.xml
Log Message:
Became more lenient with moby-s namespace for tags
moby-live/Java/xmls seahawkBuild.xml,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml 2006/10/25 02:33:23 1.1
+++ /home/repository/moby/moby-live/Java/xmls/seahawkBuild.xml 2006/10/26 01:32:06 1.2
@@ -53,8 +53,8 @@
How do I launch it?
-
@@ -79,8 +79,8 @@
java -jar seahawk.jar
-import ca.ucalgary.bluejay.util.MobyUtils;
-import ca.ucalgary.bluejay.gui.MobyContentGUI;
+import ca.ucalgary.seahawk.util.MobyUtils;
+import ca.ucalgary.seahawk.gui.MobyContentGUI;
// the rest of your application code goes here...
@@ -108,7 +108,7 @@
There are 4 main mechanisms for creating Moby Data Instances in Seahawk:
ca.ucalgary.bluejay.gui.MobyContentGUI
, and
+ ca.ucalgary.seahawk.gui.MobyContentGUI
, and
this same class will create a MOBY DNASequence, RNASequence or AASequence if 95% of the characters are valid for that sequence type.
" + word);
+ lineCharCount = word.length();
+ continue;
+ }
+ result.append(" " + word);
+ lineCharCount += word.length()+1;
+
+ if(lineCharCount > maxLine){ //single word is bigger than preset width, redo layout
+ maxLine = lineCharCount;
+ break;
+ }
+ }
+ result.append("");
+ if(!st.hasMoreTokens()){ //used up all the text, didn't break previous loop abnormally
+ break;
+ }
+ } //end layout block
+
+ return result.toString();
+ }
+
public JMenu addNameDivSubMenu(JMenu parentMenu, MobyService[] services){
if(services == null || services.length == 0){
return null;
@@ -1044,7 +1084,7 @@
String menuToolTip = commonAncestorDesc + desc;
if(menuToolTip.length() > MAX_SERVICE_DESC_LEN){
// Cut down really long ancestry descs to the last part (most precise)
- menuToolTip = "..." + menuToolTip.substring(menuToolTip.length()-MAX_SERVICE_DESC_LEN);
+ menuToolTip = htmlifyToolTipText(menuToolTip);
}
menu.setToolTipText(menuToolTip);
parentMenu.add(menu);
From gordonp at dev.open-bio.org Sun Oct 29 15:26:55 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Sun, 29 Oct 2006 10:26:55 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610291526.k9TFQtbw018754@dev.open-bio.org>
gordonp
Sun Oct 29 10:26:53 EST 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv18719
Modified Files:
MobyServlet.war
Log Message:
Fixed manifest to have ServletTester as main-class. The mainfest got overwritten in the last update by mistake
jars-archive/current MobyServlet.war,1.2,1.3
===================================================================
RCS file: /home/repository/moby/jars-archive/current/MobyServlet.war,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
Binary files /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/24 17:50:14 1.2 and /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/29 15:26:53 1.3 differ
rcsdiff: /home/repository/moby/jars-archive/current/MobyServlet.war: diff failed
From gordonp at dev.open-bio.org Mon Oct 30 15:49:39 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:49:39 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301549.k9UFnde3025206@dev.open-bio.org>
gordonp
Mon Oct 30 10:49:38 EST 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv25171
Modified Files:
MobyServlet.war
Log Message:
Updates to fix issue with registering services taking Collections (which didn't support data types due to a quirk in MobyPrimaryDataSet's implementation)
jars-archive/current MobyServlet.war,1.3,1.4
===================================================================
RCS file: /home/repository/moby/jars-archive/current/MobyServlet.war,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
Binary files /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/29 15:26:53 1.3 and /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/30 15:49:37 1.4 differ
rcsdiff: /home/repository/moby/jars-archive/current/MobyServlet.war: diff failed
From gordonp at dev.open-bio.org Mon Oct 30 15:54:39 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:54:39 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301554.k9UFsdWV025311@dev.open-bio.org>
gordonp
Mon Oct 30 10:54:39 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data
In directory dev.open-bio.org:/tmp/cvs-serv25276/main/org/biomoby/shared/data
Modified Files:
MobyDataObject.java
Log Message:
Checked for freak condition that no data type has been assigned to the object before printing
moby-live/Java/src/main/org/biomoby/shared/data MobyDataObject.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java 2006/10/26 00:31:21 1.10
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/data/MobyDataObject.java 2006/10/30 15:54:39 1.11
@@ -559,7 +559,15 @@
}
// One-tag representation, since it doesn't have any CRIB or PIB to enclose
- return "<" + getDataType().getName() +" " + getAttrXML() + "/>";
+ if(getDataType() == null){
+ // If the data type is null, there must be something wrong
+ // with fetching the ontology RDF from MOBY Central. At the very
+ // least, we know the thing must be an Object.
+ return "";
+ }
+ else{
+ return "<" + getDataType().getName() +" " + getAttrXML() + "/>";
+ }
}
else{
// Override super because article name is not actually important to us
From gordonp at dev.open-bio.org Mon Oct 30 15:55:36 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:55:36 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301555.k9UFtaHJ025354@dev.open-bio.org>
gordonp
Mon Oct 30 10:55:36 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory dev.open-bio.org:/tmp/cvs-serv25319/main/org/biomoby/shared
Modified Files:
MobyPrimaryDataSet.java
Log Message:
Added support for declaring data type of set, even if no elements are present yet. If elements are added, the data type is changed
moby-live/Java/src/main/org/biomoby/shared MobyPrimaryDataSet.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2006/07/07 04:12:40 1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyPrimaryDataSet.java 2006/10/30 15:55:36 1.8
@@ -25,6 +25,7 @@
extends MobyPrimaryData {
protected Vector elements = new Vector(); // elemenst are of type MobyPrimaryDataSimple
+ protected MobyDataType defaultDataType = new MobyDataType("Object");
/**************************************************************************
* Default constructor. Other characteristics are empty - which is usually
@@ -82,7 +83,7 @@
if (elements.size() > 0)
return ((MobyPrimaryDataSimple)elements.firstElement()).getDataType();
else
- return null;
+ return defaultDataType;
}
}
@@ -92,6 +93,7 @@
* data type).
*************************************************************************/
public void setDataType (MobyDataType dataType) {
+ defaultDataType = dataType;
synchronized (elements) {
for (Enumeration en = elements.elements(); en.hasMoreElements(); )
((MobyPrimaryDataSimple)en.nextElement()).setDataType (dataType);
@@ -170,6 +172,11 @@
for (Enumeration en = elements.elements(); en.hasMoreElements(); )
buf.append (((MobyPrimaryDataSimple)en.nextElement()).toXML());
}
+ else{
+ MobyPrimaryDataSimple template = new MobyPrimaryDataSimple();
+ template.setDataType(defaultDataType);
+ buf.append(template.toXML());
+ }
buf.append ("");
buf.append ("\n");
return new String (buf);
From gordonp at dev.open-bio.org Mon Oct 30 15:56:19 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Mon, 30 Oct 2006 10:56:19 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610301556.k9UFuJsX025393@dev.open-bio.org>
gordonp
Mon Oct 30 10:56:19 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/util
In directory dev.open-bio.org:/tmp/cvs-serv25362/main/ca/ucalgary/seahawk/util
Added Files:
MinJarMaker.java
Log Message:
Tool used to generate Seahawk standalone JAR
moby-live/Java/src/main/ca/ucalgary/seahawk/util MinJarMaker.java,NONE,1.1
From gordonp at dev.open-bio.org Tue Oct 31 20:25:56 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Tue, 31 Oct 2006 15:25:56 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610312025.k9VKPufQ029279@dev.open-bio.org>
gordonp
Tue Oct 31 15:25:55 EST 2006
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory dev.open-bio.org:/tmp/cvs-serv29244/src/Clients
Modified Files:
ServletTester.java
Log Message:
Better error reporting if the provided 'web.xml' file is not syntactically correct
moby-live/Java/src/Clients ServletTester.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/ServletTester.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/ServletTester.java 2006/10/25 02:33:22 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/ServletTester.java 2006/10/31 20:25:55 1.2
@@ -33,7 +33,7 @@
ServletTester tester = new ServletTester();
// Open the web.xml file to determine the service name and inputs/outputs.
- java.net.URL webXmlURL = tester.getClass().getClassLoader().getResource("WEB-INF/web.xml");
+ java.net.URL webXmlURL = tester.getClass().getClassLoader().getResource("WEB-INF/web.xml");
if(webXmlURL == null){
System.err.println("Could not find \"WEB-INF/web.xml\", aborting!");
System.exit(1);
@@ -48,10 +48,18 @@
dbf.setNamespaceAware(false);
DocumentBuilder docBuilder = dbf.newDocumentBuilder();
- Element docRoot = docBuilder.parse(webXmlURL.openStream()).getDocumentElement();
- if(docRoot == null || !docRoot.getNodeName().equals("web-app")){
- System.err.println("Could not find /web-app tag in " +
- webXmlURL + ", aborting!");
+ Element docRoot = null;
+ try{
+ docRoot = docBuilder.parse(webXmlURL.openStream()).getDocumentElement();
+ if(docRoot == null || !docRoot.getNodeName().equals("web-app")){
+ System.err.println("Could not find /web-app tag in " +
+ webXmlURL + ", aborting!");
+ System.exit(1);
+ }
+ } catch(Exception e){
+ System.err.println("There appears to be a problem with the \"WEB-INF/web.xml\" file (XML syntax?)." +
+ "While parsing it I encountered the error: " + e);
+ e.printStackTrace();
System.exit(1);
}
Element servlet = getChildElement(docRoot, "servlet");
From gordonp at dev.open-bio.org Tue Oct 31 20:55:45 2006
From: gordonp at dev.open-bio.org (Paul Gordon)
Date: Tue, 31 Oct 2006 15:55:45 -0500
Subject: [MOBY-guts] biomoby commit
Message-ID: <200610312055.k9VKtjgb029560@dev.open-bio.org>
gordonp
Tue Oct 31 15:55:45 EST 2006
Update of /home/repository/moby/jars-archive/current
In directory dev.open-bio.org:/tmp/cvs-serv29525
Modified Files:
MobyServlet.war
Log Message:
Better error reporting if the provided 'web.xml' file is not syntactically correctin test client
jars-archive/current MobyServlet.war,1.4,1.5
===================================================================
RCS file: /home/repository/moby/jars-archive/current/MobyServlet.war,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
Binary files /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/30 15:49:37 1.4 and /home/repository/moby/jars-archive/current/MobyServlet.war 2006/10/31 20:55:44 1.5 differ
rcsdiff: /home/repository/moby/jars-archive/current/MobyServlet.war: diff failed