[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Jul 26 23:32:48 UTC 2005


mwilkinson
Tue Jul 26 19:32:48 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby
In directory pub.open-bio.org:/tmp/cvs-serv25766/MOBY/Adaptor/moby

Modified Files:
	queryapi.pm 
Log Message:
adaptor API should now be complete

moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.15,1.16
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/26 21:55:28	1.15
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/26 23:32:48	1.16
@@ -613,10 +613,10 @@
 	die "check_object_usage not implemented in adaptor\n";
 }
 
-=head2 checkNamespaceUsedByService
+=head2 check_namespace_usage
 
- Title     :	checkNamespaceUsedByService
- Usage     :	my $un = $API->checkNamespaceUsedByService(%args)
+ Title     :	check_namespace_usage
+ Usage     :	my $un = $API->check_namespace_usage(%args)
  Function  :	Execute a custom query for namespaces that are used by some service
  Args      :    namespace_type_uris => String - namespace_type_uris you are checking for
 				term => String - the type of the namespace
@@ -627,16 +627,16 @@
  
 =cut
 # custom query routine for Moby::Central.pm -> deregisterNamespace()
-sub checkNamespaceUsedByService{
-	die "checkNamespaceUsedByService not implemented in adaptor\n";
+sub check_namespace_usage{
+	die "check_namespace_usage not implemented in adaptor\n";
 }
 
-=head2 checkKeywords
+=head2 check_keywords
 
- Title     :	checkKeywords
- Usage     :	my $un = $API->checkKeywords(%args)
+ Title     :	check_keywords
+ Usage     :	my $un = $API->check_keywords(%args)
  Function  :	Execute a custom query for services with keywords in its description
- Args      :    findme => hashref - hash contains an array of keywords
+ Args      :    keywords => listref (of keywords)
  Returns   :    listref of hashrefs:
                 [{service_instance_id => Integer,
                 category 			  => String, 
@@ -652,17 +652,18 @@
                 Each hash represents a service
  Notes     : 	the fact that it returns a service_instance_id is bad since this
              	is only useful to an SQL-based API...
- 
+		Keywords are assumed to be joined by "OR" for the query 
+
 =cut
 # custom query routine for Moby::Central.pm -> findService()
-sub checkKeywords{
-	die "checkKeywords not implemented in adaptor\n";
+sub check_keywords{
+	die "check_keywords not implemented in adaptor\n";
 }
 
-=head2 getFromSimple
+=head2 find_by_simple
 
- Title     :	getFromSimple
- Usage     :	my $un = $API->getFromSimple(%args)
+ Title     :	find_by_simple
+ Usage     :	my $un = $API->find_by_simple(%args)
  Function  :	Execute a custom query for service ids in simple_input/output
  Args      :    inout => String - to specify if input or output
 				ancestor_string => String - values that occur in object_type_uri
@@ -675,14 +676,14 @@
  
 =cut
 # custom query subroutine for Moby::Central.pm->_searchForSimple()
-sub getFromSimple{
-	die "getFromSimple not implemented in adaptor\n";
+sub find_by_simple{
+	die "find_by_simple not implemented in adaptor\n";
 }
 
-=head2 getFromCollection
+=head2 find_by_collection
 
- Title     :	getFromCollection
- Usage     :	my $un = $API->getFromCollection(%args)
+ Title     :	find_by_collection
+ Usage     :	my $un = $API->find_by_collection(%args)
  Function  :	Execute a custom query for service ids from collections
  Args      :    inout => String - to specify if input or output
 				objectURI => String - value that binds to object_type_uri
@@ -695,14 +696,14 @@
  
 =cut
 # custom query subroutine for Moby::Central.pm->_searchForCollection()
-sub getFromCollection{
-	die "getFromCollection not implemented in adaptor\n";
+sub find_by_collection{
+	die "find_by_collection not implemented in adaptor\n";
 }
 
-=head2 getServiceNames
+=head2 get_service_names
 
- Title     :	getServiceNames
- Usage     :	my $un = $API->getServiceNames(%args)
+ Title     :	get_service_names
+ Usage     :	my $un = $API->get_service_names(%args)
  Function  :	Execute a query for all service names
  Args      :    no inputs needed
  Returns   :    listref of hashrefs:
@@ -712,14 +713,14 @@
  
 =cut
 # custom query subroutine for Moby::Central.pm->RetrieveServiceNames
-sub getServiceNames{	
-	die "getServiceNames not implemented in adaptor\n";
+sub get_service_names{	
+	die "get_service_names not implemented in adaptor\n";
 }
 
-=head2 getParentTerms
+=head2 get_parent_terms
 
- Title     :	getParentTerms
- Usage     :	my $un = $API->getParentTerms(%args)
+ Title     :	get_parent_terms
+ Usage     :	my $un = $API->get_parent_terms(%args)
  Function  :	From a given term, traverse the ontology and get all parent terms
  Args      :    relationship_type_id => Integer - a bind value for relationship_type_id on an underlying SQL-based data source
  				term => String - bindvalue for OntologyEntry.term
@@ -729,16 +730,16 @@
  
 =cut
 # custom query for Moby::Central.pm->_flatten
-sub getParentTerms{
-	die "getParentTerms not implemented in adaptor\n";
+sub get_parent_terms{
+	die "get_parent_terms not implemented in adaptor\n";
 }
 
-=head2 getObjectRelationships
+=head2 get_object_relationships
 
- Title     :	getObjectRelationships
- Usage     :	my $un = $API->getObjectRelationships(%args)
+ Title     :	get_object_relationships
+ Usage     :	my $un = $API->get_object_relationships(%args)
  Function  :	Execute a query for objects that have relationships with other objects
- Args      :    object1_id => Integer - a bind value for object1_id on an underlying SQL-based data source
+ Args      :    type => String - either an object name or LSID
  Returns   :    listref of hashrefs:
                 [{relationship_type => String,
                 object_lsid         => String,
@@ -749,14 +750,14 @@
 =cut
 # custom query subroutine for selecting from object_term2term and object tables
 # used in Moby::OntologyServer.pm->retrieveObject()
-sub getObjectRelationships{
-	die "getObjectRelationships not implemented in adaptor\n";
+sub get_object_relationships{
+	die "get_object_relationships not implemented in adaptor\n";
 }
 
-=head2 getRelationship
+=head2 get_relationship
 
- Title     :	getRelationship
- Usage     :	my $un = $API->getRelationships(%args)
+ Title     :	get_relationship
+ Usage     :	my $un = $API->get_relationship(%args)
  Function  :	Execute a query for a relationship between two ontologies
  Args      :    direction => String - direction in the ontology (eg. 'root')
  				ontology => String - name of the table ontology
@@ -770,8 +771,8 @@
 =cut
 # relationship query for any table used in Moby::OntologyServer->_doRelationshipQuery()
 # note: returns a reference to an array containing ARRAY references
-sub getRelationship{
-	die "getRelationship not implemented in adaptor\n";
+sub get_relationship{
+	die "get_relationship not implemented in adaptor\n";
 }
 
 # Not quite sure what this does...




More information about the MOBY-guts mailing list