Re-writing of schemaorg in Clojure.
Changes:
- no local triple store, schema units are retrieved via SPARQL HTTP
- extended generic term page template
- no extension, all namespaces considered equal
- one server can serve other namespaces along with the default namespace
TODO:
- other templates
- fullReleasePage.tpl
- redirection to other known namespace (and mark domain/range as unknown if somewhere else)
- examples
- 'see also' and 'source' links
- RDFa annotations (or JSON-LD?)
- static site generation build command
- content negotiation
- unit caching
- logging
- reorganizing templates (e.g. put HTML head in a separate file)
- write templates with hiccup (Clojure DSL for HTML)?
- unit tests
- document properties (e.g. sitename, sitebase)
- Leiningen 2.0.0 or above
- A SPARQL 1.1 query endpoint accessible via HTTP (e.g. Apache Fuseki)
Schema definitions belonging to a given namespace are expected to be put in a named graph whose URI is the same as the namespace URI (without trailing slash).
For instance, one can have
GRAPH <http://schema.org> {
<http://schema.org/Thing> a rdfs:Class ;
rdfs:label "Thing" ;
rdfs:comment "The most generic type of item." .
}
GRAPH <http://core.example.org> {
<http://core.example.org/Something> a rdfs:Class ;
rdfs:label "Something" ;
rdfs:comment "Well... Anything." ;
rdfs:subClassOf <http://schema.org/Thing> .
}
First, open resources/schemaorg.properties
and change sparql_endpoint
to
point to your own SPARQL endpoint:
sitename=example.org
sitemode=mainsite
sparql_endpoint=http://example.org/someSPARQLEndpoint
Then, to start a web server for the application, run:
lein ring server
Copyright © 2017 Victor Charpenay