This is an old repo, the new one is over at https://github.com/pldn/LDWizard
LD Wizard is a framework for creating end-user focused Graphical User Interfaces (GUIs) that simplify the creation and publication of linked data.
The LD Wizard project delivers the following products:
- LD Wizard Core
- A separate repository where the LD Wizard Core codebase is developed and maintained.
- Cultural Heritage Wizard
- A specific configuration of the LD Wizard by the Dutch Digital Heritage Network.
- UM - Humanities and Social Sciences
- A specific configuration of the LD Wizard by the University of Maastricht for transforming tabular data in the humanities and the social sciences.
- UM - BioLink
- A specific configuration of the LD Wizard by the University of Maastricht for transforming BioLink tables.
- GeoData Wizard
- A specific application of the LD Wizard configured for linking Dutch geo data to the BAG and BRT.
- LD Wizard Design
- A detailed design document that consolidates the requirements, limitations and structural components for the LD Wizard approach.
You can create your own LD Wizard application by following these steps:
-
On Ubuntu this is done with the following commands. Check the project websites for installation on other operating systems.
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update sudo apt install nodejs yarn
-
Create a directory for your application:
mkdir my-wizard cd my-wizard
-
Add the LD Wizard dependency:
yarn add @netwerkdigitaalerfgoed/ldwizard
-
Create a configuration file called
config.ts
and enter the following content:// This is a template file import WizardConfig from "@netwerkdigitaalerfgoed/ldwizard/types/WizardConfig"; const wizardConfig: WizardConfig = {}; export default wizardConfig;
-
Run the following command to build your application:
yarn exec ldwizard-build config.ts
Your LD Wizard application can now be found inside the lib/
directory.
You can upload your LD Wizard application to an online location and use it there. But you can also run the application locally by starting an HTTP server. If you do not yet have an HTTP server installed, run the following command:
npm install -g http-server
With this particular HTTP server the LDWizard can be started in the following way:
cd lib
http-server .
Open http://localhost:8080 in a web browser.
You can customize your LD Wizard application by adding the following configuration options to your configuration file (config.ts
).
setting | type | default | description |
---|---|---|---|
appName |
string |
LD Wizard | The name of the LD Wizard instance. |
icon |
string |
The icon that is used inside the application. | |
favIcon |
string |
The icon that is used as the 'favicon'. This icon commonly appears in web browser tabs. | |
primaryColor |
string |
#6d1e70 | The primary color that is used in the application. |
secondaryColor |
string |
#a90362 | The secondary color that is used in the application. |
homepageMarkdown |
string |
undefined |
Optional name of a Markdown file that acts as the homepage for the LD Wizard application. |
defaultBaseIri |
string |
https://data.netwerkdigitaalerfgoed.nl/ | The default base IRI that is used for linked data transformations. |
classConfig |
{method: "elastic" | "sparql"; endpoint: string;} |
{method:"sparql"; endpoint: "https://api.data.netwerkdigitaalerfgoed.nl/datasets/ld-wizard/sdo/services/sparql/sparql"} |
The service that is used for giving class suggestions. |
predicateConfig |
{method: "elastic" | "sparql"; endpoint: string;} |
{method:"sparql"; endpoint: "https://api.data.netwerkdigitaalerfgoed.nl/datasets/ld-wizard/sdo/services/sparql/sparql"} |
The service that is used for giving property suggestions. |
getAllowedPrefixes |
() => Promise<{prefixLabel:string; iri:string}[]> |
() => [] |
A function that is used to return prefix declarations. |
publishOrder |
("download" | "triplydb")[] |
["download","triplydb"] |
The order in which publishing options are shown in the 'publish' step. It is also possible to exclude publication options by removing them from this list. |
dataplatformLink |
string |
https://data.netwerkdigitaalerfgoed.nl | Link to the data platform that is used in the footer. This data platform is also used for creating API tokens during the 'publish' step. |
documentationLink |
string |
https://github.com/netwerk-digitaal-erfgoed/LDWizard | Link to the generic LD Wizard project. |
repositoryLink |
string |
https://github.com/netwerk-digitaal-erfgoed/LDWizard-Core | Link to the specific LD Wizard configuration. |
newDatasetAccessLevel |
"public" | "internal" | "private" |
"private" |
The access level to use for new datasets |
You can create a Docker container for your LD Wizard application by running the following command:
docker build -f ./docker/Dockerfile -t "my-tag" --build-arg CONFIG_FILE=config.ts
LD Wizard runs entirely within the web browser, making it a client-side application. In order to give the user sugesstions about their data, LD Wizard sends/reveives requests to/from external linked data services. This section describes some of the external services that can be used by LD Wizard.
When classConfig
and/or predicateConfig
are set to sparql
, LD Wizard uses one or two SPARQL endpoints to retrieve suggestions for classes and properties, respectively. The SPARQL queries that are used can be found in the LD Wizard Core repository.
These queries support class and property descriptions that follow linked data standards and best practices:
- Use
owl:Class
orrdfs:Class
to declare that something is a class. - Use
owl:DatatypeProperty
,owl:ObjectProperty
, orrdf:Property
to declare that something is a property. - Use
rdfs:label
for human-readable labels. - Use
rdfs:comment
for human-readable descriptions.
When classConfig
and/or preficateConfig
are set to elastic
, LD Wizard uses generic ElasticSearch text queries to retrieve suggestions for classes and properties. The ElasticSearch queries that are used can be found in the LD Wizard Core repository.
These queries support class and property descriptions that follow linked data standards and best practices. See Section 3a for details.
In order to create an ElasticSearch service that can be queried in this way, your linked dataset must be indexed as a collection of JSON files. The most standards-compatible way of doing this is to create one JSON-LD file per non-trivial node. A JSON-LD file contains the Concise Bounded Description (CBD) for a particular node. Trivial nodes are nodes that are already included in the CBD (e.g., blank nodes). These trivial nodes should not be indexed separately.
There is not currently a strandard way of exposing IRI prefixes in RDF. However, there is an initiative to potentially add this feature to a future version of SPARQL.
In the meantime, programmers can configure getAllowedPrefixes
to anything that returns a list of IRI prefix objects. The following example does this for the TriplyDB backend:
getAllowedPrefixes: async () => {
const response = await fetch("https://api.data.netwerkdigitaalerfgoed.nl/datasets/ld-wizard/sdo/prefixes");
if (response.ok) {
const prefixes: PrefixEntry[] = await response.json();
return prefixes;
}
}
LD Wizard is an initiative of the following organizations and people:
- Dutch Digital Heritage Network (NDE), Enno Meijers & Ivo Zandhuis.
- The Netherlands’ Cadastre, Land Registry and Mapping Agency (Kadaster), Erwin Folmer.
- International Institute of Social History (IISH) and Clariah, Richard Zijdeman.
- Triply, Gerwin Bosch, Thomas de Groot, Laurens Rietveld & Wouter Beek.