Skip to content
Browse files

tried to clarify documentation for vocabulary serving

  • Loading branch information...
1 parent ab839d6 commit 9b2e25915f901cbabdafe6cfd9c4935f642a22fe @cygri cygri committed Jan 11, 2011
Showing with 24 additions and 11 deletions.
  1. +24 −11 doc/manual/index.htm
View
35 doc/manual/index.htm
@@ -1528,13 +1528,29 @@ <h1 id="specification">7. Language Specification</h1>
<h2><a name="servingvocabularies"></a>7.7 Serving Vocabulary Classes and Properties</h2>
-<p>In the spirit of <a href="http://www.w3.org/DesignIssues/LinkedData.html">Linked Data</a>, vocabulary data should be dereferencable by clients. D2RQ infers types of class and property resources as <tt>rdfs:Class</tt> and <tt>rdf:Property</tt> and allows the user to provide labels
-using the <tt>d2rq:classDefinitionLabel</tt> and <tt>d2rq:propertyDefinitionLabel</tt> constructs,
-comments using the <tt>d2rq:classDefinitionComment</tt> and <tt>d2rq:propertyDefinitionComment</tt> constructs,
-as well as additional properties using the <tt>d2rq:additionalClassDefinitionProperty</tt> and <tt>d2rq:additionalPropertyDefinitionProperty</tt> constructs.</p>
-<p>This feature is meant to enable Linked Data interfaces by providing additional query results for simple (URI, ANY, ANY) or (ANY, ANY, URI) find patterns that touch on vocabulary resources. It currently does <em>not</em> work within SPARQL queries beyond <tt>DESCRIBE</tt>.</p>
-<h3><a name="additionalproperty"></a>7.7.1 AdditionalProperty</h2>
+<p>In the spirit of <a href="http://www.w3.org/DesignIssues/LinkedData.html">Linked Data</a>, the URIs of classes and properties should be dereferenceable.</p>
+
+<p>In a mapping file auto-generated by the <a href="#generatemapping"><code>generate-mapping</code> utility</a>, the classes and properties have QNames such as <code>vocab:TableName</code> and <code>vocab:TableName_ColumnName</code>. The <code>vocab:</code> prefix expands to a URI relative to the base URI of the server, yielding URIs such as <code>http://<em>baseURI</em>/vocab/TableName</code>. These URIs can be dereferenced in D2R Server.</p>
+
+<p>By default, the only statement about these URIs is an <code>rdf:type</code> statement that declares the URI as an <tt>rdfs:Class</tt> or <tt>rdf:Property</tt>. However, further statements can be added in the mapping file. This is done by adding additional properties, described in this section, to the class map or property map.</p>
+
+<p>This feature only works for simple (URI, ANY, ANY) or (ANY, ANY, URI) find patterns that touch on vocabulary resources. In other words, it only works when dereferencing the class or property URI, or when describing the URI using a a SPARQL <code>DESCRIBE</code> query. It currently does <em>not</em> work within other SPARQL queries such as <code>SELECT</code> or <code>CONSTRUCT</code>.</p>
+
+<p>For further details, please refer to the <a href="http://www4.wiwiss.fu-berlin.de/bizer/d2r-server/#vocabulary">D2R documentation</a>.</p>
+
+
+<h3><a name="vocab-label-comment"></a>7.7.1 Labels and Comments for Vocabulary Terms</h3>
+
+<p>An <code>rdfs:label</code> can be added to a term URI by ading <code>d2rq:classDefinitionLabel</code> or <code>d2rq:propertyDefinitionLabel</code> to the class map or property map.</p>
+
+<p>An <code>rdfs:comment</code> can be added by adding <code>d2rq:classDefinitionComment</code> and <code>d2rq:propertyDefinitionComment</code> to the class map or property map.</p>
+
+<p>Other properties can be added by creating a <code>d2rq:AdditionalProperty</code> construct, described below, and by linking to it from the class map or property map using <code>d2rq:additionalClassDefinitionProperty</code> and <code>d2rq:additionalPropertyDefinitionProperty</code>.</p>
+
+
+<h3><a name="additionalproperty"></a>7.7.2 AdditionalProperty</h3>
+
<p>A <strong>d2rq:AdditionalProperty</strong> construct can be used to add a fixed statement
to all class definitions of a class map, or to all property definitions of a property bridge.
The statement is added to the result sets, if patterns like (ANY, ANY, ANY), (URI, ANY, ANY) or (URI, additionalPropertyName,
@@ -1581,11 +1597,8 @@ <h1 id="specification">7. Language Specification</h1>
<p>This adds an <tt>owl:equivalentProperty</tt> statement with the fixed object <tt>dc:title</tt> to every related property definition.</p>
-<h3>7.7.2 Integration with D2R Server</h3>
-<p>D2R Server automatically serves data for vocabularies placed under <tt>http://<em>baseURI</em><strong>/vocab/resource/</strong></tt>. The <a href="#generatemapping">mapping generator</a> automatically creates a compatible namespace for this purpose.
-For further details, please refer to the <a href="http://www4.wiwiss.fu-berlin.de/bizer/d2r-server/#vocabulary">D2R documentation</a>.</p>
-
-<h3>7.7.3 Controlling vocabulary serving</h3>
+
+<h3><a name="vocabulary-serving"></a>7.7.3 Controlling vocabulary serving</h3>
<p>Vocabulary serving is enabled by default. In order to deactivate it, a <a href="#configuration"><tt>d2rq:Configuration</tt></a> block
with the property <tt>d2rq:serveVocabulary</tt> set to <tt>false</tt> must be created:

0 comments on commit 9b2e259

Please sign in to comment.
Something went wrong with that request. Please try again.