You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -119,14 +119,71 @@ Also adds the `gen-vocab` command to the `rdf` command-line executable to genera
119
119
120
120
## Adding new vocabularies
121
121
122
-
* First, add an entry to `lib/rdf/vocab.rb`, the key names contained within
123
-
for guidance. For more information, see the documentation on
122
+
Vocabularies should only be added to this gem if they are widely used. An equivalent process can be used to add a vocabulary to an arbitrary Ruby application or gem if it is more application specific.
123
+
124
+
New vocabularies should be generated via a pull request after cloning from GitHub. Be sure to use a custom branch name before creating the PR.
125
+
126
+
* First, add an entry to `lib/rdf/vocab.rb`, the key is used to identify the vocabulary, and as the default basis for the prefix label to use for the vocabulary. The key names of the object value come from the following:
127
+
<dl>
128
+
<dt>uri (required)</dt>
129
+
<dd>The namespace URI for the vocabulary.</dd>
130
+
<dt>module_name (default RDF::Vocab)</dt>
131
+
<dd>The Ruby module in which the vocabulary class is created.</dd>
132
+
<dt>class_name (default from uppercase of the vocabulary identity)</dt>
133
+
<dd>The class name of the vocabulary</dd>
134
+
<dt>source (default from uri)</dt>
135
+
<dd>The source used to fetch the RDF vocabulary definition (most formats supported). Defaults to the vocabulary uri.</dd>
136
+
<dt>strict (default false)</dt>
137
+
<dd>Creates a _strict_ vocabulary, so that attempts to use undefined terms in the vocabulary namespace become errors.</dd>
138
+
<dt>alias (Internal only)</dt>
139
+
<dd>Indicates that this is an alias for a vocabulary defined directly in the RDF namespace.</dd>
140
+
<dt>skip</dt>
141
+
<dd>Do not process this vocabulary, typically when the vocabulary source is inaccessible.</dd>
142
+
<dt>patch</dt>
143
+
<dd>The value is taken as a string formatted as an <ahref="http://www.w3.org/TR/ldpatch/">LD Patch</a> used to correct issues in the vocabulary source that may show up when the vocabulary is validated.</dd>
144
+
<dt>extra</dt>
145
+
<dd>Value is a JSON Object which is added to the resulting vocabulary definition.</dd>
0 commit comments