[owl-s] ServiceParameter
dink
dink at mis.ccu.edu.tw
Thu Apr 7 07:16:07 EDT 2005
Hi, I'm a beginner using the owl-s api. Now I want to parse the owl-s file and have some problems.
The owl-s file uri : http://mis.ccu.edu.tw/~dink/ZipCodeFinder.owl
I use the ZipCodeFinder provided by mindswap and add a service parameter into it:
<profile:serviceParameter>
<addParam:GeographicRadius rdf:ID="GeographicRadius">
<profile:serviceParameterName>Geographic Radius</profile:serviceParameterName>
<profile:sParameter rdf:resource="http://www.daml.org/services/owl-s/1.0/Country.owl#UnitedStates" />
</addParam:GeographicRadius>
</profile:serviceParameter>
I have tried to use the owl-s api to read the service parameter, but there is nothing about the parameter returned.
My simple code is as follows:
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.URI;
import java.util.*;
import org.mindswap.owl.OWLResource;
import org.mindswap.owl.Util;
import org.mindswap.owls.OWLSFactory;
import org.mindswap.owls.io.OWLSReader;
import org.mindswap.owls.process.Input;
import org.mindswap.owls.service.Service;
import org.mindswap.owls.process.Process;
import org.mindswap.owls.profile.ServiceParameter;
import org.mindswap.owls.profile.Profile;
public class test
{
public static void main(String[] args)
{
try
{
URI uri = new URI("http://mis.ccu.edu.tw/~dink/ZipCodeFinder.owl");
OWLSReader reader = OWLSFactory.createOWLSReader();
Service service = reader.read(uri);
Process process=service.getProcess();
List a=service.getProfile().getServiceParameters();
System.out.println(a);
}
catch (Exception e) {System.err.println(e);}
}
}
It always return java.lang.runtimeexception "not implemented yet". I have no idea to parse the ServiceParameter.
Can anyone help me to know how to use the owl-s api to parse the ServiceParameter? thx...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mindswap.org/pipermail/owl-s/attachments/20050407/99dd33ea/attachment-0001.html
More information about the OWL-S
mailing list