/*
* Created on 16.04.2005
*/
package examples;
/**
* <p>
* This example shows how to create a service grounded to a simple Java method.
* A sample service is generated and a grounding is created, which matches to
* the following method call:
* <br>
* <pre>public String testIt(int i, Double y)</pre>
* </p>
*
* @author Michael Daenzer (University of Zurich)
*/
public class CreateJavaGrounding {
}
JavaAtomicGrounding jAtomicGround = ont.createJavaAtomicGrounding(URI.create(baseURI + "MyJAtomGround"));
// get the parameter using the local name
}
// wait some time to show interruption feature
// calc some value
double s = i * y.doubleValue();
// something to show correct invocation
// provoke exception
//s = Double.parseDouble("ThisThrowsAnException");
return new String("Return value of JavaGrounding " + s);
}
}