[MOBY-guts] biomoby commit
senger@ebi.ac.uk
senger at pub.open-bio.org
Wed Sep 22 21:11:17 UTC 2004
senger
Wed Sep 22 17:11:17 EDT 2004
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory pub.open-bio.org:/tmp/cvs-serv15476/src/Clients
Modified Files:
MobyCmdLineClient.java PopulateLocalCentralForTesting.java
TestingCentral.java
Log Message:
new registration procedure, etc.
moby-live/Java/src/Clients MobyCmdLineClient.java,1.4,1.5 PopulateLocalCentralForTesting.java,1.1,1.2 TestingCentral.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java 2004/05/18 10:13:16 1.4
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java 2004/09/22 21:11:17 1.5
@@ -221,11 +221,24 @@
for (int i = 0; i < hasas.length; i++) {
int pos = hasas[i].indexOf (":");
if (pos == -1) {
- data.addChild (null, hasas [i]);
+ data.addChild (null, hasas [i], MobyRelationship.HASA);
} else if (pos == hasas[i].length() - 1) {
- data.addChild (null, hasas [i].substring (0, pos));
+ data.addChild (hasas [i].substring (0, pos), null, MobyRelationship.HASA);
} else {
- data.addChild (hasas[i].substring (0, pos), hasas[i].substring (pos+1));
+ data.addChild (hasas[i].substring (0, pos), hasas[i].substring (pos+1), MobyRelationship.HASA);
+ }
+ }
+ }
+ if ((param = cmd.getParam ("-rd-has")) != null ) {
+ String[] hasas = StringUtils.split (param, ",");
+ for (int i = 0; i < hasas.length; i++) {
+ int pos = hasas[i].indexOf (":");
+ if (pos == -1) {
+ data.addChild (null, hasas [i], MobyRelationship.HAS);
+ } else if (pos == hasas[i].length() - 1) {
+ data.addChild (hasas [i].substring (0, pos), null, MobyRelationship.HAS);
+ } else {
+ data.addChild (hasas[i].substring (0, pos), hasas[i].substring (pos+1), MobyRelationship.HAS);
}
}
}
@@ -273,7 +286,15 @@
service.setAuthoritative (param.equals ("1") ? true : false);
}
service.setURL (cmd.getParam ("-rs-url"));
- if ((param = cmd.getParam ("-rs-in")) != null ) {
+ service.setSignatureURL (cmd.getParam ("-rs-rdf"));
+ if ( (param = cmd.getParam ("-rs-rdfpath")) != null ) {
+ service.setPathToRDF (param);
+ } else {
+ File tmpFile = File.createTempFile ("Moby-RDF." + service.getName() + ".", ".xml");
+ service.setPathToRDF (tmpFile.getAbsolutePath());
+ }
+
+ if ( (param = cmd.getParam ("-rs-in")) != null ) {
String[] inputs = StringUtils.split (param, ",");
for (int i = 0; i < inputs.length; i++) {
String[] parts = StringUtils.split (inputs[i], "=");
@@ -346,7 +367,9 @@
if ((param = cmd.getParam ("-rs-out")) != null ) {
String[] outs = StringUtils.split (param, ",");
for (int i = 0; i < outs.length; i++) {
- service.addOutput (new MobyPrimaryDataSimple (outs[i]));
+ MobyPrimaryDataSimple data = new MobyPrimaryDataSimple ("dummy");
+ data.setDataType (new MobyDataType (outs[i]));
+ service.addOutput (data);
}
}
if ((param = cmd.getParam ("-rs-ofile")) != null ) {
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/PopulateLocalCentralForTesting.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/PopulateLocalCentralForTesting.java 2003/10/17 13:13:34 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/PopulateLocalCentralForTesting.java 2004/09/22 21:11:17 1.2
@@ -240,10 +240,10 @@
protected MobyDataType[] createAllDataTypes() {
MobyDataType data1 = createDataType (dataType_1);
data1.addParentName ("Object");
- data1.addChild ("address", "string");
- data1.addChild ("age", "integer");
- data1.addChild ("salary", "float");
- data1.addChild ("born", "datetime");
+ data1.addChild ("address", "string", MobyRelationship.HASA);
+ data1.addChild ("age", "integer", MobyRelationship.HASA);
+ data1.addChild ("salary", "float", MobyRelationship.HASA);
+ data1.addChild ("born", "datetime", MobyRelationship.HASA);
MobyDataType data2 = createDataType (dataType_2);
data2.addParentName ("Object");
MobyDataType data3 = createDataType (dataType_3);
@@ -253,8 +253,8 @@
MobyDataType data5 = createDataType (dataType_5);
data5.addParentName (dataType_3);
data5.addParentName (dataType_2);
- data5.addChild ("range_min", "integer");
- data5.addChild ("range_max", "integer");
+ data5.addChild ("range_min", "integer", MobyRelationship.HAS);
+ data5.addChild ("range_max", "integer", MobyRelationship.HAS);
return new MobyDataType [] { data1, data2, data3, data4, data5 };
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestingCentral.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/Clients/TestingCentral.java 2003/10/17 13:13:34 1.2
+++ /home/repository/moby/moby-live/Java/src/Clients/TestingCentral.java 2004/09/22 21:11:17 1.3
@@ -122,7 +122,7 @@
// command-line parameters
int i = 0;
while (i < args.length) {
- if (args[i].equals ("-help") || args[i].equals ("-")) {
+ if (args[i].equals ("-help") || args[i].equals ("-h")) {
System.out.println
("Usage: java TestingCentral [-e <endpoint>] [-u <uri>] [-debug]");
System.exit (0);
@@ -160,6 +160,7 @@
// create service proxy...
TestingCentral helper = new TestingCentral();
Central worker = new CentralImpl (endpoint, uri);
+ worker.setDebug (debug);
// ...and call other methods:
String result;
@@ -246,9 +247,9 @@
try {
start ("registerDataType - 2");
data2.addParentName (data1.getName());
- data2.addChild ("len", "Integer");
- data2.addChild ("sub", "String");
- data2.addChild ("real_type", data3.getName());
+ data2.addChild ("len", "Integer", MobyRelationship.HASA);
+ data2.addChild ("sub", "String", MobyRelationship.HAS);
+ data2.addChild ("real_type", data3.getName(), MobyRelationship.HASA);
worker.registerDataType (data2);
ok();
} catch (MobyException e) { error (e);
@@ -283,7 +284,8 @@
MobySecondaryData secData1 = helper.createSecondaryData ("Secondary_A", "Integer");
MobySecondaryData secData2 = helper.createSecondaryData ("Secondary_B", "String");
- MobySecondaryData secData3 = helper.createSecondaryData ("Secondary_C", name3);
+// MobySecondaryData secData3 = helper.createSecondaryData ("Secondary_C", name3);
+ MobySecondaryData secData3 = helper.createSecondaryData ("Secondary_C", "DateTime");
MobyService service = helper.createService ("MyTestingService_" + new Date().getTime());
service.setType (stype.getName());
More information about the MOBY-guts
mailing list