[owl-s] Duplicate service objects?

Jim Andreou jim.andreou at gmail.com
Sun Jun 14 20:00:21 EDT 2009


Apparently, this is caused by this (OWLKnowledgeBaseImpl.java), see inline
comments:
public List<Service> getServices()
{
final OWLIndividualList<OWLIndividual> inds =
OWLFactory.createIndividualList();
inds.addAll(getInstances(OWLS.Service.Service)); // <--- this line must be
deleted
for (final OWLClass serviceClass : getSubClasses(OWLS.Service.Service,
false))
{
                        //because serviceClass also becomes
OWLS.Service.Service
inds.addAll(getInstances(serviceClass));
}
return OWLFactory.wrapList(inds, Service.class);
}



2009/6/15 Jim Andreou <jim.andreou at gmail.com>

> Hi,
>
> Running the Matchmaker example, with this code:
>
>     public void addOntology(final URI ont) throws IOException {
>         System.out.println("Reading " + ont);
> -        kb.read(ont);
> +        OWLOntology onto = kb.read(ont);
> +        System.out.println("Services: " + onto.getServices());
>     }
>
> I get the following output. Why do I get duplicate Service objects?
>
> Reading http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl
> Services: [
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService,
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService]
>
> Reading http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl
> Services: [
> http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl#BookFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService,
> http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl#BookFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService]
>
> Reading http://www.mindswap.org/2004/owl-s/1.1/ZipCodeFinder.owl
> Services: [
> http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl#BookFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService,
> http://www.mindswap.org/2004/owl-s/1.1/ZipCodeFinder.owl#ZipCodeFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl#BookFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService,
> http://www.mindswap.org/2004/owl-s/1.1/ZipCodeFinder.owl#ZipCodeFinderService
> ]
>
> Reading http://www.mindswap.org/2004/owl-s/1.1/FindLatLong.owl
> Services: [
> http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl#BookFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/FindLobjectatLong.owl#FindLatLongService,
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService,
> http://www.mindswap.org/2004/owl-s/1.1/ZipCodeFinder.owl#ZipCodeFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/BookFinder.owl#BookFinderService,
> http://www.mindswap.org/2004/owl-s/1.1/FindLobjectatLong.owl#FindLatLongService,
> http://www.mindswap.org/2004/owl-s/1.1/BNPrice.owl#BNPriceService,
> http://www.mindswap.org/2004/owl-s/1.1/ZipCodeFinder.owl#ZipCodeFinderService
> ]
>
> Thanks,
>
> Dimitris Andreou
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mindswap.org/pipermail/owl-s/attachments/20090615/93030b14/attachment.html 


More information about the OWL-S mailing list