From kawas at dev.open-bio.org Fri Oct 2 11:15:48 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 2 Oct 2009 11:15:48 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910021515.n92FFmmM009604@dev.open-bio.org>
kawas
Fri Oct 2 11:15:48 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv9568/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service.tt
Log Message:
make sure that we dont see undefined variables in hash warnings (thanks pieter)
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service.tt,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2008/11/19 14:24:14 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/02 15:15:48 1.6
@@ -239,7 +239,7 @@
# $response->record_error ( { code => INPUT_INCORRECT_NAMESPACE,
# msg => 'This service requires inputs under the namespaces: {"' . join(',', keys %valid_namespaces) . '"}' } );
# return;
-# } unless $valid_namespaces{$namespace};
+# } unless defined($namespace) && $valid_namespaces{$namespace};
[%- ELSE %]
if (defined $[% input.name %]_collection) {
foreach my $[% input.name %]_element (@{ $[% input.name %]_collection }) {
@@ -250,7 +250,7 @@
# $response->record_error ( { code => INPUT_INCORRECT_NAMESPACE,
# msg => 'This service requires inputs under the namespaces: { "' . join(',', keys %valid_namespaces) . '"}' } );
# return;
- # } unless $valid_namespaces{$namespace};
+ # } unless defined($namespace) && $valid_namespaces{$namespace};
}
}
[%- END %]
From senger at dev.open-bio.org Sun Oct 4 19:31:28 2009
From: senger at dev.open-bio.org (Martin Senger)
Date: Sun, 4 Oct 2009 19:31:28 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910042331.n94NVSCh029672@dev.open-bio.org>
senger
Sun Oct 4 19:31:28 EDT 2009
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv29653/xmls
Modified Files:
project.pom
Log Message:
jax-ws dependencies updated
moby-live/Java/xmls project.pom,1.16,1.17
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/project.pom,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- /home/repository/moby/moby-live/Java/xmls/project.pom 2009/06/09 22:20:54 1.16
+++ /home/repository/moby/moby-live/Java/xmls/project.pom 2009/10/04 23:31:28 1.17
@@ -282,14 +282,39 @@
com.sun.xml.wsjaxws-tools
- 2.1.3
+ 2.1.4
+
+
+ javax.xml.ws
+ jaxws-api
+
+
+ javax.jws
+ jsr181
+
+
-
- com.sun.xml.ws
- jaxws-rt
- 2.1.4
+ javax.xml.ws
+ jaxws-api
+ 2.1-1
+
+
+ javax.jws
+ jsr181
+
+
+
+
+ org.apache.geronimo.specs
+ geronimo-ws-metadata_2.0_spec
+ 1.1.1
+
+
jdom
From kawas at dev.open-bio.org Wed Oct 7 11:40:24 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 7 Oct 2009 11:40:24 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910071540.n97FeOYw010557@dev.open-bio.org>
kawas
Wed Oct 7 11:40:24 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv10517/MOSES-MOBY
Modified Files:
Changes Makefile.PL
Log Message:
bug fix to fix warning when testing soapless service and the debug log setting.
moby-live/Perl/MOSES-MOBY Changes,1.17,1.18 Makefile.PL,1.19,1.20
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/08/27 19:44:39 1.17
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/07 15:40:24 1.18
@@ -1,5 +1,15 @@
Revision history for Perl extension MOSES::MOBY.
+0.92
+ - Bug fix: Can't use string ("
kawas
Wed Oct 7 11:40:24 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv10517/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service-base.tt
Log Message:
bug fix to fix warning when testing soapless service and the debug log setting.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service-base.tt,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt 2009/08/27 19:37:37 1.4
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt 2009/10/07 15:40:24 1.5
@@ -200,7 +200,9 @@
if ($LOG->is_debug) {
my $soap_output = $self->finish_output ($out_package);
$LOG->debug ("Output raw data (first 1000 characters): " .
- substr ($soap_output->{_value}->[0], 0, 1000));
+ substr ($soap_output->{_value}->[0], 0, 1000)) if ref($soap_output) =~ m|^HASH|;
+ $LOG->debug ("Output raw data (first 1000 characters): " .
+ substr ($soap_output, 0, 1000)) unless ref($soap_output) =~ m|^HASH|;
Log::Log4perl::NDC->pop();
return $soap_output;
} else {
From kawas at dev.open-bio.org Fri Oct 9 11:31:01 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 11:31:01 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091531.n99FV1i5013333@dev.open-bio.org>
kawas
Fri Oct 9 11:31:01 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv13298/MOSES-MOBY/bin/scripts
Modified Files:
moses-testing-service.pl
Log Message:
added a line that prints the LSAE message if $opt_v is chosen when checking the status of a submitted job.
moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/04/16 18:17:24 1.11
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/09 15:31:00 1.12
@@ -153,6 +153,7 @@
$completed->{$queryID} = 1;
} elsif ( $status->percentage < 100 ) {
print "Current percentage: ", $status->percentage, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
@@ -168,6 +169,7 @@
|| ( $status->new_state =~ m"running"i ) )
{
print "Current State: ", $status->new_state, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
@@ -178,6 +180,7 @@
$completed->{$queryID} = 1;
} elsif ( $status->steps_completed < $status->total_steps ) {
print "Steps completed: ", $status->steps_completed, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
@@ -188,6 +191,7 @@
$completed->{$queryID} = 1;
} elsif ( $status->remaining > 0 ) {
print "Time remaining: ", $status->remaining, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
From kawas at dev.open-bio.org Fri Oct 9 11:39:21 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 11:39:21 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091539.n99FdLAs013374@dev.open-bio.org>
kawas
Fri Oct 9 11:39:21 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv13339/MOSES-MOBY
Modified Files:
Changes
Log Message:
updated to reflect recent changes
moby-live/Perl/MOSES-MOBY Changes,1.18,1.19
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/07 15:40:24 1.18
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 15:39:21 1.19
@@ -10,6 +10,10 @@
is passed, our code produces warnings ...
added check to ensure that namespace is
defined before checking.
+ - when testing async services, added a line
+ to print out the LSAE event message if it
+ exists and if the script is running under
+ verbose settings.
0.91
- Updated the Makefile.PL to handle some missing
dependencies.
From kawas at dev.open-bio.org Fri Oct 9 13:29:28 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:29:28 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091729.n99HTS4B013717@dev.open-bio.org>
kawas
Fri Oct 9 13:29:28 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv13682/MOSES-MOBY/lib/MOSES/MOBY/Cache
Modified Files:
Central.pm
Log Message:
category had incorrect case
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2009/08/27 19:40:50 1.8
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2009/10/09 17:29:28 1.9
@@ -991,7 +991,7 @@
$service->lsid($service_node->getAttribute('lsid') || '');
$service->type($service_node->getChildrenByTagName('serviceType')->get_node(1)->textContent) if $service_node->getChildrenByTagName('serviceType')->size() > 0;
$service->authoritative($service_node->getChildrenByTagName('authoritative')->get_node(1)->textContent) if $service_node->getChildrenByTagName('authoritative')->size() > 0;
- $service->category($service_node->getChildrenByTagName('category')->get_node(1)->textContent) if $service_node->getChildrenByTagName('category')->size() > 0;
+ $service->category($service_node->getChildrenByTagName('Category')->get_node(1)->textContent) if $service_node->getChildrenByTagName('Category')->size() > 0;
$service->description($service_node->getChildrenByTagName('Description')->get_node(1)->textContent) if $service_node->getChildrenByTagName('Description')->size() > 0;
$service->email($service_node->getChildrenByTagName('contactEmail')->get_node(1)->textContent) if $service_node->getChildrenByTagName('contactEmail')->size() > 0;
$service->signatureURL($service_node->getChildrenByTagName('signatureURL')->get_node(1)->textContent) if $service_node->getChildrenByTagName('signatureURL')->size() > 0;
From kawas at dev.open-bio.org Fri Oct 9 13:32:39 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:32:39 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091732.n99HWdiS013799@dev.open-bio.org>
kawas
Fri Oct 9 13:32:39 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv13764/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service.tt
Log Message:
added some code to modify the LSAE states
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service.tt,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/02 15:15:48 1.6
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/09 17:32:39 1.7
@@ -28,6 +28,10 @@
[%- MACRO is_simple (entry) BLOCK %]
[%- ref (entry) == 'MOSES::MOBY::Def::PrimaryDataSimple' %]
[%- END -%]
+
+ [%- MACRO is_async (entry) BLOCK %]
+ [%- entry == 'cgi-async' || entry == 'moby-async' %]
+ [%- END -%]
[%- MACRO set_child (child, leftpad, value) BLOCK %]
[% FILTER indent (leftpad) -%]
@@ -202,6 +206,9 @@
@ISA = qw( [% base.module_name %] );
use MOSES::MOBY::Package;
use MOSES::MOBY::ServiceException;
+[%- IF is_async(base.category) -%]
+use MOBY::Async::LSAE;
+[%- END %]
use strict;
[%# here we output use statements for our primitives %]
@@ -275,8 +282,23 @@
[%- END %]
[%- END %]
- # do something... (sorry, can't help with that)
-
+ # do something... (sorry, can't you help with that)
+
+ [%- IF is_async(base.category) %]
+ #simulate a long running service while providing updates
+
+ #update the state of our service
+ $self->update_state_event($request, 'running','about to sleep for 20 seconds!');
+
+ # sleep for 20 seconds
+ sleep(20);
+
+ # update state again
+ $self->update_state_event($request, 'running','Woke up and going back to sleep for 20 more seconds!');
+
+ # sleep for 20 more seconds
+ sleep(20);
+ [%- END %]
# EDIT: PUT REAL VALUES INTO THE RESPONSE
# fill the response
[%- FOREACH output IN base.outputs %]
@@ -325,6 +347,272 @@
}
+[%- IF is_async(base.category) -%]
+#-----------------------------------------------------------------
+# update_state_event
+# This method is used to update the state of your
+# LSAE_STATE_CHANGED_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $state - one of (created, running, completed, terminated_by_request, terminated_by_error)
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_state_event {
+ my ( $self, $request, $state, $msg ) = @_;
+
+ my %valid_states = ('created'=>1,'running'=>1,'completed'=>1,'termintated_by_request'=>1,'terminated_by_error'=>1,);
+
+ $msg = '' unless defined $msg;
+ $state = 'running' unless defined $state;
+
+ # validate the state of the event ...
+ $state = 'running' unless $valid_states{$state};
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_STATE_CHANGED_EVENT);
+
+ # set the previous state
+ $status->previous_state( $old_status->new_state() ) if defined ($old_status->type) and $old_status->type == LSAE_STATE_CHANGED_EVENT;
+ $status->previous_state( 'created') unless $status->previous_state;
+
+ # set the new state
+ $status->new_state($state);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+#-----------------------------------------------------------------
+# update_percentage_event
+# This method is used to update the state of your
+# LSAE_PERCENT_PROGRESS_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $percentrage - an integer between 0-100
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_percentage_event {
+ my ( $self, $request, $percentage, $msg ) = @_;
+
+ $msg = '' unless defined $msg;
+ $state = 1 unless defined $percentage;
+
+ # validate the state of the event ...
+ $percentage = 1 unless $percentage >= 0 and $percentage <=100;
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_PERCENT_PROGRESS_EVENT);
+
+ # set the new state
+ $status->percentage($percentage);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+
+#-----------------------------------------------------------------
+# update_step_event
+# This method is used to update the state of your
+# LSAE_STEP_PROGRESS_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $total_steps - integer representing total steps until completion
+# $steps_completed - integer representing steps completed
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_step_event {
+ my ( $self, $request, $total_steps, $steps_completed, $msg ) = @_;
+
+ $msg = '' unless defined $msg;
+ $total_steps = 1 unless defined $total_steps;
+ $steps_completed = 0 unless defined $steps_completed;
+
+ # validate the state of the event ...
+ $steps_completed = $total_steps if $steps_completed > $total_steps;
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_STEP_PROGRESS_EVENT);
+
+ # set the new state
+ $status->steps_completed($steps_completed);
+ $status->total_steps($total_steps);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+
+#-----------------------------------------------------------------
+# update_time_event
+# This method is used to update the state of your
+# LSAE_TIME_PROGRESS_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $remaining - integer representing seconds until completion
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_time_event {
+ my ( $self, $request, $remaining, $msg ) = @_;
+
+ $msg = '' unless defined $msg;
+ $remaining = 0 unless defined $remaining;
+
+ # validate the state of the event ...
+ $remaining = 0 unless $remaining >= 0 ;
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_TIME_PROGRESS_EVENT);
+
+ # set the new state
+ $status->remaining($remaining);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+[%- END -%]
+
1;
__END__
From kawas at dev.open-bio.org Fri Oct 9 13:37:49 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:37:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091737.n99HbnUf013860@dev.open-bio.org>
kawas
Fri Oct 9 13:37:49 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv13825/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service.tt
Log Message:
updated the use statement IF block and fixed typo in update_percentage_event
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service.tt,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/09 17:32:39 1.7
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/09 17:37:49 1.8
@@ -206,7 +206,7 @@
@ISA = qw( [% base.module_name %] );
use MOSES::MOBY::Package;
use MOSES::MOBY::ServiceException;
-[%- IF is_async(base.category) -%]
+[% IF is_async(base.category) -%]
use MOBY::Async::LSAE;
[%- END %]
use strict;
@@ -431,7 +431,7 @@
my ( $self, $request, $percentage, $msg ) = @_;
$msg = '' unless defined $msg;
- $state = 1 unless defined $percentage;
+ $percentage = 1 unless defined $percentage;
# validate the state of the event ...
$percentage = 1 unless $percentage >= 0 and $percentage <=100;
From kawas at dev.open-bio.org Fri Oct 9 13:46:44 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:46:44 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091746.n99Hki1A013903@dev.open-bio.org>
kawas
Fri Oct 9 13:46:44 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv13868/MOSES-MOBY
Modified Files:
Changes
Log Message:
updated to reflect recent changes
moby-live/Perl/MOSES-MOBY Changes,1.19,1.20
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 15:39:21 1.19
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 17:46:44 1.20
@@ -14,6 +14,10 @@
to print out the LSAE event message if it
exists and if the script is running under
verbose settings.
+ - Bug fix: Central->_createServiceFromXML had
+ Category as category
+ - added some code to the service.tt that aides
+ in updating a services LSAE event states.
0.91
- Updated the Makefile.PL to handle some missing
dependencies.
From kawas at dev.open-bio.org Fri Oct 9 13:50:08 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:50:08 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091750.n99Ho8JF013943@dev.open-bio.org>
kawas
Fri Oct 9 13:50:08 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/share
In directory dev.open-bio.org:/tmp/cvs-serv13908/MOSES-MOBY/share
Modified Files:
USER_REGISTRIES
Log Message:
moby-live/Perl/MOSES-MOBY/share USER_REGISTRIES,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/USER_REGISTRIES,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/USER_REGISTRIES 2008/02/21 00:12:55 1.3
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/USER_REGISTRIES 2009/10/09 17:50:08 1.4
@@ -1,11 +1 @@
-%USER_REGISTRIES = (
-# iCAPTURE => {
-# endpoint => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl',
-# namespace => 'http://mobycentral.icapture.ubc.ca/MOBY/Central',
-# name => 'iCAPTURE Centre, Vancouver',
-# contact => 'Edward Kawas (edward.kawas at gmail.com)',
-# public => 'yes',
-# text => 'A curated public registry hosted at the iCAPTURE Centre, Vancouver',
-# },
-
- );
+%USER_REGISTRIES = ();
From kawas at dev.open-bio.org Tue Oct 13 11:28:36 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:28:36 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131528.n9DFSZMV004279@dev.open-bio.org>
kawas
Tue Oct 13 11:28:35 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES
In directory dev.open-bio.org:/tmp/cvs-serv4243/MOSES-MOBY/lib/MOSES
Modified Files:
MOBY.pm
Log Message:
added a little text to the pod name so that when users go to cpan, they know which module has the doc
moby-live/Perl/MOSES-MOBY/lib/MOSES MOBY.pm,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2009/04/08 22:40:11 1.10
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2009/10/13 15:28:35 1.11
@@ -22,7 +22,7 @@
=head1 NAME
-MOSES::MOBY - Perl extension for the automatic generation of BioMOBY web services
+MOSES::MOBY - Start here! Documentation for the Perl extension for the automatic generation of BioMOBY web services!
=head1 SYNOPSIS
From kawas at dev.open-bio.org Tue Oct 13 11:33:25 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:33:25 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131533.n9DFXOrv004319@dev.open-bio.org>
kawas
Tue Oct 13 11:33:24 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4284/MOSES-MOBY
Modified Files:
Changes
Log Message:
getting ready to create cpan release. added some notes for those that read these things
moby-live/Perl/MOSES-MOBY Changes,1.20,1.21
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 17:46:44 1.20
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/13 15:33:24 1.21
@@ -1,6 +1,17 @@
Revision history for Perl extension MOSES::MOBY.
-0.92
+0.92 Oct 13, 2009
+ *** Notes for this release ***
+ The service template has been updated.
+ The update mainly affects async service
+ implementations. The easiest thing to do
+ is to backup your async service
+ implementations and re-generate them.
+
+ Only do this if you had problems with
+ erratic service behaviour in the past!
+
+ Changes:
- Bug fix: Can't use string ("_createServiceFromXML had
Category as category
- added some code to the service.tt that aides
- in updating a services LSAE event states.
+ in updating a services LSAE event states.
+
0.91
- Updated the Makefile.PL to handle some missing
dependencies.
From kawas at dev.open-bio.org Tue Oct 13 11:38:10 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:38:10 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131538.n9DFcAZW004359@dev.open-bio.org>
kawas
Tue Oct 13 11:38:10 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4324/MOSES-MOBY
Modified Files:
Makefile.PL
Log Message:
added a no index directive for the templates/ directory so that the perldoc on cpan doesnt look messed up.
moby-live/Perl/MOSES-MOBY Makefile.PL,1.20,1.21
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/07 15:40:24 1.20
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/13 15:38:10 1.21
@@ -42,6 +42,7 @@
build_requires 'Test::More' => '0.42';
no_index 'directory' => 'bin/scripts';
+ no_index 'directory' => 'lib/MOSES/MOBY/Generators/templates';
install_script 'bin/scripts/moses-cache-tester.pl';
install_script 'bin/scripts/moses-config-status.pl';
From kawas at dev.open-bio.org Tue Oct 13 11:43:10 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:43:10 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131543.n9DFhA57004402@dev.open-bio.org>
kawas
Tue Oct 13 11:43:10 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv4367/MOSES-MOBY/lib/MOSES/MOBY/Generators
Modified Files:
Utils.pm
Log Message:
updated the perldoc (wasnt correct on cpan)
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Utils.pm,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2008/11/06 18:32:33 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2009/10/13 15:43:10 1.6
@@ -19,22 +19,16 @@
MOSES::MOBY::Utils - what does not fit elsewhere
-=cut
-
=head1 SYNOPSIS
# find a file located somewhere in @INC
use MOSES::MOBY::Generators::Utils;
my $file = MOSES::MOBY::Generators::Utils->find_file ('resource.file');
-
-=cut
=head1 DESCRIPTION
General purpose utilities.
-=cut
-
=head1 AUTHORS
Martin Senger (martin.senger [at] gmail [dot] com)
@@ -42,8 +36,6 @@
=head1 SUBROUTINES
-=cut
-
#-----------------------------------------------------------------
# find_file
#-----------------------------------------------------------------
@@ -87,4 +79,5 @@
}
1;
+
__END__
From kawas at dev.open-bio.org Tue Oct 13 12:08:11 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 12:08:11 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131608.n9DG8BUL004478@dev.open-bio.org>
kawas
Tue Oct 13 12:08:11 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4443/MOSES-MOBY/lib/MOSES/MOBY
Modified Files:
Config.pm
Log Message:
added perldoc for module.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Config.pm,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2008/04/29 19:45:01 1.4
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2009/10/13 16:08:11 1.5
@@ -26,9 +26,63 @@
$ENV_CONFIG_DIR = 'BIOMOBY_CFG_DIR';
}
+=head1 NAME
+
+MOSES::MOBY::Config - A hash based configuration module based on Config::Simple
+
+=head1 SYNOPSIS
+
+ # use config allong with the MOSES config file
+ use MOSES::MOBY::Config;
+
+ # use config along with my properties.file
+ use MOSES::MOBY::Config qw /'properties.file'/;
+
+ # print the successfully read config files
+ foreach my $file (MOSES::MOBY::Config->ok_files) {
+ print "\t$file - successfully processed\n";
+ }
+
+ # print a list of files that failed to load
+ my %failed = MOSES::MOBY::Config->failed_files;
+ if (keys %failed > 0) {
+ print "Failed configuration files:\n";
+ foreach my $file (sort keys %failed) {
+ my $msg = $failed{$file}; $msg =~ s/\n$//;
+ print "\t$file => $msg\n";
+ }
+ }
+
+ # print out the config params read thus far
+ print "All configuration parameters:\n";
+ foreach my $name (sort MOSES::MOBY::Config->param()) {
+ print "\t$name => " . MOSES::MOBY::Config->param ($name);
+ }
+
+=head1 DESCRIPTION
+
+A module for reading configuration files and maintaining configuration parameters
+
+=head1 AUTHORS
+
+ Martin Senger (martin.senger [at] gmail [dot] com)
+ Edward Kawas (edward.kawas [at] gmail [dot] com)
+
+=head1 SUBROUTINES
+
+=cut
+
# OO access; but there are no instance attributes - everything are
# class (shared) attributes
+=head2 new
+
+Instantiates a new MOSES::MOBY::Config reference. Mainly here for OO access.
+There are no instance attributes, only class attributes
+
+=cut
+
+
sub new {
my ($class, @args) = @_;
@@ -126,6 +180,13 @@
# return value of a configuration argument; or add a new argument
+=head2 param
+
+If called with no arguments, all of the possible config keys are returned.
+If called with a single argument, then that argument is assumed to be a key and the value for that key is returned.
+
+=cut
+
sub param {
shift;
@@ -146,6 +207,12 @@
# remove one, more, or all configuration arguments
+=head2 delete
+
+removes one or more of the configuration keys and their associated values.
+
+=cut
+
sub delete {
shift;
@@ -164,6 +231,15 @@
# this argument is passed to the Data::Dumper->Dump as the variable
# name)
+=head2 dump
+
+Returns a stringified version of all configuration parameters;
+
+If passed a scalar parameter, then the dump will be given that variable name.
+This dump can be eval{}'ed.
+
+=cut
+
sub dump {
shift;
my $varname = @_ ? shift : 'CONFIG';
@@ -189,6 +265,12 @@
# return a list of configuration files successfully read (so far)
+=head2 ok_files
+
+returns a list of the configuration files successfully read thus far ...
+
+=cut
+
sub ok_files {
return sort keys %Success;
}
@@ -196,11 +278,17 @@
# return a hash of configuration files un-successfully read (so far) -
# with corresponding error messages
+=head2 failed_files
+
+returns a hash of the configuration files unsuccessfully read thus far and their corresponding error messages.
+
+=cut
+
sub failed_files {
return %Unsuccess;
}
-
+=cut
1;
__END__
From kawas at dev.open-bio.org Tue Oct 13 12:42:20 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 12:42:20 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131642.n9DGgKHF004955@dev.open-bio.org>
kawas
Tue Oct 13 12:42:20 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4920/MOSES-MOBY/lib/MOSES/MOBY
Modified Files:
Config.pm
Log Message:
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Config.pm,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2009/10/13 16:08:11 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2009/10/13 16:42:20 1.6
@@ -288,7 +288,5 @@
return %Unsuccess;
}
-=cut
-
1;
__END__
From kawas at dev.open-bio.org Tue Oct 13 12:46:21 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 12:46:21 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131646.n9DGkLAI005016@dev.open-bio.org>
kawas
Tue Oct 13 12:46:21 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv4981/MOSES-MOBY/lib/MOSES/MOBY/Generators
Modified Files:
Utils.pm
Log Message:
fixed the perldoc ... doc created had errors in it.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Utils.pm,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2009/10/13 15:43:10 1.6
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2009/10/13 16:46:21 1.7
@@ -36,10 +36,6 @@
=head1 SUBROUTINES
-#-----------------------------------------------------------------
-# find_file
-#-----------------------------------------------------------------
-
=head2 find_file
Try to locate a file whose name is created from the C<$default_start>
@@ -55,6 +51,9 @@
my %full_path_of = ();
+#-----------------------------------------------------------------
+# find_file
+#-----------------------------------------------------------------
sub find_file {
my ($self, $default_start, @names) = @_;
my $fixed_part = File::Spec->catfile (@names);
From kawas at dev.open-bio.org Tue Oct 13 13:03:41 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 13:03:41 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131703.n9DH3f6V005208@dev.open-bio.org>
kawas
Tue Oct 13 13:03:41 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv5173/MOSES-MOBY
Modified Files:
README
Log Message:
moby-live/Perl/MOSES-MOBY README,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/README,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2008/05/09 20:54:31 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2009/10/13 17:03:41 1.6
@@ -1,4 +1,4 @@
-MOSES-MOBY version .85
+MOSES-MOBY version .92
======================
OVERVIEW
@@ -16,12 +16,22 @@
INSTALLATION
-To install this module type the following:
-
- perl Makefile.PL
- make
- make test
- make install
+ To install this module type the following:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+ To install this module on WinOS:
+
+ perl Makefile.PL
+ nmake
+ nmake test
+ nmake install
+
+ If you have any problems installing prerequisite modules,
+ you may find it easier to use ActiveStates ppm utility.
UPGRADING
From drepchevski at dev.open-bio.org Fri Oct 16 08:18:47 2009
From: drepchevski at dev.open-bio.org (Dmitry Repchevski)
Date: Fri, 16 Oct 2009 08:18:47 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910161218.n9GCIkJJ024102@dev.open-bio.org>
drepchevski
Fri Oct 16 08:18:46 EDT 2009
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv24067
Modified Files:
inb_moby_core.html
Log Message:
put the ontology generator applet inside
moby-live/Java/docs inb_moby_core.html,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/inb_moby_core.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/docs/inb_moby_core.html 2009/09/21 16:31:17 1.2
+++ /home/repository/moby/moby-live/Java/docs/inb_moby_core.html 2009/10/16 12:18:46 1.3
@@ -64,6 +64,7 @@
}
.code {
+ white-space: pre;
vertical-align: top;
color: #000099;
font-size: 10pt;
@@ -131,6 +132,50 @@
+
Generating JAXB-annotated ontology classes
+
+
+ Even MobyCore may work without generated ontology classes, they facilitate a development.
+ Generated classes are nothing more than JAXB annotated beans with properties.
+
+
+
+
+
+
+
+
+
+ Here is an example of generated datatype class:
+
+
+
+ at XmlRootElement(name="WeightedAminoAcidSequences")
+ at XmlType(name="WeightedAminoAcidSequences")
+public class WeightedAminoAcidSequences extends AminoAcidSequence implements Serializable {
+ public List<? extends AminoAcidSequence> getAminoAcidSequence() {
+ return getAttributes("AminoAcidSequence");
+ }
+
+ public void addAminoAcidSequence(AminoAcidSequence aminoAcidSequence) {
+ putAttribute("AminoAcidSequence", aminoAcidSequence);
+ }
+
+ public WeightedObject getWeightedObject() {
+ return getAttribute("WeightedObject");
+ }
+
+ public void setWeightedObject(WeightedObject weightedObject) {
+ putAttribute("WeightedObject", weightedObject);
+ }
+}
+
+
+
+
+
Executing synchronous BioMoby services
@@ -138,12 +183,10 @@
This is done by creating a MobyMessage object:
-
MobyObject object = new MobyObject("P00807", "UniProt");
MobySimple simple = new MobySimple(object, "id");
MobyData data = new MobyData(simple, "sip_1");
MobyMessage request = new MobyMessage(data);
-
@@ -163,10 +206,8 @@
Now we can create a MobyDispatch object and execute a service.
-
MobyDispatch dispatch = new MobyDispatch(service);
MobyMessage response = dispatch.invoke(request);
-
@@ -181,9 +222,7 @@
not have AminoAcidSequence class generated. In this case we would have a AnyMobyObject instead of unknown to us AminoAcidSequence.
@@ -192,7 +231,6 @@
MobySimple may contain either a primitive type or a complex one, so we have to check. Here is a simple method that traverse a given element:
@@ -219,11 +256,9 @@
AnyMobyObject can also be used to setup a datatype dynamically.
-
AnyMobyObject any = new AnyMobyObject("AminoAcidSequece");
any.putAttribute("SequenceString", new MobyString("ATCG"));
any.putAttribute("Length", new MobyInteger(4));
-
@@ -235,7 +270,6 @@
Here is an example of parsing a MobyMessage response:
-
MobyMessage response = dispatch.invoke(request);
if (response.hasExceptions())
@@ -256,7 +290,7 @@
for (MobyDataElement element : elements)
{
- if (element instanceof Mobysimple)
+ if (element instanceof MobySimple)
{
MobySimple simple = (MobySimple)element;
AbstractMobyObject object = simple.getObject();
@@ -292,8 +326,7 @@
throw new Exception(); // expected MobySimple
}
}
-}
-
+}
@@ -306,7 +339,6 @@
The rest of the things are pretty the same as for synchronous invocation:
@@ -334,7 +365,6 @@
The result object is an WSRF resource through which we can poll to check our execution status:
-
while(true)
{
AnalysisEvent lsae = wsrf.getResourcePropertyStatus("sip_1");
@@ -362,7 +392,6 @@
// actually must be an error...
break;
}
-
From kawas at dev.open-bio.org Fri Oct 16 10:13:39 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 16 Oct 2009 10:13:39 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910161413.n9GEDd0V024490@dev.open-bio.org>
kawas
Fri Oct 16 10:13:39 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv24454/MOSES-MOBY/bin/scripts
Modified Files:
moses-testing-service.pl
Log Message:
bug fix: when polling a cgi-async service with > 1 job, only the first job is polled for and when it is complete both are assumed to be complete
moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.12,1.13
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/09 15:31:00 1.12
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/16 14:13:39 1.13
@@ -341,9 +341,12 @@
my $xml = $response->content();
my $parser = XML::LibXML->new();
my $doc = $parser->parse_string($xml);
- $doc = $doc->documentElement()->firstChild()->firstChild();
-
- my $status = LSAE::AnalysisEventBlock->new( $doc->toString );
+ my $xpath = "//*[\@*='$queryID']";
+ my $xpc = XML::LibXML::XPathContext->new();
+ my $nodes = $xpc->findnodes( $xpath, $doc->documentElement );
+ # should only be one ...
+ die unless $nodes->size() == 1;
+ my $status = LSAE::AnalysisEventBlock->new( $nodes->get_node(1)->toString() );
&_check_status( $status, \%completed, $queryID, $opt_v );
}
last if scalar keys(%completed) == $#query_ids + 1;
From kawas at dev.open-bio.org Fri Oct 16 11:51:45 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 16 Oct 2009 11:51:45 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910161551.n9GFpjdv024715@dev.open-bio.org>
kawas
Fri Oct 16 11:51:45 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv24672/MOSES-MOBY
Modified Files:
META.yml Changes Makefile.PL
Log Message:
updated Changes to reflect the current state of the module. Updated the makefile and META to provide a new version for MOSES (for down the road when i create a cpan update)
moby-live/Perl/MOSES-MOBY META.yml,1.8,1.9 Changes,1.21,1.22 Makefile.PL,1.21,1.22
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml 2009/04/20 14:32:26 1.8
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml 2009/10/16 15:51:45 1.9
@@ -39,5 +39,5 @@
Want: 0.18
WSRF::Lite: 0.8.2.5
XML::LibXML: 1.62
-version: 0.90
+version: 0.93
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/13 15:33:24 1.21
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/16 15:51:45 1.22
@@ -1,5 +1,16 @@
Revision history for Perl extension MOSES::MOBY.
+0.93
+
+ Changes:
+ - Bug fix: moses-testing-service.pl when
+ polling async services, didn't actually
+ poll correctly if you had multiple query
+ IDs for a single service invocation ID.
+ The first queryID was polled and when
+ it completed, the script assumed all of
+ the invocations were completed.
+
0.92 Oct 13, 2009
*** Notes for this release ***
The service template has been updated.
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/13 15:38:10 1.21
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/16 15:51:45 1.22
@@ -6,7 +6,7 @@
# Define metadata
name 'MOSES-MOBY';
- version '0.92';
+ version '0.93';
license 'perl';
abstract
'This distribution aids in the creation of BioMOBY perl based web services.';
From kawas at dev.open-bio.org Fri Oct 16 13:43:09 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 16 Oct 2009 13:43:09 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910161743.n9GHh9Cl025091@dev.open-bio.org>
kawas
Fri Oct 16 13:43:09 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv25056/MOSES-MOBY/bin/scripts
Modified Files:
moses-testing-service.pl
Log Message:
moses-testing-service.pl - async cgi service portion:
* Moved the POST request out of the foreach
$queryID loop.
* Added the name of the element "analysis_event"
to $xpath.
* Moved the sleep(20) out of the &_check_status
sub.
* Added a diagnostic message for the die
statement when we cant find our event id.
* Moved some messages for "verbose" info in
&_check_status, so the script always reports
the job status whether a job has completed
or not.
* I also added $queryID to the verbose messaging
so the script reports which job that status
message corresponded to...
(thx to Pieter Neerincx for patience, code and suggestions)
moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/16 14:13:39 1.13
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/16 17:43:09 1.14
@@ -130,9 +130,7 @@
or die "$@\n";
eval "use MOBY::Async::WSRF; 1;"
or die "$@\n";
-
}
-
use strict;
sub _empty_input {
@@ -149,17 +147,22 @@
sub _check_status {
my ( $status, $completed, $queryID, $opt_v ) = @_;
if ( $status->type == LSAE_PERCENT_PROGRESS_EVENT ) {
+ print "Current percentage for job $queryID: ", $status->percentage, "\n"
+ if $opt_v;
if ( $status->percentage >= 100 ) {
$completed->{$queryID} = 1;
} elsif ( $status->percentage < 100 ) {
- print "Current percentage: ", $status->percentage, "\n" if $opt_v;
- print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
- sleep(20);
+ print "\tmsg: ",
+ ( $status->message ? $status->message : "no message found ..." ), "\n"
+ if $opt_v;
+
+ #sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
}
-
} elsif ( $status->type == LSAE_STATE_CHANGED_EVENT ) {
+ print "Current state for job $queryID: ", $status->new_state, "\n"
+ if $opt_v;
if ( ( $status->new_state =~ m"completed"i )
|| ( $status->new_state =~ m"terminated_by_request"i )
|| ( $status->new_state =~ m"terminated_by_error"i ) )
@@ -168,36 +171,45 @@
} elsif ( ( $status->new_state =~ m"created"i )
|| ( $status->new_state =~ m"running"i ) )
{
- print "Current State: ", $status->new_state, "\n" if $opt_v;
- print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
- sleep(20);
+ print "\tmsg: ",
+ ( $status->message ? $status->message : "no message found ..." ), "\n"
+ if $opt_v;
+
+ #sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
}
-
} elsif ( $status->type == LSAE_STEP_PROGRESS_EVENT ) {
+ print "Steps completed for job $queryID: ", $status - > steps_completed, "\n"
+ if $opt_v;
if ( $status->steps_completed >= $status->total_steps ) {
$completed->{$queryID} = 1;
} elsif ( $status->steps_completed < $status->total_steps ) {
- print "Steps completed: ", $status->steps_completed, "\n" if $opt_v;
- print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
- sleep(20);
+ print "\tmsg: ",
+ ( $status->message ? $status->message : "no message found ..." ), "\n"
+ if $opt_v;
+
+ #sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
}
-
} elsif ( $status->type == LSAE_TIME_PROGRESS_EVENT ) {
+ print "Time remaining for job $queryID: ", $status->remaining, "\n"
+ if $opt_v;
if ( $status->remaining == 0 ) {
$completed->{$queryID} = 1;
} elsif ( $status->remaining > 0 ) {
- print "Time remaining: ", $status->remaining, "\n" if $opt_v;
- print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
- sleep(20);
+ print "\tmsg: ",
+ ( $status->message ? $status->message : "no message found ..." ), "\n"
+ if $opt_v;
+
+ #sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
}
} else {
- warn "Whilst checking the status of our resource, we entered into a possible infinite loop ...\n";
+ warn
+"Whilst checking the status of our resource, we entered into a possible infinite loop ...\n";
}
}
@@ -238,7 +250,6 @@
die $msg;
}
);
-
my $input = '';
if ( @ARGV > 0 ) {
my $data = shift; # a file name
@@ -249,14 +260,11 @@
} else {
$input = _empty_input;
}
-
print $soap ->$service( SOAP::Data->type( 'string' => "$input" ) )->result;
-
} elsif ($opt_c) {
# calling a real service, using cgi
- my $ua = LWP::UserAgent->new;
-
+ my $ua = LWP::UserAgent->new;
my $input = '';
if ( @ARGV > 0 ) {
my $data = shift; # a file name
@@ -267,14 +275,11 @@
} else {
$input = _empty_input;
}
-
my $req = HTTP::Request->new( POST => $opt_c );
$req->content_type('application/x-www-form-urlencoded');
$req->content("data=$input");
print "\n" . $ua->request($req)->as_string . "\n";
-
} elsif ($opt_C) {
-
my $input = '';
if ( @ARGV > 0 ) {
my $data = shift; # a file name
@@ -289,7 +294,6 @@
# extract all of the query ids from $input
my @query_ids = _get_query_ids($input);
my %completed = ();
-
print "Sending the following data to $opt_C\n$input\n";
# post to the web service
@@ -304,7 +308,6 @@
# do we have an error?
die "Error calling service: " . $response->status_line
if ( $response->code != 200 );
-
my $epr = $response->header("moby-wsrf");
my $parser = XML::LibXML->new();
my $doc = $parser->parse_string($epr);
@@ -327,261 +330,267 @@
# poll
while (1) {
+
+#
+# Poll the service for the status of all query IDs associated with this service invocation.
+#
+ $req = HTTP::Request->new( POST => $opt_C . "/status" );
+ $req->header( "moby-wsrf" => $header );
+ $req->content_type('application/x-www-form-urlencoded');
+ $req->content("data=$searchTerm");
+ $response = $ua->request($req);
+ my $xml = $response->content();
+ my $parser = XML::LibXML->new();
+ my $doc = $parser->parse_string($xml);
+
foreach my $queryID (@query_ids) {
# skip poll if current job completed
next if $completed{$queryID};
- # poll the service for given query ID
- $req = HTTP::Request->new( POST => $opt_C . "/status" );
- $req->header( "moby-wsrf" => $header );
- $req->content_type('application/x-www-form-urlencoded');
- $req->content("data=$searchTerm");
- $response = $ua->request($req);
- my $xml = $response->content();
- my $parser = XML::LibXML->new();
- my $doc = $parser->parse_string($xml);
- my $xpath = "//*[\@*='$queryID']";
- my $xpc = XML::LibXML::XPathContext->new();
- my $nodes = $xpc->findnodes( $xpath, $doc->documentElement );
- # should only be one ...
- die unless $nodes->size() == 1;
- my $status = LSAE::AnalysisEventBlock->new( $nodes->get_node(1)->toString() );
+ #
+ # Find status of this query ID.
+ #
+ #my $xpath = "//*[local-name() = 'analysis_event'][\@id='$queryID']";
+ #my $xpath = "//analysis_event[\@id='$queryID']";
+ $xpath = "//*[local-name() = 'analysis_event'][\@*='$queryId']";
+ my $xpc = XML::LibXML::XPathContext->new();
+ my $nodes = $xpc->findnodes( $xpath, $doc->documentElement );
+
+ # should only be one ...
+ die
+"Service returned unexpected/malformed resource property XML, which should contain service status info."
+ unless $nodes->size() == 1;
+ my $status =
+ LSAE::AnalysisEventBlock->new( $nodes->get_node(1)->toString() );
&_check_status( $status, \%completed, $queryID, $opt_v );
}
last if scalar keys(%completed) == $#query_ids + 1;
+ my $interval = 20;
+ print "Checking job state again in $interval seconds.\n\n" if $opt_v;
+ sleep($interval);
}
+ last if scalar keys(%completed) == $#query_ids + 1;
+}
- # task is finished, obtain the result
- $searchTerm = "";
- $searchTerm .=
+# task is finished, obtain the result
+$searchTerm = "";
+$searchTerm .=
"";
- foreach my $queryID (@query_ids) {
- $searchTerm .=
- "mobyws:result_"
- . $queryID
- . "";
- }
- $searchTerm .= "";
-
- $header = _moby_wsrf_header( $opt_C, $ID );
- $header =~ s/\n//gi;
-
- $req = HTTP::Request->new( POST => $opt_C . "/results" );
- $req->header( "moby-wsrf" => $header );
- $req->content_type('application/x-www-form-urlencoded');
- $req->content("data=$searchTerm");
- $response = $ua->request($req);
-
- # create nicely formatted XML
- $parser = XML::LibXML->new();
- $doc = $parser->parse_string( $response->content );
- print "\n" . $doc->toString(1);
-
- # destroy the job
- $searchTerm = ' ';
- $req = HTTP::Request->new( POST => $opt_C . "/destroy" );
- $req->header( "moby-wsrf" => $header );
- $req->content_type('application/x-www-form-urlencoded');
- $req->content("data=$searchTerm");
- $response = $ua->request($req);
- print "Destroying the resource returned:\n\t" . $response->content . "\n" if $opt_v;
-
-} elsif ($opt_a) {
-
- # calling a real service, using async soap
- # call using async mode for async service ... _submit
- $service .= "_submit";
-
- # set up the wsrf call
- my $soap = WSRF::Lite->proxy($opt_a)->uri($WSRF::Constants::MOBY)->on_fault(
- sub {
- my $soap = shift;
- my $res = shift;
- my $msg =
- ref $res
- ? "--- SOAP FAULT ---\n" . $res->faultcode . " " . $res->faultstring
- : "--- TRANSPORT ERROR ---\n" . $soap->transport->status . "\n$res\n";
- die $msg;
- }
- );
-
- # get the input
- my $input = '';
- if ( @ARGV > 0 ) {
- my $data = shift; # a file name
- open INPUT, "<$data"
- or die "Cannot read '$data': $!\n";
- while () { $input .= $_; }
- close INPUT;
- } else {
- $input = _empty_input;
- }
-
- # extract all of the query ids from $input
- my @query_ids = _get_query_ids($input);
- print "\nSending the following data to $service asynchronously:\n", $input, "\n"
- if $opt_v;
-
- # submit the job
- my $epr = ( $soap->$service( SOAP::Data->type( 'string' => "$input" ) )->result );
-
- # Get address from the returned Endpoint Reference
- my $address = $epr->{'EndpointReference'}->{Address};
-
- # Get resource identifier from the returned Endpoint Reference
- my $identifier =
- $epr->{'EndpointReference'}->{ReferenceParameters}->{ServiceInvocationId};
-
- # Compose the Endpoint Reference
- my $EPR = WSRF::WS_Address->new();
- $EPR->Address($address);
- $EPR->ReferenceParameters( ''
- . $identifier
- . '' );
- my %completed = ();
- while (1) {
- foreach my $queryID (@query_ids) {
-
- # skip poll if current job completed
- next if $completed{$queryID};
+foreach my $queryID (@query_ids) {
+ $searchTerm .=
+ "mobyws:result_"
+ . $queryID
+ . "";
+}
+$searchTerm .= "";
+$header = _moby_wsrf_header( $opt_C, $ID );
+$header =~ s/\n//gi;
+$req = HTTP::Request->new( POST => $opt_C . "/results" );
+$req->header( "moby-wsrf" => $header );
+$req->content_type('application/x-www-form-urlencoded');
+$req->content("data=$searchTerm");
+$response = $ua->request($req);
+
+# create nicely formatted XML
+$parser = XML::LibXML->new();
+$doc = $parser->parse_string( $response->content );
+print "\n" . $doc->toString(1);
+
+# destroy the job
+$searchTerm = ' ';
+$req = HTTP::Request->new( POST => $opt_C . "/destroy" );
+$req->header( "moby-wsrf" => $header );
+$req->content_type('application/x-www-form-urlencoded');
+$req->content("data=$searchTerm");
+$response = $ua->request($req);
+print "Destroying the resource returned:\n\t" . $response->content . "\n" if $opt_v;
+}
+elsif ($opt_a) {
- # poll the service for given query ID
- my $searchTerm = "";
- $searchTerm .=
+ # calling a real service, using async soap
+ # call using async mode for async service ... _submit
+ $service .= "_submit";
+
+ # set up the wsrf call
+ my $soap = WSRF::Lite->proxy($opt_a)->uri($WSRF::Constants::MOBY)->on_fault(
+ sub {
+ my $soap = shift;
+ my $res = shift;
+ my $msg =
+ ref $res
+ ? "--- SOAP FAULT ---\n" . $res->faultcode . " " . $res->faultstring
+ : "--- TRANSPORT ERROR ---\n" . $soap->transport->status . "\n$res\n";
+ die $msg;
+ }
+ );
+
+ # get the input
+ my $input = '';
+ if ( @ARGV > 0 ) {
+ my $data = shift; # a file name
+ open INPUT, "<$data"
+ or die "Cannot read '$data': $!\n";
+ while () { $input .= $_; }
+ close INPUT;
+ } else {
+ $input = _empty_input;
+ }
+
+ # extract all of the query ids from $input
+ my @query_ids = _get_query_ids($input);
+ print "\nSending the following data to $service asynchronously:\n", $input, "\n"
+ if $opt_v;
+
+ # submit the job
+ my $epr = ( $soap->$service( SOAP::Data->type( 'string' => "$input" ) )->result );
+
+ # Get address from the returned Endpoint Reference
+ my $address = $epr->{'EndpointReference'}->{Address};
+
+ # Get resource identifier from the returned Endpoint Reference
+ my $identifier =
+ $epr->{'EndpointReference'}->{ReferenceParameters}->{ServiceInvocationId};
+
+ # Compose the Endpoint Reference
+ my $EPR = WSRF::WS_Address->new();
+ $EPR->Address($address);
+ $EPR->ReferenceParameters( ''
+ . $identifier
+ . '' );
+ my %completed = ();
+ while (1) {
+ foreach my $queryID (@query_ids) {
+
+ # skip poll if current job completed
+ next if $completed{$queryID};
+
+ # poll the service for given query ID
+ my $searchTerm = "";
+ $searchTerm .=
"";
- $searchTerm .= "mobyws:status_" . $queryID;
- $searchTerm .= "";
-
- $soap = WSRF::Lite->uri($WSRF::Constants::WSRP)->on_action(
- sub {
- sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW, $_[1], $_[1];
- }
- )->wsaddress($EPR)
- ->GetMultipleResourceProperties(
+ $searchTerm .= "mobyws:status_" . $queryID;
+ $searchTerm .= "";
+ $soap = WSRF::Lite->uri($WSRF::Constants::WSRP)->on_action(
+ sub {
+ sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW, $_[1], $_[1];
+ }
+ )->wsaddress($EPR)
+ ->GetMultipleResourceProperties(
SOAP::Data->value($searchTerm)->type('xml') );
+ my $parser = XML::LibXML->new();
+ my $xml = $soap->raw_xml;
+ my $doc = $parser->parse_string($xml);
+ $soap = $doc->getDocumentElement();
+ my $prop_name = "status_" . $queryID;
+ my ($prop) =
+ $soap->getElementsByTagNameNS( $WSRF::Constants::MOBY, $prop_name )
+ || $soap->getElementsByTagName($prop_name);
+ my $event = $prop->getFirstChild->toString
+ unless ref $prop eq "XML::LibXML::NodeList";
+ $event = $prop->pop()->getFirstChild->toString
+ if ref $prop eq "XML::LibXML::NodeList";
+ my $status = LSAE::AnalysisEventBlock->new($event);
+
+ if ( $status->type == LSAE_PERCENT_PROGRESS_EVENT ) {
+ if ( $status->percentage >= 100 ) {
+ $completed{$queryID} = 1;
+ } elsif ( $status->percentage < 100 ) {
+ print "Current percentage: ", $status->percentage, "\n" if $opt_v;
+ sleep(20);
+ } else {
+ die "ERROR: analysis event block not well formed.\n";
+ }
+ } elsif ( $status->type == LSAE_STATE_CHANGED_EVENT ) {
+ if ( ( $status->new_state =~ m"completed"i )
+ || ( $status->new_state =~ m"terminated_by_request"i )
+ || ( $status->new_state =~ m"terminated_by_error"i ) )
+ {
+ $completed{$queryID} = 1;
+ } elsif ( ( $status->new_state =~ m"created"i )
+ || ( $status->new_state =~ m"running"i ) )
+ {
+ print "Current State: ", $status->new_state, "\n" if $opt_v;
+ sleep(20);
+ } else {
+ die "ERROR: analysis event block not well formed.\n";
+ }
+ } elsif ( $status->type == LSAE_STEP_PROGRESS_EVENT ) {
+ if ( $status->steps_completed >= $status->total_steps ) {
+ $completed{$queryID} = 1;
+ } elsif ( $status->steps_completed < $status->total_steps ) {
+ print "Steps completed: ", $status->steps_completed, "\n" if $opt_v;
+ sleep(20);
+ } else {
+ die "ERROR: analysis event block not well formed.\n";
+ }
+ } elsif ( $status->type == LSAE_TIME_PROGRESS_EVENT ) {
+ if ( $status->remaining == 0 ) {
+ $completed{$queryID} = 1;
+ } elsif ( $status->remaining > 0 ) {
+ print "Time remaining: ", $status->remaining, "\n" if $opt_v;
+ sleep(20);
+ } else {
+ die "ERROR: analysis event block not well formed.\n";
+ }
+ }
+ }
+ last if scalar keys(%completed) == $#query_ids + 1;
+ }
+ foreach my $queryID (@query_ids) {
- my $parser = XML::LibXML->new();
- my $xml = $soap->raw_xml;
- my $doc = $parser->parse_string($xml);
- $soap = $doc->getDocumentElement();
- my $prop_name = "status_" . $queryID;
-
- my ($prop) =
- $soap->getElementsByTagNameNS( $WSRF::Constants::MOBY, $prop_name )
- || $soap->getElementsByTagName($prop_name);
- my $event = $prop->getFirstChild->toString
- unless ref $prop eq "XML::LibXML::NodeList";
- $event = $prop->pop()->getFirstChild->toString
- if ref $prop eq "XML::LibXML::NodeList";
-
- my $status = LSAE::AnalysisEventBlock->new($event);
- if ( $status->type == LSAE_PERCENT_PROGRESS_EVENT ) {
- if ( $status->percentage >= 100 ) {
- $completed{$queryID} = 1;
- } elsif ( $status->percentage < 100 ) {
- print "Current percentage: ", $status->percentage, "\n" if $opt_v;
- sleep(20);
- } else {
- die "ERROR: analysis event block not well formed.\n";
- }
-
- } elsif ( $status->type == LSAE_STATE_CHANGED_EVENT ) {
- if ( ( $status->new_state =~ m"completed"i )
- || ( $status->new_state =~ m"terminated_by_request"i )
- || ( $status->new_state =~ m"terminated_by_error"i ) )
- {
- $completed{$queryID} = 1;
- } elsif ( ( $status->new_state =~ m"created"i )
- || ( $status->new_state =~ m"running"i ) )
- {
- print "Current State: ", $status->new_state, "\n" if $opt_v;
- sleep(20);
- } else {
- die "ERROR: analysis event block not well formed.\n";
- }
-
- } elsif ( $status->type == LSAE_STEP_PROGRESS_EVENT ) {
- if ( $status->steps_completed >= $status->total_steps ) {
- $completed{$queryID} = 1;
- } elsif ( $status->steps_completed < $status->total_steps ) {
- print "Steps completed: ", $status->steps_completed, "\n" if $opt_v;
- sleep(20);
- } else {
- die "ERROR: analysis event block not well formed.\n";
- }
-
- } elsif ( $status->type == LSAE_TIME_PROGRESS_EVENT ) {
- if ( $status->remaining == 0 ) {
- $completed{$queryID} = 1;
- } elsif ( $status->remaining > 0 ) {
- print "Time remaining: ", $status->remaining, "\n" if $opt_v;
- sleep(20);
- } else {
- die "ERROR: analysis event block not well formed.\n";
- }
- }
- }
- last if scalar keys(%completed) == $#query_ids + 1;
- }
-
- foreach my $queryID (@query_ids) {
-
- # get the result
- my $searchTerm .=
+ # get the result
+ my $searchTerm .=
"";
- $searchTerm .= "mobyws:result_" . $queryID;
- $searchTerm .= "";
- my $ans = WSRF::Lite->uri($WSRF::Constants::WSRP)->on_action(
- sub {
- sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW, $_[1], $_[1];
- }
- )->wsaddress($EPR)
- ->GetMultipleResourceProperties(
- SOAP::Data->value($searchTerm)->type('xml') );
- die "ERROR: " . $ans->faultstring if ( $ans->fault );
-
- my $parser = XML::LibXML->new();
- my $xml = $ans->raw_xml;
- my $doc = $parser->parse_string($xml);
- $soap = $doc->getDocumentElement();
- my $prop_name = "result_" . $queryID;
- my ($prop) = $soap->getElementsByTagNameNS( $WSRF::Constants::MOBY, $prop_name )
- || $soap->getElementsByTagName($prop_name);
- my $result = $prop->getFirstChild->toString
- unless ref $prop eq "XML::LibXML::NodeList";
- $result = $prop->pop()->getFirstChild->toString
- if ref $prop eq "XML::LibXML::NodeList";
- print $result;
- }
-
- # destroy the result
- my $ans = WSRF::Lite->uri($WSRF::Constants::WSRL)->on_action(
- sub {
- sprintf '%s/ImmediateResourceTermination/%sRequest',
- $WSRF::Constants::WSRLW, $_[1];
- }
- )->wsaddress($EPR)->Destroy();
-
+ $searchTerm .= "mobyws:result_" . $queryID;
+ $searchTerm .= "";
+ my $ans = WSRF::Lite->uri($WSRF::Constants::WSRP)->on_action(
+ sub {
+ sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW, $_[1], $_[1];
+ }
+ )->wsaddress($EPR)
+ ->GetMultipleResourceProperties( SOAP::Data->value($searchTerm)->type('xml') );
+ die "ERROR: " . $ans->faultstring if ( $ans->fault );
+ my $parser = XML::LibXML->new();
+ my $xml = $ans->raw_xml;
+ my $doc = $parser->parse_string($xml);
+ $soap = $doc->getDocumentElement();
+ my $prop_name = "result_" . $queryID;
+ my ($prop) = $soap->getElementsByTagNameNS( $WSRF::Constants::MOBY, $prop_name )
+ || $soap->getElementsByTagName($prop_name);
+ my $result = $prop->getFirstChild->toString
+ unless ref $prop eq "XML::LibXML::NodeList";
+ $result = $prop->pop()->getFirstChild->toString
+ if ref $prop eq "XML::LibXML::NodeList";
+ print $result;
+ }
+
+ # destroy the result
+ my $ans = WSRF::Lite->uri($WSRF::Constants::WSRL)->on_action(
+ sub {
+ sprintf '%s/ImmediateResourceTermination/%sRequest',
+ $WSRF::Constants::WSRLW, $_[1];
+ }
+ )->wsaddress($EPR)->Destroy();
} else {
- # calling a local service module, without SOAP
- my $data;
- if ( @ARGV > 0 ) {
- $data = shift; # a file name
- } else {
- use File::Temp qw( tempfile );
- my $fh;
- ( $fh, $data ) = tempfile( UNLINK => 1 );
- print $fh _empty_input();
- close $fh;
- }
- eval "require $module" or croak $@;
- eval {
- my $target = new $module;
- print $target->$service($data), "\n";
- } or croak $@;
+ # calling a local service module, without SOAP
+ my $data;
+ if ( @ARGV > 0 ) {
+ $data = shift; # a file name
+ } else {
+ use File::Temp qw( tempfile );
+ my $fh;
+ ( $fh, $data ) = tempfile( UNLINK => 1 );
+ print $fh _empty_input();
+ close $fh;
+ }
+ eval "require $module" or croak $@;
+ eval {
+ my $target = new $module;
+ print $target->$service($data), "\n";
+ } or croak $@;
}
sub _moby_wsrf_header {
From kawas at dev.open-bio.org Fri Oct 16 13:43:30 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 16 Oct 2009 13:43:30 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910161743.n9GHhUth025131@dev.open-bio.org>
kawas
Fri Oct 16 13:43:30 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv25096/MOSES-MOBY
Modified Files:
Changes
Log Message:
updated to reflect recent commits
moby-live/Perl/MOSES-MOBY Changes,1.22,1.23
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/16 15:51:45 1.22
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/16 17:43:30 1.23
@@ -10,6 +10,23 @@
The first queryID was polled and when
it completed, the script assumed all of
the invocations were completed.
+ - moses-testing-service.pl (thx to Pieter Neerincx)
+ * Moved the POST request out of the foreach
+ $queryID loop.
+ * Added the name of the element "analysis_event"
+ to $xpath.
+ * Moved the sleep(20) out of the &_check_status
+ sub.
+ * Added a diagnostic message for the die
+ statement when we cant find our event id.
+ * Moved some messages for "verbose" info in
+ &_check_status, so the script always reports
+ the job status whether a job has completed
+ or not.
+ * I also added $queryID to the verbose messaging
+ so the script reports which job that status
+ message corresponded to...
+
0.92 Oct 13, 2009
*** Notes for this release ***
From kawas at dev.open-bio.org Fri Oct 16 13:44:23 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 16 Oct 2009 13:44:23 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910161744.n9GHiNDD025171@dev.open-bio.org>
kawas
Fri Oct 16 13:44:23 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/share
In directory dev.open-bio.org:/tmp/cvs-serv25136/MOSES-MOBY/share
Modified Files:
notes
Log Message:
updated some of the paths in case other care to use these notes.
moby-live/Perl/MOSES-MOBY/share notes,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/notes,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/notes 2008/02/21 00:12:55 1.3
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/notes 2009/10/16 17:44:23 1.4
@@ -1,9 +1,9 @@
Perl documentation:
===================
-pod2man MOBY/Datatypes/MobyObject.pm | nroff -man | less
+pod2man lib/MOSES/MOBY/Data/Object.pm | nroff -man | less
---
-pods2html --index='Perl MoSeS Documentation' /home/senger/jMoby/src/Perl/ /home/senger/jMoby/src/perldoc/
+pods2html --index='Perl MoSeS Documentation' ~/moby-live/Perl/MOSES-MOBY/lib ~/moby-live/Perl/MOSES-MOBY/perldoc/
---
http://search.cpan.org/~iwalz/Pod2html/lib/Pod/2/html.pm
----
From kawas at dev.open-bio.org Fri Oct 23 14:02:15 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 23 Oct 2009 14:02:15 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910231802.n9NI2EuC003965@dev.open-bio.org>
kawas
Fri Oct 23 14:02:14 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv3929/MOSES-MOBY/bin/scripts
Modified Files:
moses-testing-service.pl
Log Message:
missing a my in front of $xpath ... doh!
moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.14,1.15
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/16 17:43:09 1.14
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/23 18:02:14 1.15
@@ -353,7 +353,7 @@
#
#my $xpath = "//*[local-name() = 'analysis_event'][\@id='$queryID']";
#my $xpath = "//analysis_event[\@id='$queryID']";
- $xpath = "//*[local-name() = 'analysis_event'][\@*='$queryId']";
+ my $xpath = "//*[local-name() = 'analysis_event'][\@*='$queryId']";
my $xpc = XML::LibXML::XPathContext->new();
my $nodes = $xpc->findnodes( $xpath, $doc->documentElement );
From kawas at dev.open-bio.org Fri Oct 23 14:49:31 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 23 Oct 2009 14:49:31 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910231849.n9NInVZw004150@dev.open-bio.org>
kawas
Fri Oct 23 14:49:31 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4111/MOSES-MOBY
Modified Files:
Changes Makefile.PL
Log Message:
not happy about type in testing service script, so releasing new cpan release.
moby-live/Perl/MOSES-MOBY Changes,1.23,1.24 Makefile.PL,1.22,1.23
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/16 17:43:30 1.23
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/23 18:49:31 1.24
@@ -1,5 +1,9 @@
Revision history for Perl extension MOSES::MOBY.
+0.94
+ Fix to moses-testing-service.pl script. typo
+ found in script.
+
0.93
Changes:
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/16 15:51:45 1.22
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/23 18:49:31 1.23
@@ -6,7 +6,7 @@
# Define metadata
name 'MOSES-MOBY';
- version '0.93';
+ version '0.94';
license 'perl';
abstract
'This distribution aids in the creation of BioMOBY perl based web services.';
From drepchevski at dev.open-bio.org Mon Oct 26 08:23:08 2009
From: drepchevski at dev.open-bio.org (Dmitry Repchevski)
Date: Mon, 26 Oct 2009 08:23:08 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910261223.n9QCN8TF020815@dev.open-bio.org>
drepchevski
Mon Oct 26 08:23:07 EDT 2009
Update of /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/shared/registry
In directory dev.open-bio.org:/tmp/cvs-serv20780
Modified Files:
ObjectType.java
Log Message:
Added an auxiliary method to get a relationship list by type
moby-live/Java/src/main/org/inb/biomoby/shared/registry ObjectType.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/shared/registry/ObjectType.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/inb/biomoby/shared/registry/ObjectType.java 2009/09/09 19:47:49 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/inb/biomoby/shared/registry/ObjectType.java 2009/10/26 12:23:07 1.2
@@ -55,6 +55,25 @@
getRelationships().add(relationship);
}
+ /**
+ * Auxiliary method to find relationship by its type
+ *
+ * @param relationshipType a type of relationship to be found
+ * @return found relationship object or null
+ */
+ public Relationship getRelationship(Relationship.RELATIONSHIP_TYPE relationshipType)
+ {
+ for (Relationship relationship : getRelationships())
+ {
+ if (relationship.getRelationshipType() == relationshipType)
+ {
+ return relationship;
+ }
+ }
+
+ return null;
+ }
+
@XmlElement(name="relationship")
public List> getRelationships()
{
From kawas at dev.open-bio.org Mon Oct 26 12:06:00 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 26 Oct 2009 12:06:00 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910261606.n9QG60k9030142@dev.open-bio.org>
kawas
Mon Oct 26 12:06:00 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv30106/MOSES-MOBY/bin/scripts
Modified Files:
moses-testing-service.pl
Log Message:
xpath statement for analysis_event has been changed once again, but should stay like this for a while. This one seems to be the most correct for testing moses services.
moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.15,1.16
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/23 18:02:14 1.15
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/26 16:06:00 1.16
@@ -351,9 +351,9 @@
#
# Find status of this query ID.
#
- #my $xpath = "//*[local-name() = 'analysis_event'][\@id='$queryID']";
+ #my $xpath = "//*[local-name() = 'analysis_event'][\@*='$queryID']";
#my $xpath = "//analysis_event[\@id='$queryID']";
- my $xpath = "//*[local-name() = 'analysis_event'][\@*='$queryId']";
+ my $xpath = "//*[local-name() = 'analysis_event'][\@id='$queryId']";
my $xpc = XML::LibXML::XPathContext->new();
my $nodes = $xpc->findnodes( $xpath, $doc->documentElement );
From kawas at dev.open-bio.org Mon Oct 26 12:08:07 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Mon, 26 Oct 2009 12:08:07 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910261608.n9QG87Xi030525@dev.open-bio.org>
kawas
Mon Oct 26 12:08:07 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv30490/MOSES-MOBY
Modified Files:
Changes
Log Message:
updated to reflect recent commits
moby-live/Perl/MOSES-MOBY Changes,1.24,1.25
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/23 18:49:31 1.24
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/26 16:08:07 1.25
@@ -1,5 +1,12 @@
Revision history for Perl extension MOSES::MOBY.
+
+0.95
+ * updated the xpath statement in the testing
+ service script. Change should persist until
+ the XML generated by MOSES for analysis events
+ changes.
+
0.94
Fix to moses-testing-service.pl script. typo
found in script.
From kawas at dev.open-bio.org Fri Oct 2 15:15:48 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 2 Oct 2009 11:15:48 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910021515.n92FFmmM009604@dev.open-bio.org>
kawas
Fri Oct 2 11:15:48 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv9568/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service.tt
Log Message:
make sure that we dont see undefined variables in hash warnings (thanks pieter)
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service.tt,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2008/11/19 14:24:14 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/02 15:15:48 1.6
@@ -239,7 +239,7 @@
# $response->record_error ( { code => INPUT_INCORRECT_NAMESPACE,
# msg => 'This service requires inputs under the namespaces: {"' . join(',', keys %valid_namespaces) . '"}' } );
# return;
-# } unless $valid_namespaces{$namespace};
+# } unless defined($namespace) && $valid_namespaces{$namespace};
[%- ELSE %]
if (defined $[% input.name %]_collection) {
foreach my $[% input.name %]_element (@{ $[% input.name %]_collection }) {
@@ -250,7 +250,7 @@
# $response->record_error ( { code => INPUT_INCORRECT_NAMESPACE,
# msg => 'This service requires inputs under the namespaces: { "' . join(',', keys %valid_namespaces) . '"}' } );
# return;
- # } unless $valid_namespaces{$namespace};
+ # } unless defined($namespace) && $valid_namespaces{$namespace};
}
}
[%- END %]
From senger at dev.open-bio.org Sun Oct 4 23:31:28 2009
From: senger at dev.open-bio.org (Martin Senger)
Date: Sun, 4 Oct 2009 19:31:28 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910042331.n94NVSCh029672@dev.open-bio.org>
senger
Sun Oct 4 19:31:28 EDT 2009
Update of /home/repository/moby/moby-live/Java/xmls
In directory dev.open-bio.org:/tmp/cvs-serv29653/xmls
Modified Files:
project.pom
Log Message:
jax-ws dependencies updated
moby-live/Java/xmls project.pom,1.16,1.17
===================================================================
RCS file: /home/repository/moby/moby-live/Java/xmls/project.pom,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- /home/repository/moby/moby-live/Java/xmls/project.pom 2009/06/09 22:20:54 1.16
+++ /home/repository/moby/moby-live/Java/xmls/project.pom 2009/10/04 23:31:28 1.17
@@ -282,14 +282,39 @@
com.sun.xml.wsjaxws-tools
- 2.1.3
+ 2.1.4
+
+
+ javax.xml.ws
+ jaxws-api
+
+
+ javax.jws
+ jsr181
+
+
-
- com.sun.xml.ws
- jaxws-rt
- 2.1.4
+ javax.xml.ws
+ jaxws-api
+ 2.1-1
+
+
+ javax.jws
+ jsr181
+
+
+
+
+ org.apache.geronimo.specs
+ geronimo-ws-metadata_2.0_spec
+ 1.1.1
+
+
jdom
From kawas at dev.open-bio.org Wed Oct 7 15:40:24 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Wed, 7 Oct 2009 11:40:24 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910071540.n97FeOYw010557@dev.open-bio.org>
kawas
Wed Oct 7 11:40:24 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv10517/MOSES-MOBY
Modified Files:
Changes Makefile.PL
Log Message:
bug fix to fix warning when testing soapless service and the debug log setting.
moby-live/Perl/MOSES-MOBY Changes,1.17,1.18 Makefile.PL,1.19,1.20
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/08/27 19:44:39 1.17
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/07 15:40:24 1.18
@@ -1,5 +1,15 @@
Revision history for Perl extension MOSES::MOBY.
+0.92
+ - Bug fix: Can't use string ("
kawas
Wed Oct 7 11:40:24 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv10517/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service-base.tt
Log Message:
bug fix to fix warning when testing soapless service and the debug log setting.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service-base.tt,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt 2009/08/27 19:37:37 1.4
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service-base.tt 2009/10/07 15:40:24 1.5
@@ -200,7 +200,9 @@
if ($LOG->is_debug) {
my $soap_output = $self->finish_output ($out_package);
$LOG->debug ("Output raw data (first 1000 characters): " .
- substr ($soap_output->{_value}->[0], 0, 1000));
+ substr ($soap_output->{_value}->[0], 0, 1000)) if ref($soap_output) =~ m|^HASH|;
+ $LOG->debug ("Output raw data (first 1000 characters): " .
+ substr ($soap_output, 0, 1000)) unless ref($soap_output) =~ m|^HASH|;
Log::Log4perl::NDC->pop();
return $soap_output;
} else {
From kawas at dev.open-bio.org Fri Oct 9 15:31:01 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 11:31:01 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091531.n99FV1i5013333@dev.open-bio.org>
kawas
Fri Oct 9 11:31:01 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv13298/MOSES-MOBY/bin/scripts
Modified Files:
moses-testing-service.pl
Log Message:
added a line that prints the LSAE message if $opt_v is chosen when checking the status of a submitted job.
moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/04/16 18:17:24 1.11
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2009/10/09 15:31:00 1.12
@@ -153,6 +153,7 @@
$completed->{$queryID} = 1;
} elsif ( $status->percentage < 100 ) {
print "Current percentage: ", $status->percentage, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
@@ -168,6 +169,7 @@
|| ( $status->new_state =~ m"running"i ) )
{
print "Current State: ", $status->new_state, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
@@ -178,6 +180,7 @@
$completed->{$queryID} = 1;
} elsif ( $status->steps_completed < $status->total_steps ) {
print "Steps completed: ", $status->steps_completed, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
@@ -188,6 +191,7 @@
$completed->{$queryID} = 1;
} elsif ( $status->remaining > 0 ) {
print "Time remaining: ", $status->remaining, "\n" if $opt_v;
+ print "\tmsg: ", ($status->message ? $status->message : "no message found ..."), "\n" if $opt_v;
sleep(20);
} else {
die "ERROR: analysis event block not well formed.\n";
From kawas at dev.open-bio.org Fri Oct 9 15:39:21 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 11:39:21 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091539.n99FdLAs013374@dev.open-bio.org>
kawas
Fri Oct 9 11:39:21 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv13339/MOSES-MOBY
Modified Files:
Changes
Log Message:
updated to reflect recent changes
moby-live/Perl/MOSES-MOBY Changes,1.18,1.19
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/07 15:40:24 1.18
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 15:39:21 1.19
@@ -10,6 +10,10 @@
is passed, our code produces warnings ...
added check to ensure that namespace is
defined before checking.
+ - when testing async services, added a line
+ to print out the LSAE event message if it
+ exists and if the script is running under
+ verbose settings.
0.91
- Updated the Makefile.PL to handle some missing
dependencies.
From kawas at dev.open-bio.org Fri Oct 9 17:29:28 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:29:28 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091729.n99HTS4B013717@dev.open-bio.org>
kawas
Fri Oct 9 13:29:28 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache
In directory dev.open-bio.org:/tmp/cvs-serv13682/MOSES-MOBY/lib/MOSES/MOBY/Cache
Modified Files:
Central.pm
Log Message:
category had incorrect case
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2009/08/27 19:40:50 1.8
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2009/10/09 17:29:28 1.9
@@ -991,7 +991,7 @@
$service->lsid($service_node->getAttribute('lsid') || '');
$service->type($service_node->getChildrenByTagName('serviceType')->get_node(1)->textContent) if $service_node->getChildrenByTagName('serviceType')->size() > 0;
$service->authoritative($service_node->getChildrenByTagName('authoritative')->get_node(1)->textContent) if $service_node->getChildrenByTagName('authoritative')->size() > 0;
- $service->category($service_node->getChildrenByTagName('category')->get_node(1)->textContent) if $service_node->getChildrenByTagName('category')->size() > 0;
+ $service->category($service_node->getChildrenByTagName('Category')->get_node(1)->textContent) if $service_node->getChildrenByTagName('Category')->size() > 0;
$service->description($service_node->getChildrenByTagName('Description')->get_node(1)->textContent) if $service_node->getChildrenByTagName('Description')->size() > 0;
$service->email($service_node->getChildrenByTagName('contactEmail')->get_node(1)->textContent) if $service_node->getChildrenByTagName('contactEmail')->size() > 0;
$service->signatureURL($service_node->getChildrenByTagName('signatureURL')->get_node(1)->textContent) if $service_node->getChildrenByTagName('signatureURL')->size() > 0;
From kawas at dev.open-bio.org Fri Oct 9 17:32:39 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:32:39 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091732.n99HWdiS013799@dev.open-bio.org>
kawas
Fri Oct 9 13:32:39 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv13764/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service.tt
Log Message:
added some code to modify the LSAE states
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service.tt,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/02 15:15:48 1.6
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/09 17:32:39 1.7
@@ -28,6 +28,10 @@
[%- MACRO is_simple (entry) BLOCK %]
[%- ref (entry) == 'MOSES::MOBY::Def::PrimaryDataSimple' %]
[%- END -%]
+
+ [%- MACRO is_async (entry) BLOCK %]
+ [%- entry == 'cgi-async' || entry == 'moby-async' %]
+ [%- END -%]
[%- MACRO set_child (child, leftpad, value) BLOCK %]
[% FILTER indent (leftpad) -%]
@@ -202,6 +206,9 @@
@ISA = qw( [% base.module_name %] );
use MOSES::MOBY::Package;
use MOSES::MOBY::ServiceException;
+[%- IF is_async(base.category) -%]
+use MOBY::Async::LSAE;
+[%- END %]
use strict;
[%# here we output use statements for our primitives %]
@@ -275,8 +282,23 @@
[%- END %]
[%- END %]
- # do something... (sorry, can't help with that)
-
+ # do something... (sorry, can't you help with that)
+
+ [%- IF is_async(base.category) %]
+ #simulate a long running service while providing updates
+
+ #update the state of our service
+ $self->update_state_event($request, 'running','about to sleep for 20 seconds!');
+
+ # sleep for 20 seconds
+ sleep(20);
+
+ # update state again
+ $self->update_state_event($request, 'running','Woke up and going back to sleep for 20 more seconds!');
+
+ # sleep for 20 more seconds
+ sleep(20);
+ [%- END %]
# EDIT: PUT REAL VALUES INTO THE RESPONSE
# fill the response
[%- FOREACH output IN base.outputs %]
@@ -325,6 +347,272 @@
}
+[%- IF is_async(base.category) -%]
+#-----------------------------------------------------------------
+# update_state_event
+# This method is used to update the state of your
+# LSAE_STATE_CHANGED_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $state - one of (created, running, completed, terminated_by_request, terminated_by_error)
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_state_event {
+ my ( $self, $request, $state, $msg ) = @_;
+
+ my %valid_states = ('created'=>1,'running'=>1,'completed'=>1,'termintated_by_request'=>1,'terminated_by_error'=>1,);
+
+ $msg = '' unless defined $msg;
+ $state = 'running' unless defined $state;
+
+ # validate the state of the event ...
+ $state = 'running' unless $valid_states{$state};
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_STATE_CHANGED_EVENT);
+
+ # set the previous state
+ $status->previous_state( $old_status->new_state() ) if defined ($old_status->type) and $old_status->type == LSAE_STATE_CHANGED_EVENT;
+ $status->previous_state( 'created') unless $status->previous_state;
+
+ # set the new state
+ $status->new_state($state);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+#-----------------------------------------------------------------
+# update_percentage_event
+# This method is used to update the state of your
+# LSAE_PERCENT_PROGRESS_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $percentrage - an integer between 0-100
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_percentage_event {
+ my ( $self, $request, $percentage, $msg ) = @_;
+
+ $msg = '' unless defined $msg;
+ $state = 1 unless defined $percentage;
+
+ # validate the state of the event ...
+ $percentage = 1 unless $percentage >= 0 and $percentage <=100;
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_PERCENT_PROGRESS_EVENT);
+
+ # set the new state
+ $status->percentage($percentage);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+
+#-----------------------------------------------------------------
+# update_step_event
+# This method is used to update the state of your
+# LSAE_STEP_PROGRESS_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $total_steps - integer representing total steps until completion
+# $steps_completed - integer representing steps completed
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_step_event {
+ my ( $self, $request, $total_steps, $steps_completed, $msg ) = @_;
+
+ $msg = '' unless defined $msg;
+ $total_steps = 1 unless defined $total_steps;
+ $steps_completed = 0 unless defined $steps_completed;
+
+ # validate the state of the event ...
+ $steps_completed = $total_steps if $steps_completed > $total_steps;
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_STEP_PROGRESS_EVENT);
+
+ # set the new state
+ $status->steps_completed($steps_completed);
+ $status->total_steps($total_steps);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+
+#-----------------------------------------------------------------
+# update_time_event
+# This method is used to update the state of your
+# LSAE_TIME_PROGRESS_EVENT event.
+#
+# Parameters:
+# $request - $request from process_it()
+# $remaining - integer representing seconds until completion
+# $msg - a message to provide regarding the state of our event
+#-----------------------------------------------------------------
+sub update_time_event {
+ my ( $self, $request, $remaining, $msg ) = @_;
+
+ $msg = '' unless defined $msg;
+ $remaining = 0 unless defined $remaining;
+
+ # validate the state of the event ...
+ $remaining = 0 unless $remaining >= 0 ;
+
+ unless ( defined $ENV{ID} ) {
+ # hmm, local testing of service?
+ $ENV{ID} = WSRF::GSutil::CalGSH_ID();
+ WSRF::File::toFile($ENV{ID});
+ }
+
+ # our service invocation id
+ my $ID = $ENV{ID};
+
+ # our job id
+ my $jid = $request->jid;
+
+ # some variables we need to access/store our event information
+ my $property_pid = "pid_$jid";
+ my $property_input = "input_$jid";
+ my $property_status = "status_$jid";
+ my $property_result = "result_$jid";
+
+ # construct an LSAE object based on the old event block
+ my $old_status = LSAE::AnalysisEventBlock->new(
+ $WSRF::WSRP::ResourceProperties{$property_status}
+ );
+ # construct a new state changed event
+ my $status = LSAE::AnalysisEventBlock->new();
+ $status->type(LSAE_TIME_PROGRESS_EVENT);
+
+ # set the new state
+ $status->remaining($remaining);
+ $status->message($msg);
+
+ # set our job id for this event
+ $status->id($jid);
+
+ # create a file based resource that we will store our event information
+ my $lock = WSRF::MobyFile->new( undef, $ID );
+ $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML();
+
+ # here we leave the result empty since the service is still running
+ $WSRF::WSRP::ResourceProperties{$property_result} = '';
+
+ # save the event so that our clients can access the information
+ $lock->toFile();
+ return;
+}
+[%- END -%]
+
1;
__END__
From kawas at dev.open-bio.org Fri Oct 9 17:37:49 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:37:49 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091737.n99HbnUf013860@dev.open-bio.org>
kawas
Fri Oct 9 13:37:49 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
In directory dev.open-bio.org:/tmp/cvs-serv13825/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates
Modified Files:
service.tt
Log Message:
updated the use statement IF block and fixed typo in update_percentage_event
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service.tt,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/09 17:32:39 1.7
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates/service.tt 2009/10/09 17:37:49 1.8
@@ -206,7 +206,7 @@
@ISA = qw( [% base.module_name %] );
use MOSES::MOBY::Package;
use MOSES::MOBY::ServiceException;
-[%- IF is_async(base.category) -%]
+[% IF is_async(base.category) -%]
use MOBY::Async::LSAE;
[%- END %]
use strict;
@@ -431,7 +431,7 @@
my ( $self, $request, $percentage, $msg ) = @_;
$msg = '' unless defined $msg;
- $state = 1 unless defined $percentage;
+ $percentage = 1 unless defined $percentage;
# validate the state of the event ...
$percentage = 1 unless $percentage >= 0 and $percentage <=100;
From kawas at dev.open-bio.org Fri Oct 9 17:46:44 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:46:44 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091746.n99Hki1A013903@dev.open-bio.org>
kawas
Fri Oct 9 13:46:44 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv13868/MOSES-MOBY
Modified Files:
Changes
Log Message:
updated to reflect recent changes
moby-live/Perl/MOSES-MOBY Changes,1.19,1.20
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 15:39:21 1.19
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 17:46:44 1.20
@@ -14,6 +14,10 @@
to print out the LSAE event message if it
exists and if the script is running under
verbose settings.
+ - Bug fix: Central->_createServiceFromXML had
+ Category as category
+ - added some code to the service.tt that aides
+ in updating a services LSAE event states.
0.91
- Updated the Makefile.PL to handle some missing
dependencies.
From kawas at dev.open-bio.org Fri Oct 9 17:50:08 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Fri, 9 Oct 2009 13:50:08 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910091750.n99Ho8JF013943@dev.open-bio.org>
kawas
Fri Oct 9 13:50:08 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/share
In directory dev.open-bio.org:/tmp/cvs-serv13908/MOSES-MOBY/share
Modified Files:
USER_REGISTRIES
Log Message:
moby-live/Perl/MOSES-MOBY/share USER_REGISTRIES,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/USER_REGISTRIES,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/USER_REGISTRIES 2008/02/21 00:12:55 1.3
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/share/USER_REGISTRIES 2009/10/09 17:50:08 1.4
@@ -1,11 +1 @@
-%USER_REGISTRIES = (
-# iCAPTURE => {
-# endpoint => 'http://mobycentral.icapture.ubc.ca/cgi-bin/MOBY05/mobycentral.pl',
-# namespace => 'http://mobycentral.icapture.ubc.ca/MOBY/Central',
-# name => 'iCAPTURE Centre, Vancouver',
-# contact => 'Edward Kawas (edward.kawas at gmail.com)',
-# public => 'yes',
-# text => 'A curated public registry hosted at the iCAPTURE Centre, Vancouver',
-# },
-
- );
+%USER_REGISTRIES = ();
From kawas at dev.open-bio.org Tue Oct 13 15:28:36 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:28:36 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131528.n9DFSZMV004279@dev.open-bio.org>
kawas
Tue Oct 13 11:28:35 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES
In directory dev.open-bio.org:/tmp/cvs-serv4243/MOSES-MOBY/lib/MOSES
Modified Files:
MOBY.pm
Log Message:
added a little text to the pod name so that when users go to cpan, they know which module has the doc
moby-live/Perl/MOSES-MOBY/lib/MOSES MOBY.pm,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2009/04/08 22:40:11 1.10
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY.pm 2009/10/13 15:28:35 1.11
@@ -22,7 +22,7 @@
=head1 NAME
-MOSES::MOBY - Perl extension for the automatic generation of BioMOBY web services
+MOSES::MOBY - Start here! Documentation for the Perl extension for the automatic generation of BioMOBY web services!
=head1 SYNOPSIS
From kawas at dev.open-bio.org Tue Oct 13 15:33:25 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:33:25 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131533.n9DFXOrv004319@dev.open-bio.org>
kawas
Tue Oct 13 11:33:24 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4284/MOSES-MOBY
Modified Files:
Changes
Log Message:
getting ready to create cpan release. added some notes for those that read these things
moby-live/Perl/MOSES-MOBY Changes,1.20,1.21
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/09 17:46:44 1.20
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2009/10/13 15:33:24 1.21
@@ -1,6 +1,17 @@
Revision history for Perl extension MOSES::MOBY.
-0.92
+0.92 Oct 13, 2009
+ *** Notes for this release ***
+ The service template has been updated.
+ The update mainly affects async service
+ implementations. The easiest thing to do
+ is to backup your async service
+ implementations and re-generate them.
+
+ Only do this if you had problems with
+ erratic service behaviour in the past!
+
+ Changes:
- Bug fix: Can't use string ("_createServiceFromXML had
Category as category
- added some code to the service.tt that aides
- in updating a services LSAE event states.
+ in updating a services LSAE event states.
+
0.91
- Updated the Makefile.PL to handle some missing
dependencies.
From kawas at dev.open-bio.org Tue Oct 13 15:38:10 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:38:10 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131538.n9DFcAZW004359@dev.open-bio.org>
kawas
Tue Oct 13 11:38:10 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4324/MOSES-MOBY
Modified Files:
Makefile.PL
Log Message:
added a no index directive for the templates/ directory so that the perldoc on cpan doesnt look messed up.
moby-live/Perl/MOSES-MOBY Makefile.PL,1.20,1.21
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/07 15:40:24 1.20
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Makefile.PL 2009/10/13 15:38:10 1.21
@@ -42,6 +42,7 @@
build_requires 'Test::More' => '0.42';
no_index 'directory' => 'bin/scripts';
+ no_index 'directory' => 'lib/MOSES/MOBY/Generators/templates';
install_script 'bin/scripts/moses-cache-tester.pl';
install_script 'bin/scripts/moses-config-status.pl';
From kawas at dev.open-bio.org Tue Oct 13 15:43:10 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 11:43:10 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131543.n9DFhA57004402@dev.open-bio.org>
kawas
Tue Oct 13 11:43:10 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv4367/MOSES-MOBY/lib/MOSES/MOBY/Generators
Modified Files:
Utils.pm
Log Message:
updated the perldoc (wasnt correct on cpan)
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Utils.pm,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2008/11/06 18:32:33 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2009/10/13 15:43:10 1.6
@@ -19,22 +19,16 @@
MOSES::MOBY::Utils - what does not fit elsewhere
-=cut
-
=head1 SYNOPSIS
# find a file located somewhere in @INC
use MOSES::MOBY::Generators::Utils;
my $file = MOSES::MOBY::Generators::Utils->find_file ('resource.file');
-
-=cut
=head1 DESCRIPTION
General purpose utilities.
-=cut
-
=head1 AUTHORS
Martin Senger (martin.senger [at] gmail [dot] com)
@@ -42,8 +36,6 @@
=head1 SUBROUTINES
-=cut
-
#-----------------------------------------------------------------
# find_file
#-----------------------------------------------------------------
@@ -87,4 +79,5 @@
}
1;
+
__END__
From kawas at dev.open-bio.org Tue Oct 13 16:08:11 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 12:08:11 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131608.n9DG8BUL004478@dev.open-bio.org>
kawas
Tue Oct 13 12:08:11 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4443/MOSES-MOBY/lib/MOSES/MOBY
Modified Files:
Config.pm
Log Message:
added perldoc for module.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Config.pm,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2008/04/29 19:45:01 1.4
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2009/10/13 16:08:11 1.5
@@ -26,9 +26,63 @@
$ENV_CONFIG_DIR = 'BIOMOBY_CFG_DIR';
}
+=head1 NAME
+
+MOSES::MOBY::Config - A hash based configuration module based on Config::Simple
+
+=head1 SYNOPSIS
+
+ # use config allong with the MOSES config file
+ use MOSES::MOBY::Config;
+
+ # use config along with my properties.file
+ use MOSES::MOBY::Config qw /'properties.file'/;
+
+ # print the successfully read config files
+ foreach my $file (MOSES::MOBY::Config->ok_files) {
+ print "\t$file - successfully processed\n";
+ }
+
+ # print a list of files that failed to load
+ my %failed = MOSES::MOBY::Config->failed_files;
+ if (keys %failed > 0) {
+ print "Failed configuration files:\n";
+ foreach my $file (sort keys %failed) {
+ my $msg = $failed{$file}; $msg =~ s/\n$//;
+ print "\t$file => $msg\n";
+ }
+ }
+
+ # print out the config params read thus far
+ print "All configuration parameters:\n";
+ foreach my $name (sort MOSES::MOBY::Config->param()) {
+ print "\t$name => " . MOSES::MOBY::Config->param ($name);
+ }
+
+=head1 DESCRIPTION
+
+A module for reading configuration files and maintaining configuration parameters
+
+=head1 AUTHORS
+
+ Martin Senger (martin.senger [at] gmail [dot] com)
+ Edward Kawas (edward.kawas [at] gmail [dot] com)
+
+=head1 SUBROUTINES
+
+=cut
+
# OO access; but there are no instance attributes - everything are
# class (shared) attributes
+=head2 new
+
+Instantiates a new MOSES::MOBY::Config reference. Mainly here for OO access.
+There are no instance attributes, only class attributes
+
+=cut
+
+
sub new {
my ($class, @args) = @_;
@@ -126,6 +180,13 @@
# return value of a configuration argument; or add a new argument
+=head2 param
+
+If called with no arguments, all of the possible config keys are returned.
+If called with a single argument, then that argument is assumed to be a key and the value for that key is returned.
+
+=cut
+
sub param {
shift;
@@ -146,6 +207,12 @@
# remove one, more, or all configuration arguments
+=head2 delete
+
+removes one or more of the configuration keys and their associated values.
+
+=cut
+
sub delete {
shift;
@@ -164,6 +231,15 @@
# this argument is passed to the Data::Dumper->Dump as the variable
# name)
+=head2 dump
+
+Returns a stringified version of all configuration parameters;
+
+If passed a scalar parameter, then the dump will be given that variable name.
+This dump can be eval{}'ed.
+
+=cut
+
sub dump {
shift;
my $varname = @_ ? shift : 'CONFIG';
@@ -189,6 +265,12 @@
# return a list of configuration files successfully read (so far)
+=head2 ok_files
+
+returns a list of the configuration files successfully read thus far ...
+
+=cut
+
sub ok_files {
return sort keys %Success;
}
@@ -196,11 +278,17 @@
# return a hash of configuration files un-successfully read (so far) -
# with corresponding error messages
+=head2 failed_files
+
+returns a hash of the configuration files unsuccessfully read thus far and their corresponding error messages.
+
+=cut
+
sub failed_files {
return %Unsuccess;
}
-
+=cut
1;
__END__
From kawas at dev.open-bio.org Tue Oct 13 16:42:20 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 12:42:20 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131642.n9DGgKHF004955@dev.open-bio.org>
kawas
Tue Oct 13 12:42:20 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv4920/MOSES-MOBY/lib/MOSES/MOBY
Modified Files:
Config.pm
Log Message:
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Config.pm,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2009/10/13 16:08:11 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2009/10/13 16:42:20 1.6
@@ -288,7 +288,5 @@
return %Unsuccess;
}
-=cut
-
1;
__END__
From kawas at dev.open-bio.org Tue Oct 13 16:46:21 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 12:46:21 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131646.n9DGkLAI005016@dev.open-bio.org>
kawas
Tue Oct 13 12:46:21 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators
In directory dev.open-bio.org:/tmp/cvs-serv4981/MOSES-MOBY/lib/MOSES/MOBY/Generators
Modified Files:
Utils.pm
Log Message:
fixed the perldoc ... doc created had errors in it.
moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Utils.pm,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2009/10/13 15:43:10 1.6
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2009/10/13 16:46:21 1.7
@@ -36,10 +36,6 @@
=head1 SUBROUTINES
-#-----------------------------------------------------------------
-# find_file
-#-----------------------------------------------------------------
-
=head2 find_file
Try to locate a file whose name is created from the C<$default_start>
@@ -55,6 +51,9 @@
my %full_path_of = ();
+#-----------------------------------------------------------------
+# find_file
+#-----------------------------------------------------------------
sub find_file {
my ($self, $default_start, @names) = @_;
my $fixed_part = File::Spec->catfile (@names);
From kawas at dev.open-bio.org Tue Oct 13 17:03:41 2009
From: kawas at dev.open-bio.org (Eddie Kawas)
Date: Tue, 13 Oct 2009 13:03:41 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910131703.n9DH3f6V005208@dev.open-bio.org>
kawas
Tue Oct 13 13:03:41 EDT 2009
Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY
In directory dev.open-bio.org:/tmp/cvs-serv5173/MOSES-MOBY
Modified Files:
README
Log Message:
moby-live/Perl/MOSES-MOBY README,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/README,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2008/05/09 20:54:31 1.5
+++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2009/10/13 17:03:41 1.6
@@ -1,4 +1,4 @@
-MOSES-MOBY version .85
+MOSES-MOBY version .92
======================
OVERVIEW
@@ -16,12 +16,22 @@
INSTALLATION
-To install this module type the following:
-
- perl Makefile.PL
- make
- make test
- make install
+ To install this module type the following:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+ To install this module on WinOS:
+
+ perl Makefile.PL
+ nmake
+ nmake test
+ nmake install
+
+ If you have any problems installing prerequisite modules,
+ you may find it easier to use ActiveStates ppm utility.
UPGRADING
From drepchevski at dev.open-bio.org Fri Oct 16 12:18:47 2009
From: drepchevski at dev.open-bio.org (Dmitry Repchevski)
Date: Fri, 16 Oct 2009 08:18:47 -0400
Subject: [MOBY-guts] biomoby commit
Message-ID: <200910161218.n9GCIkJJ024102@dev.open-bio.org>
drepchevski
Fri Oct 16 08:18:46 EDT 2009
Update of /home/repository/moby/moby-live/Java/docs
In directory dev.open-bio.org:/tmp/cvs-serv24067
Modified Files:
inb_moby_core.html
Log Message:
put the ontology generator applet inside
moby-live/Java/docs inb_moby_core.html,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/docs/inb_moby_core.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/docs/inb_moby_core.html 2009/09/21 16:31:17 1.2
+++ /home/repository/moby/moby-live/Java/docs/inb_moby_core.html 2009/10/16 12:18:46 1.3
@@ -64,6 +64,7 @@
}
.code {
+ white-space: pre;
vertical-align: top;
color: #000099;
font-size: 10pt;
@@ -131,6 +132,50 @@
+
Generating JAXB-annotated ontology classes
+
+
+ Even MobyCore may work without generated ontology classes, they facilitate a development.
+ Generated classes are nothing more than JAXB annotated beans with properties.
+
+
+
+
+
+
+
+
+
+ Here is an example of generated datatype class:
+
+
+
+ at XmlRootElement(name="WeightedAminoAcidSequences")
+ at XmlType(name="WeightedAminoAcidSequences")
+public class WeightedAminoAcidSequences extends AminoAcidSequence implements Serializable {
+ public List<? extends AminoAcidSequence> getAminoAcidSequence() {
+ return getAttributes("AminoAcidSequence");
+ }
+
+ public void addAminoAcidSequence(AminoAcidSequence aminoAcidSequence) {
+ putAttribute("AminoAcidSequence", aminoAcidSequence);
+ }
+
+ public WeightedObject getWeightedObject() {
+ return getAttribute("WeightedObject");
+ }
+
+ public void setWeightedObject(WeightedObject weightedObject) {
+ putAttribute("WeightedObject", weightedObject);
+ }
+}
+
+
+
+
+
Executing synchronous BioMoby services
@@ -138,12 +183,10 @@
This is done by creating a MobyMessage object:
-
MobyObject object = new MobyObject("P00807", "UniProt");
MobySimple simple = new MobySimple(object, "id");
MobyData data = new MobyData(simple, "sip_1");
MobyMessage request = new MobyMessage(data);
-
@@ -163,10 +206,8 @@
Now we can create a MobyDispatch object and execute a service.
-
MobyDispatch dispatch = new MobyDispatch(service);
MobyMessage response = dispatch.invoke(request);
-
@@ -181,9 +222,7 @@
not have AminoAcidSequence class generated. In this case we would have a AnyMobyObject instead of unknown to us AminoAcidSequence.
@@ -192,7 +231,6 @@
MobySimple may contain either a primitive type or a complex one, so we have to check. Here is a simple method that traverse a given element:
@@ -219,11 +256,9 @@
AnyMobyObject can also be used to setup a datatype dynamically.
-
AnyMobyObject any = new AnyMobyObject("AminoAcidSequece");
any.putAttribute("SequenceString", new MobyString("ATCG"));
any.putAttribute("Length", new MobyInteger(4));
-
@@ -235,7 +270,6 @@
Here is an example of parsing a MobyMessage response:
-
MobyMessage response = dispatch.invoke(request);
if (response.hasExceptions())
@@ -256,7 +290,7 @@
for (MobyDataElement element : elements)
{
- if (element instanceof Mobysimple)
+ if (element instanceof MobySimple)
{
MobySimple simple = (MobySimple)element;
AbstractMobyObject object = simple.getObject();
@@ -292,8 +326,7 @@
throw new Exception(); // expected MobySimple
}
}
-}
-
+}
@@ -306,7 +339,6 @@
The rest of the things are pretty the same as for synchronous invocation: