RunService.java revision 2
// The MIT License
//
// Copyright (c) 2004 Evren Sirin
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
/*
* Created on Mar 19, 2004
*/
package examples;
/**
*
* Examples to show how services can be executed. Some examples of simple execution monitoring is
* included.
*
* @author Evren Sirin
*/
public class RunService {
WSDLService s;
public RunService() {
// create an execution engine
// Attach a listener to the execution engine
}
public void runZipCode() throws Exception {
// initialize the input values to be empty
// get the result
// do something with output
}
public void runJGroundingTest() throws Exception {
// read the service description
// get the parameter using the local name
// do something with output
}
public void runBookFinder() throws Exception {
// read the service description
// initialize the input values to be empty
// use any book name
inValue = "City of Glass";
// get the parameter using the local name
// get the output param using the index
// do something with output
}
public void runBookPrice() throws Exception {
// read the service description
// initialize the input values to be empty
// use an arbitrary book name
inValue = "City of Glass";
// get the parameter using the local name
// get the output param using the index
// do something with output
}
public void runFindCheaperBook() throws Exception {
// we need to check preconditions so that local variables will be assigned values
exec.setPreconditionCheck( true );
// read the service description
// initialize the input values to be empty
// use an arbitrary book name
// get the output values
// do something with output
}
public void runCurrencyConverter() throws Exception {
// read the service description
// initialize the input values to be empty
// get the parameter using the local name
// get the output param using the index
// do something with output
}
public void runFrenchDictionary() throws Exception {
// we need a reasoner that can evaluate the precondition of the translator
// initialize the input values to be empty
inValue = "mere";
// get the output using local name
// do something with output
}
public void runTranslator() throws Exception {
// language ontology
// we at least need RDFS reasoning to evaluate preconditions (to understand
// that process:Parameter is subclass of swrl:Variable)
// get the references for these values
// initialize the input values to be empty
// get the output using local name
// do something with output
}
public void runDictionary() throws Exception {
// initialize the input values to be empty
inValue = "hello";
// get the output
// do something with output
}
try {
} catch(Exception e) {
}
try {
runZipCode();
} catch(Exception e) {
}
try {
} catch(Exception e) {
}
try {
} catch(Exception e) {
}
try {
} catch(Exception e) {
}
try {
} catch(Exception e) {
}
try {
} catch(Exception e) {
}
try {
runBookPrice();
} catch(Exception e) {
}
try {
} catch(Exception e) {
}
}
}
}