[owl-s] Profile.getService
Michael Dänzer
mdaenzer at gmx.net
Wed Mar 29 04:34:16 EST 2006
Hello Pablo
Did you seperate the profile and the service descriptions into two
files? I assume so, because of the two differents parameters url_profile
and url_Service in your code snippets. Check that you imported your
Service description in your Profile description and vice versa. If this
is not the problem, please post your owl-files.
Best Regards
Michael
Pablo Alvez wrote:
> Hi, I have a problem when I read a profile whit getProfile(url) and
> then try to get the service from it with the method getService, I get
> a class cast exception telling the service I'm trying to get cannot be
> cast to http://www.daml.org/services/owl-s/1.1/Service.owl#Service.
> However, if I read the service with the method readService I can get
> the Profile with getProfile and then if a I use getService with
> this profile I get the service without problem.
>
> This is the code that fails:
> kb = OWLFactory.createKB();
> ontToCall = kb.read(url_profile);
> Profile aProfile =
> ((OWLModel)ontToCall).getProfile(URIUtils.createURI(url_profile));
> Service aService = aProfile.getService();
>
> This is the code that works:
> OWLKnowledgeBase kb = OWLFactory.createKB();
> Service aService = kb.readService(url_service);
> aProfile = aService.getProfile();
> Service bService = aProfile.getService();
>
> Thanks for any help,
> Pablo.
> ------------------------------------------------------------------------
>
> _______________________________________________
> OWL-S mailing list
> OWL-S at lists.mindswap.org
> http://lists.mindswap.org/mailman/listinfo/owl-s
>
More information about the OWL-S
mailing list