Skip to content

Commit

Permalink
Added the two side-by-side tables. Added the JSON section.
Browse files Browse the repository at this point in the history
  • Loading branch information
riannella committed Jul 1, 2016
1 parent 1e5a6cd commit 3245bae
Show file tree
Hide file tree
Showing 7 changed files with 2,347 additions and 825 deletions.
25 changes: 19 additions & 6 deletions tools/classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,21 +323,30 @@ public function htmlTerms($type, $title) {
$description = file_get_contents($path);
}
}
$html .= "\n" . $description . "\n";;

#$html .= "\n" . $description . "\n";;

$html .= "<table>\n <tr style='vertical-align: top;'>\n <td style='width:70%;'>\n";

$html .= "<table class='def propdef'>\n";
$html .= " <tr><td><b>URI:</b></td> <td>".$term->htmlLink()."</td></tr>\n";
$html .= $term->propertyRow("Label", "rdfs:label");
$html .= $term->propertyRow("Status", "vs:term_status");
$html .= " <tr><td><b>Identifier:</b></td> <td>".$term->htmlLink()."</td></tr>\n";
$html .= " <tr><td><b>Defintion:</b></td> <td>".$description."</td></tr>\n";
$html .= " <tr><td><b>Comment:</b></td> <td>test</td></tr>\n";

$html .= "</table>\n </td>\n <td>\n";
$html .= "<table class='def propdef'>\n";

#$html .= $term->propertyRow("Status", "vs:term_status");
$html .= $term->propertyRow("Parent class", "rdfs:subClassOf");
$html .= $term->propertyRow("Parent property", "rdfs:subPropertyOf");
$html .= $term->propertyRow("Equivalent to", "owl:sameAs");
$html .= $term->propertyRow("Deprecated by", "ont:deprecatedBy");
$html .= $term->propertyRow("Deprecates", "^ont:deprecatedBy");
$html .= $term->propertyRow("Sub-classes", "^rdfs:subClassOf");
$html .= $term->propertyRow("Sub-properties", "^rdfs:subPropertyOf");
$html .= $term->propertyRow("Narrower terms", "^skos:broaderTransitive");
$html .= $term->propertyRow("Broader terms", "skos:broaderTransitive");
$html .= $term->propertyRow("Parent class", "rdfs:subClassOf");
$html .= $term->propertyRow("Parent property", "rdfs:subPropertyOf");

$html .= $term->propertyRow("Properties", "^rdfs:domain");
if ($term instanceof Phpspecgen_Class) {
$properties = $term->inheritedProperties();
Expand All @@ -357,6 +366,10 @@ public function htmlTerms($type, $title) {
$html .= $term->propertyRow('Concepts', 'skos:hasTopConcept');
$html .= $term->propertyRow('Concept scheme', '^skos:hasTopConcept');
$html .= "</table>\n";

$html .= "</td>\n </tr>\n </table>\n ";


$html .= "</section>\n";
}
$html .= '</section>';
Expand Down
4 changes: 2 additions & 2 deletions vocab/WD/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var respecConfig = {
specStatus: "ED",
shortName: "odrl-vocab",
publishDate: "2016-05-20",
publishDate: "2016-06-30",
//previousPublishDate: "",
//previousMaturity: "",
//previousURI: "",
Expand Down Expand Up @@ -45,5 +45,5 @@ var respecConfig = {
inlineCSS: true,
noIDLIn: true,
noLegacyStyle: false,
issueBase: "https://www.w3.org/2016/poe/track/issues/"
issueBase: "https://github.com/w3c/poe/milestones/Vocabulary%20&%20Expression"
};
3,100 changes: 2,287 additions & 813 deletions vocab/WD/index.html

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions vocab/WD/parts/json.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<p>This section describes how to encode both the ODRL Model and Vocabulary, including any community developed Profiles, using the JSON syntax [[rfc4627]] and using a JSON Schema [[json-schema]].</p>

<p>The complete ODRL JSON Schema is shown in the <a href="#jasonschema">Appendix.</a> and can be <a href="https://www.w3.org/ns/odrl/2/ODRL21.json">downloaded</a>.</p>

<p>ODRL can express complex contracts and policies which may require quite sophisticated systems to evaluate contractual permissions, restrictions and duties. However, the ODRL in JSON encoding is designed to be lightweight and requires only standard JSON software to generate or parse the representation.</p>

<p>In order to make the JSON encoding of ODRL as natural as possible, certain terms which are represented in the ODRL Vocabulary as values become JSON properties. For example, both assigner and assignee are Role controlled vocabulary values of Party. However, in the JSON encoding, they are expressed as fully-fledged Properties. This contrasts with the XML encoding which has a Party element and a Role attribute.</p>

<p>Similarly, the Asset object has a Relation controlled vocabulary with values of target and output. The JSON encoding directly represents these as first-class properties.</p>

<p>The ODRL Model and Vocabulary is designed in this manner, in part, to allow for extensibility. In other words, it is possible to add additional types of Party or other kinds of Asset. The JSON ODRL Encoding allows for this by using patternProperties – for example, for additional types of Party or Scope.</p>

<p>Unlike XML, JSON doesn’t support the concept of namespaces. This means that property values need to be expressed using globally unique identifiers, in order to be unambiguous. Therefore, one key implementation decision for ODRL in JSON is to require that terms drawn from the ODRL Vocabulary or any ODRL profile (such as RightsML [[rights-ml]]) must be expressed using complete URLs. (This differs from the XML encoding of ODRL, which allows various short forms of URLs to be used, like QNames [[xml-names]] or QCodes [[news-ml]]).</p>

<p>All of the URIs used in ODRL JSON instances MUST follow those defined in the ODRL Vocabulary. This includes URIs for policy types, actions, operators, operands, functions, scopes, conflict handling terms, and unsupported action-handling terms.</p>

<section>

<h2>A Note on JSON-LD</h2>
<p>JSON-LD [[json-ld]] (JSON for Linked Data) is a method to convey Linked Data using JSON. It is a W3C Recommendation and it is a JSON syntax for RDF (similar to the RDF/XML and Turtle syntaxes for RDF). If you would prefer to use JSON-LD, it is recommended that you use the ODRL Ontology and appropriate software to parse and serialize the RDF triples using JSON-LD.</p>
</section>
1 change: 1 addition & 0 deletions vocab/WD/parts/rdfowl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>The complete ODRL Ontology and can be downloaded in <a href="https://www.w3.org/ns/odrl/2/ODRL21.ttl">Turtle serialisation</a> or <a href="https://www.w3.org/ns/odrl/2/ODRL21.rdf">RDF/XML serialisation</a> or <a href="https://www.w3.org/ns/odrl/2/ODRL21.nt">N-Triples serialisation</a></p>
3 changes: 2 additions & 1 deletion vocab/WD/parts/xml.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<p>The ODRL statements can be encoded in XML [[xml]] defined by XML Schema [[xmlschema11-1]] and XML Datatypes [[xmlschema11-2]]. All of the URIs used in ODRL XML instances MUST follow those defined in the ODRL Vocabulary. The complete ODRL XML Schema is shown in the <a href="#xmlschema">Appendix.</a></p>
<p>The ODRL statements can be encoded in XML [[xml]] defined by XML Schema [[xmlschema11-1]] and XML Datatypes [[xmlschema11-2]]. All of the URIs used in ODRL XML instances MUST follow those defined in the ODRL Vocabulary.</p>
<p>The complete ODRL XML Schema is shown in the <a href="#xmlschema">Appendix.</a> and can be <a href="https://www.w3.org/ns/odrl/2/ODRL21.xsd">downloaded</a>.</p>

<p>To enable compact URIs, this encoding also supports the use of Qualified Names (QNames) [[xml-names]] for the specification of the value identifiers. In addition, Qualified Codes (QCodes) [[news-ml]] may also be used for vocabulary values. QCodes are similar to QNames but also allow a digit as the first character of the value.</p>

Expand Down
18 changes: 15 additions & 3 deletions vocab/WD/template.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,18 @@
<section id="vocab">
<h2>Vocabulary</h2>

<p>The Namespace URI to identify the ODRL model and vocabulary is <code>http://www.w3.org/ns/odrl/2/</code></p>
<p>The Namespace URI to identify the ODRL model and vocabulary terms is <code>http://www.w3.org/ns/odrl/2/</code></p>

<div class="issue">
<p>The namespace URI may change in future versions.</p>
</div>

<figure>
<img src="diagram.png" alt="ODRL Vocabulary groups"/>
<figcaption>Vocabulary groups </figcaption>
</figure>


<?php
echo $vocab->htmlSummaryOfTerms();

Expand Down Expand Up @@ -105,8 +115,10 @@
</section>

<section class="appendix" id="community">
<h2>Change from the Community Group Reports</h2>

<h2>Changes from the Community Group Reports</h2>
<p>
None.
</p>
</section>


Expand Down

0 comments on commit 3245bae

Please sign in to comment.