Skip to content

Commit 065500b

Browse files
committed
Updated package documentation
1 parent 0196e64 commit 065500b

3 files changed

Lines changed: 31 additions & 12 deletions

File tree

linkeddatahub/docs/reference/administration/packages/index.html

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ <h2 id="package-structure">Package structure</h2>
172172

173173
<dt><code>ns.ttl</code> - Package ontology</dt>
174174

175-
<dd>An RDF ontology file that imports the external vocabulary using <code>owl:imports</code> and defines template blocks (<code>ldh:template</code>) for custom views. Template blocks are SPARQL-based views attached to RDF types from
176-
the imported vocabulary.</dd>
175+
<dd>An RDF ontology file that imports the external vocabulary using <code>owl:imports</code> and attaches blocks to properties using <code>ldh:view</code> (forward relationships) or <code>ldh:inverseView</code> (inverse relationships). Blocks are typically <code>ldh:View</code> resources with SPARQL queries that render related data for property values.</dd>
177176

178177
<dt><code>layout.xsl</code> - XSLT stylesheet</dt>
179178

@@ -185,7 +184,7 @@ <h2 id="package-structure">Package structure</h2>
185184

186185
<pre>packages/
187186
├── package-name/
188-
│ ├── ns.ttl # Ontology with template blocks
187+
│ ├── ns.ttl # Ontology with views
189188
│ └── layout.xsl # XSLT stylesheet</pre>
190189

191190
<p>Package metadata is published as Linked Data that resolves from the package URI (e.g.,
@@ -248,11 +247,11 @@ <h3 id="vocabulary-import">Vocabulary import</h3>
248247
<pre>&lt;https://raw.githubusercontent.com/AtomGraph/LinkedDataHub-Apps/master/packages/skos/ns.ttl#&gt; a owl:Ontology ;
249248
owl:imports &lt;http://www.w3.org/2004/02/skos/core&gt; .</pre>
250249

251-
<h3 id="template-blocks">Template blocks</h3>
250+
<h3 id="property-views">Property views</h3>
252251

253-
<p>SPARQL-based views attached to RDF types from the imported vocabulary:</p>
252+
<p>SPARQL-based views attached to properties from the imported vocabulary:</p>
254253

255-
<pre>skos:Concept ldh:template ns:NarrowerConcepts .
254+
<pre>skos:narrower ldh:view ns:NarrowerConcepts .
256255

257256
ns:NarrowerConcepts a ldh:View ;
258257
dct:title "Narrower concepts" ;
@@ -263,8 +262,8 @@ <h3 id="template-blocks">Template blocks</h3>
263262
WHERE { GRAPH ?graph { $about skos:narrower ?narrower } }
264263
ORDER BY ?narrower""" .</pre>
265264

266-
<p>Template blocks define custom views that appear in the UI when viewing resources of
267-
the specified type.</p>
265+
<p>Views are rendered when displaying resources that have the specified property. Use
266+
<code>ldh:view</code> for forward relationships (resource has property) or <code>ldh:inverseView</code> for inverse relationships (other resources point to this resource via property).</p>
268267
</div>
269268

270269
<div>
@@ -325,6 +324,16 @@ <h3 id="installation-process">Installation process</h3>
325324
&lt;xsl:import href="../com/linkeddatahub/packages/skos/layout.xsl"/&gt; &lt;!-- Package (added) --&gt;</pre>
326325
</li>
327326
</ol>
327+
328+
<div class="alert alert-info">
329+
330+
<p><strong>Important:</strong> After installing or uninstalling a package, you must restart the Docker service for
331+
XSLT stylesheet changes to take effect:</p>
332+
333+
<pre>docker-compose restart linkeddatahub</pre>
334+
335+
<p>Do not use <code>--force-recreate</code> as that would overwrite the stylesheet file changes.</p>
336+
</div>
328337
</div>
329338

330339
<div>
@@ -398,13 +407,13 @@ <h2 id="creating-packages">Creating custom packages</h2>
398407

399408
<h3 id="write-ontology">Write package ontology</h3>
400409

401-
<p>Create <code>ns.ttl</code> with vocabulary import and template blocks:</p>
410+
<p>Create <code>ns.ttl</code> with vocabulary import and views:</p>
402411

403412
<pre>&lt;https://raw.githubusercontent.com/you/repo/master/packages/schema.org/ns.ttl#&gt; a owl:Ontology ;
404413
owl:imports &lt;http://schema.org/&gt; .
405414

406-
# Attach template block to a vocabulary class
407-
schema:Person ldh:template :PersonKnows .
415+
# Attach view to a property
416+
schema:knows ldh:view :PersonKnows .
408417

409418
:PersonKnows a ldh:View ;
410419
dct:title "Knows" ;

linkeddatahub/docs/user-guide/browse-data/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h1>Browse data</h1>
137137

138138
<p class="lead">Use LinkedDataHub's built-in Linked Data browser to explore remote datasources</p>
139139

140-
<p>LinkedDataHub's has a built-in Linked Data browser which is accessed through <a href="../reference/user-interface/#nav-bar">the navigation bar</a>. Enter a <code>http://</code> or <code>https://</code> URL and
140+
<p>LinkedDataHub's has a built-in Linked Data browser which is accessed through <a href="../../reference/user-interface/#nav-bar">the navigation bar</a>. Enter a <code>http://</code> or <code>https://</code> URL and
141141
press <samp>Enter</samp> or click the search button.</p>
142142

143143
<p>The browser supports all standard RDF formats as well as JSON-LD embedded in HTML

linkeddatahub/docs/user-guide/manage-packages/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,16 @@ <h1>Manage packages</h1>
145145

146146
<p class="lead"><a href="../../reference/administration/packages/" target="_blank">Read more about how packages work.</a></p>
147147

148+
<div class="alert alert-info">
149+
150+
<p><strong>Important:</strong> After installing or uninstalling a package, you must restart the Docker service for
151+
XSLT stylesheet changes to take effect:</p>
152+
153+
<pre>docker-compose restart linkeddatahub</pre>
154+
155+
<p>Do not use <code>--force-recreate</code> as that would overwrite the stylesheet file changes.</p>
156+
</div>
157+
148158
<div>
149159

150160
<h2 id="install-package">Install a package</h2>

0 commit comments

Comments
 (0)