-import { Hydra } from 'alcaeus'
+import Hydra from 'alcaeus'
################################################################# | |
## Iro | |
################################################################ | |
## | |
## * Press Ctrl + '+'/'-' To Zoom in | |
## * Press Ctrl + S to save and recalculate... | |
## * Documents are saved to web storage. | |
## * Only one save slot supported. | |
## * Matches cannot span lines. | |
## * Unicode chars must be defined in \u0000 to \uffff format. |
PREFIX dataCube: <https://rdf-cube-curation.described.at/> | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
INSERT DATA { | |
GRAPH <http://localhost:5678/project/apidays> { | |
<http://localhost:5678/project/apidays> | |
a dataCube:Project ; | |
<http://schema.org/name> "Fact table project" . | |
} | |
} |
// WARNING | |
// | |
// Ugly implementation and not exactly like in the examples. but similar | |
import { Literal, NamedNode } from 'rdf-js' | |
import Clownface from 'clownface/lib/Clownface' | |
import rdf from 'rdf-ext' | |
import { TypedClownfaceEntity } from './TypedClownfaceEntity' | |
const trueLiteral: Literal = rdf.literal(true) |
You only have a single graph for multiple related and unrelated resources, which would be accessed over a web api (Hydra/LDP)
How do you handle updates and deletes to remove only the right triples.
Consider the resources, as can be found in tbbt-ld. Let's take the representation of Amy and Sheldon.
<api> | |
a hydra:ApiDocumentation ; | |
hydra:supportedClass :UserCollection ; | |
. | |
:UserCollection | |
a hydra:Class ; | |
hydra:supportedProperty [ | |
hydra:property :searchUsers ; | |
] ; |
<data-file> | |
a schema:MediaObject ; | |
schema:identifier "sample-data.csv" ; | |
schema:encodingFormat "text/csv"; | |
schema:contenUrl <https://s3.link/ugly-guid-link-whatever.csv> | |
. |
This is an idea for how SHACL AF Node Expression can be used to annotate a hydra search template so that values coming from the request query string would be transformed to SPARQL patterns an injeced into the resulting query
The collection resource <shapes>
supports a targetNode
query string parameter which should be translated to a SPARQL union like below. The $this
token will represent each collection member (instance of shape). For example, when requesting shapes?targetNode=foobar
, the generated patterns could be:
{
# query the target node directly
$this sh:targetNode <foobar>
}
UNION
node_modules/ | |
js/ |