[MOBY-guts] biomoby commit
Dennis Wang
dwang at pub.open-bio.org
Wed Aug 3 00:28:20 UTC 2005
dwang
Tue Aug 2 20:28:20 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby
In directory pub.open-bio.org:/tmp/cvs-serv1822/Perl/MOBY/Adaptor/moby
Modified Files:
queryapi.pm
Log Message:
reviewed up to get_object_relationships
moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.25,1.26
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/07/29 07:50:04 1.25
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm 2005/08/03 00:28:20 1.26
@@ -341,8 +341,7 @@
Returns : listref of hashrefs:
[{collection_output_id => Integer,
article_name => String,
- service_instance_id => Integer,
- }]
+ service_instance_id => Integer}, ...]
Notes : Only allows querying by lsid or type term, so service_instance_id is retrieved from lsid or term
=cut
sub query_collection_output{
@@ -403,7 +402,7 @@
namespace_type_uris => String,
article_name => String,
service_instance_id => Integer,
- collection_input_id => Integer}]
+ collection_input_id => Integer}, ...]
Notes : Only allows querying by lsid or type term, so service_instance_id is retrieved from lsid or term
=cut
sub query_simple_input{
@@ -460,7 +459,7 @@
namespace_type_uris => String,
article_name => String,
service_instance_id => Integer,
- collection_output_id => Integer}]
+ collection_output_id => Integer}, ...]
Notes : Only allows querying by lsid or type term, so service_instance_id is retrieved from lsid or term
=cut
sub query_simple_output{
@@ -469,7 +468,7 @@
=head2 insert_simple_output
- Title : inse_simple_output
+ Title : insert_simple_output
Usage : my $un = $API->insert_simple_output(%args)
Function : Inserts a Simple output into the database
Args : object_type_uri => String,
@@ -516,7 +515,7 @@
enum_value => String,
datatype => String,
article_name => String,
- service_instance_id => Integer}]
+ service_instance_id => Integer}, ...]
Notes : Only allows querying by lsid or type term, so service_instance_id is retrieved from lsid or term
=cut
sub query_secondary_input{
@@ -528,12 +527,12 @@
Title : insert_secondary_input
Usage : my $un = $API->insert_secondar_input(%args)
Function : Inserts a Secondary input into the database
- Args : default_value => String,
- maximum_value => Float,
- minimum_value => Float,
- enum_value => String,
- datatype => String,
- article_name => String,
+ Args : default_value => String,
+ maximum_value => Float,
+ minimum_value => Float,
+ enum_value => String,
+ datatype => String,
+ article_name => String,
service_instance_lsid => String
Returns : Integer insertid
Notes : the fact that it returns an insertid is bad since this
@@ -573,7 +572,7 @@
object_type => String,
description => String,
authority => String,
- contact_email => String}]
+ contact_email => String}, ...]
Notes : Only allows querying by lsid or type term
=cut
sub query_object{
@@ -627,7 +626,7 @@
relationship_type => String,
object1_id => String,
object2_id => String,
- object2_articlename => String}]
+ object2_articlename => String}, ...]
Notes : Only allows querying by lsid or type term
=cut
sub query_object_term2term{
@@ -687,13 +686,28 @@
authoritative => Integer,
description => String,
signatureURL => String,
- lsid => String}]
+ lsid => String}, ...]
Notes : Allows querying by multiple conditions joined by 'and'
=cut
sub query_service_instance {
die "query_service_instance not implemented in adaptor\n";
}
+=head2 query_service_existence
+
+ Title : query_service_existence
+ Usage : my $un = $API->query_service_existence(%args)
+ Function : Executes a query to check if the service exists in the database
+ Args : servicename => String
+ authority_uri => String
+ Returns : 1 if service exists
+ 0 if no such service instance
+ Notes : Only allows querying by URI of the authority and service name
+=cut
+sub query_service_existence{
+ die "query_service_existence not implemented in adaptor\n";
+}
+
# This might be redundant of query_service_instance(), since same function can be
# replicated by several of its calls
sub match_service_type_uri{
@@ -750,7 +764,7 @@
Returns : listref of hashrefs:
[{authority_common_name => String,
authority_uri => String,
- contact_email => String}]
+ contact_email => String}, ...]
Notes : Only allows querying by URI of the authority
=cut
sub query_authority{
@@ -807,7 +821,7 @@
service_type => String,
description => String,
authority => String,
- contact_email => String}]
+ contact_email => String}, ...]
Notes : the fact that it returns an service_id is bad since this
is only useful to an SQL-based API...
=cut
@@ -861,7 +875,7 @@
[{assertion_id => Integer,
relationship_type => String,
service1_id => String,
- service2_id => String}]
+ service2_id => String}, ...]
Notes : the fact that it returns an service ids is bad since this
is only useful to an SQL-based API...should return lsids
=cut
@@ -917,7 +931,7 @@
die "query_relationship not implemented in adaptor\n";
}
-# probably no need for this and not implemented in mysql api
+# probably no need for this in the future and not implemented in mysql api
sub insert_relationship{
die "insert_relationship not implemented in adaptor\n";
}
@@ -932,17 +946,18 @@
#
=head2 query_namespace
- Title : insert_namespace
- Usage : my $un = $API->insert_namespace(%args)
- Function : Deletes a namespace instance from the database
- Args : namespace_type => String,
- namespace_lsid => String,
- description => String,
- authority => String,
- contact_email => String
- Returns : Integer mysql_insertid
- Notes : the fact that it returns a mysql_insertid is bad since this
- is only useful to an SQL-based API...
+ Title : query_namespace
+ Usage : my $un = $API->query_namespace(%args)
+ Function : Executes a query for namespace instances in the database
+ Args : type => String - either lsid or term for a particular namespace
+ Returns : listref of hashrefs:
+ [{namespace_id => Integer,
+ namespace_lsid => String,
+ namespace_type => String,
+ description => String,
+ authority => String,
+ contact_email => String}, ...]
+
=cut
sub query_namespace{
die "query_namespace not implemented in adaptor\n";
@@ -991,7 +1006,7 @@
[{assertion_id => Integer,
relationship_type => String,
namespace1_id => String,
- namespace2_id => String}]
+ namespace2_id => String}, ...]
Notes : namespace1_id and namespace2_id will be lsids
=cut
@@ -1146,7 +1161,11 @@
Args : type => String - either an object name or LSID
Returns : listref of hashrefs:
[{relationship_type => String,
+ object_type => String,
object_lsid => String,
+ description => String,
+ authority => String,
+ contact_email => String,
object2_articlename => String}, ...]
one hashref for each relationship between two objects
Notes : relationship_type from object_term2term, object_lsid from object, and object2_articlename from object_term2term
@@ -1170,7 +1189,7 @@
Returns : reference to array containing array-refs representing the result set:
[[String lsid, String relationship_type], ...]
each array-ref represents one row
- Notes : Only returns distinct lsid from $ontology and relationship_type from $ontology_term2term
+ Notes : Only returns distinct lsids from $ontology and relationship_type from $ontology_term2term
=cut
# relationship query for any table used in Moby::OntologyServer->_doRelationshipQuery()
More information about the MOBY-guts
mailing list