[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Thu Jan 29 19:12:58 UTC 2009


kawas
Thu Jan 29 14:12:58 EST 2009
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder
In directory dev.open-bio.org:/tmp/cvs-serv12590/src/main/org/biomoby/client/rdf/builder

Modified Files:
	ServiceInstanceRDF.java 
Log Message:
updated to reflect the fact that >= 0 test cases are available and not 0 or 1.
moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.38,1.39
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java	2008/11/07 17:26:34	1.38
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java	2009/01/29 19:12:58	1.39
@@ -347,33 +347,39 @@
 	    hasOperation.addProperty(FetaVocabulary.performsTask, performs);
 
 	    // add any unit test information now
-	    if (services[i].getUnitTest() != null) {
-		MobyUnitTest mobyUnitTest = services[i].getUnitTest();
-        	Resource unitTest = model.createResource(SI
-        		+ MD5Checksum.md5(services[i].getAuthority()
-        		+ "/"
-        		+ services[i].getName()
-        		+ "/"
-        		+ FetaVocabulary.unitTest.getURI()));
-        	unitTest.addProperty(RDF.type, FetaVocabulary.unitTest);
-        	// add the example input if defined
-        	if (!mobyUnitTest.getExampleInput().trim().equals("")) {
-        	    unitTest.addProperty(FetaVocabulary.exampleInput, mobyUnitTest.getExampleInput());
-        	}
-        	// add the valid output xml if defined
-        	if (!mobyUnitTest.getValidOutputXML().trim().equals("")) {
-        	    unitTest.addProperty(FetaVocabulary.validOutputXML, mobyUnitTest.getValidOutputXML());
-        	}
-        	// add the valid regex if defined
-        	if (!mobyUnitTest.getValidREGEX().trim().equals("")) {
-        	    unitTest.addProperty(FetaVocabulary.validREGEX, mobyUnitTest.getValidREGEX());
-        	}
-        	// add the xpath expression if defined
-        	if (!mobyUnitTest.getValidXPath().trim().equals("")) {
-        	    unitTest.addProperty(FetaVocabulary.validXPath, mobyUnitTest.getValidXPath());
-        	}
-        	// add node to the graph
-        	hasOperation.addProperty(FetaVocabulary.hasUnitTest, unitTest);
+	    if (services[i].getUnitTests() != null) {
+		for (MobyUnitTest mobyUnitTest : services[i].getUnitTests()) {
+		    Resource unitTest = model.createResource(SI
+			    + MD5Checksum.md5(services[i].getAuthority()
+				    + "/"
+				    + services[i].getName()
+				    + "/"
+				    + mobyUnitTest.getExampleInput() .trim()
+				    + mobyUnitTest.getValidOutputXML() .trim()
+				    + mobyUnitTest.getValidREGEX() .trim()
+				    + mobyUnitTest.getValidXPath() .trim()
+				    + "/"
+				    + FetaVocabulary.unitTest.getURI()));
+		    unitTest.addProperty(RDF.type, FetaVocabulary.unitTest);
+		    // add the example input if defined
+		    if (!mobyUnitTest.getExampleInput().trim().equals("")) {
+			unitTest.addProperty(FetaVocabulary.exampleInput, mobyUnitTest.getExampleInput());
+		    }
+		    // add the valid output xml if defined
+		    if (!mobyUnitTest.getValidOutputXML().trim().equals("")) {
+			unitTest.addProperty(FetaVocabulary.validOutputXML, mobyUnitTest.getValidOutputXML());
+		    }
+		    // add the valid regex if defined
+		    if (!mobyUnitTest.getValidREGEX().trim().equals("")) {
+			unitTest.addProperty(FetaVocabulary.validREGEX, mobyUnitTest.getValidREGEX());
+		    }
+		    // add the xpath expression if defined
+		    if (!mobyUnitTest.getValidXPath().trim().equals("")) {
+			unitTest.addProperty(FetaVocabulary.validXPath, mobyUnitTest.getValidXPath());
+		    }
+		    // add node to the graph
+		    hasOperation.addProperty(FetaVocabulary.hasUnitTest, unitTest);
+		}
 	    }
 	    
 	    




More information about the MOBY-guts mailing list