Skip to content

Commit

Permalink
Fix #468
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart committed Apr 6, 2023
1 parent 843a45d commit 69a72c2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 33 deletions.
58 changes: 29 additions & 29 deletions ontologies/sparnatural-config-datasources.owl
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ This is typically the default behavior for a list without a datasource specified
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?uri (STR(?uri) AS ?label)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# Note how the range criteria is not used in this query
Expand All @@ -562,7 +562,7 @@ WHERE {
{
SELECT DISTINCT ?uri (COUNT(?domain) AS ?count)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# Note how the range criteria is not used in this query
Expand All @@ -582,7 +582,7 @@ LIMIT 500</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
# Note how the range criteria is not used in this query
?uri $labelPath ?label .
Expand All @@ -604,7 +604,7 @@ WHERE {
{
SELECT DISTINCT ?uri (COUNT(?domain) AS ?count)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# Note how the range criteria is not used in this query
Expand All @@ -629,7 +629,7 @@ WHERE {
{
SELECT DISTINCT ?uri (COUNT(?domain) AS ?count)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# Note how the range criteria is not used in this query
Expand All @@ -651,10 +651,10 @@ LIMIT 500</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
# range criteria
?uri a $range .
?uri $type $range .
?uri $labelPath ?label .
FILTER(isIRI(?uri))
FILTER(lang(?label) = &quot;&quot; || lang(?label) = $lang)
Expand All @@ -674,11 +674,11 @@ WHERE {
{
SELECT DISTINCT ?uri (COUNT(?domain) AS ?count)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# range criteria
?uri a $range .
?uri $type $range .
}
GROUP BY ?uri
}
Expand All @@ -700,11 +700,11 @@ WHERE {
{
SELECT DISTINCT ?uri (COUNT(?domain) AS ?count)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# range criteria
?uri a $range .
?uri $type $range .
}
GROUP BY ?uri
}
Expand All @@ -723,7 +723,7 @@ LIMIT 500</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?value (STR(?value) AS ?label)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?value .
}
ORDER BY UCASE(?label)
Expand All @@ -741,7 +741,7 @@ WHERE {
{
SELECT DISTINCT ?theLabel (COUNT(?theLabel) AS ?count)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?theLabel .
FILTER(lang(?theLabel) = &quot;&quot; || lang(?theLabel) = $lang)
}
Expand All @@ -763,7 +763,7 @@ WHERE {
{
SELECT DISTINCT ?theLabel (COUNT(?theLabel) AS ?count)
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?theLabel .
FILTER(lang(?theLabel) = &quot;&quot; || lang(?theLabel) = $lang)
}
Expand All @@ -782,9 +782,9 @@ LIMIT 500</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
?uri a $range .
?uri $type $range .
FILTER(isIRI(?uri))
BIND(STR(?uri) AS ?label)
FILTER(CONTAINS(LCASE(?label), LCASE(&quot;$key&quot;)))
Expand All @@ -801,9 +801,9 @@ LIMIT 50</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
?uri a $range .
?uri $type $range .
?uri $labelPath ?label .
FILTER(isIRI(?uri))
FILTER(lang(?label) = &apos;&apos; || lang(?label) = $lang )
Expand All @@ -822,9 +822,9 @@ LIMIT 50</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
?uri a $range .
?uri $type $range .
?uri $labelPath ?label .
FILTER(isIRI(?uri))
FILTER(lang(?label) = &apos;&apos; || lang(?label) = $lang)
Expand All @@ -842,9 +842,9 @@ LIMIT 50</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $type $domain .
?domain $property ?uri .
?uri a $range .
?uri $type $range .
?uri $labelPath ?label .
FILTER(isIRI(?uri))
FILTER(lang(?label) = &apos;&apos; || lang(?label) = $lang)
Expand Down Expand Up @@ -898,10 +898,10 @@ WHERE {
}

OPTIONAL {
?x a $domain .
?x $type $domain .
?x $property ?uri .
# no range criteria
# ?uri a $range .
# ?uri $type $range .
}
}
GROUP BY ?uri ?theLabel ?hasChildren
Expand All @@ -916,7 +916,7 @@ ORDER BY UCASE(?label)</sparnatural-config-datasources:queryString>
<rdf:type rdf:resource="http://data.sparna.fr/ontologies/sparnatural-config-datasources#SPARQLQuery"/>
<sparnatural-config-datasources:queryString>SELECT ?uri ?label ?hasChildren
WHERE {
?uri a $range .
?uri $type $range .
FILTER NOT EXISTS {
?parent $childrenPath ?uri .
}
Expand All @@ -942,7 +942,7 @@ WHERE {
{
SELECT ?uri ?theLabel ?hasChildren
WHERE {
?uri a $range .
?uri $type $range .
FILTER NOT EXISTS {
?parent $childrenPath ?uri .
}
Expand All @@ -957,7 +957,7 @@ WHERE {
}

OPTIONAL {
?x a $domain .
?x $type $domain .
?x $property ?uri .
}
}
Expand Down Expand Up @@ -1207,10 +1207,10 @@ WHERE {
}

OPTIONAL {
?x a $domain .
?x $type $domain .
?x $property ?uri .
# no range criteria
# ?uri a $range .
# ?uri $type $range .
}
}
GROUP BY ?uri ?theLabel ?hasChildren
Expand Down
13 changes: 9 additions & 4 deletions src/assets/stylesheets/sparnatural.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ body .select2-container--default {
background-color: var(--primary-color-main);
}
}
//tippy overides

// tippy overides
// WARNING : this is outside of the Sparnatural div and hance cannot use the variables in the theme CSS
// for the moment the colors are thus hardcoded and cannot be customised
.tippy-box[data-theme~='sparnatural'] {
background-color: var(--primary-color-light);
// background-color: var(--primary-color-light);
background-color: rgb(255, 231, 203);
color: #000;
border-radius: 5px;
border: 1px dashed var(--primary-color-main);
// border: 1px dashed var(--primary-color-main);
border: 1px dashed rgb(250,136,3);
padding: 2px;
font-size:0.75em;
}
}

0 comments on commit 69a72c2

Please sign in to comment.