Skip to content

Includes both the Processor/Server and the Web-Client

License

Notifications You must be signed in to change notification settings

AtomGraph/Web-Node

Repository files navigation

Web-Node

Includes both the Processor/Server and the Web-Client

Nodes can manage each others RDF data in a distributed way, using LDT hypermedia as the read-write Linked Data protocol. Web-Node processes LDT ontologies and serves/accepts RDF data as the Processor, but also renders that data, as well RDF data from external sources, as the Web-Client does.

AtomGraph Web-Node architecture

Usage

Docker

Processor is available from Docker Hub as `atomgraph/web-node image. It accepts the following environment variables (that become webapp context parameters):

ENDPOINT
SPARQL 1.1 Protocol endpoint
URI
GRAPH_STORE
SPARQL 1.1 Graph Store Protocol endpoint
URI
ONTOLOGY
Linked Data Templates ontology
URI
AUTH_USER
SPARQL service HTTP Basic auth username
string, optional
AUTH_PWD
SPARQL service HTTP Basic auth password
string, optional
PREEMPTIVE_AUTH
use premptive HTTP Basic auth?
true/false, optional
STYLESHEET
Custom XSLT stylesheet
URI, optional
RESOLVING_UNCACHED
If true, the stylesheet will attempt to load RDF resources by dereferencing URIs in the main data to improve the UX
true/false, optional

If you want to have your ontologies read from a local file rather than their URIs, you can define a custom location mapping that will be appended to the system location mapping. The mapping has to be a file in N3 format and mounted to the /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/custom-mapping.n3 path. Validate the file syntax beforehand to avoid errors.

To enable logging, mount log4j.properties file to /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.properties.

Run the container with Wikidata's example like this (replace //c/Users/namedgraph/WebRoot/... paths with your own; the paths have to be absolute):

docker run \
    -p 8080:8080 \
    -e ENDPOINT="https://query.wikidata.org/bigdata/namespace/wdq/sparql" \
    -e GRAPH_STORE="https://query.wikidata.org/bigdata/namespace/wdq/service" \
    -e ONTOLOGY="https://github.com/AtomGraph/Processor/blob/develop/examples/wikidata#" \
    -v "//c/Users/namedgraph/WebRoot/Web-Node/src/main/resources/log4j.properties":"/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.properties" \
    -v "//c/Users/namedgraph/WebRoot/Processor/examples/wikidata.ttl":"/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/org/wikidata/ldt.ttl" \
    -v "//c/Users/namedgraph/WebRoot/Processor/examples/location-mapping.n3":"/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/custom-mapping.n3" \
    atomgraph/processor

After that, access http://localhost:8080/birthdays?limit=10 and you will retrieve RDF data with 10 people (or "entities") that have a birthday today.

Maven

Web-Node will be released on Maven central when it reaches the 2.1 version.

About

Includes both the Processor/Server and the Web-Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published