Skip to content

Commit

Permalink
Preparing vocabulary publication (#44)
Browse files Browse the repository at this point in the history
## What's changed
<!-- Give a concise description of the change -->
Adding labels and comments
Adding metadata
Generating Widoco files
Evaluation with Oops!

## Change checklist
- [x] updated ontology, where necessary
- [x] updated shapes, where necessary
- [x] added or updated test cases, where necessary
- [x] any TODOs have been turned into trackable issues and referenced
where necessary

## Issue reference
<!-- For example: -->
<!-- Fixes #{ISSUE}. -->
<!-- Resolves #{ISSUE}. -->
Resolves #41, #42, #43
  • Loading branch information
elsdvlee authored Dec 3, 2024
1 parent ac44c1e commit 2662894
Show file tree
Hide file tree
Showing 44 changed files with 24,043 additions and 87 deletions.
70 changes: 70 additions & 0 deletions ontology/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
############################################################################
### THIS FILE SHOULD BE PLACED ON THE PARENT FOLDER OF THE DOCUMENTATION ###
### OTHERWISE THE CONTENT NEGOTIATION WILL NOT WORK ###
### THE URL OF YOUR VOCABULARY WILL BE (domain)/rml-lv/def ###
############################################################################
# Turn off MultiViews
Options -MultiViews

# Directive to ensure *.rdf files served as appropriate content type,
# if not present in main apache config
AddType application/rdf+xml .rdf
AddType application/rdf+xml .owl
AddType text/turtle .ttl
AddType application/n-triples .n3
AddType application/ld+json .jsonld
# Rewrite engine setup
RewriteEngine On
#Change the path to the folder here
RewriteBase /rml-lv

# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested
# Placed before HTML to support serving JSON-LD from a browser (e.g., JSON Playground)
RewriteCond %{HTTP_ACCEPT} application/ld\+json
RewriteRule ^def$ doc/ontology.jsonld [R=303,L]

RewriteCond %{HTTP_ACCEPT} application/ld\+json
RewriteRule ^def/(.+)$ doc/ontology.jsonld [R=303,NE,L]

RewriteRule ^def$ doc/index-en.html [R=303,L]
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
RewriteCond %{HTTP_ACCEPT} text/html [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
RewriteRule ^def/(.+) doc/index-en.html#$1 [R=303,NE,L]
# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
RewriteRule ^def$ doc/ontology.owl [R=303,L]

# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
RewriteRule ^def/(.+)$ doc/ontology.owl [R=303,NE,L]

# Rewrite rule to serve N-Triples content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/n-triples
RewriteRule ^def$ doc/ontology.nt [R=303,L]

# Rewrite rule to serve N-Triples content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/n-triples
RewriteRule ^def/(.+)$ doc/ontology.nt [R=303,NE,L]

# Rewrite rule to serve TTL content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} text/turtle [OR]
RewriteCond %{HTTP_ACCEPT} text/\* [OR]
RewriteCond %{HTTP_ACCEPT} \*/turtle
RewriteRule ^def$ doc/ontology.ttl [R=303,L]

# Rewrite rule to serve TTL content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} text/turtle [OR]
RewriteCond %{HTTP_ACCEPT} text/\* [OR]
RewriteCond %{HTTP_ACCEPT} \*/turtle
RewriteRule ^def/(.+)$ doc/ontology.ttl [R=303,NE,L]

RewriteCond %{HTTP_ACCEPT} .+
RewriteRule ^def$ doc/406.html [R=406,L]
# Default response
# ---------------------------
# Rewrite rule to serve the RDF/XML content from the vocabulary URI by default
RewriteRule ^def$ doc/ontology.owl [R=303,L]
10 changes: 10 additions & 0 deletions ontology/documentation/406.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head>
<body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource could not be found on this server.</p>
Available variants:<ul><li><a href="index-en.html">html</a></li><li><a href="ontology.jsonld">JSON-LD</a></li><li><a href="ontology.owl">RDF/XML</a></li><li><a href="ontology.nt">N-Triples</a></li><li><a href="ontology.ttl">TTL</a></li></ul>

</body></html>
Binary file not shown.
Loading

0 comments on commit 2662894

Please sign in to comment.