You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by kamil Sokolski <k....@gmx.de> on 2013/12/01 17:20:36 UTC

check inconsistency with jena

Hello,

we are trying  to check inconsistency with jena but the report is
allways empty.

Thanks for help.


java Code:


    final OntModel model = ontology.getModel();
        // content += model.getReasoner().getReasonerCapabilities() + "\n";
        InfModel inferedRDFSModel = ModelFactory.createRDFSModel(model);
        ValidityReport reports = inferedRDFSModel.validate();
        if (reports.isValid()) {
            tab.setText("Keine Inkonsistenzen gefunden!");
        }

        Report report = null;
        for (Iterator<Report> i = reports.getReports(); i.hasNext();
report = i.next()) {
            content += "Report: " + report + "\n";
        }





Re: check inconsistency with jena

Posted by Dave Reynolds <da...@gmail.com>.
On 01/12/13 16:20, kamil Sokolski wrote:
> Hello,
>
> we are trying  to check inconsistency with jena but the report is
> allways empty.

RDFS semantics gives almost no inconsistencies. I think about the only 
thing might show up is a literal value which doesn't match a range 
declaration.

To get any non-trivial validation you need to use OWL. Even then lots of 
things you might expect to be inconsistencies aren't.

Dave

>
> Thanks for help.
>
>
> java Code:
>
>
>      final OntModel model = ontology.getModel();
>          // content += model.getReasoner().getReasonerCapabilities() + "\n";
>          InfModel inferedRDFSModel = ModelFactory.createRDFSModel(model);
>          ValidityReport reports = inferedRDFSModel.validate();
>          if (reports.isValid()) {
>              tab.setText("Keine Inkonsistenzen gefunden!");
>          }
>
>          Report report = null;
>          for (Iterator<Report> i = reports.getReports(); i.hasNext();
> report = i.next()) {
>              content += "Report: " + report + "\n";
>          }
>
>
>
>