riddl 0.99.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. data/AUTHORS +1 -0
  2. data/COPYING +165 -0
  3. data/INSTALL +24 -0
  4. data/README.rdoc +2 -0
  5. data/Rakefile +17 -0
  6. data/TODO +17 -0
  7. data/contrib/riddl.jpg +0 -0
  8. data/contrib/riddl.png +0 -0
  9. data/contrib/riddl.svg +138 -0
  10. data/lib/riddl/client.rb +423 -0
  11. data/lib/riddl/commonlogger.rb +16 -0
  12. data/lib/riddl/constants.rb +5 -0
  13. data/lib/riddl/error.rb +8 -0
  14. data/lib/riddl/handlers.rb +14 -0
  15. data/lib/riddl/handlers/oauth.rb +19 -0
  16. data/lib/riddl/handlers/plain-type.rb +21 -0
  17. data/lib/riddl/handlers/relaxng.rb +16 -0
  18. data/lib/riddl/handlers/xmlschema.rb +16 -0
  19. data/lib/riddl/header.rb +9 -0
  20. data/lib/riddl/implementation.rb +57 -0
  21. data/lib/riddl/ns/common-patterns/addon-security/request.xml +25 -0
  22. data/lib/riddl/ns/common-patterns/addon-security/response.xml +25 -0
  23. data/lib/riddl/ns/common-patterns/downloadify/1.0/downloadify.xml +18 -0
  24. data/lib/riddl/ns/common-patterns/notifications-consumer/1.0/consumer.xml +100 -0
  25. data/lib/riddl/ns/common-patterns/notifications-producer/1.0/producer.xml +204 -0
  26. data/lib/riddl/ns/common-patterns/properties/1.0/properties.schema.schema +140 -0
  27. data/lib/riddl/ns/common-patterns/properties/1.0/properties.schema.xsl +89 -0
  28. data/lib/riddl/ns/common-patterns/properties/1.0/properties.xml +150 -0
  29. data/lib/riddl/ns/common/datatypes-1_0.rng +79 -0
  30. data/lib/riddl/ns/common/relaxng-modular.rng +330 -0
  31. data/lib/riddl/ns/common/relaxng.rng +10 -0
  32. data/lib/riddl/ns/declaration/1.0/declaration.rng +114 -0
  33. data/lib/riddl/ns/description/1.0/description.rng +302 -0
  34. data/lib/riddl/option.rb +9 -0
  35. data/lib/riddl/parameter.rb +54 -0
  36. data/lib/riddl/protocols/http/generator.rb +121 -0
  37. data/lib/riddl/protocols/http/parser.rb +199 -0
  38. data/lib/riddl/protocols/websocket.rb +103 -0
  39. data/lib/riddl/protocols/xmpp/generator.rb +176 -0
  40. data/lib/riddl/protocols/xmpp/parser.rb +118 -0
  41. data/lib/riddl/roles.rb +15 -0
  42. data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Faccess_token.rb +30 -0
  43. data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Fon_behalf.rb +22 -0
  44. data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Frequest_token.rb +30 -0
  45. data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0/base.rb +67 -0
  46. data/lib/riddl/server.rb +519 -0
  47. data/lib/riddl/utils/description.rb +29 -0
  48. data/lib/riddl/utils/downloadify.rb +14 -0
  49. data/lib/riddl/utils/erbserve.rb +23 -0
  50. data/lib/riddl/utils/fileserve.rb +31 -0
  51. data/lib/riddl/utils/notifications_producer.rb +310 -0
  52. data/lib/riddl/utils/properties.rb +474 -0
  53. data/lib/riddl/utils/xsloverlay.rb +21 -0
  54. data/lib/riddl/wrapper.rb +280 -0
  55. data/lib/riddl/wrapper/declaration.rb +103 -0
  56. data/lib/riddl/wrapper/declaration/facade.rb +94 -0
  57. data/lib/riddl/wrapper/declaration/interface.rb +34 -0
  58. data/lib/riddl/wrapper/declaration/tile.rb +107 -0
  59. data/lib/riddl/wrapper/description.rb +69 -0
  60. data/lib/riddl/wrapper/description/access.rb +108 -0
  61. data/lib/riddl/wrapper/description/message_and_transformation.rb +131 -0
  62. data/lib/riddl/wrapper/description/resource.rb +271 -0
  63. data/lib/riddl/wrapper/layerchecker.rb +33 -0
  64. data/lib/riddl/wrapper/messageparser.rb +221 -0
  65. data/lib/riddl/wrapper/resourcechecker.rb +98 -0
  66. data/ns/common-patterns/addon-security/request.xml +25 -0
  67. data/ns/common-patterns/addon-security/response.xml +25 -0
  68. data/ns/common-patterns/downloadify/1.0/downloadify.xml +18 -0
  69. data/ns/common-patterns/notifications-consumer/1.0/consumer.xml +100 -0
  70. data/ns/common-patterns/notifications-producer/1.0/producer.xml +204 -0
  71. data/ns/common-patterns/properties/1.0/properties.schema.schema +140 -0
  72. data/ns/common-patterns/properties/1.0/properties.schema.xsl +89 -0
  73. data/ns/common-patterns/properties/1.0/properties.xml +150 -0
  74. data/ns/common/datatypes-1_0.rng +79 -0
  75. data/ns/common/relaxng-modular.rng +330 -0
  76. data/ns/common/relaxng.rng +10 -0
  77. data/ns/declaration/1.0/declaration.rng +114 -0
  78. data/ns/description/1.0/description.rng +302 -0
  79. data/riddl.gemspec +33 -0
  80. data/test/smartrunner.rb +48 -0
  81. data/test/tc_declaration-distributed.rb +79 -0
  82. data/test/tc_declaration-hybrid.rb +71 -0
  83. data/test/tc_declaration-local.rb +47 -0
  84. data/test/tc_helloworld.rb +17 -0
  85. data/test/tc_producer.rb +54 -0
  86. data/test/tc_properties.rb +72 -0
  87. data/tools/flash-policy-server.rb +12 -0
  88. data/tools/riddlcheck +36 -0
  89. data/tools/riddlcheck-1_0 +36 -0
  90. data/tools/riddlprocess +51 -0
  91. data/tools/riddlprocess-1_0 +51 -0
  92. metadata +291 -0
@@ -0,0 +1,16 @@
1
+ require 'logger'
2
+
3
+ module Riddl
4
+
5
+ class CommonLogger
6
+ def initialize(appname="Riddl Server",logger=$stdout)
7
+ @logger = Logger.new(logger)
8
+ @appname = appname
9
+ end
10
+
11
+ def write(it)
12
+ @logger << @appname + ': ' + it
13
+ end
14
+ end
15
+
16
+ end
@@ -0,0 +1,5 @@
1
+ module Riddl
2
+ BOUNDARY = "Time_is_an_illusion._Lunchtime_doubly_so.0xriddldata"
3
+ EOL = "\r\n"
4
+ D = '&;'
5
+ end
@@ -0,0 +1,8 @@
1
+ module Riddl
2
+ class URIError < ::RuntimeError; end
3
+ class InputError < ::RuntimeError; end
4
+ class OutputError < ::RuntimeError; end
5
+ class PathError < ::RuntimeError; end
6
+ class BlockError < ::StandardError; end
7
+ class SpecificationError < ::StandardError; end
8
+ end
@@ -0,0 +1,14 @@
1
+ module Riddl
2
+ module Handlers
3
+ @@handlers = {}
4
+ def self::add(name,what)
5
+ @@handlers[name] = what
6
+ end
7
+ def self::handlers
8
+ @@handlers
9
+ end
10
+ class Implementation
11
+ def self::handle(content,arguments); end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ module Riddl
2
+ module Handlers
3
+ class OAuth
4
+ WANTED = [:oauth_token,:oauth_token_secret]
5
+
6
+ def self::handle(what,hinfo)
7
+ provided = []
8
+ qs = what.read
9
+ (qs || '').split(/[&] */n).each do |p|
10
+ k, v = Protocols::HTTP::Parser::unescape(p).split('=', 2)
11
+ provided << k.to_sym
12
+ end
13
+ WANTED.all?{ |e| provided.include?(e) }
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ Riddl::Handlers::add("http://riddl.org/ns/handlers/oauth",Riddl::Handlers::OAuth)
@@ -0,0 +1,21 @@
1
+ module Riddl
2
+ module Handlers
3
+ class PlainType
4
+ def self::handle(what,hinfo)
5
+ if what.class == Riddl::Parameter::Tempfile
6
+ w = what.read
7
+ else
8
+ w = what
9
+ end
10
+ begin
11
+ re = Regexp.new(hinfo)
12
+ rescue
13
+ return false
14
+ end
15
+ w =~ re
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+ Riddl::Handlers::add("http://riddl.org/ns/handlers/plain-type",Riddl::Handlers::PlainType)
@@ -0,0 +1,16 @@
1
+ module Riddl
2
+ module Handlers
3
+ class RelaxNG < Riddl::Handlers::Implementation
4
+ def self::handle(what,hinfo)
5
+ w = if what.class == Riddl::Parameter::Tempfile || what.class == File
6
+ XML::Smart.open_unprotected(what)
7
+ else
8
+ XML::Smart.string(what)
9
+ end
10
+ w.validate_against(XML::Smart.string(hinfo)) rescue false
11
+ end
12
+ end
13
+ end
14
+ end
15
+
16
+ Riddl::Handlers::add("http://riddl.org/ns/handlers/relaxng",Riddl::Handlers::RelaxNG)
@@ -0,0 +1,16 @@
1
+ module Riddl
2
+ module Handlers
3
+ class XMLSchema < Riddl::Handlers::Implementation
4
+ def self::handle(what,hinfo)
5
+ w = if what.class == Riddl::Parameter::Tempfile || what.class == File
6
+ XML::Smart.open_unprotected(what)
7
+ else
8
+ XML::Smart.string(what)
9
+ end
10
+ w.validate_against(XML::Smart.string(hinfo)) rescue false
11
+ end
12
+ end
13
+ end
14
+ end
15
+
16
+ Riddl::Handlers::add("http://riddl.org/ns/handlers/xmlschema",Riddl::Handlers::XMLSchema)
@@ -0,0 +1,9 @@
1
+ module Riddl
2
+ class Header
3
+ attr_reader :name, :value
4
+ def initialize(name,value)
5
+ @name = name
6
+ @value = value
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,57 @@
1
+ module Riddl
2
+ class Implementation
3
+ def initialize(request)
4
+ @request = request
5
+
6
+ @h = request[:h] # incoming riddl headers
7
+ @p = request[:p] # incoming riddl parameters
8
+ @r = request[:r] # the matching resource path (fixed)
9
+ @s = request[:s] # the matching resource path schema (fixed)
10
+ @match = request[:match] # the matching resource path schema for current resource, important for recursive
11
+ @env = request[:env] # environment (all headers)
12
+ @a = request[:a] # args to run command
13
+ @m = request[:m] # get, put, post, ...
14
+
15
+ @headers = []
16
+ end
17
+ def response # riddl parameters to return
18
+ @response || []
19
+ end
20
+ def headers # riddl headers to return (additional headers not defined in description are okay too)
21
+ @headers
22
+ end
23
+ def status # return status
24
+ @status || 200
25
+ end
26
+ end
27
+
28
+ class WebSocketImplementation
29
+ def initialize(ws)
30
+ @ws = ws
31
+ @r = ws[:r] # the matching resource path
32
+ @s = ws[:s] # the matching resource path schema
33
+ @match = ws[:match] # the path of the branch matching, important for recursive
34
+ @env = ws[:env] # environment (all headers)
35
+ @a = ws[:a] # args to run command
36
+ end
37
+
38
+ def onopen;end
39
+ def onclose;end
40
+ def onmessage;end
41
+ def onerror(err);end
42
+
43
+ def send(data)
44
+ self.io.send data
45
+ end
46
+
47
+ def io=(connection)
48
+ @ws[:io] = connection
49
+ end
50
+ def io
51
+ @ws[:io]
52
+ end
53
+ def closed?
54
+ @ws[:io].closed?
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,25 @@
1
+ <description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
2
+
3
+ <!-- RAS - Riddl Addon Security -->
4
+
5
+ <transformation name="ras_request">
6
+ <add_as_last>
7
+ <parameter name="ras_own-public-key" type="string"/>
8
+ <parameter name="ras_fingerprint" type="string"/>
9
+ </add_as_last>
10
+ </transformation>
11
+
12
+ <!--
13
+ * fingerprint: hash all parameters, sign with own private key
14
+ * Append own public key of sender to message
15
+ * Append fingerprint to message
16
+ -->
17
+
18
+ <resource>
19
+ <get transformation="ras_request"/>
20
+ <post transformation="ras_request"/>
21
+ <put transformation="ras_request"/>
22
+ <delete transformation="ras_request"/>
23
+ </resource>
24
+
25
+ </description>
@@ -0,0 +1,25 @@
1
+ <description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
2
+
3
+ <!-- RAS - Riddl Addon Security -->
4
+
5
+ <transformation name="ras_response">
6
+ <remove_each name="ras_remote-public-key"/>
7
+ <remove_each name="ras_fingerprint"/>
8
+ </transformation>
9
+
10
+ <!--
11
+ All other parameters are encryped with 1) remote private key, then 2) own public key
12
+ * Decrypt all parameters with own private key
13
+ * Decrypt all parameters with remote public key
14
+ * hash all decrypted parameters plus remote public key
15
+ * compare to fingerprint
16
+ -->
17
+
18
+ <resource>
19
+ <get transformation="ras_response"/>
20
+ <post transformation="ras_response"/>
21
+ <put transformation="ras_response"/>
22
+ <delete transformation="ras_response"/>
23
+ </resource>
24
+
25
+ </description>
@@ -0,0 +1,18 @@
1
+ <description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
2
+
3
+ <message name="dfout">
4
+ <parameter name="content" mimetype="*"/>
5
+ </message>
6
+ <message name="dfin">
7
+ <parameter name="mimetype" type="string"/>
8
+ <parameter name="content" type="string"/>
9
+ </message>
10
+
11
+ <resource pattern="http://riddl.org/ns/common-patterns/downloadify/1.0">
12
+ <resource>
13
+ <get in="dfin" out="dfout"/>
14
+ <post in="dfin" out="dfout"/>
15
+ </resource>
16
+ </resource>
17
+
18
+ </description>
@@ -0,0 +1,100 @@
1
+ <description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
2
+
3
+ <message name="notification">
4
+ <parameter name="key" type="string"/>
5
+ <parameter name="topic" type="string"/>
6
+ <choice>
7
+ <parameter name="event" type="string">
8
+ <param name="pattern">[\w_]+</param>
9
+ </parameter>
10
+ <parameter name="vote" type="string">
11
+ <param name="pattern">[\w_]+</param>
12
+ </parameter>
13
+ </choice>
14
+ <parameter name="notification" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
15
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-consumer/1.0">
16
+ <start>
17
+ <element name="notification">
18
+ <zeroOrMore>
19
+ <ref name="header"/>
20
+ </zeroOrMore>
21
+ <zeroOrMore>
22
+ <ref name="parameter"/>
23
+ </zeroOrMore>
24
+ </element>
25
+ </start>
26
+
27
+ <define name="header">
28
+ <element name="header">
29
+ <attribute name="name">
30
+ <data type="string"/>
31
+ </attribute>
32
+ <optional>
33
+ <attribute name="type">
34
+ <data type="string"/>
35
+ </attribute>
36
+ </optional>
37
+ <data type="string"/>
38
+ </element>
39
+ </define>
40
+
41
+ <define name="parameter">
42
+ <element name="parameter">
43
+ <attribute name="name">
44
+ <data type="string"/>
45
+ </attribute>
46
+ <optional>
47
+ <choice>
48
+ <attribute name="type">
49
+ <data type="string"/>
50
+ </attribute>
51
+ <attribute name="mimetype">
52
+ <data type="string">
53
+ <param name="pattern">[\c]+/[\c\+]+|\*</param>
54
+ </data>
55
+ </attribute>
56
+ </choice>
57
+ </optional>
58
+ <ref name="any"/>
59
+ </element>
60
+ </define>
61
+
62
+ <define name="any">
63
+ <mixed>
64
+ <zeroOrMore>
65
+ <element>
66
+ <anyName/>
67
+ <zeroOrMore>
68
+ <choice>
69
+ <attribute>
70
+ <anyName/>
71
+ </attribute>
72
+ <text/>
73
+ <ref name="any"/>
74
+ </choice>
75
+ </zeroOrMore>
76
+ </element>
77
+ </zeroOrMore>
78
+ </mixed>
79
+ </define>
80
+
81
+ </grammar>
82
+ </parameter>
83
+ <parameter name="message-uid" type="string"/>
84
+ <parameter name="fingerprint-with-consumer-secret" type="string"/>
85
+ </message>
86
+
87
+ <message name="acknowledgment">
88
+ <header name="CPEE_CALLBACK" type="boolean"/>
89
+ <optional>
90
+ <parameter name="continue" type="boolean"/>
91
+ </optional>
92
+ <parameter name="message-uid" type="string"/>
93
+ <parameter name="fingerprint-with-consumer-secret" type="string"/>
94
+ </message>
95
+
96
+ <resource pattern="http://riddl.org/ns/common-patterns/notifications-consumer/1.0">
97
+ <post in="notification" out="acknowledgment"/>
98
+ </resource>
99
+
100
+ </description>
@@ -0,0 +1,204 @@
1
+ <description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
2
+
3
+ <message name="topics">
4
+ <parameter name="topics" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
5
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
6
+ <start>
7
+ <element name="topics">
8
+ <zeroOrMore>
9
+ <ref name="topic"/>
10
+ </zeroOrMore>
11
+ </element>
12
+ </start>
13
+
14
+ <define name="topic">
15
+ <element name="topic">
16
+ <attribute name="id">
17
+ <data type="string"/>
18
+ </attribute>
19
+ <zeroOrMore>
20
+ <element>
21
+ <choice>
22
+ <name>event</name>
23
+ <name>vote</name>
24
+ </choice>
25
+ <data type="string">
26
+ <param name="pattern">[\w-_]+</param>
27
+ </data>
28
+ </element>
29
+ </zeroOrMore>
30
+ </element>
31
+ </define>
32
+
33
+ </grammar>
34
+ </parameter>
35
+ </message>
36
+
37
+ <message name="subscriptions">
38
+ <parameter name="subscriptions" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
39
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
40
+ <start>
41
+ <element name="subscriptions">
42
+ <attribute name="details">
43
+ <choice>
44
+ <value>debug</value>
45
+ <value>production</value>
46
+ </choice>
47
+ </attribute>
48
+ <zeroOrMore>
49
+ <ref name="subscription"/>
50
+ </zeroOrMore>
51
+ </element>
52
+ </start>
53
+
54
+ <define name="subscription">
55
+ <element name="subscription">
56
+ <attribute name="id">
57
+ <data type="string"/>
58
+ </attribute>
59
+ <optional>
60
+ <attribute name="url">
61
+ <data type="string"/>
62
+ </attribute>
63
+ </optional>
64
+ </element>
65
+ </define>
66
+
67
+ </grammar>
68
+ </parameter>
69
+ </message>
70
+
71
+ <message name="subscription">
72
+ <parameter name="subscription" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
73
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
74
+ <start>
75
+ <element name="subscription">
76
+ <optional>
77
+ <attribute name="url">
78
+ <data type="string"/>
79
+ </attribute>
80
+ </optional>
81
+ <oneOrMore>
82
+ <element name="topic">
83
+ <attribute name="id">
84
+ <data type="string"/>
85
+ </attribute>
86
+ <oneOrMore>
87
+ <element>
88
+ <choice>
89
+ <name>event</name>
90
+ <name>vote</name>
91
+ </choice>
92
+ <data type="string">
93
+ <param name="pattern">[\w_]+</param>
94
+ </data>
95
+ </element>
96
+ </oneOrMore>
97
+ </element>
98
+ </oneOrMore>
99
+ </element>
100
+ </start>
101
+ </grammar>
102
+ </parameter>
103
+ <optional>
104
+ <parameter name="message-uid" type="string"/>
105
+ <parameter name="fingerprint-with-producer-secret" type="string"/>
106
+ </optional>
107
+ </message>
108
+
109
+ <message name="delete">
110
+ <optional>
111
+ <parameter name="message-uid" type="string"/>
112
+ <parameter name="fingerprint-with-producer-secret" type="string"/>
113
+ </optional>
114
+ </message>
115
+ <message name="request">
116
+ <optional>
117
+ <parameter name="message-uid" type="string"/>
118
+ <parameter name="fingerprint-with-producer-secret" type="string"/>
119
+ </optional>
120
+ </message>
121
+
122
+ <message name="subscribe">
123
+ <optional>
124
+ <parameter name="url" type="string"/>
125
+ <optional>
126
+ <parameter name="onbehalf" type="string"/>
127
+ </optional>
128
+ </optional>
129
+ <oneOrMore>
130
+ <parameter name="topic" type="string"/>
131
+ <choice>
132
+ <parameter name="votes" type="string">
133
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
134
+ </parameter>
135
+ <parameter name="events" type="string">
136
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
137
+ </parameter>
138
+ </choice>
139
+ </oneOrMore>
140
+ </message>
141
+ <message name="acknowledgment">
142
+ <parameter name="key" type="string"/>
143
+ <parameter name="producer-secret" type="string"/>
144
+ <parameter name="consumer-secret" type="string"/>
145
+ </message>
146
+
147
+ <message name="details">
148
+ <parameter name="message-uid" type="string"/>
149
+ <optional>
150
+ <parameter name="url" type="string"/>
151
+ </optional>
152
+ <oneOrMore>
153
+ <parameter name="topic" type="string"/>
154
+ <choice>
155
+ <parameter name="votes" type="string">
156
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
157
+ </parameter>
158
+ <parameter name="events" type="string">
159
+ <param name="pattern">([\w-_]+,)*([\w-_]+)</param>
160
+ </parameter>
161
+ </choice>
162
+ </oneOrMore>
163
+ <parameter name="fingerprint-with-producer-secret" type="string"/>
164
+ </message>
165
+
166
+ <message name="overview">
167
+ <parameter name="overview" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
168
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
169
+ <start>
170
+ <element name="overview">
171
+ <element name="topics">
172
+ <empty/>
173
+ </element>
174
+ <element name="subscriptions">
175
+ <empty/>
176
+ </element>
177
+ </element>
178
+ </start>
179
+ </grammar>
180
+ </parameter>
181
+ </message>
182
+
183
+ <resource pattern="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
184
+ <resource relative="notifications">
185
+ <get in="*" out="overview"/>
186
+ <resource relative="topics">
187
+ <get in="*" out="topics"/>
188
+ </resource>
189
+ <resource relative="subscriptions">
190
+ <get in="*" out="subscriptions"/>
191
+ <post in="subscribe" out="acknowledgment"/>
192
+ <resource>
193
+ <get in="request" out="subscription"/>
194
+ <put in="details"/>
195
+ <delete in="delete"/>
196
+ <resource relative="ws">
197
+ <websocket/>
198
+ </resource>
199
+ </resource>
200
+ </resource>
201
+ </resource>
202
+ </resource>
203
+
204
+ </description>