This project has retired. For details please refer to its Attic page.
JSONConstants xref

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.chemistry.opencmis.commons.impl;
20  
21  import java.util.HashSet;
22  import java.util.Set;
23  
24  import org.apache.chemistry.opencmis.commons.enums.Action;
25  
26  /**
27   * JSON object constants.
28   */
29  public class JSONConstants {
30  
31      public static final String ERROR_EXCEPTION = "exception";
32      public static final String ERROR_MESSAGE = "message";
33      public static final String ERROR_STACKTRACE = "stacktrace";
34  
35      public static final String JSON_REPINFO_ID = "repositoryId";
36      public static final String JSON_REPINFO_NAME = "repositoryName";
37      public static final String JSON_REPINFO_DESCRIPTION = "repositoryDescription";
38      public static final String JSON_REPINFO_VENDOR = "vendorName";
39      public static final String JSON_REPINFO_PRODUCT = "productName";
40      public static final String JSON_REPINFO_PRODUCT_VERSION = "productVersion";
41      public static final String JSON_REPINFO_ROOT_FOLDER_ID = "rootFolderId";
42      public static final String JSON_REPINFO_REPOSITORY_URL = "repositoryUrl";
43      public static final String JSON_REPINFO_ROOT_FOLDER_URL = "rootFolderUrl";
44      public static final String JSON_REPINFO_CAPABILITIES = "capabilities";
45      public static final String JSON_REPINFO_ACL_CAPABILITIES = "aclCapabilities";
46      public static final String JSON_REPINFO_CHANGE_LOCK_TOKEN = "latestChangeLogToken";
47      public static final String JSON_REPINFO_CMIS_VERSION_SUPPORTED = "cmisVersionSupported";
48      public static final String JSON_REPINFO_THIN_CLIENT_URI = "thinClientURI";
49      public static final String JSON_REPINFO_CHANGES_INCOMPLETE = "changesIncomplete";
50      public static final String JSON_REPINFO_CHANGES_ON_TYPE = "changesOnType";
51      public static final String JSON_REPINFO_PRINCIPAL_ID_ANONYMOUS = "principalIdAnonymous";
52      public static final String JSON_REPINFO_PRINCIPAL_ID_ANYONE = "principalIdAnyone";
53  
54      public static final Set<String> REPINFO_KEYS = new HashSet<String>();
55      static {
56          REPINFO_KEYS.add(JSON_REPINFO_ID);
57          REPINFO_KEYS.add(JSON_REPINFO_NAME);
58          REPINFO_KEYS.add(JSON_REPINFO_DESCRIPTION);
59          REPINFO_KEYS.add(JSON_REPINFO_VENDOR);
60          REPINFO_KEYS.add(JSON_REPINFO_PRODUCT);
61          REPINFO_KEYS.add(JSON_REPINFO_PRODUCT_VERSION);
62          REPINFO_KEYS.add(JSON_REPINFO_ROOT_FOLDER_ID);
63          REPINFO_KEYS.add(JSON_REPINFO_REPOSITORY_URL);
64          REPINFO_KEYS.add(JSON_REPINFO_ROOT_FOLDER_URL);
65          REPINFO_KEYS.add(JSON_REPINFO_CAPABILITIES);
66          REPINFO_KEYS.add(JSON_REPINFO_ACL_CAPABILITIES);
67          REPINFO_KEYS.add(JSON_REPINFO_CHANGE_LOCK_TOKEN);
68          REPINFO_KEYS.add(JSON_REPINFO_CMIS_VERSION_SUPPORTED);
69          REPINFO_KEYS.add(JSON_REPINFO_THIN_CLIENT_URI);
70          REPINFO_KEYS.add(JSON_REPINFO_CHANGES_INCOMPLETE);
71          REPINFO_KEYS.add(JSON_REPINFO_CHANGES_ON_TYPE);
72          REPINFO_KEYS.add(JSON_REPINFO_PRINCIPAL_ID_ANONYMOUS);
73          REPINFO_KEYS.add(JSON_REPINFO_PRINCIPAL_ID_ANYONE);
74      }
75  
76      public static final String JSON_CAP_CONTENT_STREAM_UPDATES = "capabilityContentStreamUpdatability";
77      public static final String JSON_CAP_CHANGES = "capabilityChanges";
78      public static final String JSON_CAP_RENDITIONS = "capabilityRenditions";
79      public static final String JSON_CAP_GET_DESCENDANTS = "capabilityGetDescendants";
80      public static final String JSON_CAP_GET_FOLDER_TREE = "capabilityGetFolderTree";
81      public static final String JSON_CAP_MULTIFILING = "capabilityMultifiling";
82      public static final String JSON_CAP_UNFILING = "capabilityUnfiling";
83      public static final String JSON_CAP_VERSION_SPECIFIC_FILING = "capabilityVersionSpecificFiling";
84      public static final String JSON_CAP_PWC_SEARCHABLE = "capabilityPWCSearchable";
85      public static final String JSON_CAP_PWC_UPDATABLE = "capabilityPWCUpdatable";
86      public static final String JSON_CAP_ALL_VERSIONS_SEARCHABLE = "capabilityAllVersionsSearchable";
87      public static final String JSON_CAP_QUERY = "capabilityQuery";
88      public static final String JSON_CAP_JOIN = "capabilityJoin";
89      public static final String JSON_CAP_ACL = "capabilityACL";
90  
91      public static final Set<String> CAP_KEYS = new HashSet<String>();
92      static {
93          CAP_KEYS.add(JSON_CAP_CONTENT_STREAM_UPDATES);
94          CAP_KEYS.add(JSON_CAP_CHANGES);
95          CAP_KEYS.add(JSON_CAP_RENDITIONS);
96          CAP_KEYS.add(JSON_CAP_GET_DESCENDANTS);
97          CAP_KEYS.add(JSON_CAP_GET_FOLDER_TREE);
98          CAP_KEYS.add(JSON_CAP_MULTIFILING);
99          CAP_KEYS.add(JSON_CAP_UNFILING);
100         CAP_KEYS.add(JSON_CAP_VERSION_SPECIFIC_FILING);
101         CAP_KEYS.add(JSON_CAP_PWC_SEARCHABLE);
102         CAP_KEYS.add(JSON_CAP_PWC_UPDATABLE);
103         CAP_KEYS.add(JSON_CAP_ALL_VERSIONS_SEARCHABLE);
104         CAP_KEYS.add(JSON_CAP_QUERY);
105         CAP_KEYS.add(JSON_CAP_JOIN);
106         CAP_KEYS.add(JSON_CAP_ACL);
107     }
108 
109     public static final String JSON_ACLCAP_SUPPORTED_PERMISSIONS = "supportedPermissions";
110     public static final String JSON_ACLCAP_ACL_PROPAGATION = "propagation";
111     public static final String JSON_ACLCAP_PERMISSIONS = "permissions";
112     public static final String JSON_ACLCAP_PERMISSION_MAPPING = "permissionMapping";
113 
114     public static final Set<String> ACLCAP_KEYS = new HashSet<String>();
115     static {
116         ACLCAP_KEYS.add(JSON_ACLCAP_SUPPORTED_PERMISSIONS);
117         ACLCAP_KEYS.add(JSON_ACLCAP_ACL_PROPAGATION);
118         ACLCAP_KEYS.add(JSON_ACLCAP_PERMISSIONS);
119         ACLCAP_KEYS.add(JSON_ACLCAP_PERMISSION_MAPPING);
120     }
121 
122     public static final String JSON_ACLCAP_PERMISSION_PERMISSION = "permission";
123     public static final String JSON_ACLCAP_PERMISSION_DESCRIPTION = "description";
124 
125     public static final Set<String> ACLCAP_PERMISSION_KEYS = new HashSet<String>();
126     static {
127         ACLCAP_PERMISSION_KEYS.add(JSON_ACLCAP_PERMISSION_PERMISSION);
128         ACLCAP_PERMISSION_KEYS.add(JSON_ACLCAP_PERMISSION_DESCRIPTION);
129     }
130 
131     public static final String JSON_ACLCAP_MAPPING_KEY = "key";
132     public static final String JSON_ACLCAP_MAPPING_PERMISSION = "permission";
133 
134     public static final Set<String> ACLCAP_MAPPING_KEYS = new HashSet<String>();
135     static {
136         ACLCAP_MAPPING_KEYS.add(JSON_ACLCAP_MAPPING_KEY);
137         ACLCAP_MAPPING_KEYS.add(JSON_ACLCAP_MAPPING_PERMISSION);
138     }
139 
140     public static final String JSON_OBJECT_PROPERTIES = "properties";
141     public static final String JSON_OBJECT_ALLOWABLE_ACTIONS = "allowableActions";
142     public static final String JSON_OBJECT_RELATIONSHIPS = "relationships";
143     public static final String JSON_OBJECT_CHANGE_EVENT_INFO = "changeEventInfo";
144     public static final String JSON_OBJECT_ACL = "acl";
145     public static final String JSON_OBJECT_EXACT_ACL = "exactACL";
146     public static final String JSON_OBJECT_POLICY_IDS = "policyIds";
147     public static final String JSON_OBJECT_RENDITIONS = "renditions";
148 
149     public static final Set<String> OBJECT_KEYS = new HashSet<String>();
150     static {
151         OBJECT_KEYS.add(JSON_OBJECT_PROPERTIES);
152         OBJECT_KEYS.add(JSON_OBJECT_ALLOWABLE_ACTIONS);
153         OBJECT_KEYS.add(JSON_OBJECT_RELATIONSHIPS);
154         OBJECT_KEYS.add(JSON_OBJECT_CHANGE_EVENT_INFO);
155         OBJECT_KEYS.add(JSON_OBJECT_ACL);
156         OBJECT_KEYS.add(JSON_OBJECT_EXACT_ACL);
157         OBJECT_KEYS.add(JSON_OBJECT_POLICY_IDS);
158         OBJECT_KEYS.add(JSON_OBJECT_RENDITIONS);
159     }
160 
161     public static final Set<String> ALLOWABLE_ACTIONS_KEYS = new HashSet<String>();
162     static {
163         for (Action action : Action.values()) {
164             ALLOWABLE_ACTIONS_KEYS.add(action.value());
165         }
166     }
167 
168     public static final String JSON_OBJECTINFOLDER_OBJECT = "object";
169     public static final String JSON_OBJECTINFOLDER_PATH_SEGMENT = "pathSegment";
170 
171     public static final Set<String> OBJECTINFOLDER_KEYS = new HashSet<String>();
172     static {
173         OBJECTINFOLDER_KEYS.add(JSON_OBJECTINFOLDER_OBJECT);
174         OBJECTINFOLDER_KEYS.add(JSON_OBJECTINFOLDER_PATH_SEGMENT);
175     }
176 
177     public static final String JSON_OBJECTPARENTS_OBJECT = "object";
178     public static final String JSON_OBJECTPARENTS_RELATIVE_PATH_SEGMENT = "relativePathSegment";
179 
180     public static final Set<String> OBJECTPARENTS_KEYS = new HashSet<String>();
181     static {
182         OBJECTPARENTS_KEYS.add(JSON_OBJECTPARENTS_OBJECT);
183         OBJECTPARENTS_KEYS.add(JSON_OBJECTPARENTS_RELATIVE_PATH_SEGMENT);
184     }
185 
186     public static final String JSON_PROPERTY_ID = "id";
187     public static final String JSON_PROPERTY_LOCALNAME = "localName";
188     public static final String JSON_PROPERTY_DISPLAYNAME = "displayName";
189     public static final String JSON_PROPERTY_QUERYNAME = "queryName";
190     public static final String JSON_PROPERTY_VALUE = "value";
191     public static final String JSON_PROPERTY_DATATYPE = "type";
192     public static final String JSON_PROPERTY_CARDINALITY = "cardinality";
193 
194     public static final Set<String> PROPERTY_KEYS = new HashSet<String>();
195     static {
196         PROPERTY_KEYS.add(JSON_PROPERTY_ID);
197         PROPERTY_KEYS.add(JSON_PROPERTY_LOCALNAME);
198         PROPERTY_KEYS.add(JSON_PROPERTY_DISPLAYNAME);
199         PROPERTY_KEYS.add(JSON_PROPERTY_QUERYNAME);
200         PROPERTY_KEYS.add(JSON_PROPERTY_VALUE);
201         PROPERTY_KEYS.add(JSON_PROPERTY_DATATYPE);
202         PROPERTY_KEYS.add(JSON_PROPERTY_CARDINALITY);
203     }
204 
205     public static final String JSON_CHANGE_EVENT_TYPE = "changeType";
206     public static final String JSON_CHANGE_EVENT_TIME = "changeTime";
207 
208     public static final Set<String> CHANGE_EVENT_KEYS = new HashSet<String>();
209     static {
210         CHANGE_EVENT_KEYS.add(JSON_CHANGE_EVENT_TYPE);
211         CHANGE_EVENT_KEYS.add(JSON_CHANGE_EVENT_TIME);
212     }
213 
214     public static final String JSON_ACL_ACES = "aces";
215     public static final String JSON_ACL_IS_EXACT = "isExact";
216 
217     public static final Set<String> ACL_KEYS = new HashSet<String>();
218     static {
219         ACL_KEYS.add(JSON_ACL_ACES);
220         ACL_KEYS.add(JSON_ACL_IS_EXACT);
221     }
222 
223     public static final String JSON_ACE_PRINCIPAL = "principal";
224     public static final String JSON_ACE_PRINCIPAL_ID = "principalId";
225     public static final String JSON_ACE_PERMISSIONS = "permissions";
226     public static final String JSON_ACE_IS_DIRECT = "isDirect";
227 
228     public static final Set<String> ACE_KEYS = new HashSet<String>();
229     static {
230         ACE_KEYS.add(JSON_ACE_PRINCIPAL);
231         ACE_KEYS.add(JSON_ACE_PRINCIPAL_ID);
232         ACE_KEYS.add(JSON_ACE_PERMISSIONS);
233         ACE_KEYS.add(JSON_ACE_IS_DIRECT);
234     }
235 
236     public static final Set<String> PRINCIPAL_KEYS = new HashSet<String>();
237     static {
238         PRINCIPAL_KEYS.add(JSON_ACE_PRINCIPAL_ID);
239     }
240 
241     public static final String JSON_RENDITION_STREAM_ID = "streamId";
242     public static final String JSON_RENDITION_MIMETYPE = "mimeType";
243     public static final String JSON_RENDITION_LENGTH = "length";
244     public static final String JSON_RENDITION_KIND = "kind";
245     public static final String JSON_RENDITION_TITLE = "title";
246     public static final String JSON_RENDITION_HEIGHT = "height";
247     public static final String JSON_RENDITION_WIDTH = "width";
248     public static final String JSON_RENDITION_DOCUMENT_ID = "renditionDocumentId";
249 
250     public static final Set<String> RENDITION_KEYS = new HashSet<String>();
251     static {
252         RENDITION_KEYS.add(JSON_RENDITION_STREAM_ID);
253         RENDITION_KEYS.add(JSON_RENDITION_MIMETYPE);
254         RENDITION_KEYS.add(JSON_RENDITION_LENGTH);
255         RENDITION_KEYS.add(JSON_RENDITION_KIND);
256         RENDITION_KEYS.add(JSON_RENDITION_TITLE);
257         RENDITION_KEYS.add(JSON_RENDITION_HEIGHT);
258         RENDITION_KEYS.add(JSON_RENDITION_WIDTH);
259         RENDITION_KEYS.add(JSON_RENDITION_DOCUMENT_ID);
260     }
261 
262     public static final String JSON_OBJECTLIST_OBJECTS = "objects";
263     public static final String JSON_OBJECTLIST_HAS_MORE_ITEMS = "hasMoreItems";
264     public static final String JSON_OBJECTLIST_NUM_ITEMS = "numItems";
265     public static final String JSON_OBJECTLIST_CHANGE_LOG_TOKEN = "changeLogToken";
266 
267     public static final Set<String> OBJECTLIST_KEYS = new HashSet<String>();
268     static {
269         OBJECTLIST_KEYS.add(JSON_OBJECTLIST_OBJECTS);
270         OBJECTLIST_KEYS.add(JSON_OBJECTLIST_HAS_MORE_ITEMS);
271         OBJECTLIST_KEYS.add(JSON_OBJECTLIST_NUM_ITEMS);
272         OBJECTLIST_KEYS.add(JSON_OBJECTLIST_CHANGE_LOG_TOKEN);
273     }
274 
275     public static final String JSON_OBJECTINFOLDERLIST_OBJECTS = "objects";
276     public static final String JSON_OBJECTINFOLDERLIST_HAS_MORE_ITEMS = "hasMoreItems";
277     public static final String JSON_OBJECTINFOLDERLIST_NUM_ITEMS = "numItems";
278 
279     public static final Set<String> OBJECTINFOLDERLIST_KEYS = new HashSet<String>();
280     static {
281         OBJECTINFOLDERLIST_KEYS.add(JSON_OBJECTINFOLDERLIST_OBJECTS);
282         OBJECTINFOLDERLIST_KEYS.add(JSON_OBJECTINFOLDERLIST_HAS_MORE_ITEMS);
283         OBJECTINFOLDERLIST_KEYS.add(JSON_OBJECTINFOLDERLIST_NUM_ITEMS);
284     }
285 
286     public static final String JSON_OBJECTINFOLDERCONTAINER_OBJECT = "object";
287     public static final String JSON_OBJECTINFOLDERCONTAINER_CHILDREN = "children";
288 
289     public static final Set<String> OBJECTINFOLDERCONTAINER_KEYS = new HashSet<String>();
290     static {
291         OBJECTINFOLDERCONTAINER_KEYS.add(JSON_OBJECTINFOLDERCONTAINER_OBJECT);
292         OBJECTINFOLDERCONTAINER_KEYS.add(JSON_OBJECTINFOLDERCONTAINER_CHILDREN);
293     }
294 
295     public static final String JSON_QUERYRESULTLIST_RESULTS = "results";
296     public static final String JSON_QUERYRESULTLIST_HAS_MORE_ITEMS = "hasMoreItems";
297     public static final String JSON_QUERYRESULTLIST_NUM_ITEMS = "numItems";
298 
299     public static final Set<String> QUERYRESULTLIST_KEYS = new HashSet<String>();
300     static {
301         OBJECTLIST_KEYS.add(JSON_QUERYRESULTLIST_RESULTS);
302         OBJECTLIST_KEYS.add(JSON_QUERYRESULTLIST_HAS_MORE_ITEMS);
303         OBJECTLIST_KEYS.add(JSON_QUERYRESULTLIST_NUM_ITEMS);
304     }
305 
306     public static final String JSON_TYPE_ID = "id";
307     public static final String JSON_TYPE_LOCALNAME = "localName";
308     public static final String JSON_TYPE_LOCALNAMESPACE = "localNamespace";
309     public static final String JSON_TYPE_DISPLAYNAME = "displayName";
310     public static final String JSON_TYPE_QUERYNAME = "queryName";
311     public static final String JSON_TYPE_DESCRIPTION = "description";
312     public static final String JSON_TYPE_BASE_ID = "baseId";
313     public static final String JSON_TYPE_PARENT_ID = "parentId";
314     public static final String JSON_TYPE_CREATABLE = "creatable";
315     public static final String JSON_TYPE_FILEABLE = "fileable";
316     public static final String JSON_TYPE_QUERYABLE = "queryable";
317     public static final String JSON_TYPE_FULLTEXT_INDEXED = "fulltextIndexed";
318     public static final String JSON_TYPE_INCLUDE_IN_SUPERTYPE_QUERY = "includedInSupertypeQuery";
319     public static final String JSON_TYPE_CONTROLABLE_POLICY = "controllablePolicy";
320     public static final String JSON_TYPE_CONTROLABLE_ACL = "controllableACL";
321     public static final String JSON_TYPE_PROPERTY_DEFINITIONS = "propertyDefinitions";
322 
323     public static final String JSON_TYPE_VERSIONABLE = "versionable"; // document
324     public static final String JSON_TYPE_CONTENTSTREAM_ALLOWED = "contentStreamAllowed"; // document
325 
326     public static final String JSON_TYPE_ALLOWED_SOURCE_TYPES = "allowedSourceTypes"; // relationship
327     public static final String JSON_TYPE_ALLOWED_TARGET_TYPES = "allowedTargetTypes"; // relationship
328 
329     public static final Set<String> TYPE_KEYS = new HashSet<String>();
330     static {
331         TYPE_KEYS.add(JSON_TYPE_ID);
332         TYPE_KEYS.add(JSON_TYPE_LOCALNAME);
333         TYPE_KEYS.add(JSON_TYPE_LOCALNAMESPACE);
334         TYPE_KEYS.add(JSON_TYPE_DISPLAYNAME);
335         TYPE_KEYS.add(JSON_TYPE_QUERYNAME);
336         TYPE_KEYS.add(JSON_TYPE_DESCRIPTION);
337         TYPE_KEYS.add(JSON_TYPE_BASE_ID);
338         TYPE_KEYS.add(JSON_TYPE_PARENT_ID);
339         TYPE_KEYS.add(JSON_TYPE_CREATABLE);
340         TYPE_KEYS.add(JSON_TYPE_FILEABLE);
341         TYPE_KEYS.add(JSON_TYPE_QUERYABLE);
342         TYPE_KEYS.add(JSON_TYPE_FULLTEXT_INDEXED);
343         TYPE_KEYS.add(JSON_TYPE_INCLUDE_IN_SUPERTYPE_QUERY);
344         TYPE_KEYS.add(JSON_TYPE_CONTROLABLE_POLICY);
345         TYPE_KEYS.add(JSON_TYPE_CONTROLABLE_ACL);
346         TYPE_KEYS.add(JSON_TYPE_PROPERTY_DEFINITIONS);
347         TYPE_KEYS.add(JSON_TYPE_VERSIONABLE);
348         TYPE_KEYS.add(JSON_TYPE_CONTENTSTREAM_ALLOWED);
349         TYPE_KEYS.add(JSON_TYPE_ALLOWED_SOURCE_TYPES);
350         TYPE_KEYS.add(JSON_TYPE_ALLOWED_TARGET_TYPES);
351     }
352 
353     public static final String JSON_PROPERTY_TYPE_ID = "id";
354     public static final String JSON_PROPERTY_TYPE_LOCALNAME = "localName";
355     public static final String JSON_PROPERTY_TYPE_LOCALNAMESPACE = "localNamespace";
356     public static final String JSON_PROPERTY_TYPE_DISPLAYNAME = "displayName";
357     public static final String JSON_PROPERTY_TYPE_QUERYNAME = "queryName";
358     public static final String JSON_PROPERTY_TYPE_DESCRIPTION = "description";
359     public static final String JSON_PROPERTY_TYPE_PROPERTY_TYPE = "propertyType";
360     public static final String JSON_PROPERTY_TYPE_CARDINALITY = "cardinality";
361     public static final String JSON_PROPERTY_TYPE_UPDATABILITY = "updatability";
362     public static final String JSON_PROPERTY_TYPE_INHERITED = "inherited";
363     public static final String JSON_PROPERTY_TYPE_REQUIRED = "required";
364     public static final String JSON_PROPERTY_TYPE_QUERYABLE = "queryable";
365     public static final String JSON_PROPERTY_TYPE_ORDERABLE = "orderable";
366     public static final String JSON_PROPERTY_TYPE_OPENCHOICE = "openChoice";
367 
368     public static final String JSON_PROPERTY_TYPE_DEAULT_VALUE = "defaultValue";
369 
370     public static final String JSON_PROPERTY_TYPE_MAX_LENGTH = "maxLength";
371     public static final String JSON_PROPERTY_TYPE_MIN_VALUE = "minValue";
372     public static final String JSON_PROPERTY_TYPE_MAX_VALUE = "maxValue";
373     public static final String JSON_PROPERTY_TYPE_PRECISION = "precision";
374     public static final String JSON_PROPERTY_TYPE_RESOLUTION = "resolution";
375 
376     public static final String JSON_PROPERTY_TYPE_CHOICE = "choice";
377     public static final String JSON_PROPERTY_TYPE_CHOICE_DISPLAYNAME = "displayName";
378     public static final String JSON_PROPERTY_TYPE_CHOICE_VALUE = "value";
379     public static final String JSON_PROPERTY_TYPE_CHOICE_CHOICE = "choice";
380 
381     public static final Set<String> PROPERTY_TYPE_KEYS = new HashSet<String>();
382     static {
383         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_ID);
384         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_LOCALNAME);
385         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_LOCALNAMESPACE);
386         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_DISPLAYNAME);
387         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_QUERYNAME);
388         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_DESCRIPTION);
389         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_PROPERTY_TYPE);
390         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_CARDINALITY);
391         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_UPDATABILITY);
392         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_INHERITED);
393         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_REQUIRED);
394         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_QUERYABLE);
395         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_ORDERABLE);
396         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_OPENCHOICE);
397         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_DEAULT_VALUE);
398         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_MAX_LENGTH);
399         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_MIN_VALUE);
400         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_MAX_VALUE);
401         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_PRECISION);
402         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_RESOLUTION);
403         PROPERTY_TYPE_KEYS.add(JSON_PROPERTY_TYPE_CHOICE);
404     }
405 
406     public static final String JSON_TYPESLIST_TYPES = "types";
407     public static final String JSON_TYPESLIST_HAS_MORE_ITEMS = "hasMoreItems";
408     public static final String JSON_TYPESLIST_NUM_ITEMS = "numItems";
409 
410     public static final Set<String> TYPESLIST_KEYS = new HashSet<String>();
411     static {
412         TYPESLIST_KEYS.add(JSON_TYPESLIST_TYPES);
413         TYPESLIST_KEYS.add(JSON_TYPESLIST_HAS_MORE_ITEMS);
414         TYPESLIST_KEYS.add(JSON_TYPESLIST_NUM_ITEMS);
415     }
416 
417     public static final String JSON_TYPESCONTAINER_TYPE = "type";
418     public static final String JSON_TYPESCONTAINER_CHILDREN = "children";
419 
420     public static final Set<String> TYPESCONTAINER_KEYS = new HashSet<String>();
421     static {
422         TYPESCONTAINER_KEYS.add(JSON_TYPESCONTAINER_TYPE);
423         TYPESCONTAINER_KEYS.add(JSON_TYPESCONTAINER_CHILDREN);
424     }
425 
426     public static final String JSON_FAILEDTODELETE_ID = "ids";
427 
428     public static final Set<String> FAILEDTODELETE_KEYS = new HashSet<String>();
429     static {
430         FAILEDTODELETE_KEYS.add(JSON_FAILEDTODELETE_ID);
431     }
432 
433     // Constant utility class.
434     private JSONConstants() {
435     }
436 
437 }