index.html revision 2
2ronwalf<?xml version="1.0" encoding="iso-8859-1"?>
2ronwalf<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2ronwalf "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2ronwalf<html xmlns="http://www.w3.org/1999/xhtml">
2ronwalf <head>
2ronwalf <link href="http://www.mindswap.org/css/mindswap.css" type="text/css" rel="stylesheet" />
2ronwalf<link media="screen" href="http://www.mindswap.org/css/swap.css" type="text/css" rel="stylesheet" title="normal"/><link media="screen" href="http://www.mindswap.org/css/mind.css" type="text/css" rel="alternate stylesheet" title="none"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2ronwalf<meta name="ICBM" content="38.99358387,-76.93262615"/>
2ronwalf
2ronwalf
2ronwalf
2ronwalf <title>OWL-S @ MINDSWAP</title>
2ronwalf <meta name="DC.Creator" content="Evren Sirin"/>
2ronwalf <meta name="DC.Language" content="en"/>
2ronwalf <meta name="DC.Date" content="Monday, 05-Apr-2004 04:34:21 EDT"/>
2ronwalf </head>
2ronwalf<body>
2ronwalf
2ronwalf<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2ronwalf "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2ronwalf<!--HTML-->
2ronwalf<html xmlns="http://www.w3.org/1999/xhtml">
2ronwalf<head>
2ronwalf<title>Semantic Web Research Group</title>
2ronwalf<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2ronwalf<link href="/css/mindswap.css" type="text/css" rel="stylesheet" />
2ronwalf<link media="screen" href="/css/swap.css" type="text/css" rel="stylesheet" title="normal"/><link media="screen" href="/css/mind.css" type="text/css" rel="alternate stylesheet" title="none"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2ronwalf<meta name="ICBM" content="38.99358387,-76.93262615"/>
2ronwalf
2ronwalf
2ronwalf
2ronwalf</head>
2ronwalf<body>
2ronwalf
2ronwalf<div id="wholePageHeader">
2ronwalf <div id="pageHeader">
2ronwalf <div id="logo"></div>
2ronwalf <h1 class="headingTitle">Mindswap</h2>
2ronwalf <h2 class="headingSubtitle">Maryland Information and Network Dynamics Lab Semantic Web Agents Project </h2>
2ronwalf </div>
2ronwalf
2ronwalf<div class="menu"><ul>
2ronwalf <li><a href="http://www.mindswap.org/">Home</a></li>
2ronwalf <li><a href="http://www.mindswap.org/people/">People</a></li>
2ronwalf <li><a href="http://www.mindswap.org/papers/">Papers</a></li>
2ronwalf <li><a href="http://www.mindswap.org/demos/">Demos</a></li>
2ronwalf <li><a href="http://www.mindswap.org/downloads/">Downloads</a></li>
2ronwalf <li><a href="http://www.mindswap.org/directions/">Directions</a></li>
2ronwalf <li><a href="http://www.mindswap.org/wikis/">Wikis</a></li>
2ronwalf</ul></div>
2ronwalf</div>
2ronwalf<div id="mainContent">
2ronwalf <div id="floatedLogo"></div>
2ronwalf <div id="mainContentInner">
2ronwalf
2ronwalf
2ronwalf
2ronwalf
2ronwalf<h2>Contents</h2>
2ronwalf<ol>
2ronwalf <li><h5><a href="#javadocs">API javadocs</a></h5></li>
2ronwalf <li><h5><a href="#services">Service examples</a></h5></li>
2ronwalf <li><h5><a href="#io">Reading/writing service descriptions</a></h5></li>
2ronwalf <li><h5><a href="#translation">Translating older service descriptions</a></h5></li>
2ronwalf <li><h5><a href="#validation">OWL-S Validation</a></h5></li>
2ronwalf <li><h5><a href="#cache">Loading cached ontologies</a></h5></li>
2ronwalf <li><h5><a href="#exec">Executing services</a></h5></li>
2ronwalf <li><h5><a href="#monitor">Execution monitoring</a></h5></li>
2ronwalf <li><h5><a href="#composite">Creating composite processes</a></h5></li>
2ronwalf <li><h5><a href="#owl">Using OWL resources</a></h5></li>
2ronwalf <li><h5><a href="#wsdl">WSDL support</a></h5></li>
2ronwalf</ol>
2ronwalf
2ronwalf<h2>Tutorial</h2>
2ronwalf<ol>
2ronwalf <li><h5><a name="javadocs">API javadocs</a></h5>
2ronwalf <p>The javadocs of the API is included in the distribution file. You can access the online version
2ronwalf <a href="javadoc/index.html">here</a>.
2ronwalf </p>
2ronwalf </li>
2ronwalf <li><h5><a name="#services">Service examples</a></h5>
2ronwalf <p>There are couple of example OWL-S files here <a href="http://www.mindswap.org/2004/owl-s/services.shtml">http://www.mindswap.org/2004/owl-s/services.shtml</a>.
2ronwalfThese services are all grounded in actual WSDL services and can be executed with the API. These are simple service descriptions to show different features in OWL-S such
2ronwalfas how to define XSLT transformations in groundings, how to define CompositeProcesses and data flows and so on.</p>
2ronwalf <p>The examples directory in the distribution file contains example code that shows how to use these service
2ronwalf descriptions in the API.</p>
2ronwalf <p>&nbsp;</p>
2ronwalf </li>
2ronwalf <li><h5><a name="#io">Reading/writing service descriptions</a></h5>
2ronwalf <p>There are two important interfaces in the OWL-S API:
2ronwalf <font face="Courier New">
2ronwalf <a href="javadoc/org/mindswap/owl/OWLOntology.html">OWLOntology</a></font> and
2ronwalf <font face="Courier New">
2ronwalf <a href="javadoc/org/mindswap/owl/OWLKnowledgeBase.html">OWLKnowledgeBase</a></font>. OWLOntology represents the information stored in a single
2ronwalf file and an OWLKnowledgeBase is a collection of ontologies. RDF data (triples)
2ronwalf can only be added to OWLOntology objects and only OWLOntology objects can be
2ronwalf serialized. There is one base ontology associated with each KB that is used to
2ronwalf store data (for example after execution new instances will be added to this
2ronwalf ontology). </p>
2ronwalf <p>
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owl/OWLKnowledgeBase.html#read(java.net.URI)">OWLKnowledgeBase.read(URI)</a></code> function reads the file from the
2ronwalf given ontology and loads the generated OWLOntology to the KB.
2ronwalf <a href="javadoc/org/mindswap/owl/OWLOntology.html#getService()">
2ronwalf <font face="Courier New">OWLOntology.getService()</font> </a>can be used to get the service instance from the
2ronwalf ontology (<font face="Courier New"><a href="javadoc/org/mindswap/owl/OWLOntology.html#getServices()">OWLOntology.getServices()</a></font> if there are multiple services).
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owl/OWLKnowledgeBase.html#readService(java.net.URI)">
2ronwalf <font face="Courier New">OWLKnowledgeBase.readService(URI)</font></a><font face="tahoma, arial, sans-serif">
2ronwalf </font> </code>(and resp.
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owl/OWLKnowledgeBase.html#readServices(java.net.URI)">
2ronwalf <font face="Courier New">OWLKnowledgeBase.readServices(URI)</font></a><font face="tahoma, arial, sans-serif">) function will automatically do that.
2ronwalf </font> </code>If an error occurs
2ronwalf during parsing these functions will return null value. See next section about
2ronwalf <a href="##validation">validation</a> to get more info about catching these
2ronwalf problems.</p>
2ronwalf <p>The ontology associated with a service can be serialized using
2ronwalf <font face="Courier New">
2ronwalf <a href="javadoc/org/mindswap/owl/OWLOntology.html#write(java.io.Writer)">
2ronwalf OWLOntology.write(Writer)</a></font> function.</p>
2ronwalf <!-- ======================================================== -->
2ronwalf<!-- = Java Sourcecode to HTML automatically converted code = -->
2ronwalf<!-- = Java2Html Converter V4.0 2004 by Markus Gebhard markus@jave.de = -->
2ronwalf<!-- = Further information: http://www.java2html.de = -->
2ronwalf<div align="left" class="java">
2ronwalf<div align="center">
2ronwalf
2ronwalf<center>
2ronwalf
2ronwalf<table border="2" cellpadding="3" cellspacing="0" bgcolor="#ffffff" width="60%" style="border-collapse: collapse" bordercolor="#111111">
2ronwalf <tr>
2ronwalf
2ronwalf <!-- start source code -->
2ronwalf <td nowrap="nowrap" valign="top" align="left">
2ronwalf <code>
2ronwalf<font color="#3f7f5f">&nbsp;&nbsp;&nbsp; // create a URI for the service&nbsp;(note
2ronwalf that this is a 0.9 version file) </font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">URI&nbsp;uri&nbsp;=&nbsp;</font><font color="#7f0055"><b>new&nbsp;</b></font><font color="#000000">URI(</font></code><font SIZE="2" COLOR="#2a00ff">&quot;http://www.mindswap.org/2004/owl-s/0.9/ZipCodeFinder.owl&quot;</font><code><font color="#000000">);</font></code><p>
2ronwalf <code>
2ronwalf<font color="#3f7f5f">&nbsp;&nbsp;&nbsp; // create a KB</font><font color="#ffffff">&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#000000">&nbsp;&nbsp;&nbsp; OWLKnowledgeBase kb =
2ronwalfOWLFactory.createKB();<br>
2ronwalf</font><br/>
2ronwalf
2ronwalf<font color="#3f7f5f">&nbsp;&nbsp;&nbsp; // create a generic reader and a 1.0
2ronwalfwriter<br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">OWLOntology&nbsp;ont&nbsp;=&nbsp;kb.read(uri;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#3f7f5f">&nbsp;&nbsp;&nbsp; // get the service<br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Service&nbsp;service&nbsp;=&nbsp;ont.getService();<br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#3f7f5f">&nbsp;&nbsp;&nbsp; // write the output to console (a file
2ronwalfstream can also be used here)<br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">ont.write(System.out);</font><br/>
2ronwalf
2ronwalf&nbsp;</code></td>
2ronwalf <!-- end source code -->
2ronwalf </tr>
2ronwalf
2ronwalf <!-- start Java2Html link -->
2ronwalf <!-- end Java2Html link -->
2ronwalf</table>
2ronwalf</center>
2ronwalf</div>
2ronwalf</div>
2ronwalf<!-- = END of automatically generated HTML code = -->
2ronwalf<!-- ======================================================== -->
2ronwalf <p>&nbsp;</p>
2ronwalf </li>
2ronwalf <li><h5><a name="#translation">Translating older service descriptions</a></h5>
2ronwalf <p>There is limited support for older versions of OWL-S. Currently, API
2ronwalf natively supports 1.1 version and provides translators for 1.0 version.
2ronwalf Translation should be enabled with the OWLKnowledgeBase.setAutoTranslate(true)
2ronwalf function call.</p>
2ronwalf <p>&nbsp;</p>
2ronwalf </li>
2ronwalf <li><h5><a name="#validation">OWL-S Validation</a></h5>
2ronwalf <p>The validation feature has not yet been implemented.</p>
2ronwalf <p>&nbsp;</p>
2ronwalf <p>
2ronwalf </p>
2ronwalf </li>
2ronwalf <li><h5><a name="#cache">Loading cached ontologies</a></h5>
2ronwalf <p>Sometimes it is desirable to use cached versions of the files rather than
2ronwalf downloading the remote files. The
2ronwalf <a href="javadoc/org/mindswap/owl/OWLCache.html">
2ronwalf OWLCache</a> class provides the functionality for this purpose.&nbsp;
2ronwalf <font face="Courier New">
2ronwalf <a href="javadoc/org/mindswap/owl/OWLCache.html#setLocalCacheDirectory(java.lang.String)">
2ronwalf OWLCache.setLocalCacheDirectory(String)</a></font> specifies a directory to find the
2ronwalf cached files. The cache dir should include a file named service.idx that has
2ronwalf the mappings from URI&#39;s to local file names. This index file is a text file
2ronwalf where each line is in the format </p>
2ronwalf <p>&nbsp;&nbsp;&nbsp; [service description url]=[local filename] </p>
2ronwalf <p>The &#39;:&#39; characters in the url&#39;s should be escaped as &quot;\:&quot;. See
2ronwalf <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream)">
2ronwalf <code>Properties.load()</code></a> for more details about the file format. You may choose
2ronwalf to add file entries one by one using the
2ronwalf <a href="javadoc/org/mindswap/owl/OWLCache.html#getCachedFile(java.lang.String)">
2ronwalf <code>OWLCache.addCachedFile()</code></a> function. When there is a cache entry for a file,
2ronwalf the cached version is only used when the original file cannot be found (e.g.
2ronwalf no connection). It is also possible to give more priority to cached files and
2ronwalf try to get the remote file only if there is no cached version. See
2ronwalf <a href="javadoc/org/mindswap/owl/OWLCache.html#getCachedFile(java.lang.String)">
2ronwalf <code>OWLCache.setForced(boolean)</code></a> for this functionality. Remember to include an
2ronwalf xml:base statement in your cached files so that URIs generated from your local
2ronwalf file will be exactly same as the remote one.</p>
2ronwalf <p>There is one OWLCache assocaited with each OWLReader.
2ronwalf OWLKnowledgeBase.getReader().getCache() will return the cache assocaited with
2ronwalf a KB.</p>
2ronwalf <p>&nbsp;</p>
2ronwalf <p>
2ronwalf </p>
2ronwalf </li>
2ronwalf <li><h5><a name="#exec">Executing services</a></h5>
2ronwalf <p>Executing a service means executing the process it has. The process should
2ronwalf have a valid grounding specification in order to invoke the service
2ronwalf successfully. The WSDL and UPnP groundings are supported by the API. A process
2ronwalf is executed by the <font color="#000000">
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owls/process/execution/ProcessExecutionEngine.html">ProcessExecutionEngine.execute(Process,
2ronwalf ValueMap)</a> </code><font face="Tahoma">
2ronwalf
2ronwalf function where second parameter specifies the values for
2ronwalf input parameters.&nbsp; This function returns another
2ronwalf <code><a href="javadoc/org/mindswap/owls/process/ValueMap.html">
2ronwalf ValueMap</a></code> which contains the output value bindings. The following
2ronwalf code segment shows an example of executing a service:</font></font></p>
2ronwalf<div align="left" class="java">
2ronwalf<div align="center">
2ronwalf
2ronwalf<center>
2ronwalf
2ronwalf<table border="2" cellpadding="3" cellspacing="0" bgcolor="#ffffff" width="60%" style="border-collapse: collapse" bordercolor="#111111">
2ronwalf <tr>
2ronwalf
2ronwalf <td nowrap="nowrap" valign="top" align="left">
2ronwalf <code>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;an&nbsp;execution&nbsp;engine&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">ProcessExecutionEngine&nbsp;exec&nbsp;=&nbsp;OWLSFactory.createExecutionEngine();</font></code><p>
2ronwalf <code>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;</font><font color="#3F7F5F">load
2ronwalf the service description</font><font color="#ffffff"><br>
2ronwalf &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Service service&nbsp;=&nbsp;kb.readService(</font><font color="#2a00ff">&quot;http://www.mindswap.org/2004/owl-s/1.0/Dictionary.owl&#34;</font><font color="#000000">);<br>
2ronwalf </font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;get
2ronwalf the process of the service</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Process process&nbsp;=&nbsp;service.getProcess();</font><br/>
2ronwalf
2ronwalf<br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create
2ronwalfan empty value map</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">ValueMap values&nbsp;=&nbsp;new
2ronwalfValueMap();</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;set
2ronwalfthe value of input parameter</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">values.setDataValue(process.getInput(</font><font color="#2a00ff">&#34;InputString&#34;</font><font color="#000000">),&nbsp;</font><font color="#2a00ff">&#34;computer&#34;</font><font color="#000000">);&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;execute
2ronwalfthe process with the given input bindings</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">values&nbsp;=&nbsp;exec.execute(process,&nbsp;values);&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;get&nbsp;the&nbsp;output&nbsp;value
2ronwalfas a string</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">String outValue&nbsp;=&nbsp;values.getStringValue(process.getOutput());</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;display&nbsp;the&nbsp;result</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">System.out.println(</font><font color="#2a00ff">&#34;Output&nbsp;=&nbsp;&#34;&nbsp;</font><font color="#000000">+&nbsp;outValue);</font></code></td>
2ronwalf <!-- end source code -->
2ronwalf </tr>
2ronwalf
2ronwalf <!-- start Java2Html link -->
2ronwalf <!-- end Java2Html link -->
2ronwalf</table>
2ronwalf</center>
2ronwalf</div>
2ronwalf</div>
2ronwalf<!-- = END of automatically generated HTML code = -->
2ronwalf<!-- ======================================================== -->
2ronwalf <p><br>
2ronwalf The above is a simple example where the input is a simple XML Schema string.
2ronwalf However, some services will have complex input types that are represented by
2ronwalf OWL classes. In this case, the value of input parameter can be set to an
2ronwalf OWLIndividual. See
2ronwalf <a href="http://svn.mindswap.org/owl-s/trunk/src/examples/RunService.java">
2ronwalf <code>RunService.java</code></a> in the examples directory
2ronwalf for more examples of this kind.<br>
2ronwalf&nbsp;</p>
2ronwalf <p>
2ronwalf </p>
2ronwalf </li>
2ronwalf <li><h5><a name="#monitor">Execution monitoring</a></h5>
2ronwalf <p>It is possible to see the progress of execution when a complex service is
2ronwalf being executed.
2ronwalf <a href="javadoc/org/mindswap/owls/process/execution/ProcessExecutionListener.html">
2ronwalf ProcessExecutionListener</a> defines a set of minimal functions for this
2ronwalf purpose. simply use the <font color="#000000">
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owls/process/execution/ProcessExecutionEngine.html">ProcessExecutionEngine.addExecutionListener(ProcessExecutionListener)</a> </code>
2ronwalf to set a listener on the execution engine. </font>See
2ronwalf <a href="http://svn.mindswap.org/owl-s/trunk/src/org/mindswap/owls/examples/RunService.java">
2ronwalf <code>RunService.java</code></a> in the examples directory
2ronwalf for examples of how to use the listener.<br>
2ronwalf&nbsp;</p>
2ronwalf <p>
2ronwalf </p>
2ronwalf </li>
2ronwalf <li><h5><a name="#composite">Creating composite processes</a></h5>
2ronwalf <p>It is possible to create service descriptions, profiles or processes
2ronwalf programmatically.
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owl/OWLOntology.html">OWLOntology</a></code> provides functions to create any of these structures.
2ronwalf <code>
2ronwalf <a href="http://svn.mindswap.org/owl-s/trunk/src/examples/CreateSequence.java">
2ronwalf CreateSequence.java</a></code> in the examples directory
2ronwalf shows an example of how to do this. The following code snippet shows the main
2ronwalf idea:</p>
2ronwalf<div align="left" class="java">
2ronwalf<div align="center">
2ronwalf
2ronwalf<center>
2ronwalf
2ronwalf<table border="2" cellpadding="3" cellspacing="0" bgcolor="#ffffff" width="60%" style="border-collapse: collapse" bordercolor="#111111">
2ronwalf <tr>
2ronwalf
2ronwalf <td nowrap="nowrap" valign="top" align="left">
2ronwalf <code>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;</font><font color="#3f5fbf">/**</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;Create&nbsp;a&nbsp;new&nbsp;Sequence&nbsp;from&nbsp;the&nbsp;processes&nbsp;of&nbsp;the&nbsp;given&nbsp;services&nbsp;and&nbsp;put&nbsp;them&nbsp;in&nbsp;a&nbsp;new</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;Service.</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;</font><font color="#7f9fbf">@param&nbsp;</font><font color="#3f5fbf">services&nbsp;List&nbsp;of&nbsp;Service</font><font color="#3F5FBF">s</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;</font><font color="#7f9fbf">@param&nbsp;</font><font color="#3f5fbf">baseURI&nbsp;The&nbsp;base&nbsp;URI&nbsp;for&nbsp;the&nbsp;generated&nbsp;service</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*&nbsp;</font><font color="#7f9fbf">@return&nbsp;</font><font color="#3f5fbf">The&nbsp;Service&nbsp;which&nbsp;is&nbsp;a&nbsp;Sequence&nbsp;of&nbsp;the&nbsp;given&nbsp;services&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;</font><font color="#3f5fbf">*/</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;</font><font color="#000000">Service&nbsp;createSequenceService(List&nbsp;services,&nbsp;String&nbsp;baseURI)&nbsp;{</font><font color="#ffffff">&nbsp;&nbsp;&nbsp;<br>
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;an empty ontology</font><br/>
2ronwalf
2ronwalf&nbsp;&nbsp;&nbsp; OWLOntology ont = OWLFactory.createOntology();<br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;a
2ronwalfn</font><font color="#3F7F5F">ew service</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Service&nbsp;service&nbsp;=&nbsp;ont.createService(URI.create(baseURI&nbsp;+&nbsp;</font><font color="#2a00ff">&#34;Service&#34;</font><font color="#000000">));</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;a new
2ronwalfcomposite process&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">CompositeProcess&nbsp;process&nbsp;=&nbsp;ont.createCompositeProcess(URI.create(baseURI&nbsp;+&nbsp;</font><font color="#2a00ff">&#34;Process&#34;</font><font color="#000000">));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff"><br>
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;a new sequence
2ronwalfconstruct</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Sequence&nbsp;sequence&nbsp;=&nbsp;ont.createSequence();</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;put
2ronwalfthe sequence into composite process&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">compositeProcess.setComposedOf(sequence);</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#7f0055"><b>for</b></font><font color="#000000">(</font><font color="#7f0055"><b>int&nbsp;</b></font><font color="#000000">i&nbsp;=&nbsp;</font><font color="#990000">0</font><font color="#000000">;&nbsp;i&nbsp;&lt;&nbsp;services.size();&nbsp;i++)&nbsp;{&nbsp;&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;get
2ronwalfthe service from the list</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Service&nbsp;s&nbsp;=&nbsp;(Service)&nbsp;services.get(i);</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;get
2ronwalfthe process fron the service<br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Process&nbsp;p&nbsp;=&nbsp;s.getProcess();</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
2ronwalf&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create a perform
2ronwalfconstruct<br>
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font>Perform perform = ont.createPreform();<br>
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; perform.setProcess(p);<br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;put
2ronwalfthe process&nbsp;into the sequence</font><br/>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">sequence.addComponent(p);</font><br/>
2ronwalf
2ronwalf<font color="#ffffff"><br>
2ronwalf&nbsp;
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;data flow if
2ronwalfnecessary...&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#ffffff"><br>
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">}<br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff"><br>
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;profile...<br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff"><br>
2ronwalf&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;create&nbsp;grounding&nbsp;</font><br/>
2ronwalf
2ronwalf<font color="#3f7f5f"><br>
2ronwalf</font>
2ronwalf
2ronwalf<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#7f0055"><b>return&nbsp;</b></font><font color="#000000">service;</font><font color="#3f7f5f"><br>
2ronwalf</font><font color="#000000">&nbsp; }</font></code></td>
2ronwalf <!-- end source code -->
2ronwalf </tr>
2ronwalf
2ronwalf <!-- start Java2Html link -->
2ronwalf <!-- end Java2Html link -->
2ronwalf <tr>
2ronwalf
2ronwalf <td nowrap="nowrap" valign="top" align="left">
2ronwalf &nbsp;</td>
2ronwalf </tr>
2ronwalf
2ronwalf </table>
2ronwalf</center>
2ronwalf</div>
2ronwalf</div>
2ronwalf<!-- = END of automatically generated HTML code = -->
2ronwalf<!-- ======================================================== -->
2ronwalf <p><br>
2ronwalf&nbsp;</p>
2ronwalf <p>
2ronwalf </p>
2ronwalf </li>
2ronwalf <li><h5><a name="#owl">Using OWL resources</a></h5>
2ronwalf <p>
2ronwalf Every resource in the API (<code><a href="javadoc/org/mindswap/owls/service/Service.html">Service</a>,</code>
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owls/profile/Profile.html">
2ronwalf Profile</a>,</code>
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owls/process/Process.html">
2ronwalf Process</a>,</code> etc.) extends
2ronwalf <code>
2ronwalf <a href="javadoc/org/mindswap/owl/OWLIndividual.html">
2ronwalf OWLIndividual</a></code> which provides the basic functionalities to get and set
2ronwalf object and data properties for any OWL individual. If additional information is
2ronwalf required about the resources then the underlying RDF model can be queried.
2ronwalf OWLIndividual.getImplementation() returns the implementation specific object. Right now, API is built on top of Jena so the function will return the corresponding
2ronwalf Resource in the Jena model.</p>
2ronwalf <p>
2ronwalf In the future releases it is planned to add support for
2ronwalf <a href="http://sourceforge.net/projects/owlapi">OWL API</a>.<br>
2ronwalf&nbsp;</p>
2ronwalf <p>
2ronwalf </p>
2ronwalf </li>
2ronwalf
2ronwalf <li><h5><a name="#wsdl">WSDL Support</a></h5>
2ronwalf <p>The API contains a package
2ronwalf <a href="javadoc/org/mindswap/wsdl/package-summary.html">
2ronwalf org.mindswap.owls.wsdl</a> that provides support for reading and executing
2ronwalf WSDL services. Execution of OWL-S services is achieved through this package.
2ronwalf The WSDL functionality is based on <a href="http://ws.apache.org/axis/">Axis</a>
2ronwalf package version 1.1. The main functionality added to Axis is the ability to
2ronwalf execute services with complex inputs dynamically without a need to create
2ronwalf stubs or extra code. The SOAP messages are created from the string
2ronwalf representation of XML Schema complex type. This invocation method is not
2ronwalf robust but works for most of the cases.<br>
2ronwalf&nbsp;</p>
2ronwalf <p>
2ronwalf </p>
2ronwalf </li>
2ronwalf</ol>
2ronwalf
2ronwalf
2ronwalf </div>
2ronwalf</div>
2ronwalf
2ronwalf
2ronwalf</body>
2ronwalf</html>