rdf 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CREDITS +1 -0
- data/VERSION +1 -1
- data/lib/rdf.rb +10 -48
- data/lib/rdf/cli/vocab-loader.rb +78 -142
- data/lib/rdf/mixin/enumerable.rb +25 -0
- data/lib/rdf/mixin/mutable.rb +3 -0
- data/lib/rdf/model/graph.rb +1 -1
- data/lib/rdf/model/node.rb +25 -2
- data/lib/rdf/model/statement.rb +20 -12
- data/lib/rdf/model/uri.rb +11 -2
- data/lib/rdf/nquads.rb +8 -6
- data/lib/rdf/ntriples/writer.rb +14 -10
- data/lib/rdf/query/pattern.rb +10 -8
- data/lib/rdf/reader.rb +11 -2
- data/lib/rdf/repository.rb +1 -1
- data/lib/rdf/vocab.rb +396 -96
- data/lib/rdf/vocab/cc.rb +117 -25
- data/lib/rdf/vocab/cert.rb +230 -117
- data/lib/rdf/vocab/dc.rb +930 -233
- data/lib/rdf/vocab/dc11.rb +151 -37
- data/lib/rdf/vocab/doap.rb +326 -114
- data/lib/rdf/vocab/exif.rb +930 -533
- data/lib/rdf/vocab/foaf.rb +602 -346
- data/lib/rdf/vocab/geo.rb +139 -33
- data/lib/rdf/vocab/gr.rb +1551 -1084
- data/lib/rdf/vocab/ht.rb +319 -0
- data/lib/rdf/vocab/ical.rb +507 -349
- data/lib/rdf/vocab/ma.rb +504 -280
- data/lib/rdf/vocab/mo.rb +2425 -876
- data/lib/rdf/vocab/og.rb +178 -90
- data/lib/rdf/vocab/owl.rb +513 -219
- data/lib/rdf/vocab/prov.rb +1557 -479
- data/lib/rdf/vocab/rdfs.rb +107 -31
- data/lib/rdf/vocab/rdfv.rb +165 -0
- data/lib/rdf/vocab/rsa.rb +61 -18
- data/lib/rdf/vocab/rss.rb +55 -22
- data/lib/rdf/vocab/schema.rb +8590 -3995
- data/lib/rdf/vocab/sioc.rb +657 -218
- data/lib/rdf/vocab/skos.rb +227 -134
- data/lib/rdf/vocab/skosxl.rb +47 -33
- data/lib/rdf/vocab/vcard.rb +693 -327
- data/lib/rdf/vocab/void.rb +175 -132
- data/lib/rdf/vocab/vs.rb +27 -0
- data/lib/rdf/vocab/wdrs.rb +123 -119
- data/lib/rdf/vocab/wot.rb +155 -45
- data/lib/rdf/vocab/xhtml.rb +2 -1
- data/lib/rdf/vocab/xhv.rb +496 -231
- data/lib/rdf/vocab/xsd.rb +382 -53
- data/lib/rdf/writer.rb +8 -4
- metadata +5 -4
- data/lib/rdf/vocab/http.rb +0 -84
- data/lib/rdf/vocab/v.rb +0 -154
data/lib/rdf/vocab/cc.rb
CHANGED
@@ -1,35 +1,127 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
1
2
|
# This file generated automatically using vocab-fetch from http://creativecommons.org/ns#
|
2
3
|
require 'rdf'
|
3
4
|
module RDF
|
4
5
|
class CC < StrictVocabulary("http://creativecommons.org/ns#")
|
5
6
|
|
6
7
|
# Class definitions
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
8
|
+
term :Jurisdiction,
|
9
|
+
label: "Jurisdiction".freeze,
|
10
|
+
type: "rdfs:Class".freeze
|
11
|
+
term :License,
|
12
|
+
label: "License".freeze,
|
13
|
+
subClassOf: "dc:LicenseDocument".freeze,
|
14
|
+
type: "rdfs:Class".freeze
|
15
|
+
term :Permission,
|
16
|
+
label: "Permission".freeze,
|
17
|
+
type: "rdfs:Class".freeze
|
18
|
+
term :Prohibition,
|
19
|
+
label: "Prohibition".freeze,
|
20
|
+
type: "rdfs:Class".freeze
|
21
|
+
term :Requirement,
|
22
|
+
label: "Requirement".freeze,
|
23
|
+
type: "rdfs:Class".freeze
|
24
|
+
term :Work,
|
25
|
+
label: "Work".freeze,
|
26
|
+
type: "rdfs:Class".freeze
|
21
27
|
|
22
28
|
# Property definitions
|
23
|
-
property :
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
property :
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
property :
|
29
|
+
property :attributionName,
|
30
|
+
domain: "cc:Work".freeze,
|
31
|
+
label: "attributionName".freeze,
|
32
|
+
range: "rdfs:Literal".freeze,
|
33
|
+
type: "rdf:Property".freeze
|
34
|
+
property :attributionURL,
|
35
|
+
domain: "cc:Work".freeze,
|
36
|
+
label: "attributionURL".freeze,
|
37
|
+
range: "rdfs:Resource".freeze,
|
38
|
+
type: "rdf:Property".freeze
|
39
|
+
property :deprecatedOn,
|
40
|
+
domain: "cc:License".freeze,
|
41
|
+
label: "deprecatedOn".freeze,
|
42
|
+
range: "http://www.w3.org/2001/XMLSchema-datatypes#date".freeze,
|
43
|
+
type: "rdf:Property".freeze
|
44
|
+
property :jurisdiction,
|
45
|
+
domain: "cc:License".freeze,
|
46
|
+
label: "jurisdiction".freeze,
|
47
|
+
range: "cc:Jurisdiction".freeze,
|
48
|
+
type: "rdf:Property".freeze
|
49
|
+
property :legalcode,
|
50
|
+
domain: "cc:License".freeze,
|
51
|
+
label: "legalcode".freeze,
|
52
|
+
range: "rdfs:Resource".freeze,
|
53
|
+
type: "rdf:Property".freeze
|
54
|
+
property :license,
|
55
|
+
domain: "cc:Work".freeze,
|
56
|
+
label: "license".freeze,
|
57
|
+
"owl:sameAs" => %(xhv:license).freeze,
|
58
|
+
range: "cc:License".freeze,
|
59
|
+
subPropertyOf: "dc:license".freeze,
|
60
|
+
type: "rdf:Property".freeze
|
61
|
+
property :morePermissions,
|
62
|
+
domain: "cc:Work".freeze,
|
63
|
+
label: "morePermissions".freeze,
|
64
|
+
range: "rdfs:Resource".freeze,
|
65
|
+
subPropertyOf: "dc:relation".freeze,
|
66
|
+
type: "rdf:Property".freeze
|
67
|
+
property :permits,
|
68
|
+
domain: "cc:License".freeze,
|
69
|
+
label: "permits".freeze,
|
70
|
+
range: "cc:Permission".freeze,
|
71
|
+
type: "rdf:Property".freeze
|
72
|
+
property :prohibits,
|
73
|
+
domain: "cc:License".freeze,
|
74
|
+
label: "prohibits".freeze,
|
75
|
+
range: "cc:Prohibition".freeze,
|
76
|
+
type: "rdf:Property".freeze
|
77
|
+
property :requires,
|
78
|
+
domain: "cc:License".freeze,
|
79
|
+
label: "requires".freeze,
|
80
|
+
range: "cc:Requirement".freeze,
|
81
|
+
type: "rdf:Property".freeze
|
82
|
+
property :useGuidelines,
|
83
|
+
domain: "cc:Work".freeze,
|
84
|
+
label: "useGuidelines".freeze,
|
85
|
+
range: "rdfs:Resource".freeze,
|
86
|
+
subPropertyOf: "dc:relation".freeze,
|
87
|
+
type: "rdf:Property".freeze
|
88
|
+
|
89
|
+
# Extra definitions
|
90
|
+
term :Attribution,
|
91
|
+
label: "Attribution".freeze,
|
92
|
+
type: "cc:Requirement".freeze
|
93
|
+
term :CommercialUse,
|
94
|
+
label: "CommercialUse".freeze,
|
95
|
+
type: "cc:Prohibition".freeze
|
96
|
+
term :Copyleft,
|
97
|
+
label: "Copyleft".freeze,
|
98
|
+
type: "cc:Requirement".freeze
|
99
|
+
term :DerivativeWorks,
|
100
|
+
label: "DerivativeWorks".freeze,
|
101
|
+
type: "cc:Permission".freeze
|
102
|
+
term :Distribution,
|
103
|
+
label: "Distribution".freeze,
|
104
|
+
type: "cc:Permission".freeze
|
105
|
+
term :HighIncomeNationUse,
|
106
|
+
label: "HighIncomeNationUse".freeze,
|
107
|
+
type: "cc:Prohibition".freeze
|
108
|
+
term :LesserCopyleft,
|
109
|
+
label: "LesserCopyleft".freeze,
|
110
|
+
type: "cc:Requirement".freeze
|
111
|
+
term :Notice,
|
112
|
+
label: "Notice".freeze,
|
113
|
+
type: "cc:Requirement".freeze
|
114
|
+
term :Reproduction,
|
115
|
+
label: "Reproduction".freeze,
|
116
|
+
type: "cc:Permission".freeze
|
117
|
+
term :ShareAlike,
|
118
|
+
label: "ShareAlike".freeze,
|
119
|
+
type: "cc:Requirement".freeze
|
120
|
+
term :Sharing,
|
121
|
+
label: "Sharing".freeze,
|
122
|
+
type: "cc:Permission".freeze
|
123
|
+
term :SourceCode,
|
124
|
+
label: "SourceCode".freeze,
|
125
|
+
type: "cc:Requirement".freeze
|
34
126
|
end
|
35
127
|
end
|
data/lib/rdf/vocab/cert.rb
CHANGED
@@ -1,131 +1,244 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
1
2
|
# This file generated automatically using vocab-fetch from http://www.w3.org/ns/auth/cert#
|
2
3
|
require 'rdf'
|
3
4
|
module RDF
|
4
5
|
class CERT < StrictVocabulary("http://www.w3.org/ns/auth/cert#")
|
5
6
|
|
6
7
|
# Class definitions
|
7
|
-
|
8
|
-
%(A certificate is a Document that is signed.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
%(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
%(
|
27
|
-
|
28
|
-
%(the class of
|
29
|
-
|
30
|
-
%(
|
8
|
+
term :Certificate,
|
9
|
+
comment: %(A certificate is a Document that is signed.
|
10
|
+
As explained here http://www.pgpi.org/doc/pgpintro/#p16
|
11
|
+
'A digital certificate consists of three things:
|
12
|
+
* A public key.
|
13
|
+
* Certificate information. \('Identity' information about the
|
14
|
+
user, such as name, user ID, and so on.\)
|
15
|
+
* One or more digital signatures.'
|
16
|
+
).freeze,
|
17
|
+
label: "Certificate".freeze,
|
18
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
19
|
+
subClassOf: "foaf:Document".freeze,
|
20
|
+
type: "owl:Class".freeze,
|
21
|
+
"vs:term_status" => %(unstable).freeze
|
22
|
+
term :Key,
|
23
|
+
comment: %(the class of keys).freeze,
|
24
|
+
label: "Key".freeze,
|
25
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
26
|
+
type: "owl:Class".freeze,
|
27
|
+
"vs:term_status" => %(unstable).freeze
|
28
|
+
term :PGPCertificate,
|
29
|
+
comment: %(the class of PGP Certificates).freeze,
|
30
|
+
label: "PGPCertificate".freeze,
|
31
|
+
"owl:equivalentClass" => %(wot:PubKey).freeze,
|
32
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
33
|
+
subClassOf: "cert:Certificate".freeze,
|
34
|
+
type: "owl:Class".freeze,
|
35
|
+
"vs:term_status" => %(unstable).freeze
|
36
|
+
term :PrivateKey,
|
37
|
+
comment: %(Private Key).freeze,
|
38
|
+
label: "PrivateKey".freeze,
|
39
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
40
|
+
subClassOf: "cert:Key".freeze,
|
41
|
+
type: "owl:Class".freeze
|
42
|
+
term :PublicKey,
|
43
|
+
comment: %(Public Key).freeze,
|
44
|
+
label: "PublicKey".freeze,
|
45
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
46
|
+
subClassOf: "cert:Key".freeze,
|
47
|
+
type: "owl:Class".freeze,
|
48
|
+
"vs:term_status" => %(unstable).freeze
|
49
|
+
term :RSAKey,
|
50
|
+
comment: %(
|
51
|
+
The union of the public and private components of an RSAKey.
|
52
|
+
Usually those pieces are not kept together
|
53
|
+
).freeze,
|
54
|
+
label: "RSA Key".freeze,
|
55
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
56
|
+
subClassOf: "cert:Key".freeze,
|
57
|
+
type: "owl:Class".freeze,
|
58
|
+
"vs:term_status" => %(unstable).freeze
|
59
|
+
term :RSAPublicKey,
|
60
|
+
comment: %(
|
61
|
+
The RSA public key. Padded message m are encrypted by applying the function
|
62
|
+
modulus\(power\(m,exponent\),modulus\)
|
63
|
+
).freeze,
|
64
|
+
label: "RSA Public Key".freeze,
|
65
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
66
|
+
"rdfs:seeAlso" => %(http://en.wikipedia.org/wiki/RSA).freeze,
|
67
|
+
subClassOf: "cert:PublicKey".freeze,
|
68
|
+
type: "owl:Class".freeze,
|
69
|
+
"vs:term_status" => %(unstable).freeze
|
70
|
+
term :Signature,
|
71
|
+
comment: %(the class of signtatures).freeze,
|
72
|
+
label: "Signature".freeze,
|
73
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
74
|
+
type: "owl:Class".freeze,
|
75
|
+
"vs:term_status" => %(unstable).freeze
|
76
|
+
term :X509Certificate,
|
77
|
+
comment: %(the class of X509 Certificates).freeze,
|
78
|
+
label: "X509Certificate".freeze,
|
79
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
80
|
+
"rdfs:seeAlso" => %(http://en.wikipedia.org/wiki/X509).freeze,
|
81
|
+
subClassOf: "cert:Certificate".freeze,
|
82
|
+
type: "owl:Class".freeze,
|
83
|
+
"vs:term_status" => %(unstable).freeze
|
31
84
|
|
32
85
|
# Property definitions
|
33
|
-
property :
|
34
|
-
%(
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
%(
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
86
|
+
property :exponent,
|
87
|
+
comment: %(
|
88
|
+
The exponent used to encrypt the message. Number chosen between
|
89
|
+
1 and the totient\(p*q\). Often named 'e' .
|
90
|
+
).freeze,
|
91
|
+
domain: "cert:RSAPublicKey".freeze,
|
92
|
+
label: "exponent".freeze,
|
93
|
+
range: "xsd:nonNegativeInteger".freeze,
|
94
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
95
|
+
type: "owl:DatatypeProperty".freeze,
|
96
|
+
"vs:term_status" => %(unstable).freeze
|
97
|
+
property :identity,
|
98
|
+
comment: %(
|
99
|
+
the identity of the public key. This is the entity that knows the private key and
|
100
|
+
so can decrypt messages encrypted with the public key, or encrypt messages that can
|
101
|
+
be decrypted with the public key.
|
102
|
+
).freeze,
|
103
|
+
domain: "cert:PublicKey".freeze,
|
104
|
+
label: "identity".freeze,
|
105
|
+
"owl:inverseOf" => %(cert:key).freeze,
|
106
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
107
|
+
"skos:editorialNote" => %(
|
108
|
+
It turns out that this relation is unintuitive to write out and to name.
|
109
|
+
One should instead use cert:key
|
110
|
+
).freeze,
|
111
|
+
type: "rdf:Property".freeze,
|
112
|
+
"vs:term_status" => %(archaic).freeze
|
113
|
+
property :key,
|
114
|
+
comment: %(relates an agent to a key - most often the public key.).freeze,
|
115
|
+
domain: "foaf:Agent".freeze,
|
116
|
+
label: "key".freeze,
|
117
|
+
"owl:inverseOf" => %(cert:identity).freeze,
|
118
|
+
range: "cert:Key".freeze,
|
119
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
120
|
+
type: "rdf:Property".freeze,
|
121
|
+
"vs:term_status" => %(unstable).freeze
|
122
|
+
property :modulus,
|
123
|
+
comment: %(
|
124
|
+
<p>The modulus of an RSA public and private key.
|
125
|
+
Or the modulus of a DSA Key.
|
126
|
+
The modulus is encoded as a hex binary. The binary is the same as the one encoded in the
|
127
|
+
<a href="http://www.w3.org/TR/xmldsig-core/#sec-CryptoBinary">XML DSIG CryptoBinary</a>
|
128
|
+
</p>
|
129
|
+
<blockquote>
|
130
|
+
This specification defines the ds:CryptoBinary simple type for representing arbitrary-length integers \(e.g. "bignums"\) in XML as octet strings. The integer value is first converted to a "big endian" bitstring. The bitstring is then padded with leading zero bits so that the total number of bits == 0 mod 8 \(so that there are an integral number of octets\). If the bitstring contains entire leading octets that are zero, these are removed \(so the high-order octet is always non-zero\).
|
131
|
+
</blockquote>
|
132
|
+
<p>The only difference is that the octet string is then encoded using either xsd:base64Binary or xsd:hexBinary. Currently for all usages of this relation, the xsd:hexBinary datatype should be used until the SPARQL working group specifies specifies in its <a href="http://www.w3.org/TR/sparql11-entailment/#DEntRegime">D-Entailment</a> that those two types are equivalent.</p>
|
133
|
+
<p>It would have been better had there been a hexInteger datatype that was standard and supported by all tools.</p>
|
134
|
+
).freeze,
|
135
|
+
domain: "cert:DSAKey".freeze,
|
136
|
+
label: "modulus".freeze,
|
137
|
+
range: "xsd:base64Binary".freeze,
|
138
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
139
|
+
type: "owl:DatatypeProperty".freeze,
|
140
|
+
"vs:term_status" => %(unstable).freeze
|
141
|
+
property :privateExponent,
|
142
|
+
comment: %(
|
143
|
+
The exponent used to decrypt the message
|
144
|
+
calculated as
|
145
|
+
public_exponent*private_exponent = 1 modulo totient\(p*q\)
|
146
|
+
The private exponent is often named 'd'
|
147
|
+
).freeze,
|
148
|
+
domain: "cert:RSAPrivateKey".freeze,
|
149
|
+
label: "private".freeze,
|
150
|
+
range: "xsd:nonNegativeInteger".freeze,
|
151
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
152
|
+
type: "owl:DatatypeProperty".freeze,
|
153
|
+
"vs:term_status" => %(unstable).freeze
|
77
154
|
|
78
155
|
# Datatype definitions
|
79
|
-
|
80
|
-
%(<span xmlns="http://www.w3.org/1999/xhtml"
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
156
|
+
term :hex,
|
157
|
+
comment: %(<span xmlns="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#"><p>
|
158
|
+
An encoding of a positive integer \(from 0 to infinity\) as a hexadecimal string that makes it easy to read and/or fun to present on the web.</p>
|
159
|
+
<p>The purpose of this way of representing hexadecimals is to enable users to copy and paste hexadecimal notations as shown by most browsers, keychains or tools such as opensso, into their rdf representation of choice. There are a wide variety of ways in which such strings can be presented. One finds the following:</p>
|
160
|
+
<pre>
|
161
|
+
e1 dc d5 e1 00 8f 21 5e d5 cc 7c 7e c4 9c ad 86
|
162
|
+
64 aa dc 29 f2 8d d9 56 7f 31 b6 bd 1b fd b8 ee
|
163
|
+
51 0d 3c 84 59 a2 45 d2 13 59 2a 14 82 1a 0f 6e
|
164
|
+
d3 d1 4a 2d a9 4c 7e db 90 07 fc f1 8d a3 8e 38
|
165
|
+
25 21 0a 32 c1 95 31 3c ba 56 cc 17 45 87 e1 eb
|
166
|
+
fd 9f 0f 82 16 67 9f 67 fa 91 e4 0d 55 4e 52 c0
|
167
|
+
66 64 2f fe 98 8f ae f8 96 21 5e ea 38 9e 5c 4f
|
168
|
+
27 e2 48 ca ca f2 90 23 ad 99 4b cc 38 32 6d bf
|
169
|
+
</pre>
|
170
|
+
<p>
|
171
|
+
Or the same as the above, with ':' instead of spaces. We can't guarantee that these are the only ways such tools will present hexadecimals, so we are very lax.</p>
|
172
|
+
<p>The letters can be uppercase or lowercase, or mixed. </p>
|
173
|
+
<p>Some strings may start with initial 00's, and can be stripped in this notation as they often are. Doing this could, in complement of 2 notation turn a positive number into a negative one, if the first hexadecimal character happens to be one of the set {'8', '9', 'a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F'} . As we interpret this string as a hexadecimal number leading 00s are not important \(Complement of 2 notation and hexadecimal overlap for positive numbers\)</p>
|
174
|
+
<p> In order to make this fun, we allow any unicode characters in the string. A parser should </p>
|
175
|
+
<ol>
|
176
|
+
<li>remove all non hexadecimal characters</li>
|
177
|
+
<li>treat the resulting as a hexadecimal representation of a number</li>
|
178
|
+
</ol>
|
179
|
+
<p>
|
180
|
+
This will allow people to make an ascii - better yet a UTF-8 - picture of their public key when publishing it on the web.
|
181
|
+
</p>
|
182
|
+
<p>
|
183
|
+
Cert hex is also a datatype property because we used to write it out like this
|
184
|
+
</p>
|
185
|
+
<pre>
|
186
|
+
[] a rsa:RSAPublicKey;
|
187
|
+
rsa:public_exponent [ cert:hex "e1 dc d5 ..."]
|
188
|
+
</pre>
|
189
|
+
<p> The above notation is now deprecated. Now we prefer the literal format below.</p>
|
190
|
+
<pre>
|
191
|
+
[] a rsa:RSAPublicKey;
|
192
|
+
rsa:public_exponent "e1 dc d5 ..."^^cert:hex .
|
193
|
+
</pre>
|
194
|
+
</span>
|
195
|
+
).freeze,
|
196
|
+
label: "hexadecimal".freeze,
|
197
|
+
"owl:equivalentClass" => %(xsd:nonNegativeInteger).freeze,
|
198
|
+
"rdfs:isDefinedBy" => %(cert:).freeze,
|
199
|
+
"rdfs:seeAlso" => %(http://en.wikipedia.org/wiki/Hexadecimal).freeze,
|
200
|
+
"skos:editorialNote" => %(<span xmlns="http://www.w3.org/1999/xhtml"><p>
|
201
|
+
This relation should slowly be transited to just being a datatype.</p>
|
202
|
+
<p>Being a datatype and a property is legal as explained here
|
203
|
+
<a href="http://lists.w3.org/Archives/Public/semantic-web/2010Mar/0037.html">on the semantic web mailing list in March 2010</a>.
|
204
|
+
But it may be somewhat confusing, especially if it goes against a pattern - still to be set - by the xsd datatypes as the follow up email makes clear. </p></span>
|
205
|
+
).freeze,
|
206
|
+
type: "rdfs:Datatype".freeze,
|
207
|
+
"vs:term_status" => %(archaic).freeze
|
127
208
|
|
128
209
|
# Extra definitions
|
129
|
-
|
210
|
+
term :"",
|
211
|
+
comment: %(
|
212
|
+
Ontology for Certificates and crypto stuff.
|
213
|
+
This is in development.
|
214
|
+
Some other ontologies to look at:
|
215
|
+
* http://www.w3.org/2000/10/swap/crypto
|
216
|
+
+ has cwm builtins: http://www.w3.org/2000/10/swap/doc/Trust
|
217
|
+
- a bit old perhaps. It imports daml+oil
|
218
|
+
- would help to be more completely specified
|
219
|
+
- uses literals as subjects a little liberally, which makes this a
|
220
|
+
bit difficult to work with frameworks that don't permit this
|
221
|
+
* http://xmlns.com/wot/0.1/
|
222
|
+
- limited very much to PGP \(though on can map PGP to X509\)
|
223
|
+
- a little coarse grained, mixes up the PGP certificate with the PGP
|
224
|
+
public key
|
225
|
+
*
|
226
|
+
Todo:
|
227
|
+
- add some classes and relations for DSA
|
228
|
+
- should this all be in one file? Or should this be cut up a little? Say one file for the general CERT ontology, and then files for RSA, DSA, PGP, etc... Or perhaps it does not really matter?
|
229
|
+
- expand more on the certification side of things
|
230
|
+
- verify this by security experts
|
231
|
+
- owl2 has some constructs for combined inverse functional properties.
|
232
|
+
This may be useful to use in defining an RSA key which is identified
|
233
|
+
by two numbers.
|
234
|
+
- also create html version of the spec by using this as a template.
|
235
|
+
- should comments such as this be in html?
|
236
|
+
).freeze,
|
237
|
+
"dc:created" => %(2008-11-13).freeze,
|
238
|
+
"foaf:maker" => %(http://bblfish.net/people/henry/card#me).freeze,
|
239
|
+
label: "Ontology for Certificates and crypto stuff.".freeze,
|
240
|
+
"rdfs:seeAlso" => [%(http://lists.foaf-project.org/mailman/listinfo/foaf-protocols).freeze, %(http://www.w3.org/ns/auth/X509Uml.svg).freeze, %(http://www.w3.org/ns/auth/rsa).freeze],
|
241
|
+
type: "owl:Ontology".freeze,
|
242
|
+
"vs:term_status" => %(unstable).freeze
|
130
243
|
end
|
131
244
|
end
|