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
Copy file name to clipboardExpand all lines: docs/gistStyleGuide.md
+43-15Lines changed: 43 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,39 @@
1
-
gist Style Guide [ IN PROGRESS ]
1
+
gist Style Guide <!-- omit in toc -->
2
2
=====
3
3
4
-
Purpose of this document
4
+
-[Purpose of this style guide](#purpose-of-this-style-guide)
5
+
-[OWL Version](#owl-version)
6
+
-[Serialization](#serialization)
7
+
-[Naming: Local Names](#naming-local-names)
8
+
-[Classes](#classes)
9
+
-[Properties](#properties)
10
+
-[All](#all)
11
+
-[Naming: Labels](#naming-labels)
12
+
-[Classes](#classes-1)
13
+
-[Properties](#properties-1)
14
+
-[gist Definition of Title Case](#gist-definition-of-title-case)
15
+
-[Annotations](#annotations)
16
+
-[Conventions](#conventions)
17
+
-[Rationale](#rationale)
18
+
-[Documentation](#documentation)
19
+
20
+
Purpose of this style guide
5
21
-----
6
22
7
-
The purpose of this document is two-fold:
23
+
The purpose of this evolving document is two-fold:
8
24
9
25
- Define and implement conventions in order to standardize gist.
10
26
- Articulate what we consider best or "better" practices for ontology design and implementation.
11
27
28
+
-----
29
+
12
30
OWL Version
13
31
-----
14
32
15
33
gist uses OWL 2 DL.
16
34
35
+
-----
36
+
17
37
Serialization
18
38
-----
19
39
@@ -23,12 +43,12 @@ Serialization
23
43
In order to use the standard settings, copy the provided `pre-commit` script from the `tools/` directory in the repository to `.git/hooks/` after the repository is cloned,
24
44
and ensure that `JAVA_HOME` is set in your environment. This script will only format RDF files, ignoring all others.
25
45
26
-
Naming
27
46
-----
28
47
29
-
### Local names
48
+
Naming: Local Names
49
+
-----
30
50
31
-
####Classes
51
+
### Classes
32
52
33
53
- Camelcase with initial uppercase
34
54
- Acronyms are also camelcased so that word boundaries are unambiguous.
@@ -37,36 +57,37 @@ Naming
37
57
- Alphanumeric characters only.
38
58
- Example: `Isbn10`, not `Isbn-10` or `ISBN-10`.
39
59
40
-
####Properties
60
+
### Properties
41
61
42
62
- Camelcase with initial lowercase
43
63
- Acronyms as above
44
64
45
-
####All
65
+
### All
46
66
47
67
- No non-standard abbreviations. E.g., `hasUoM` should be `hasUnitOfMeasure`.
48
68
49
-
### Labels
69
+
Naming: Labels
70
+
-----
50
71
51
72
The following conventions apply to `skos:prefLabel` but not `skos:altLabel`.
52
73
53
-
####Classes
74
+
### Classes
54
75
55
76
- Title case (see definition of title case below)
56
77
- Normalized to natural language standards. E.g., hyphens inserted, acronyms in all caps, etc.
57
78
- Examples: _AMA Guideline_, _ISBN-10_
58
79
59
-
####Properties
80
+
### Properties
60
81
61
82
- Lower case
62
83
- Normalized to natural language standards. E.g., hyphens inserted, acronyms in all caps, proper nouns capitalized, etc.
63
84
- Examples: _has unit of measure_, _has SSN_, _unit symbol Unicode_
64
85
65
-
####gist Definition of Title Case
86
+
### gist Definition of Title Case
66
87
67
88
The rules of title case are not universally standardized; standardization is only at the level of house styles and individual style guides. Most English style guides agree that the first and last words should always be capitalized, while articles, short prepositions, and some conjunctions should not be. Other rules about the capitalization vary.
68
89
69
-
gist style guide for title case:
90
+
This style guide defines the rules for title case as follows:
70
91
71
92
- Capitalize:
72
93
- First and last words
@@ -79,7 +100,12 @@ gist style guide for title case:
79
100
- Acronyms in all caps (e.g., _SSN_, _ISBN_)
80
101
- Capitalize everything else
81
102
82
-
### Annotations
103
+
-----
104
+
105
+
Annotations
106
+
-----
107
+
108
+
### Conventions
83
109
84
110
gist uses SKOS annotations rather than `rdfs:label` and `rdfs:comment`. The accepted annotations, intended use, and previous usage are shown in the following tables. Refer to the [SKOS ontology](http://www.w3.org/2004/02/skos/core) for formal definitions.
85
111
@@ -117,10 +143,12 @@ Certain RDFS annotations are recommended where there is no SKOS equivalent.
117
143
|`rdfs:label`|`skos:prefLabel`|
118
144
|`rdfs:comment`| All other annotations, especially `skos:scopeNote` and `skos:example`|
119
145
120
-
####Rationale
146
+
### Rationale
121
147
122
148
SKOS annotations allow a more fine-grained approach to human-readable documentation. This change also aligns with emerging common practice.
0 commit comments