Skip to content

Commit

Permalink
more work on documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aklakan committed Sep 18, 2024
1 parent ccfe64d commit dd7b4bb
Show file tree
Hide file tree
Showing 37 changed files with 41 additions and 18 deletions.
7 changes: 7 additions & 0 deletions doc/README.md → docs/examples/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
title: Examples
parent: RDF/SPARQL Processing
layout: default
nav_order: 10
---

# SPARQL Integrate examples


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions docs/graphql/demo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Online demo
parent: GraphQL
parent: GraphQL over SPARQL
nav_order: 90
layout: default
---
Expand All @@ -10,5 +10,7 @@ Inspect the source code to see the underlying queries.

* A simple [WikiData Movies Browser.](https://smartdataanalytics.github.io/RdfProcessingToolkit/demos/movies/). This is a HTML one-pager that queries the GraphQL endpoint of a demo RPT instance loaded with movies from Wikidata.

* A simple [GraphQL-to-GeoJSON Demo.](https://smartdataanalytics.github.io/RdfProcessingToolkit/demos/leaflet-graphql/). This is a HTML one-pager that uses GraphQL to transform GeoSPARQL data to a customizable GeoJSON structure.
* A simple [GraphQL-to-GeoJSON Demo.](https://smartdataanalytics.github.io/RdfProcessingToolkit/demos/leaflet-graphql/). This is a HTML one-pager that uses GraphQL to transform GeoSPARQL data to a customizable GeoJSON structure. It also demonstrates:
* Ad-hoc simplification of GeoSPARQL polygons using our `geof:simplifyDp` extension function.
* Use of caching cardinalities of properties across a dataset using `SERVICE <cache:>`, which is part of Apache Jena's [Service Enhancer extension](https://jena.apache.org/documentation/query/service_enhancer.html).

2 changes: 1 addition & 1 deletion docs/graphql/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: GraphQL
title: GraphQL over SPARQL
has_children: true
nav_order: 100
layout: default
Expand Down
2 changes: 1 addition & 1 deletion docs/graphql/reference/index-directive.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: index
parent: GraphQL
parent: GraphQL over SPARQL
nav_order: 150
layout: default
---
Expand Down
4 changes: 2 additions & 2 deletions docs/graphql/reference/join.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: join
parent: Reference
parent: GraphQL over SPARQL
nav_order: 140
layout: default
---
Expand All @@ -18,7 +18,7 @@ While implicit joins automatically connect a parent’s target variables with a
#### Arguments

- **`parent`** (`String | [String]`): Specifies the parent field's variable(s) to be joined.
- **`this`** (`String | [String]`): Specifies the child field's variable(s) that should be connected with the parent’s variable(s).
- **`this`** (`String | [String]`): Specifies `this` field's variable(s) that should be connected with its parent’s variable(s).

#### Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/graphql/reference/one-and-many.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: one and many
parent: GraphQL
parent: GraphQL over SPARQL
nav_order: 130
layout: default
---

## GraphQL Directives: `@one` and `@many`

The `@one` and `@many` directives control the cardinality of a field within a GraphQL schema. These directives are particularly useful in RDF and SPARQL-based contexts, where fields often correspond to graph patterns that involve relationships with varying cardinalities.
The `@one` and `@many` directives control the cardinality of a field within a GraphQL query or schema. These directives are particularly useful in RDF and SPARQL-based contexts, where fields often correspond to graph patterns that involve relationships with varying cardinalities.

### Purpose

Expand Down
19 changes: 10 additions & 9 deletions docs/graphql/reference/prefix.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: prefix
parent: GraphQL
parent: GraphQL over SPARQL
nav_order: 100
layout: default
---

## GraphQL Directive: `@prefix`

The `@prefix` directive is designed to manage and define namespace prefixes in a GraphQL schema. This directive can be used to either specify a single prefix with an IRI or map multiple prefixes to their corresponding IRIs.
The `@prefix` directive is designed to manage and define namespace prefixes in a GraphQL query or schema. This directive can be used to either specify a single prefix with an IRI or map multiple prefixes to their corresponding IRIs.

### Usage

Expand All @@ -32,25 +32,26 @@ The `@prefix` directive accepts two possible configurations:
{
field
@prefix(name: "rdf", iri: "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
@prefix(name: "owl", iri: "http://www.w3.org/2002/07/owl#")
}
```

2. **Multiple Prefix Mapping**

Define multiple prefixes using the `map` argument:
Define multiple prefixes using the `map` argument. As GraphQL does not allow the empty string `""` as a key, the `name/iri` form can be used in conjunction with map:

```graphql
query MyQuery
@prefix(map: {
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
}, name: "", iri: "http://my.domain/ontology/)
{
field
@prefix(map: {
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
})
# ...
}
```
#### Notes
- When using the `map` argument, you can define multiple prefix-to-IRI mappings in a single directive instance.
- The `name` and `iri` arguments should not be used together with the `map` argument; choose one configuration based on your needs.
2 changes: 1 addition & 1 deletion docs/integrate/canned-queries.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Canned Queries
parent: RDF/SPARQL Processing
nav_order: 10
nav_order: 30
layout: default
---

Expand Down
13 changes: 13 additions & 0 deletions docs/integrate/sparql-extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: SPARQL Extensions
nav_order: 20
layout: default
---

## SPARQL Extensions
RPT's SPARQL extensions are provided by our unofficial [JenaX Jena eXtenions project](https://scaseco.github.io/jenax/).

* A function reference is available at [http://jsa.aksw.org/fn/](http://jsa.aksw.org/fn/).
Note, that the functions are being consolidated into the new `norse` (Not Only Rdf Sparql Extensions) namespace `norse: <https://w3id.org/aksw/norse#>`.
* Additional extensions are detailed at our [JenaX ARQ Plugins documentation](https://scaseco.github.io/jenax/jenax-arq-parent/jenax-arq-plugins-parent/README.html).

0 comments on commit dd7b4bb

Please sign in to comment.