[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Wed Oct 22 11:27:46 EDT 2003


mwilkinson
Wed Oct 22 10:27:46 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv6731/Perl/MOBY

Modified Files:
	Central.pm 
Log Message:
repaired the retrieveObjectDefinition method.  It isn't yet written up in the online API, but it is available in the pod documentation for MOB::Central and MOBY::Client::Central.  This method is used to retrieve the definition of an object (i.e. its ISA and HASA relationships and articleName attributes).  It DOES NOT traverse the ontology, so you don't see the details of contained objects - they must be queried independently.

moby-live/Perl/MOBY Central.pm,1.108,1.109
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/10/17 21:29:51	1.108
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/10/22 14:27:45	1.109
@@ -2033,9 +2033,26 @@
  Returns   :	see input XML for registerObjectClass
  Input XML :
          <retrieveObjectDefinition>
-			 <objectType>ExistingObjectClassname</objectType>
+			 <obqjectType>ExistingObjectClassname</objectType>
 		 </retrieveObjectDefinition>
 
+ Ouptut XML :
+        <retrieveObjectDefinition>
+            <objectType>NewObjectType</objectType>
+            <Description><![CDATA[
+                    human readable description
+                    of data type]]>
+            </Description>
+            <Relationship relationshipType="RelationshipOntologyTerm">
+               <objectType articleName="SomeName">ExistingObjectType</objectType>
+            </Relationship>
+            ...
+            ...
+            <authURI>owner.URI.here</authURI>
+            <contactEmail>owner at their.address.com</contactEmail>
+        </retrieveObjectDefinition>
+
+
 =cut
 
 sub retrieveObjectDefinition {
@@ -2043,13 +2060,13 @@
 	my $Parser = new XML::DOM::Parser;
 	my $doc = $Parser->parse($payload);
 	my $term =  &_nodeTextContent($doc, "objectType");
-	return "<registerObjectClass/>" unless $term;
+	return "<retrieveObjectDefinition/>" unless $term;
 	my $OS = MOBY::OntologyServer->new(ontology => 'object');
 	my $def = $OS->retrieveObject(node => $term);  # will return undef if this term does not exist, and does not look like an LSID
-	return "<registerObjectClass/>" unless $def;
+	return "<retrieveObjectDefinition/>" unless $def;
 	my %def = %{$OS->retrieveObject(node => $term)};
 	my $response;
-	$response = "<registerObjectClass>
+	$response = "<retrieveObjectDefinition>
 	<objectType>$def{objectType}</objectType>
 	<Description><![CDATA[$def{description}]]></Description>
 	<authURI>$def{authURI}</authURI>
@@ -2064,7 +2081,7 @@
 		}
 		$response .="</Relationship>\n";
 	}
-	$response .="</registerObjectClass>\n";
+	$response .="</retrieveObjectDefinition>\n";
 	return $response;
 }
 
@@ -2316,6 +2333,7 @@
 }
 
 *DUMP = \&DUMP_MySQL;  # alias it for backward compatibility
+*DUMP = \&DUMP_MySQL;  # alias it for backward compatibility
 
 sub _flatten {
 	# from a given term, traverse the ontology



More information about the MOBY-guts mailing list