[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Sat Nov 1 08:28:33 EST 2003


mwilkinson
Sat Nov  1 08:28:32 EST 2003
Update of /home/repository/moby/moby-live/Perl/lsid/authority
In directory pub.open-bio.org:/tmp/cvs-serv28979

Modified Files:
	NamespaceResolver.pm RDFConfigure.pm metadata.pl 
Added Files:
	ClassResolver.pm RelationshipResolver.pm ServiceResolver.pm 
Log Message:
added LSID resolvers for the Class and Service and Relationship ontologies.

moby-live/Perl/lsid/authority ClassResolver.pm,NONE,1.1 RelationshipResolver.pm,NONE,1.1 ServiceResolver.pm,NONE,1.1 NamespaceResolver.pm,1.2,1.3 RDFConfigure.pm,1.2,1.3 metadata.pl,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/lsid/authority/NamespaceResolver.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/lsid/authority/NamespaceResolver.pm	2003/11/01 11:37:02	1.2
+++ /home/repository/moby/moby-live/Perl/lsid/authority/NamespaceResolver.pm	2003/11/01 13:28:32	1.3
@@ -17,7 +17,7 @@
 
 sub resolve_namespacetype {
     my ($namespace_db_params, $ls) = @_;
-    print STDERR "LSID is $ls\n";
+    #print STDERR "LSID is $ls\n";
 	my $lsid= LS::ID->new($ls)->canonical;
 	unless ($lsid) {
 		_die('Malformed LSID', 200);
@@ -29,7 +29,7 @@
 	my $rev= $lsid->revision;
 	
 	my $mdata;
-    my $dbh = dbAccess($namespace_db_params);
+    my $dbh = dbConnect($namespace_db_params);
 
     my $sth = $dbh->prepare("select namespace_type, description, authority, contact_email from namespace where namespace_lsid = ?");
     $sth->execute($lsid);
@@ -64,7 +64,7 @@
     $mdata.= rdfLiteral(
         $lsid->as_string,
         'dc:type',
-        "bioMoby namespace identifier"
+        "bioMoby Namespace identifier"
     );
     $mdata.= rdfResource(
         $contact_email,

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/lsid/authority/RDFConfigure.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/lsid/authority/RDFConfigure.pm	2003/11/01 11:17:24	1.2
+++ /home/repository/moby/moby-live/Perl/lsid/authority/RDFConfigure.pm	2003/11/01 13:28:32	1.3
@@ -11,6 +11,7 @@
     $RDF_SUFFIX
     rdfLiteral
     rdfResource
+    _die
     );
 our %EXPORT_TAGS =(all => [qw(
     $SERVICE_CGI
@@ -18,6 +19,7 @@
     $RDF_SUFFIX
     rdfLiteral
     rdfResource
+    _die
     )]);
 
 
@@ -45,4 +47,11 @@
 </rdf:Description>";
 }
 
+
+sub _die {
+    my $m = shift;
+    my $e = shift;
+    die ($e, $m);
+}
+
 1;

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/lsid/authority/metadata.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Perl/lsid/authority/metadata.pl	2003/11/01 11:17:24	1.3
+++ /home/repository/moby/moby-live/Perl/lsid/authority/metadata.pl	2003/11/01 13:28:32	1.4
@@ -21,12 +21,16 @@
 	);
 
 use NamespaceResolver qw(:all);
+use ClassResolver qw(:all);
+use ServiceResolver qw(:all);
+use RelationshipResolver qw(:all);
 
-my %known_types = (  # switch on/off various LSID resolvers.
+my %known_types = (  # switch on/off various LSID-namespace resolvers.
     'namespacetype' => 1,
-    'objecttype' => 0,
-    'servicetype' => 0,
-    'relationshiptype' => 0,
+    'objectclass' => 1,
+    'servicetype' => 1,
+    'servicerelation' => 1,
+    'objectrelation' => 1,
     'serviceinstance' => 0,
                   );
 
@@ -65,12 +69,10 @@
 	}
     
     return resolve_namespacetype($namespacedb,$lsid) if $1 eq "namespacetype";
+    return resolve_classtype($objectdb,$lsid) if $1 eq "objectclass";
+    return resolve_servicetype($servicedb,$lsid) if $1 eq "objectclass";
+    return resolve_relationshiptype($relationshipdb,$lsid) if $1 eq "objectrelation";
+    return resolve_relationshiptype($relationshipdb,$lsid) if $1 eq "servicerelation";
     
 }
 
-sub _die {
-    my $m = shift;
-    my $e = shift;
-    die ($e, $m);
-}
-



More information about the MOBY-guts mailing list