Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current https://raw.githubusercontent.com/w3c/dxwg/gh-pages/dcat/rdf/dcat.ttl is inconsistent #944

Closed
rduerr opened this issue Jun 1, 2019 · 10 comments
Labels
critical defects that must be completed for CR dcat due for closing Issue that is going to be closed if there are no objection within 6 days feedback Issues stemming from external feedback to the WG
Milestone

Comments

@rduerr
Copy link

rduerr commented Jun 1, 2019

Using the ELK 0.4.3 reasoner on the dcat.ttl results in Error2 on:

'Catalog Record' SubClassOf foaf:primaryTopic only 'Catalogued resource'

I expect this is related to #771; but thought I should mention it anyway... Yes, we are trying to use DCAT 2 too early... Sorry about that...

@andrea-perego andrea-perego added this to To do in DCAT revision via automation Jun 3, 2019
@andrea-perego andrea-perego added this to the DCAT CR milestone Jun 3, 2019
@andrea-perego andrea-perego added the critical defects that must be completed for CR label Jun 3, 2019
@andrea-perego andrea-perego added the feedback Issues stemming from external feedback to the WG label Jun 22, 2019
@riccardoAlbertoni riccardoAlbertoni self-assigned this Jul 4, 2019
@riccardoAlbertoni
Copy link
Contributor

@rduerr wrote

Using the ELK 0.4.3 reasoner on the dcat.ttl results in Error2 on:

'Catalog Record' SubClassOf foaf:primaryTopic only 'Catalogued resource'

I expect this is related to #771; but thought I should mention it anyway... Yes, we are trying to use DCAT 2 too early... Sorry about that...

Thanks, @rduerr for warning us.
any other detail on the kind of environment you are using might be useful.
For instance, are you using ELK standalone or as a plugin of some Ontology editor?

@rduerr
Copy link
Author

rduerr commented Jul 8, 2019

From within the latest version of desktop Protege

@riccardoAlbertoni
Copy link
Contributor

riccardoAlbertoni commented Jul 8, 2019

Opening DCAT with protege5.0 returns the message
"Entity not properly recognized, missing triples in input?"
in correspondence of the unqualified cardinality restriction

dcat:CatalogRecord  rdfs:subClassOf [
        rdf:type owl:Restriction ;
       owl:cardinality "1"^^xsd:nonNegativeInteger ;
       owl:onProperty foaf:primaryTopic ;
] ;

I have made different attempts to fix this, but with very limited success.
Just reporting some of the many attempts I made

Attempt A:
Simply Drop the restriction, which produces a ttl which can be opened by Protege without problem

Attempt B :
Replacing the unqualified cardinality restriction with qualified restriction, but it does seem to work ...

Attempt C1:
Rewrite the unqualified cardinality restriction after opening the ttl, and save it as TTL, Then reopen it, obtaining the same error when reopening the created file.

Attempt C2:
Rewrite the unqualified cardinality restriction after opening the ttl, and save it as OWl functional Syntax.
Then reopen it. This seems to work. Protege 5.5.0 opens the ontology without ERROR.
I have to check consistency for the above with stand-alone ELK 0.4.3 reasoner, and everything seems to be ok.

I do not know what to think. Is it something connected to the serialization syntax? Any idea?

@riccardoAlbertoni riccardoAlbertoni removed their assignment Jul 8, 2019
@dr-shorthair
Copy link
Contributor

@cmungall have you seen this before?

@riccardoAlbertoni
Copy link
Contributor

Following the discussion on PR 1003, I have made a further attempt:
Attempt D: Deleting all the multiline literals between """, but It does not resolve the issue.

@dr-shorthair
Copy link
Contributor

The SWEET team have just uncovered a bug in OWLAPI which is currently preventing SWEET loading in Protege. It appears that there are issues with the latest OWLAPI - so it might not be a DCAT problem at all.
https://github.com/ESIPFed/sweet/blob/master/CONTRIBUTING.md#avoiding-presence-of-httporgsemanticwebowlapierrorerrorn-in-contributions-when-editing-using-protege

@cmungall
Copy link

Is there a ticket on the owlapi issue tracker?

@cmungall
Copy link

I just tried parsing https://raw.githubusercontent.com/w3c/dxwg/gh-pages/dcat/rdf/dcat.ttl

Missing semicolon on line 797 - is this hand-authored?

  skos:scopeNote "La descrizione dell'endpoint fornisce dettagli specifici dell'istanza dell'endpoint reale, mentre dct:conformsTo viene utilizzato per indicare lo standard o le specifiche implementate dall'endpoint."@it
  skos:scopeNote "La descripción del endpoint brinda detalles específicos de la instancia del endpoint, mientras que dct:conformsTo se usa para indicar el estándar general o especificación que implementa el endpoint."@es ;

@cmungall
Copy link

I think you need to declare primaryTopic to be an OP

This works as expected:

@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix locn: <http://www.w3.org/ns/locn#> .
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sdo: <http://schema.org/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

foaf:primaryTopic a owl:ObjectProperty .

dcat:CatalogRecord  rdfs:subClassOf [
        rdf:type owl:Restriction ;
       owl:cardinality "1"^^xsd:nonNegativeInteger ;
       owl:onProperty foaf:primaryTopic ;
    ] .

however, omitting the declaration causes the parse error.

I believe this is consistent with the specs:

https://www.w3.org/TR/owl2-mapping-to-rdf/

Sometimes the owlapi will infer these declarations but this isn't guaranteed. Missing OP declarations is a common source of errors, especially when trying to repurpose ontologies that were designed to be RDFS as OWL ontologies.

@dr-shorthair
Copy link
Contributor

dr-shorthair commented Jul 17, 2019

Thanks @cmungall
I had a sneaking suspicion that FOAF could be causing the issue.
Good intel - I hope I remember it in future!

I think I've fixed it (and the missing ;) in https://github.com/w3c/dxwg/tree/dcat-issue-944

@agbeltran agbeltran added the due for closing Issue that is going to be closed if there are no objection within 6 days label Jul 17, 2019
DCAT revision automation moved this from To do to Done Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical defects that must be completed for CR dcat due for closing Issue that is going to be closed if there are no objection within 6 days feedback Issues stemming from external feedback to the WG
Projects
DCAT revision
  
Done
Development

No branches or pull requests

7 participants