rdf 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/CREDITS +1 -0
  3. data/VERSION +1 -1
  4. data/lib/rdf.rb +10 -48
  5. data/lib/rdf/cli/vocab-loader.rb +78 -142
  6. data/lib/rdf/mixin/enumerable.rb +25 -0
  7. data/lib/rdf/mixin/mutable.rb +3 -0
  8. data/lib/rdf/model/graph.rb +1 -1
  9. data/lib/rdf/model/node.rb +25 -2
  10. data/lib/rdf/model/statement.rb +20 -12
  11. data/lib/rdf/model/uri.rb +11 -2
  12. data/lib/rdf/nquads.rb +8 -6
  13. data/lib/rdf/ntriples/writer.rb +14 -10
  14. data/lib/rdf/query/pattern.rb +10 -8
  15. data/lib/rdf/reader.rb +11 -2
  16. data/lib/rdf/repository.rb +1 -1
  17. data/lib/rdf/vocab.rb +396 -96
  18. data/lib/rdf/vocab/cc.rb +117 -25
  19. data/lib/rdf/vocab/cert.rb +230 -117
  20. data/lib/rdf/vocab/dc.rb +930 -233
  21. data/lib/rdf/vocab/dc11.rb +151 -37
  22. data/lib/rdf/vocab/doap.rb +326 -114
  23. data/lib/rdf/vocab/exif.rb +930 -533
  24. data/lib/rdf/vocab/foaf.rb +602 -346
  25. data/lib/rdf/vocab/geo.rb +139 -33
  26. data/lib/rdf/vocab/gr.rb +1551 -1084
  27. data/lib/rdf/vocab/ht.rb +319 -0
  28. data/lib/rdf/vocab/ical.rb +507 -349
  29. data/lib/rdf/vocab/ma.rb +504 -280
  30. data/lib/rdf/vocab/mo.rb +2425 -876
  31. data/lib/rdf/vocab/og.rb +178 -90
  32. data/lib/rdf/vocab/owl.rb +513 -219
  33. data/lib/rdf/vocab/prov.rb +1557 -479
  34. data/lib/rdf/vocab/rdfs.rb +107 -31
  35. data/lib/rdf/vocab/rdfv.rb +165 -0
  36. data/lib/rdf/vocab/rsa.rb +61 -18
  37. data/lib/rdf/vocab/rss.rb +55 -22
  38. data/lib/rdf/vocab/schema.rb +8590 -3995
  39. data/lib/rdf/vocab/sioc.rb +657 -218
  40. data/lib/rdf/vocab/skos.rb +227 -134
  41. data/lib/rdf/vocab/skosxl.rb +47 -33
  42. data/lib/rdf/vocab/vcard.rb +693 -327
  43. data/lib/rdf/vocab/void.rb +175 -132
  44. data/lib/rdf/vocab/vs.rb +27 -0
  45. data/lib/rdf/vocab/wdrs.rb +123 -119
  46. data/lib/rdf/vocab/wot.rb +155 -45
  47. data/lib/rdf/vocab/xhtml.rb +2 -1
  48. data/lib/rdf/vocab/xhv.rb +496 -231
  49. data/lib/rdf/vocab/xsd.rb +382 -53
  50. data/lib/rdf/writer.rb +8 -4
  51. metadata +5 -4
  52. data/lib/rdf/vocab/http.rb +0 -84
  53. 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
- property :Jurisdiction, :label => 'Jurisdiction', :comment =>
8
- %(the legal jurisdiction of a license)
9
- property :License, :label => 'License', :comment =>
10
- %(a set of requests/permissions to users of a Work, e.g. a
11
- copyright license, the public domain, information for
12
- distributors)
13
- property :Permission, :label => 'Permission', :comment =>
14
- %(an action that may or may not be allowed or desired)
15
- property :Prohibition, :label => 'Prohibition', :comment =>
16
- %(something you may be asked not to do)
17
- property :Requirement, :label => 'Requirement', :comment =>
18
- %(an action that may or may not be requested of you)
19
- property :Work, :label => 'Work', :comment =>
20
- %(a potentially copyrightable work)
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 :deprecatedOn, :label => 'deprecated on'
24
- property :license, :label => 'has license'
25
- property :attributionName
26
- property :attributionURL
27
- property :legalcode
28
- property :morePermissions
29
- property :useGuidelines
30
- property :jurisdiction, :label => 'jurisdiction'
31
- property :permits, :label => 'permits'
32
- property :prohibits, :label => 'prohibits'
33
- property :requires, :label => 'requires'
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
@@ -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
- property :Certificate, :label => 'Certificate', :comment =>
8
- %(A certificate is a Document that is signed. As explained here
9
- http://www.pgpi.org/doc/pgpintro/#p16 'A digital certificate
10
- consists of three things: * A public key. * Certificate
11
- information. \('Identity' information about the user, such as
12
- name, user ID, and so on.\) * One or more digital signatures.')
13
- property :PGPCertificate, :label => 'PGPCertificate', :comment =>
14
- %(the class of PGP Certificates)
15
- property :PrivateKey, :label => 'PrivateKey', :comment =>
16
- %(Private Key)
17
- property :PublicKey, :label => 'PublicKey', :comment =>
18
- %(Public Key)
19
- property :RSAKey, :label => 'RSA Key', :comment =>
20
- %(The union of the public and private components of an RSAKey.
21
- Usually those pieces are not kept together)
22
- property :RSAPublicKey, :label => 'RSA Public Key', :comment =>
23
- %(The RSA public key. Padded message m are encrypted by applying
24
- the function modulus\(power\(m,exponent\),modulus\))
25
- property :Signature, :label => 'Signature', :comment =>
26
- %(the class of signtatures)
27
- property :X509Certificate, :label => 'X509Certificate', :comment =>
28
- %(the class of X509 Certificates)
29
- property :Key, :comment =>
30
- %(the class of keys)
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 :identity, :label => 'identity', :comment =>
34
- %(the identity of the public key. This is the entity that knows
35
- the private key and so can decrypt messages encrypted with the
36
- public key, or encrypt messages that can be decrypted with the
37
- public key.)
38
- property :key, :label => 'key', :comment =>
39
- %(relates an agent to a key - most often the public key.)
40
- property :exponent, :label => 'exponent', :comment =>
41
- %(The exponent used to encrypt the message. Number chosen
42
- between 1 and the totient\(p*q\). Often named 'e' .)
43
- property :modulus, :label => 'modulus', :comment =>
44
- %(<p>The modulus of an RSA public and private key. Or the
45
- modulus of a DSA Key. The modulus is encoded as a hex binary.
46
- The binary is the same as the one encoded in the <a
47
- href="http://www.w3.org/TR/xmldsig-core/#sec-CryptoBinary">XML
48
- DSIG CryptoBinary</a> </p> <blockquote> This specification
49
- defines the ds:CryptoBinary simple type for representing
50
- arbitrary-length integers \(e.g. "bignums"\) in XML as octet
51
- strings. The integer value is first converted to a "big
52
- endian" bitstring. The bitstring is then padded with leading
53
- zero bits so that the total number of bits == 0 mod 8 \(so
54
- that there are an integral number of octets\). If the
55
- bitstring contains entire leading octets that are zero, these
56
- are removed \(so the high-order octet is always non-zero\).
57
- </blockquote> <p>The only difference is that the octet string
58
- is then encoded using either xsd:base64Binary or
59
- xsd:hexBinary. Currently for all usages of this relation, the
60
- xsd:hexBinary datatype should be used until the SPARQL working
61
- group specifies specifies in its <a
62
- href="http://www.w3.org/TR/sparql11-entailment/#DEntRegime">D-Entailment</a>
63
- that those two types are equivalent.</p> <p>It would have been
64
- better had there been a hexInteger datatype that was standard
65
- and supported by all tools.</p>)
66
- property :privateExponent, :label => 'private', :comment =>
67
- %(The exponent used to decrypt the message calculated as
68
- public_exponent*private_exponent = 1 modulo totient\(p*q\) The
69
- private exponent is often named 'd')
70
- property :identity, :label => 'identity', :comment =>
71
- %(the identity of the public key. This is the entity that knows
72
- the private key and so can decrypt messages encrypted with the
73
- public key, or encrypt messages that can be decrypted with the
74
- public key.)
75
- property :key, :label => 'key', :comment =>
76
- %(relates an agent to a key - most often the public key.)
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
- property :hex, :label => 'hexadecimal', :comment =>
80
- %(<span xmlns="http://www.w3.org/1999/xhtml"
81
- xmlns:dc="http://purl.org/dc/terms/"
82
- xmlns:foaf="http://xmlns.com/foaf/0.1/"
83
- xmlns:owl="http://www.w3.org/2002/07/owl#"
84
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
85
- xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
86
- xmlns:skos="http://www.w3.org/2004/02/skos/core#"
87
- xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#"><p>
88
- An encoding of a positive integer \(from 0 to infinity\) as a
89
- hexadecimal string that makes it easy to read and/or fun to
90
- present on the web.</p> <p>The purpose of this way of
91
- representing hexadecimals is to enable users to copy and paste
92
- hexadecimal notations as shown by most browsers, keychains or
93
- tools such as opensso, into their rdf representation of
94
- choice. There are a wide variety of ways in which such strings
95
- can be presented. One finds the following:</p> <pre> e1 dc d5
96
- e1 00 8f 21 5e d5 cc 7c 7e c4 9c ad 86 64 aa dc 29 f2 8d d9 56
97
- 7f 31 b6 bd 1b fd b8 ee 51 0d 3c 84 59 a2 45 d2 13 59 2a 14 82
98
- 1a 0f 6e d3 d1 4a 2d a9 4c 7e db 90 07 fc f1 8d a3 8e 38 25 21
99
- 0a 32 c1 95 31 3c ba 56 cc 17 45 87 e1 eb fd 9f 0f 82 16 67 9f
100
- 67 fa 91 e4 0d 55 4e 52 c0 66 64 2f fe 98 8f ae f8 96 21 5e ea
101
- 38 9e 5c 4f 27 e2 48 ca ca f2 90 23 ad 99 4b cc 38 32 6d bf
102
- </pre> <p> Or the same as the above, with ':' instead of
103
- spaces. We can't guarantee that these are the only ways such
104
- tools will present hexadecimals, so we are very lax.</p>
105
- <p>The letters can be uppercase or lowercase, or mixed. </p>
106
- <p>Some strings may start with initial 00's, and can be
107
- stripped in this notation as they often are. Doing this could,
108
- in complement of 2 notation turn a positive number into a
109
- negative one, if the first hexadecimal character happens to be
110
- one of the set {'8', '9', 'a', 'A', 'b', 'B', 'c', 'C', 'd',
111
- 'D', 'e', 'E', 'f', 'F'} . As we interpret this string as a
112
- hexadecimal number leading 00s are not important \(Complement
113
- of 2 notation and hexadecimal overlap for positive
114
- numbers\)</p> <p> In order to make this fun, we allow any
115
- unicode characters in the string. A parser should </p> <ol>
116
- <li>remove all non hexadecimal characters</li> <li>treat the
117
- resulting as a hexadecimal representation of a number</li>
118
- </ol> <p> This will allow people to make an ascii - better yet
119
- a UTF-8 - picture of their public key when publishing it on
120
- the web. </p> <p> Cert hex is also a datatype property because
121
- we used to write it out like this </p> <pre> [] a
122
- rsa:RSAPublicKey; rsa:public_exponent [ cert:hex "e1 dc d5
123
- ..."] </pre> <p> The above notation is now deprecated. Now we
124
- prefer the literal format below.</p> <pre> [] a
125
- rsa:RSAPublicKey; rsa:public_exponent "e1 dc d5 ..."^^cert:hex
126
- . </pre> </span>)
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
- property :hex
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