import * as UI from "../../lib";
import { Canvas, Meta, Story } from "@storybook/addon-docs"; import { rawJsonDecorator } from "./decorators";
Retrieve all RDF class URIs from solid-ui's RDF store
{() => { UI.store.add( UI.rdf.namedNode("http://example.com/#some-thing"), UI.rdf.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), UI.rdf.namedNode("http://example.com/#some-class") ); UI.store.add( UI.rdf.namedNode("http://example.com/#some-other-thing"), UI.rdf.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), UI.rdf.namedNode("http://example.com/#some-other-class") ); return UI.widgets.allClassURIs(); }}Make a URI in the Tabulator.org annotation store out of the URI of the thing to be annotated.
{() => { const url = "http://example.com/a/b.html"; return UI.widgets.defaultAnnotationStore(UI.rdf.namedNode(url)); }}To figure out the log URI from the full URI used to invoke the reasoner
{() => { const url = "https://example.com/logFile=http%3A%2F%2Fexample.org%2Flogs.ttl&rulesFile=ttp%3A%2F%2Fexample.org%2Frules.ttl"; return decodeURIComponent(UI.widgets.extractLogURI(url)); }}Figuring which properties we know about
{() => { // FIXME: make this example return actual possible properties const kb = UI.rdf.graph(); return UI.widgets.propertyTriage(kb); }}