[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Thu Jun 19 21:49:01 UTC 2008
kawas
Thu Jun 19 17:49:01 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies
In directory dev.open-bio.org:/tmp/cvs-serv3986/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies
Modified Files:
ServiceTypes.pm Objects.pm Services.pm Namespaces.pm
Log Message:
#'s converted to forward slashes so that the URIs are resolvable
fixed a bug in Services.pm that caused the incorrect domain name to be placed in the URIs
moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies ServiceTypes.pm,1.2,1.3 Objects.pm,1.3,1.4 Services.pm,1.3,1.4 Namespaces.pm,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/ServiceTypes.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/ServiceTypes.pm 2008/02/21 17:15:41 1.2
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/ServiceTypes.pm 2008/06/19 21:49:01 1.3
@@ -77,8 +77,8 @@
# save some information retrieved from mobycentral.config
my $CONF = MOBY::Config->new;
- $self->{uri} = $CONF->{mobyservice}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Services#';
- $self->{uri} = $self->{uri} . "#" unless $self->{uri} =~ m/^.*(\#{1})$/;
+ $self->{uri} = $CONF->{mobyservice}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Services/';
+ $self->{uri} = $self->{uri} . "/" unless $self->{uri} =~ m/^.*(\/{1})$/;
$self->{query_all} = <<END;
SELECT ot1.service_type, rt.relationship_type, ot2.service_type, ot1.description, ot1.service_lsid, ot1.authority, ot1.contact_email, ot2.service_lsid
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Objects.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Objects.pm 2008/02/21 17:19:11 1.3
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Objects.pm 2008/06/19 21:49:01 1.4
@@ -78,8 +78,8 @@
# save some information retrieved from mobycentral.config
my $CONF = MOBY::Config->new;
- $self->{uri} = $CONF->{mobyobject}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Objects#';
- $self->{uri} = $self->{uri} . "#" unless $self->{uri} =~ m/^.*(\#{1})$/;
+ $self->{uri} = $CONF->{mobyobject}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Objects/';
+ $self->{uri} = $self->{uri} . "/" unless $self->{uri} =~ m/^.*(\/{1})$/;
$self->{uri_comp} = $self->{uri};
$self->{uri_comp} =~ s/\/MOBY\-S\//\/MOBY_SUB_COMPONENT\//;
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/04/01 18:26:19 1.3
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/06/19 21:49:01 1.4
@@ -111,12 +111,14 @@
# save some information retrieved from mobycentral.config
my $CONF = MOBY::Config->new;
- # FIXME get me from api call
- $self->{instance_uri} = $CONF->{mobycentral}->{resourceURL} || '';
- $self->{service_uri} = $CONF->{mobyservice}->{resourceURL} || '';
- $self->{datatype_uri} = $CONF->{mobyobject}->{resourceURL} || '';
- $self->{namespace_uri} = $CONF->{mobynamespace}->{resourceURL} || '';
-
+ # set the uris unless an endpoint was specified
+ do {
+ $self->{instance_uri} = $CONF->{mobycentral}->{resourceURL} || '';
+ $self->{service_uri} = $CONF->{mobyservice}->{resourceURL} || '';
+ $self->{datatype_uri} = $CONF->{mobyobject}->{resourceURL} || '';
+ $self->{namespace_uri} = $CONF->{mobynamespace}->{resourceURL} || '';
+ } unless $args{endpoint};
+
# save the endpoint/namespace/uri if passed in
$self->{endpoint} = $args{endpoint} if $args{endpoint};
$self->{namespace} = $args{endpoint} if $args{namespace};
@@ -148,28 +150,29 @@
#revert to a default value if nothing is retrieved
$self->{instance_uri} =
- 'http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances#'
+ 'http://biomoby.org/RESOURCES/MOBY-S/ServiceInstances/'
unless $moby->{ServiceInstance}->[0];
- $self->{service_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Services#'
+ $self->{service_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Services/'
unless $moby->{Services}->[0];
$self->{namespace_uri} =
- 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces#'
+ 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces/'
unless $moby->{Namespaces}->[0];
- $self->{datatype_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Objects#'
+ $self->{datatype_uri} = 'http://biomoby.org/RESOURCES/MOBY-S/Objects/'
unless $moby->{Objects}->[0];
}
# add a / at the end of the uri if it isnt there already
- $self->{instance_uri} = $self->{instance_uri} . "#"
- unless $self->{instance_uri} =~ m/^.*(\#{1})$/;
- $self->{service_uri} = $self->{service_uri} . "#"
- unless $self->{service_uri} =~ m/^.*(\#{1})$/;
- $self->{namespace_uri} = $self->{namespace_uri} . "#"
- unless $self->{namespace_uri} =~ m/^.*(\#{1})$/;
- $self->{datatype_uri} = $self->{datatype_uri} . "#"
- unless $self->{datatype_uri} =~ m/^.*(\#{1})$/;
+ $self->{instance_uri} = $self->{instance_uri} . "/"
+ unless $self->{instance_uri} =~ m/^.*(\/{1})$/;
+ $self->{service_uri} = $self->{service_uri} . "/"
+ unless $self->{service_uri} =~ m/^.*(\/{1})$/;
+ $self->{namespace_uri} = $self->{namespace_uri} . "/"
+ unless $self->{namespace_uri} =~ m/^.*(\/{1})$/;
+ $self->{datatype_uri} = $self->{datatype_uri} . "/"
+ unless $self->{datatype_uri} =~ m/^.*(\/{1})$/;
- $self->{is_alive_path} = $CONF->{mobycentral}->{service_tester_path};
+ #set the isAlive path
+ $self->{is_alive_path} = $CONF->{mobycentral}->{service_tester_path} if $ENV{MOBY_SERVER} eq $self->{endpoint};
# done
return $self;
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Namespaces.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Namespaces.pm 2008/02/21 17:43:13 1.4
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Namespaces.pm 2008/06/19 21:49:01 1.5
@@ -76,8 +76,8 @@
# save some information retrieved from mobycentral.config
my $CONF = MOBY::Config->new;
- $self->{uri} = $CONF->{mobynamespace}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces#';
- $self->{uri} = $self->{uri} . "#" unless $self->{uri} =~ m/^.*(\#{1})$/;
+ $self->{uri} = $CONF->{mobynamespace}->{resourceURL} || 'http://biomoby.org/RESOURCES/MOBY-S/Namespaces/';
+ $self->{uri} = $self->{uri} . "/" unless $self->{uri} =~ m/^.*(\/{1})$/;
$self->{query_all} = <<END;
SELECT namespace_type, description, namespace_lsid, authority, contact_email FROM namespace ORDER BY namespace_type asc
More information about the MOBY-guts
mailing list