Skip to content

Commit

Permalink
added number widget in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart committed Apr 23, 2024
1 parent dbbf722 commit 1038c6d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
Binary file added docs/assets/images/readme/19-number.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions docs/widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ _[Home](index.html) > Widgets_

This is a reference documentation for Sparnatural widgets.


[TOC]



## List widget

### Appearance
Expand Down Expand Up @@ -70,6 +75,8 @@ SELECT DISTINCT ?Museum_1 ?Country_2 WHERE {
}
```



## Autocomplete widget

### Appearance
Expand All @@ -95,6 +102,8 @@ The default datasource used is [`datasources:search_URI_contains`](http://data.s

The SPARQL query generation logic is identical to the ListWidget (see above).



## Tree widget

### Appearance
Expand Down Expand Up @@ -169,6 +178,8 @@ The string will be searched using GraphDB proprietary Lucene connector. Make sur

The string will be searched using Virtuoso proprietary `bif:contains` operator.



## Date range widget

### Appearance
Expand Down Expand Up @@ -198,6 +209,7 @@ FILTER(((xsd:dateTime(?Date_2)) >= "1948-06-12T23:00:00Z"^^xsd:dateTime) && ((xs
For advanced date-range querying, see the [detailled documentation](http://docs.sparnatural.eu/Querying-date-ranges.html).



## Year range widget

### Appearance
Expand Down Expand Up @@ -226,6 +238,47 @@ FILTER((xsd:dateTime(?Date_2)) >= "2017-12-31T23:00:01Z"^^xsd:dateTime)
(here with only a start year). Note how the values is cast to an xsd:dateTime explicitely.



## Number widget

### Appearance

<img src=" https://raw.githubusercontent.com/sparna-git/Sparnatural/master/docs/assets/images/readme/19-number.png" />

### Description

Allows to select a number range, with a lower bound and upper bound.
Can limit the range of input fields based on the datatype indicated in the SHACL config (e.g. xsd:byte will be limited betwen -127 and 128)

### Configuration

In OWL configuration, declare a sub-property of [`config-core:NumberProperty`](http://data.sparna.fr/ontologies/sparnatural-config-core#NumberProperty).

### Datasources

No datasource required.

### SPARQL clause

Either with a lower and upper bound:

```sparql
FILTER((?Number_2 >= "1"^^xsd:decimal) && (?Number_2 <= "1000"^^xsd:decimal))
```

With only lower bound:

```sparql
FILTER(?Number_2 >= "11"^^xsd:decimal)
```

With only upper bound:

```sparql
FILTER(?Number_2 <= "11"^^xsd:decimal)
```


## Boolean widget

### Appearance
Expand Down

0 comments on commit 1038c6d

Please sign in to comment.