Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
292 changes: 292 additions & 0 deletions demo/northwind-traders/admin/model/ns.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,298 @@ schema:City spin:constructor :CityConstructor .
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:Person spin:constructor :PersonConstructor .

:PersonConstructor a ldh:Constructor ;
rdfs:label "Person constructor" ;
dct:title "Person constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:givenName [ a xsd:string ] ;
schema:familyName [ a xsd:string ] ;
schema:honorificPrefix [ a xsd:string ] ;
schema:jobTitle [ a xsd:string ] ;
schema:birthDate [ a xsd:date ] ;
schema:telephone [ a xsd:string ] ;
schema:description [ a xsd:string ] ;
schema:address [ a schema:PostalAddress ] ;
schema:sponsor [ a schema:Person ] ;
schema:areaServed [ a schema:City ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:Corporation spin:constructor :CorporationConstructor .

:CorporationConstructor a ldh:Constructor ;
rdfs:label "Company constructor" ;
dct:title "Company constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:legalName [ a xsd:string ] ;
schema:identifier [ a xsd:string ] ;
schema:telephone [ a xsd:string ] ;
schema:contactPoint [ a schema:ContactPoint ] ;
schema:employee [ a schema:Person ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:ContactPoint spin:constructor :ContactPointConstructor .

:ContactPointConstructor a ldh:Constructor ;
rdfs:label "Contact point constructor" ;
dct:title "Contact point constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
schema:telephone [ a xsd:string ] ;
schema:faxNumber [ a xsd:string ] ;
schema:url [ a xsd:string ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:PostalAddress spin:constructor :PostalAddressConstructor .

:PostalAddressConstructor a ldh:Constructor ;
rdfs:label "Postal address constructor" ;
dct:title "Postal address constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
schema:streetAddress [ a xsd:string ] ;
schema:addressLocality [ a xsd:string ] ;
schema:addressRegion [ a xsd:string ] ;
schema:postalCode [ a xsd:string ] ;
schema:addressCountry [ a xsd:string ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:ProductGroup spin:constructor :ProductGroupConstructor .

:ProductGroupConstructor a ldh:Constructor ;
rdfs:label "Category constructor" ;
dct:title "Category constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:name [ a xsd:string ] ;
schema:description [ a xsd:string ] ;
schema:identifier [ a xsd:string ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:Place spin:constructor :PlaceConstructor .

:PlaceConstructor a ldh:Constructor ;
rdfs:label "Region constructor" ;
dct:title "Region constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:name [ a xsd:string ] ;
schema:identifier [ a xsd:string ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:Order spin:constructor :OrderConstructor .

:OrderConstructor a ldh:Constructor ;
rdfs:label "Order constructor" ;
dct:title "Order constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:identifier [ a xsd:string ] ;
schema:orderDate [ a xsd:date ] ;
schema:customer [ a schema:Corporation ] ;
schema:broker [ a schema:Person ] ;
schema:orderedItem [ a schema:OrderItem ] ;
schema:orderDelivery [ a schema:ParcelDelivery ] ;
schema:acceptedOffer [ a schema:Offer ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:OrderItem spin:constructor :OrderItemConstructor .

:OrderItemConstructor a ldh:Constructor ;
rdfs:label "Order item constructor" ;
dct:title "Order item constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
schema:orderedItem [ a schema:Product ] ;
schema:orderQuantity [ a xsd:integer ] ;
schema:price [ a xsd:float ] ;
schema:priceCurrency [ a xsd:string ] ;
schema:discount [ a xsd:float ] ;
schema:priceSpecification [ a schema:UnitPriceSpecification ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:ParcelDelivery spin:constructor :ParcelDeliveryConstructor .

:ParcelDeliveryConstructor a ldh:Constructor ;
rdfs:label "Delivery constructor" ;
dct:title "Delivery constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
schema:partOfOrder [ a schema:Order ] ;
schema:provider [ a schema:Corporation ] ;
schema:deliveryAddress [ a schema:PostalAddress ] ;
schema:expectedArrivalUntil [ a xsd:date ] ;
schema:deliveryStatus [ a schema:DeliveryEvent ] ;
schema:price [ a xsd:float ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:DeliveryEvent spin:constructor :DeliveryEventConstructor .

:DeliveryEventConstructor a ldh:Constructor ;
rdfs:label "Shipment constructor" ;
dct:title "Shipment constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:startDate [ a xsd:date ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:Offer spin:constructor :OfferConstructor .

:OfferConstructor a ldh:Constructor ;
rdfs:label "Offer constructor" ;
dct:title "Offer constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:itemOffered [ a schema:Product ] ;
schema:price [ a xsd:float ] ;
schema:priceCurrency [ a xsd:string ] ;
schema:priceSpecification [ a schema:PriceSpecification ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:PriceSpecification spin:constructor :PriceSpecificationConstructor .

:PriceSpecificationConstructor a ldh:Constructor ;
rdfs:label "Price specification constructor" ;
dct:title "Price specification constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:price [ a xsd:float ] ;
schema:priceCurrency [ a xsd:string ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:UnitPriceSpecification spin:constructor :UnitPriceSpecificationConstructor .

:UnitPriceSpecificationConstructor a ldh:Constructor ;
rdfs:label "Unit price constructor" ;
dct:title "Unit price constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:price [ a xsd:float ] ;
schema:priceCurrency [ a xsd:string ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

schema:DeliveryChargeSpecification spin:constructor :DeliveryChargeSpecificationConstructor .

:DeliveryChargeSpecificationConstructor a ldh:Constructor ;
rdfs:label "Delivery charge constructor" ;
dct:title "Delivery charge constructor" ;
sp:text """
PREFIX schema: <https://schema.org/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

CONSTRUCT {
$this
dct:title [ a xsd:string ] ;
schema:price [ a xsd:float ] ;
schema:priceCurrency [ a xsd:string ] .
}
WHERE {}""" ;
rdfs:isDefinedBy : .

:MissingName a ldh:MissingPropertyValue ;
rdfs:label "Missing schema:name" ;
sp:arg1 schema:name ;
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/setup.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ OWNER_COUNTRY_NAME=DK</pre>
<pre>LinkedDataHub/
├── config/ # dataspace and service configuration (dataspaces.trig, system.trig)
├── datasets/ # owner and secretary agent metadata
├── fuseki/ # the backend triplestores' persisted RDF data
├── fuseki/ # the triplestore's persisted RDF data, one TDB2 directory per dataset
├── ssl/
│ ├── owner/ # your WebID certificate (keystore.p12)
│ └── secretary/ # the service agent's certificate
Expand Down
10 changes: 8 additions & 2 deletions docs/reference/configuration.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,14 @@ ABS_PATH=/linkeddatahub/</pre>
</dl>
</div>
<div>
<h2 id="fuseki"><samp>fuseki-admin</samp> and <samp>fuseki-end-user</samp> services</h2>
<p><samp>JAVA_OPTIONS</samp> carries the Java options of the Fuseki process, and is what sizes its heap. It defaults to <samp>-Xmx768m -Xms768m</samp> for <samp>fuseki-admin</samp> and <samp>-Xmx1536m -Xms1536m</samp> for <samp>fuseki-end-user</samp>.</p>
<h2 id="fuseki"><samp>fuseki</samp> service</h2>
<p>A single Apache Jena Fuseki server holds a TDB2 dataset for every dataspace role — an <samp>end-user</samp> and an <samp>admin</samp> dataset per dataspace — declared in <samp>config/fuseki/config.ttl</samp> and persisted under the <samp>fuseki/</samp> folder, one sub-folder per dataset. <samp>JAVA_OPTIONS</samp> carries the Java options of the Fuseki process, and is what sizes its heap.</p>
<p>Datasets are named after the dataspace origin with the deployment host dropped and the role appended — <samp>northwind-traders.demo.end-user</samp>, <samp>northwind-traders.demo.admin</samp> — so the names hold across development and production; the root dataspace's are plain <samp>end-user</samp> and <samp>admin</samp>. See the <a href="../dataspace/#services">dataspace reference</a> for the service declarations that bind an application to its datasets.</p>
</div>
<div>
<h2 id="egress"><samp>egress</samp> service</h2>
<p>A forward proxy (Squid) that the outbound SPARQL <code>SERVICE</code> and <code>LOAD</code> requests of both Fuseki and the platform pass through. It permits public destinations and refuses loopback, private and link-local ones, resolving each where it connects so redirect hops and DNS answers are checked too. Federation with public endpoints keeps working, while a <code>SERVICE</code> clause cannot reach another dataset, the cache or the platform.</p>
<p>Fuseki is pointed at it through its <samp>JAVA_TOOL_OPTIONS</samp>; the platform's own in-process queries (imports and PATCH updates) are routed through it when <samp>EGRESS_PROXY</samp> is set to its <samp>host:port</samp>. Without a proxy and without <samp>ALLOW_INTERNAL_URLS</samp>, the platform disables <code>SERVICE</code> in those queries rather than leaving it open.</p>
</div>
<div>
<h2 id="nginx"><samp>nginx</samp> service</h2>
Expand Down
15 changes: 8 additions & 7 deletions docs/reference/dataspace.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,17 @@
</tbody>
</table>
<p>You can use either HTTP Basic authentication (username/password) or Bearer token authentication (auth token), but not both for the same service.</p>
<p>The default end-user service, which the Northwind Traders dataspace shares:</p>
<pre>&lt;urn:linkeddatahub:services/end-user&gt;
<p>Each dataspace has its own end-user and admin service, pointing at its own datasets in the single <a href="../configuration/#fuseki"><samp>fuseki</samp></a> server. A dataset is named after the dataspace origin with the deployment host dropped and the role appended, so the Northwind Traders end-user service reads <samp>northwind-traders.demo.end-user</samp>:</p>
<pre>&lt;urn:northwind-traders:services/end-user&gt;
{
&lt;urn:linkeddatahub:services/end-user&gt; a sd:Service ;
dct:title "LinkedDataHub service" ;
&lt;urn:northwind-traders:services/end-user&gt; a sd:Service ;
dct:title "Northwind Traders service" ;
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
sd:endpoint &lt;http://fuseki-end-user:3030/ds/&gt; ;
a:graphStore &lt;http://fuseki-end-user:3030/ds/&gt; ;
a:quadStore &lt;http://fuseki-end-user:3030/ds/&gt; .
sd:endpoint &lt;http://fuseki:3030/northwind-traders.demo.end-user/&gt; ;
a:graphStore &lt;http://fuseki:3030/northwind-traders.demo.end-user/&gt; ;
a:quadStore &lt;http://fuseki:3030/northwind-traders.demo.end-user/&gt; .
}</pre>
<p>The root dataspace's services keep the plain <samp>end-user</samp> and <samp>admin</samp> dataset names. Several dataspaces may still share one service where isolation is not required.</p>
<p class="exhibit-links">Source: <a href="https://github.com/AtomGraph/LinkedDataHub/blob/develop/config/system.trig" target="_blank">config/system.trig</a></p>
<div class="ac-alert va-informative" role="status">
<span class="ac-alert-ic"><span aria-hidden="true" class="msi outline">info</span></span>
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/triplestores.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<th scope="row"><code>a:quadStore</code></th>
<td>Quad store, for dataset-level CRUD</td>
<td>No — omitting it falls back to graph-scoped GSP</td>
<td><code>&lt;http://fuseki-host:3030/ds/&gt;</code>, which is Fuseki-specific</td>
<td><code>&lt;http://fuseki:3030/end-user/&gt;</code>, which is Fuseki-specific</td>
</tr>
</tbody>
</table>
Expand Down
5 changes: 3 additions & 2 deletions docs/user-guide/manage-dataspaces.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<p>To create a new dataspace:</p>
<ol>
<li>Add instances of <code>lapp:EndUserApplication</code> and <code>lapp:AdminApplication</code> to <samp>config/dataspaces.trig</samp>, following the default dataspace as a template</li>
<li>Add corresponding <code>sd:Service</code> instances to <samp>config/system.trig</samp> with the SPARQL endpoint connection details</li>
<li>Declare an <samp>end-user</samp> and an <samp>admin</samp> dataset for the dataspace in <samp>config/fuseki/config.ttl</samp>, named after its origin (deployment host dropped, role appended)</li>
<li>Add corresponding <code>sd:Service</code> instances to <samp>config/system.trig</samp>, each pointing at one of those datasets, and bind the applications to them</li>
</ol>
<p>The relationship between end-user and admin applications is automatically inferred based on naming conventions — you do not need to specify
<code>lapp:endUserApplication</code> or <code>lapp:adminApplication</code> properties manually. Applications whose origin (<code>lapp:origin</code>) uses the
Expand All @@ -51,7 +52,7 @@
</div>
<div>
<h2 id="manage-services">Manage services</h2>
<p>The LinkedDataHub service, along with the default SPARQL services <samp>fuseki-end-user</samp> and <samp>fuseki-admin</samp>, is defined in <a href="https://github.com/AtomGraph/LinkedDataHub/blob/master/docker-compose.yml" target="_blank"><samp>docker-compose.yml</samp></a>; each runs as a Docker container.</p>
<p>The LinkedDataHub service, the single <samp>fuseki</samp> triplestore and the <samp>egress</samp> proxy are defined in <a href="https://github.com/AtomGraph/LinkedDataHub/blob/master/docker-compose.yml" target="_blank"><samp>docker-compose.yml</samp></a>; each runs as a Docker container. One Fuseki server holds an <samp>end-user</samp> and an <samp>admin</samp> dataset per dataspace, declared in <samp>config/fuseki/config.ttl</samp> — so giving a dataspace its own datasets means adding a dataset pair there and a matching pair of <code>sd:Service</code> instances in <samp>config/system.trig</samp>.</p>
<p>While LinkedDataHub uses Apache Jena Fuseki by default, you can configure it to use other SPARQL 1.1-compatible triplestores such as <a href="https://github.com/ad-freiburg/qlever" target="_blank">QLever</a>, <a href="https://github.com/dice-group/tentris" target="_blank">Tentris</a>, or others.</p>
<p>See the <a href="../../reference/triplestores/" target="_blank">triplestores reference</a> for step-by-step configuration examples, including QLever setup and troubleshooting.</p>
</div>
Expand Down
Loading
Loading