2ronwalf// The MIT License
2ronwalf//
2ronwalf// Copyright (c) 2004 Evren Sirin
2ronwalf//
2ronwalf// Permission is hereby granted, free of charge, to any person obtaining a copy
2ronwalf// of this software and associated documentation files (the "Software"), to
2ronwalf// deal in the Software without restriction, including without limitation the
2ronwalf// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
2ronwalf// sell copies of the Software, and to permit persons to whom the Software is
2ronwalf// furnished to do so, subject to the following conditions:
2ronwalf//
2ronwalf// The above copyright notice and this permission notice shall be included in
2ronwalf// all copies or substantial portions of the Software.
2ronwalf//
2ronwalf// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2ronwalf// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2ronwalf// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2ronwalf// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2ronwalf// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2ronwalf// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2ronwalf// IN THE SOFTWARE.
2ronwalf
2ronwalf/*
2ronwalf * Created on 13.04.2005
2ronwalf */
2ronwalfpackage org.mindswap.owls.grounding;
2ronwalf
26daenzeroramaimport org.mindswap.owl.OWLIndividualList;
2ronwalfimport org.mindswap.owls.process.Input;
2ronwalfimport org.mindswap.owls.process.Output;
2ronwalf
2ronwalf/**
2ronwalf * <p>This interface encapsulates the access to a JavaAtomicProcessGrounding.</p>
2ronwalf *
2ronwalf * <p>A JavaAtomicGrounding grounds an OWL-S Service to a Java method invocation. The method call
2ronwalf * is specified by its method signature in an OWL-S Ontology.</p>
2ronwalf *
2ronwalf * <p>Static methods can be invoked, Exceptions during the execution are catched and redirected in a ExecutionExecpetion.
2ronwalf * At the time, only primitive datatypes (such as int, boolean and so on) and thier adapters (such as Integer, Boolean and so on)
2ronwalf * are support as Parameter and ReturnValue types.</p>
2ronwalf *
2ronwalf * <p>The driving parts are:
2ronwalf * <ul>
2ronwalf * <li>fully qualified class name</li>
2ronwalf * <li>method name</li>
2ronwalf * <li>a map of all input parameters (at the time only primitive datatypes and their adapter classes)</li>
2ronwalf * <li>an output type (at the time only primitive datatypes and their adapter classes)</li>
2ronwalf * </ul></p>
2ronwalf *
38daenzerorama * @author Michael Daenzer (University of Zurich)
2ronwalf * @see <a href="http://www.ifi.unizh.ch/ddis/ont/owl-s/MoreGroundings.owl">MoreGroundings.owl</a>
2ronwalf * @see org.mindswap.owls.grounding.AtomicGrounding
2ronwalf * @see org.mindswap.owls.vocabulary.MoreGroundings
2ronwalf */
2ronwalfpublic interface JavaAtomicGrounding extends AtomicGrounding {
2ronwalf /**
2ronwalf * Sets the name of the class, on which the method in the Grounding should be executed
2ronwalf *
2ronwalf * @param claz Fully qualified name of the Java class, which implements the method to invoke
2ronwalf */
2ronwalf public void setClaz(String claz);
2ronwalf /**
2ronwalf * Returns the name of the class, on which the method in the Grounding should be executed
2ronwalf *
2ronwalf * @return Name of the class specified in the JavaAtomicProcessGrounding
2ronwalf */
2ronwalf public String getClaz();
2ronwalf
2ronwalf /**
2ronwalf * Sets the name of the method which should be executed
2ronwalf *
2ronwalf * @param method Name of the method to invoke
2ronwalf */
2ronwalf public void setMethod(String method);
2ronwalf /**
2ronwalf * Returns the name of the method which should be executed
2ronwalf *
2ronwalf * @return Name of the method specified in the JavaAtomicProcessGrounding
2ronwalf */
2ronwalf public String getMethod();
2ronwalf /**
2ronwalf * Sets the Output part of the Java Grounding. Declares the return value of the Java method to invoke
2ronwalf *
2ronwalf * @param name Name of the OWL-S JavaVariable instance
2ronwalf * @param type Fully qualified Java type of the return value of the method to invoke
2ronwalf * @param owlsParameter Reference to the OWL-S Output Variable
2ronwalf */
30daenzerorama public void setOutput(String name, String type, Output owlsParameter);
2ronwalf /**
2ronwalf * Sets an Input Parameter of the Java Grounding. Declares one Parameter of the Jave method to invoke
2ronwalf *
2ronwalf * @param name Name of the OWL-S JavaParameter instance
2ronwalf * @param type Fully qualified Java type of the Java Parameter to set
2ronwalf * @param index Number of order for this Parameter in the Parameter-List
2ronwalf * @param owlsParameter Reference to the OWL-S Input Variable
2ronwalf */
24daenzerorama public void setInputParameter(String name, String type, int index, Input owlsParameter);
24daenzerorama
24daenzerorama /**
24daenzerorama * Returns the java input parameter related to given OWL-S input
24daenzerorama * @return the java input parameter related to given OWL-S input
24daenzerorama */
24daenzerorama public JavaParameter getInputParamter(Input input);
24daenzerorama
24daenzerorama /**
26daenzerorama * Returns the input parameters for this java method in correct order
26daenzerorama * @see org.mindswap.owls.vocabulary.MoreGroundings#paramIndex
26daenzerorama * @return a list with all inputs for this java method in correct order
26daenzerorama */
26daenzerorama public OWLIndividualList getInputParameters();
26daenzerorama
26daenzerorama /**
24daenzerorama * Returns the java output variable related to given OWL-S output
24daenzerorama * @return the java output variable related to given OWL-S output
24daenzerorama */
30daenzerorama public JavaVariable getOutput();
2ronwalf}