Skip to content

Introspection does not work for Zefix #55

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

Open
BenjaminHofstetter opened this issue Oct 7, 2022 · 2 comments
Open

Introspection does not work for Zefix #55

BenjaminHofstetter opened this issue Oct 7, 2022 · 2 comments
Labels
wontfix This will not be worked on

Comments

@BenjaminHofstetter
Copy link
Contributor

BenjaminHofstetter commented Oct 7, 2022

https://spex.zazuko.com/#/?url=https://lindas.admin.ch/query&graph=https://lindas.admin.ch/foj/zefix&prefixes=admin:https://schema.ld.admin.ch/&forceIntrospection=false

This is a good example to investigate "Introspection" issues. Because the Schema is very simple.

Ontology

Classes

Just a small class count ...

SELECT ?class (count(?s) as ?count)
 FROM <https://lindas.admin.ch/foj/zefix>
 WHERE {
  ?s a ?class .
 } GROUP BY ?class order by ?count
  class count
1 http://schema.org/DefinedTermSet "1"^^xsd:integer
2 http://schema.org/Person "1"^^xsd:integer
3 https://cube.link/meta/SharedDimension "1"^^xsd:integer
4 http://www.w3.org/ns/dcat#Dataset "1"^^xsd:integer
5 http://rdfs.org/ns/void#Dataset "1"^^xsd:integer
6 http://schema.org/Dataset "1"^^xsd:integer
7 http://www.w3.org/ns/locn#Address "710619"^^xsd:integer
8 https://schema.ld.admin.ch/ZefixOrganisation "710619"^^xsd:integer
9 http://schema.org/Organization "710619"^^xsd:integer
10 http://schema.org/PostalAddress "710619"^^xsd:integer
11 http://schema.org/DefinedTerm "710619"^^xsd:integer
12 http://schema.org/PropertyValue "2131857"^^xsd:integer

Predicates

SELECT ?p (COUNT(?s) AS ?count)
FROM <https://lindas.admin.ch/foj/zefix>
WHERE {
  {
    SELECT DISTINCT ?p WHERE {
    	?s ?p ?o.
    }
  }
  ?s ?p ?o .
} GROUP BY ?p ORDER BY DESC(?count)
  p count
1 http://www.w3.org/1999/02/22-rdf-syntax-ns#type "5684958"^^xsd:integer
2 http://schema.org/name "2908101"^^xsd:integer
3 http://schema.org/identifier "2131857"^^xsd:integer
4 http://schema.org/value "2131857"^^xsd:integer
5 http://schema.org/address "710619"^^xsd:integer
6 http://schema.org/streetAddress "710619"^^xsd:integer
7 http://schema.org/inDefinedTermSet "710619"^^xsd:integer
8 http://schema.org/addressRegion "710619"^^xsd:integer
9 http://schema.org/addressLocality "710619"^^xsd:integer
10 http://www.w3.org/ns/locn#postName "710619"^^xsd:integer
11 https://schema.ld.admin.ch/municipality "710619"^^xsd:integer
12 http://www.w3.org/ns/locn#adminUnitL2 "710619"^^xsd:integer
13 http://schema.org/legalName "710619"^^xsd:integer
14 http://schema.org/additionalType "710619"^^xsd:integer
15 http://www.w3.org/ns/locn#address "710619"^^xsd:integer
16 http://www.w3.org/ns/locn#postCode "706543"^^xsd:integer
17 http://schema.org/postalCode "706543"^^xsd:integer
18 http://www.w3.org/ns/locn#thoroughfare "703311"^^xsd:integer
19 http://schema.org/description "700528"^^xsd:integer
20 http://www.w3.org/ns/locn#locatorDesignator "689521"^^xsd:integer
21 http://www.w3.org/ns/locn#locatorName "121365"^^xsd:integer
22 http://schema.org/areaServed "35659"^^xsd:integer
23 http://www.w3.org/ns/locn#addressArea "35659"^^xsd:integer
24 http://schema.org/postOfficeBoxNumber "29362"^^xsd:integer
25 http://www.w3.org/ns/locn#poBox "29362"^^xsd:integer
26 http://purl.org/dc/terms/keyword "25"^^xsd:integer
27 http://purl.org/dc/terms/title "4"^^xsd:integer
28 http://purl.org/dc/terms/description "4"^^xsd:integer
29 http://purl.org/dc/terms/language "4"^^xsd:integer
30 http://www.w3.org/ns/dcat#theme "3"^^xsd:integer
31 http://schema.org/email "2"^^xsd:integer
32 http://schema.org/datePublished "1"^^xsd:integer
33 http://purl.org/dc/terms/identifier "1"^^xsd:integer
34 http://schema.org/dateCreated "1"^^xsd:integer
35 http://schema.org/dateModified "1"^^xsd:integer
36 http://www.w3.org/ns/dcat#landingPage "1"^^xsd:integer
37 http://purl.org/dc/terms/creator "1"^^xsd:integer
38 http://www.w3.org/ns/dcat#contactPoint "1"^^xsd:integer
39 http://purl.org/dc/terms/accrualPeriodicity "1"^^xsd:integer
40 http://purl.org/dc/terms/coverage "1"^^xsd:integer
41 http://purl.org/dc/terms/license "1"^^xsd:integer
42 http://schema.org/publisher "1"^^xsd:integer
43 http://www.w3.org/ns/dcat#accessURL "1"^^xsd:integer
44 http://rdfs.org/ns/void#sparqlEndpoint "1"^^xsd:integer
45 http://www.w3.org/ns/shacl#property "1"^^xsd:integer
46 http://schema.org/dataset "1"^^xsd:integer
47 http://purl.org/dc/terms/publisher "1"^^xsd:integer
48 http://schema.org/familyName "1"^^xsd:integer
49 http://schema.org/givenName "1"^^xsd:integer
50 http://schema.org/creativeWorkStatus "1"^^xsd:integer
51 http://rdfs.org/ns/void#exampleResource "1"^^xsd:integer
52 http://qudt.org/schema/qudt/scaleType "1"^^xsd:integer
53 http://schema.org/workExample "1"^^xsd:integer
54 http://purl.org/dc/terms/issued "1"^^xsd:integer
55 http://purl.org/dc/terms/modified "1"^^xsd:integer
56 http://schema.org/validFrom "1"^^xsd:integer
57 http://purl.org/dc/terms/rights "1"^^xsd:integer

Introspection

The introspection query is like this ...

 SELECT DISTINCT ?cls ?property ?linktype ?datatype
      FROM <https://lindas.admin.ch/foj/zefix>
      WHERE {
        ?subject a ?cls .
        ?subject ?property ?object . # <--- this is a killer 

        OPTIONAL {
          ?object a ?linktype .
        }

        BIND(DATATYPE(?object) AS ?datatype)
      }

For this Zefix dataset the line "this is a killer" is a bit too much.

@BenjaminHofstetter
Copy link
Contributor Author

We can try to use SPARQL Sample

@l00mi
Copy link
Contributor

l00mi commented Mar 6, 2023

Probably easier to make it a two step process. 1th cls, 2nd property?

@BenjaminHofstetter BenjaminHofstetter added the wontfix This will not be worked on label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants