JavaAtomicGroundingImpl.java revision 30
214N/A * A JavaAtomicGrounding grounds an OWL-S Service to a Java method invocation. The method call
493N/A * <li>a map of all input parameters (at the time only primitive datatypes and their adapter classes)</li>
* @see <a href="http://www.ifi.unizh.ch/ddis/ont/owl_s/MoreGroundings.owl">Grounding Ontology</a>
super(ind);
* @see org.mindswap.owls.grounding.JavaAtomicGrounding#setClaz(java.lang.String)
* @see org.mindswap.owls.grounding.JavaAtomicGrounding#getClaz()
* @see org.mindswap.owls.grounding.JavaAtomicGrounding#setMethod(java.lang.String)
* @see org.mindswap.owls.grounding.JavaAtomicGrounding#getMethod()
return null;
* @see org.mindswap.owls.grounding.AtomicGrounding#addMessageMap(org.mindswap.owls.process.Parameter, java.lang.String, java.lang.String)
return null;
return null;
* @see org.mindswap.owls.grounding.AtomicGrounding#invoke(org.mindswap.query.ValueMap, org.mindswap.owl.OWLKnowledgeBase)
} catch (ClassNotFoundException e){
throw new ExecutionException("JavaAtomicGrounding: Class " + strClaz + " defined in Grounding not found." );
} catch (NoSuchMethodException e) {
throw new ExecutionException("JavaAtomicGrounding: Method " + strMethod + " defined in Grounding not found." );
} catch (Exception e) {
throw new ExecutionException("JavaAtomicGrounding: " + e.getClass().toString() + " ocurred: " + e.getMessage());
paramValues[i] = ReflectionUtils.getCastedObjectFromStringValue(((OWLDataValue) owlValue).getLexicalValue(), params[i]);
} catch (InvocationTargetException e) {
throw new ExecutionException("JavaAtomicGrounding: Error in executed method\n" + e.getTargetException().toString() + " ocurred: ");
} catch (Exception e) {
throw new ExecutionException("JavaAtomicGrounding: Error while executing method\n" + e.getClass().toString() + " ocurred: ");
throw new ExecutionException("JavaAtomicGrounding: Output in Grounding not specified although method provides a return value.");
return results;
return null;
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
return null;
OWLObject owlsParam = getProperty(MoreGroundings.javaOutput).getProperty(MoreGroundings.owlsParameter);
return null;
return null;
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
return null;
return null;
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
return null;
* @see org.mindswap.owls.grounding.JavaAtomicGrounding#setOutputVar(java.lang.String, java.lang.String, org.mindswap.owls.process.Output)
* @see org.mindswap.owls.grounding.JavaAtomicGrounding#setInputVar(java.lang.String, java.lang.String, int, org.mindswap.owls.process.Input)
OWLIndividual ind = getOntology().createInstance(MoreGroundings.JavaParameter, URIUtils.createURI(name));
private void removeAll() {
public void delete() {
removeAll();
super.delete();
return null;
return null;
int pos = i;
pos = j;
return list;