[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Tue Oct 21 16:41:23 UTC 2008
kawas
Tue Oct 21 12:41:22 EDT 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended
In directory dev.open-bio.org:/tmp/cvs-serv21511/src/main/org/biomoby/shared/extended
Modified Files:
ServiceInstanceParser.java
Log Message:
committing additions to the class that augment this class with the ability to parse and set unit testing data for a service
moby-live/Java/src/main/org/biomoby/shared/extended ServiceInstanceParser.java,1.24,1.25
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java 2008/02/28 17:00:12 1.24
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/extended/ServiceInstanceParser.java 2008/10/21 16:41:22 1.25
@@ -18,6 +18,7 @@
import org.biomoby.shared.MobySecondaryData;
import org.biomoby.shared.MobyService;
import org.biomoby.shared.MobyServiceType;
+import org.biomoby.shared.MobyUnitTest;
import org.biomoby.shared.Utils;
import com.hp.hpl.jena.rdf.model.Model;
@@ -35,7 +36,10 @@
/**
*
- * @author Eddie created Oct 18, 2005 This class parses the RDF document that
+ * @author Eddie Kawas
+ * @author Wendy Alexander
+ *
+ * created Oct 18, 2005 This class parses the RDF document that
* describes the service instance ontology.
* <p>
* An example of how to use this class is below:
@@ -247,6 +251,21 @@
}
}
}
+
+ // get/set the unit test information for the service
+ if (hoResource.hasProperty(FetaVocabulary.hasUnitTest)) {
+ Resource utResource = hoResource.getProperty(FetaVocabulary.hasUnitTest).getResource();
+ MobyUnitTest mut = new MobyUnitTest();
+ if (utResource.hasProperty(FetaVocabulary.exampleInput))
+ mut.setExampleInput(utResource.getProperty(FetaVocabulary.exampleInput).getObject().toString());
+ if (utResource.hasProperty(FetaVocabulary.validOutputXML))
+ mut.setValidOutputXML(utResource.getProperty(FetaVocabulary.validOutputXML).getObject().toString());
+ if (utResource.hasProperty(FetaVocabulary.validXPath))
+ mut.setValidXPath(utResource.getProperty(FetaVocabulary.validXPath).getObject().toString());
+ if (utResource.hasProperty(FetaVocabulary.validREGEX))
+ mut.setValidREGEX(utResource.getProperty(FetaVocabulary.validREGEX).getObject().toString());
+ service.setUnitTest(mut);
+ }
}
More information about the MOBY-guts
mailing list