[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Tue Apr 1 18:26:19 UTC 2008
kawas
Tue Apr 1 14:26:19 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies
In directory dev.open-bio.org:/tmp/cvs-serv10263/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies
Modified Files:
Services.pm
Log Message:
added file checking for isAlive.xml and put the isalive block in an eval because isalive information shouldnt kill rdf generation
moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/02/21 17:15:41 1.2
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/04/01 18:26:19 1.3
@@ -315,42 +315,42 @@
new RDF::Core::Literal( $SI->name )
)
);
+ eval{
+ do {
+ # add is alive information if necessary
+ if ( $self->{is_alive_path} and -e $self->{is_alive_path} and -r $self->{is_alive_path} ."/isAliveStats.xml") {
+ my $parser = XML::LibXML->new();
+ my $doc =
+ $parser->parse_file(
+ $self->{is_alive_path} . '/isAliveStats.xml' );
+ my $value = "true";
+ my $id = $SI->authority . "," . $SI->name;
+ my @nodelist = $doc->getElementsByTagName("service");
+ for my $node (@nodelist) {
+ next unless ( $node->getAttribute('id') eq $id );
+ $value = $node->textContent;
+ last;
+ }
+ $model->addStmt(
+ new RDF::Core::Statement(
+ $resource,
+ $resource->new( MOBY::RDF::Predicates::FETA->isAlive ),
+ new RDF::Core::Literal($value)
+ )
+ );
+ } else {
- do {
- # add is alive information if necessary
- if ( $self->{is_alive_path} and -e $self->{is_alive_path} ) {
- my $parser = XML::LibXML->new();
- my $doc =
- $parser->parse_file(
- $self->{is_alive_path} . '/isAliveStats.xml' );
- my $value = "true";
- my $id = $SI->authority . "," . $SI->name;
- my @nodelist = $doc->getElementsByTagName("service");
- for my $node (@nodelist) {
- next unless ( $node->getAttribute('id') eq $id );
- $value = $node->textContent;
- last;
+ # by default, state the service is alive ...
+ $model->addStmt(
+ new RDF::Core::Statement(
+ $resource,
+ $resource->new( MOBY::RDF::Predicates::FETA->isAlive ),
+ new RDF::Core::Literal('true')
+ )
+ );
}
- $model->addStmt(
- new RDF::Core::Statement(
- $resource,
- $resource->new( MOBY::RDF::Predicates::FETA->isAlive ),
- new RDF::Core::Literal($value)
- )
- );
- } else {
-
- # by default, state the service is alive ...
- $model->addStmt(
- new RDF::Core::Statement(
- $resource,
- $resource->new( MOBY::RDF::Predicates::FETA->isAlive ),
- new RDF::Core::Literal('true')
- )
- );
- }
- } unless $addIsAlive =~ /no/i;
-
+ } unless $addIsAlive =~ /no/i;
+ };
# add the authoring statements
my $bnode = $node_factory->newResource;
$model->addStmt(
More information about the MOBY-guts
mailing list