[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri Oct 31 18:40:38 UTC 2008


kawas
Fri Oct 31 14:40:37 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies
In directory dev.open-bio.org:/tmp/cvs-serv26229/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies

Modified Files:
	Services.pm 
Log Message:
fixed bug related to how md5 hashes were created.
moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm	2008/09/02 13:12:46	1.7
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm	2008/10/31 18:40:37	1.8
@@ -16,7 +16,7 @@
 use RDF::Core::Model::Serializer;
 use RDF::Core::NodeFactory;
 
-use Digest::MD5;
+use Digest::MD5 qw /md5_hex/;
 
 use XML::LibXML;
 
@@ -264,9 +264,6 @@
 	my $model        = new RDF::Core::Model( Storage => $storage );
 	my $node_factory = new RDF::Core::NodeFactory();
 
-	# used to create bnode IDs
-	my $digest = new Digest::MD5;
-
 	foreach my $SI (@$services) {
 		# used for computing checksums
 		my $service_name = $SI->name;
@@ -371,7 +368,7 @@
 		# add the authoring statements
 		my $bnode = new RDF::Core::Resource(
 			$self->{instance_uri}, 
-			$digest->md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->providedBy )
+			md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->providedBy )
 		); #$node_factory->newResource;
 		$model->addStmt(
 				  new RDF::Core::Statement(
@@ -416,7 +413,7 @@
 		# add parameter statements
 		my $operation = new RDF::Core::Resource(
 			$self->{instance_uri}, 
-			$digest->md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->hasOperation)
+			md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->hasOperation)
 		); # $node_factory->newResource;
 		$model->addStmt(
 				new RDF::Core::Statement(
@@ -444,7 +441,7 @@
 		);
 		$bnode = new RDF::Core::Resource(
 			$self->{instance_uri}, 
-			$digest->md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->performsTask)
+			md5_hex("$service_authority/$service_name/" . MOBY::RDF::Predicates::FETA->performsTask)
 		); # $node_factory->newResource;
 		$model->addStmt(
 				new RDF::Core::Statement(
@@ -476,7 +473,7 @@
 		foreach (@$inputs) {
 			my $inputParameter = new RDF::Core::Resource(
 				$self->{instance_uri}, 
-				$digest->md5_hex(
+				md5_hex(
 					"$service_authority/$service_name/" 
 					. ($_->isSimple ? "isSimple/" : "isCollection/") 
 					. MOBY::RDF::Predicates::FETA->inputParameter 
@@ -514,7 +511,7 @@
 
 				my $oType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->inputParameter
@@ -546,7 +543,7 @@
 
 				my $pType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->hasParameterType
@@ -576,7 +573,7 @@
 				foreach my $n (@$namespaces) {
 					my $inNamespaces = new RDF::Core::Resource(
 						$self->{instance_uri}, 
-						$digest->md5_hex(
+						md5_hex(
 							"$service_authority/$service_name/" 
 							. ($_->isSimple ? "isSimple/" : "isCollection/") 
 							. MOBY::RDF::Predicates::FETA->inputParameter 
@@ -637,7 +634,7 @@
 
 				my $pType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->hasParameterType
@@ -668,7 +665,7 @@
 				foreach my $simp (@$simples) {
 					my $oType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->inputParameter
@@ -701,7 +698,7 @@
 					foreach my $n (@$namespaces) {
 						my $inNamespaces = new RDF::Core::Resource(
 						$self->{instance_uri}, 
-						$digest->md5_hex(
+						md5_hex(
 							"$service_authority/$service_name/" 
 							. ($_->isSimple ? "isSimple/" : "isCollection/") 
 							. MOBY::RDF::Predicates::FETA->inputParameter 
@@ -754,7 +751,7 @@
 			next unless $_->isSecondary;
 			my $inputParameter =  new RDF::Core::Resource(
 				$self->{instance_uri}, 
-				$digest->md5_hex(
+				md5_hex(
 					"$service_authority/$service_name/" 
 					. "isSecondaryInputParameter/"
 					. MOBY::RDF::Predicates::FETA->inputParameter 
@@ -782,7 +779,7 @@
 
 			my $pType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. "isSecondary/"
 						. MOBY::RDF::Predicates::FETA->hasParameterType
@@ -880,7 +877,7 @@
 		foreach (@$outputs) {
 			my $outputParameter = new RDF::Core::Resource(
 				$self->{instance_uri}, 
-				$digest->md5_hex(
+				md5_hex(
 					"$service_authority/$service_name/" 
 					. ($_->isSimple ? "isSimple/" : "isCollection/") 
 					. MOBY::RDF::Predicates::FETA->outputParameter 
@@ -918,7 +915,7 @@
 
 				my $oType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->outputParameter
@@ -950,7 +947,7 @@
 
 				my $pType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->hasParameterType
@@ -980,7 +977,7 @@
 				foreach my $n (@$namespaces) {
 					my $inNamespaces = new RDF::Core::Resource(
 						$self->{instance_uri}, 
-						$digest->md5_hex(
+						md5_hex(
 							"$service_authority/$service_name/" 
 							. ($_->isSimple ? "isSimple/" : "isCollection/") 
 							. MOBY::RDF::Predicates::FETA->outputParameter 
@@ -1041,7 +1038,7 @@
 
 				my $pType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->hasParameterType
@@ -1072,7 +1069,7 @@
 				foreach my $simp (@$simples) {
 					my $oType = new RDF::Core::Resource(
 					$self->{instance_uri}, 
-					$digest->md5_hex(
+					md5_hex(
 						"$service_authority/$service_name/" 
 						. ($_->isSimple ? "isSimple/" : "isCollection/" )
 						. MOBY::RDF::Predicates::FETA->outputParameter
@@ -1105,7 +1102,7 @@
 					foreach my $n (@$namespaces) {
 						my $inNamespaces = new RDF::Core::Resource(
 						$self->{instance_uri}, 
-						$digest->md5_hex(
+						md5_hex(
 							"$service_authority/$service_name/" 
 							. ($_->isSimple ? "isSimple/" : "isCollection/") 
 							. MOBY::RDF::Predicates::FETA->outputParameter 




More information about the MOBY-guts mailing list