VisualDataWeb / OWL2VOWL

Converting ontologies for WebVOWL
http://vowl.visualdataweb.org
MIT License
136 stars 49 forks source link

missing class in generated json. #30

Closed TuanjieLi closed 7 years ago

TuanjieLi commented 7 years ago

Hi there,

I tried to convert this ontology to vowl json http://www.omg.org/spec/EDMC-FIBO/FND/AgentsAndPeople/People.rdf

And there is a weird iri in the result: { "iri" : "http://www.omg.org/spec/EDMC-FIBO/FND/Relations/Relations/isPartOf", "inverse" : "167", "baseIri" : "http://www.omg.org/spec/EDMC-FIBO/FND/Relations/Relations", ...}

The "167"(or another number) is supposed to be an id of a classes in this json string, right? But I can't find any other 167 in this json. and this missing class will fail the webvowl (We tried several versions.)

Could you help to fix that? Thanks.

BTW, we use this to generate owl model: https://mvnrepository.com/artifact/net.sourceforge.owlapi/owlapi-distribution We tried 5.0.5 and 5.0.4, none of them work.

and the "isPartOf" is defined in http://www.omg.org/spec/EDMC-FIBO/FND/Relations/Relations which is an "owl:imports" of the people.rdf.

I guess its inverse class is "hasPart", and it is define in that url (http://www.omg.org/spec/EDMC-FIBO/FND/Relations/Relations)

Cheers, Tony

steffen-l commented 7 years ago

Thanks for the error report. This is one of the known issues of the refactored OWL2VOWL converter (the one in this repo), i.e., it does not treat all "inverse of" axioms correctly or generates some weird ones. We will hopefully be able to fix it at some point, but it is not of highest priority at the moment. Feel free to fix it yourself if you have a good idea of how to do it. In any case, you can at least process and visualize the ontology in the latest WebVOWL version, even if maybe not 100% correct - see http://visualdataweb.de/webvowl/#iri=http://www.omg.org/spec/EDMC-FIBO/FND/AgentsAndPeople/People.rdf

TuanjieLi commented 7 years ago

Thanks, Steffen. As it is a known issue, I will try to see if I can fix it soon. If I can't, I'll close this ticket then. Thanks.

TuanjieLi commented 7 years ago

Hi Steffen,

I didn't fix it, but I make it work with this particular ontology. ( it may bring other bugs I know..)

The root cause is that isPartOf and hasPart are inverse, and hasPart somehow has an anonymous super property, and there will be a reference in hasPart itself, and when owl2vowl generates the json, it will ignore the properties that have a reference.

So the hasPart is ignored, and in the generated json, isPartOf has an inverse property pointing to index 144, but the 144(supposed to be the hasPart) is not in json. And that will fail the front end.

It is weird that the hasPart is in the json with another index rather than 144.

Anyway, it start to work after checking properties even if they have reference.

To be exact, I comment out some lines in class de.uni_stuttgart.vis.vowl.owl2vowl.parser.vowl.property.DomainRangeFiller

public void visit(VowlDatatypeProperty property) and private void classBehaviour(AbstractProperty property)

// if (!property.getReferencedIris().isEmpty()) { // property.setExportToJson(false); // return; // }

I'll close this ticket, thanks for your support :)

Cheers, Tony