Debian Codegraph @

jackrabbit-spi-commons/src/test/resources/cnd-reader-test-input.cnd

raw
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 <ex = "http://example.org/jackrabbit/example">
18 <jcr='http://www.jcp.org/jcr/1.0'>
19 <nt='http://www.jcp.org/jcr/nt/1.0'>
20
21 // test remapping
22 <REP='internal'>
23
24 // omit this namespace to test auto-registering
25 // <mix='http://www.jcp.org/jcr/mix/1.0'>
26
27 //------------------------------------------------------------------------------
28 // E X A M P L E T Y P E S
29 //------------------------------------------------------------------------------
30
31 [ex:NodeType] > ex:ParentNodeType1, ex:ParentNodeType2
32 orderable mixin
33 - ex:property (long) = '1', '2' primary mandatory autocreated protected multiple version < '[1,10]'
34 + ex:node (ex:RequiredNodeType1, ex:RequiredNodeType2) = ex:RequiredNodeType1 mandatory autocreated protected multiple version
35
36 [ex:AnotherNodeType] > ex:NodeType
37 - * (string) = 'a residual property' multiple
38 + * (ex:RequiredNodeType1) multiple
39
40 [ex:Empty]
41
42 [NoPrefix]
43
44 [ex:Reference]
45 - ex:ref (reference) mandatory protected < 'ex:ref'
46
47 [ex:Name]
48 - ex:name (name) < 'ex:name'
49
50 [ex:Path]
51 - ex:path (path) < 'ex:a/ex:b'
52
53 [ex:Full] > ex:NodeType
54 orderable mixin abstract primaryitem ex:p1 noquery
55 - ex:p1 (STRING) mandatory protected autocreated multiple
56 - ex:p2 (BINARY) queryops '=, <>, <, <=, >, >=, LIKE'
57 - ex:p3 (LONG) nofulltext noqueryorder
58 - ex:p4 (DOUBLE)
59 - ex:p5 (BOOLEAN)
60 - ex:p6 (NAME)
61 - ex:p8 (PATH)
62 - ex:p9 (REFERENCE)
63 - ex:pa (WEAKREFERENCE)
64 - ex:pb (DECIMAL)
65 - ex:pc (URI)
66 - ex:pd (UNDEFINED)
67 - ex:pf (*)
68 + ex:n1 (ex:NodeType) COPY
69 + ex:n2 (ex:NodeType) VERSION
70 + ex:n3 (ex:NodeType) INITIALIZE
71 + ex:n4 (ex:NodeType) COMPUTE
72 + ex:n5 (ex:NodeType) IGNORE
73 + ex:n6 (ex:NodeType) ABORT
74
75 [ex:Full1] > ex:NodeType
76 orderable mixin abstract primaryitem ex:p1 query
77 - ex:p1
78
79 //------------------------------------------------------------------------------
80 // B A S E T Y P E S
81 //------------------------------------------------------------------------------
82
83 [nt:base]
84 - jcr:primaryType (name) mandatory autocreated protected compute
85 - jcr:mixinTypes (name) protected multiple compute
86
87 [nt:unstructured]
88 orderable
89 - * (undefined) multiple
90 - * (undefined)
91 + * (nt:base) = nt:unstructured multiple version
92
93 [mix:referenceable]
94 mixin
95 - jcr:uuid (string) mandatory autocreated protected initialize
96
97 [mix:lockable]
98 mixin
99 - jcr:lockOwner (string) protected ignore
100 - jcr:lockIsDeep (boolean) protected ignore
101
102 //------------------------------------------------------------------------------
103 // V E R S I O N I N G
104 //------------------------------------------------------------------------------
105
106 [mix:versionable] > mix:referenceable
107 mixin
108 - jcr:versionHistory (reference) mandatory protected
109 < 'nt:versionHistory'
110 - jcr:baseVersion (reference) mandatory protected ignore
111 < 'nt:version'
112 - jcr:isCheckedOut (boolean) = 'true' mandatory autocreated protected ignore
113 - jcr:predecessors (reference) mandatory protected multiple
114 < 'nt:version'
115 - jcr:mergeFailed (reference) protected multiple abort
116
117 [nt:versionHistory] > mix:referenceable
118 - jcr:versionableUuid (string) mandatory autocreated protected abort
119 + jcr:rootVersion (nt:version) = nt:version mandatory autocreated protected abort
120 + jcr:versionLabels (nt:versionLabels) = nt:versionLabels mandatory autocreated protected abort
121 + * (nt:version) = nt:version protected abort
122
123 [nt:versionLabels]
124 - * (reference) protected abort
125 < 'nt:version'
126
127 [nt:version] > mix:referenceable
128 - jcr:created (date) mandatory autocreated protected abort
129 - jcr:predecessors (reference) protected multiple abort
130 < 'nt:version'
131 - jcr:successors (reference) protected multiple abort
132 < 'nt:version'
133 + jcr:frozenNode (nt:frozenNode) protected abort
134
135 [nt:frozenNode] > mix:referenceable
136 orderable
137 - jcr:frozenPrimaryType (name) mandatory autocreated protected abort
138 - jcr:frozenMixinTypes (name) protected multiple abort
139 - jcr:frozenUuid (string) mandatory autocreated protected abort
140 - * (undefined) protected abort
141 - * (undefined) protected multiple abort
142 + * (nt:base) protected multiple abort
143
144 [nt:versionedChild]
145 - jcr:childVersionHistory (reference) mandatory autocreated protected abort
146 < 'nt:versionHistory'
147
148 //------------------------------------------------------------------------------
149 // N O D E T Y P E S
150 //------------------------------------------------------------------------------
151
152 [nt:nodeType]
153 - jcr:nodeTypeName (name) mandatory
154 - jcr:supertypes (name) multiple
155 - jcr:isMixin (boolean) mandatory
156 - jcr:hasOrderableChildNodes (boolean) mandatory
157 - jcr:primaryItemName (name)
158 + jcr:propertyDefinition (nt:propertyDefinition) = nt:propertyDefinition multiple version
159 + jcr:childNodeDefinition (nt:childNodeDefinition) = nt:childNodeDefinition multiple version
160
161 [nt:propertyDefinition]
162 - jcr:name (name)
163 - jcr:autoCreated (boolean) mandatory
164 - jcr:mandatory (boolean) mandatory
165 - jcr:onParentVersion (string) mandatory
166 < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
167 - jcr:protected (boolean) mandatory
168 - jcr:requiredType (string) mandatory
169 < 'STRING', 'BINARY', 'LONG', 'DOUBLE', 'BOOLEAN', 'DATE', 'NAME', 'PATH', 'REFERENCE', 'UNDEFINED'
170 - jcr:valueConstraints (string) multiple
171 - jcr:defaultValues (undefined) multiple
172 - jcr:multiple (boolean) mandatory
173
174 [nt:childNodeDefinition]
175 - jcr:name (name)
176 - jcr:autoCreated (boolean) mandatory
177 - jcr:mandatory (boolean) mandatory
178 - jcr:onParentVersion (string) mandatory
179 < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE', 'IGNORE', 'ABORT'
180 - jcr:protected (boolean) mandatory
181 - jcr:requiredPrimaryTypes (name) = 'nt:base' mandatory multiple
182 - jcr:defaultPrimaryType (name)
183 - jcr:sameNameSiblings (boolean) mandatory
184
185 //------------------------------------------------------------------------------
186 // M I S C
187 //------------------------------------------------------------------------------
188
189 [nt:hierarchyNode]
190 - jcr:created (date) autocreated protected initialize
191
192 [nt:folder] > nt:hierarchyNode
193 + * (nt:hierarchyNode) version
194
195 [nt:file] > nt:hierarchyNode
196 + jcr:content (nt:base) primary mandatory
197
198 [nt:linkedFile] > nt:hierarchyNode
199 - jcr:content (reference) primary mandatory
200
201 [nt:resource] > mix:referenceable
202 - jcr:encoding (string)
203 - jcr:mimeType (string) mandatory
204 - jcr:data (binary) primary mandatory
205 - jcr:lastModified (date) mandatory ignore
206
207 [nt:query]
208 - jcr:statement (string)
209 - jcr:language (string)
210
211 //------------------------------------------------------------------------------
212 // J A C K R A B B I T I N T E R N A L S
213 //------------------------------------------------------------------------------
214
215 [REP:nodeTypes]
216 + * (nt:nodeType) = nt:nodeType protected abort
217
218 [REP:root] > nt:unstructured
219 orderable
220 + jcr:system (REP:system) = REP:system mandatory ignore
221
222 [REP:system]
223 orderable
224 + jcr:versionStorage (REP:versionStorage) = REP:versionStorage mandatory protected abort
225 + jcr:nodeTypes (REP:nodeTypes) = REP:nodeTypes mandatory protected abort
226 + * (nt:base) = nt:unstructured multiple ignore
227
228 [REP:versionStorage]
229 + * (nt:versionHistory) = nt:versionHistory protected multiple abort
230 + * (REP:versionStorage) = REP:versionStorage protected multiple abort