1 /******************************************************************************* 2 * Copyright (c) 2008, 2014 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.pde.api.tools.internal; 15 16 import org.eclipse.pde.api.tools.internal.comparator.Delta; 17 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem; 18 19 /** 20 * Interface containing all of the constants used in XML documents in API Tools 21 * 22 * @since 1.0.0 23 */ 24 public interface IApiXmlConstants { 25 26 /** 27 * Constant representing the current version for API description files 28 */ 29 public static final String API_DESCRIPTION_CURRENT_VERSION = "1.2"; //$NON-NLS-1$ 30 /** 31 * Constant representing the current version for API filter store files 32 */ 33 public static final String API_FILTER_STORE_CURRENT_VERSION = Integer.toString(FilterStore.CURRENT_STORE_VERSION); 34 /** 35 * Constant representing the current version for API profile files 36 */ 37 public static final String API_PROFILE_CURRENT_VERSION = "2"; //$NON-NLS-1$ 38 /** 39 * Constant representing the current version for API report XML file 40 */ 41 public static final String API_REPORT_CURRENT_VERSION = "1"; //$NON-NLS-1$ 42 /** 43 * Constant representing the category attribute of an {@link IApiProblem} in 44 * XML. Value is: <code>category</code> 45 */ 46 public static final String ATTR_CATEGORY = "category"; //$NON-NLS-1$ 47 /** 48 * Constant representing the element kind attribute of an 49 * {@link IApiProblem} in XML. Value is: <code>elementkind</code> 50 */ 51 public static final String ATTR_ELEMENT_KIND = "elementkind"; //$NON-NLS-1$ 52 /** 53 * Constant representing the element attribute for a comment. value is: 54 * <code>comment</code> 55 * 56 * @since 1.1 57 */ 58 public static final String ATTR_COMMENT = "comment"; //$NON-NLS-1$ 59 /** 60 * Constant representing the element severity attribute of an 61 * {@link IApiProblem} in XML. Value is: <code>severity</code> 62 */ 63 public static final String ATTR_SEVERITY = "severity"; //$NON-NLS-1$ 64 /** 65 * Constant representing the extend attribute for a type XML node. Value is: 66 * <code>extend</code> 67 */ 68 public static final String ATTR_EXTEND = "extend"; //$NON-NLS-1$ 69 /** 70 * Constant representing the override attribute for a method XML node. Value 71 * is: <code>override</code> 72 */ 73 public static final String ATTR_OVERRIDE = "override"; //$NON-NLS-1$ 74 /** 75 * Constant representing the subclass attribute for a class XML node. Value 76 * is: <code>subclass</code> 77 */ 78 public static final String ATTR_SUBCLASS = "subclass"; //$NON-NLS-1$ 79 /** 80 * Constant representing the flags attribute of an {@link IApiProblem} in 81 * XML. Value is: <code>flags</code> 82 */ 83 public static final String ATTR_FLAGS = "flags"; //$NON-NLS-1$ 84 /** 85 * Constant representing the java element handle attribute name in XML. 86 * Value is <code>handle</code> 87 */ 88 public static final String ATTR_HANDLE = "handle"; //$NON-NLS-1$ 89 /** 90 * Constant representing the id attribute Value is: <code>id</code> 91 */ 92 public static final String ATTR_ID = "id"; //$NON-NLS-1$ 93 /** 94 * Constant representing the implement attribute for a type XML node. Value 95 * is: <code>implement</code> 96 */ 97 public static final String ATTR_IMPLEMENT = "implement"; //$NON-NLS-1$ 98 /** 99 * Constant representing the instantiate attribute for a type XML node. 100 * Value is: <code>instantiate</code> 101 */ 102 public static final String ATTR_INSTANTIATE = "instantiate"; //$NON-NLS-1$ 103 /** 104 * Constant representing the kind attribute of an {@link IApiProblem} in 105 * XML. Value is: <code>kind</code> 106 */ 107 public static final String ATTR_KIND = "kind"; //$NON-NLS-1$ 108 /** 109 * Constant representing the location attribute name for an API profile XML 110 * file. Value is <code>location</code> 111 */ 112 static final String ATTR_LOCATION = "location"; //$NON-NLS-1$ 113 /** 114 * Constant representing the message attribute of an {@link IApiProblem 115 * problem} or a {@link Delta delta} in XML. Value is: <code>message</code> 116 */ 117 public static final String ATTR_MESSAGE = "message"; //$NON-NLS-1$ 118 /** 119 * Constant representing the resource modification stamp attribute name in 120 * XML. Value is <code>modificationStamp</code> 121 */ 122 public static final String ATTR_MODIFICATION_STAMP = "modificationStamp"; //$NON-NLS-1$ 123 /** 124 * Constant representing the name attribute for component, package, type, 125 * method, field and bundle XML nodes. Value is: <code>name</code> 126 */ 127 public static final String ATTR_NAME = "name"; //$NON-NLS-1$ 128 /** 129 * Constant representing the compatibility attribute of a delta in XML 130 * report. Value is: <code>compatible</code> 131 */ 132 public static final String ATTR_NAME_COMPATIBLE = "compatible"; //$NON-NLS-1$ 133 /** 134 * Constant representing the element type attribute of a delta in XML 135 * report. Value is: <code>element_type</code> 136 */ 137 public static final String ATTR_NAME_ELEMENT_TYPE = "element_type"; //$NON-NLS-1$ 138 /** 139 * Constant representing the char start attribute of an {@link IApiProblem} 140 * in XML. Value is: <code>charstart</code> 141 */ 142 public static final String ATTR_CHAR_START = "charstart"; //$NON-NLS-1$ 143 /** 144 * Constant representing the charend attribute of an {@link IApiProblem} in 145 * XML. Value is: <code>charend</code> 146 */ 147 public static final String ATTR_CHAR_END = "charend"; //$NON-NLS-1$ 148 /** 149 * Constant representing the new modifiers attribute of a delta in XML 150 * report. Value is: <code>newModifiers</code> 151 */ 152 public static final String ATTR_NAME_NEW_MODIFIERS = "newModifiers"; //$NON-NLS-1$ 153 /** 154 * Constant representing the old modifiers attribute of a delta in XML 155 * report. Value is: <code>oldModifiers</code> 156 */ 157 public static final String ATTR_NAME_OLD_MODIFIERS = "oldModifiers"; //$NON-NLS-1$ 158 /** 159 * Constant representing the type name attribute of a delta in XML report. 160 * Value is: <code>type_name</code> 161 */ 162 public static final String ATTR_NAME_TYPE_NAME = "type_name"; //$NON-NLS-1$ 163 /** 164 * Constant representing the linenumber attribute of an {@link IApiProblem} 165 * in XML. Value is: <code>linenumber</code> 166 */ 167 public static final String ATTR_LINE_NUMBER = "linenumber"; //$NON-NLS-1$ 168 /** 169 * Constant representing the message argument attribute of an 170 * {@link IApiProblem} in XML. Value is: <code>messageargs</code> 171 */ 172 public static final String ATTR_MESSAGE_ARGUMENTS = "messageargs"; //$NON-NLS-1$ 173 /** 174 * Constant representing the path attribute of a resource in XML. Value is: 175 * <code>path</code> 176 */ 177 public static final String ATTR_PATH = "path"; //$NON-NLS-1$ 178 /** 179 * Constant representing the reference attribute for a type XML node. Value 180 * is: <code>reference</code> 181 */ 182 public static final String ATTR_REFERENCE = "reference"; //$NON-NLS-1$ 183 /** 184 * Constant representing the API restrictions mask attribute name in XML. 185 * Value is <code>restrictions</code> 186 */ 187 public static final String ATTR_RESTRICTIONS = "restrictions"; //$NON-NLS-1$ 188 /** 189 * Constant representing the API profile attribute name in XML for which the 190 * element was added. Value is <code>addedprofile</code> 191 */ 192 public static final String ATTR_ADDED_PROFILE = "addedprofile"; //$NON-NLS-1$ 193 /** 194 * Constant representing the API profile attribute name in XML for which the 195 * element was defined. Value is <code>profile</code> 196 */ 197 public static final String ATTR_PROFILE = "profile"; //$NON-NLS-1$ 198 /** 199 * Constant representing the API profile attribute name in XML for which the 200 * element was removed. Value is <code>removedprofile</code> 201 */ 202 public static final String ATTR_REMOVED_PROFILE = "removedprofile"; //$NON-NLS-1$ 203 /** 204 * Constant representing the superclass attribute name in XML. Value is 205 * <code>sc</code> 206 */ 207 public static final String ATTR_SUPER_CLASS = "sc"; //$NON-NLS-1$ 208 /** 209 * Constant representing the superinterfaces attribute name in XML. Value is 210 * <code>sis</code> 211 */ 212 public static final String ATTR_SUPER_INTERFACES = "sis"; //$NON-NLS-1$ 213 /** 214 * Constant representing the interface flag attribute name in XML. Value is 215 * <code>int</code> 216 */ 217 public static final String ATTR_INTERFACE = "int"; //$NON-NLS-1$ 218 /** 219 * Constant representing the status of a member attribute name in XML. Value 220 * is <code>status</code> 221 */ 222 public static final String ATTR_STATUS = "status"; //$NON-NLS-1$ 223 /** 224 * Constant representing the delta component id attribute name in XML. Value 225 * is <code>componentId</code> 226 */ 227 public static final String ATTR_NAME_COMPONENT_ID = "componentId"; //$NON-NLS-1$ 228 /** 229 * Constant representing the signature attribute for a method XML node. 230 * Value is: <code>signature</code> 231 */ 232 public static final String ATTR_SIGNATURE = "signature"; //$NON-NLS-1$ 233 /** 234 * Constant representing the version attribute name for an API profile XML 235 * file. Value is <code>version</code> 236 */ 237 static final String ATTR_VERSION = "version"; //$NON-NLS-1$ 238 /** 239 * Constant representing the visibility attribute for component, package, 240 * type, method and field XML nodes. Will be one of: "API", "private", 241 * "private_permissable", or "SPI" 242 */ 243 public static final String ATTR_VISIBILITY = "visibility"; //$NON-NLS-1$ 244 /** 245 * Constant representing the delta element name. Value is: 246 * <code>delta</code> 247 */ 248 public static final String DELTA_ELEMENT_NAME = "delta"; //$NON-NLS-1$ 249 /** 250 * Constant representing the deltas element name. Value is: 251 * <code>deltas</code> 252 */ 253 public static final String DELTAS_ELEMENT_NAME = "deltas"; //$NON-NLS-1$ 254 /** 255 * Constant representing the API component node name for an API profile XML 256 * file. Value is <code>apicomponent</code> 257 */ 258 public static final String ELEMENT_APICOMPONENT = "apicomponent"; //$NON-NLS-1$ 259 260 /** 261 * Constant representing the API profile node name for an API profile XML 262 * file. Value is <code>apiprofile</code> 263 */ 264 public static final String ELEMENT_APIPROFILE = "apiprofile"; //$NON-NLS-1$ 265 266 /** 267 * Constant representing a component element node in XML. Value is: 268 * <code>component</code> 269 */ 270 public static final String ELEMENT_COMPONENT = "component"; //$NON-NLS-1$ 271 272 /** 273 * Constant representing a components element node in XML. Value is: 274 * <code>components</code> 275 */ 276 public static final String ELEMENT_COMPONENTS = "components"; //$NON-NLS-1$ 277 278 /** 279 * Constant representing a field element node in XML. Value is: 280 * <code>field</code> 281 */ 282 public static final String ELEMENT_FIELD = "field"; //$NON-NLS-1$ 283 /** 284 * Constant representing a API filter element node in XML. Value is: 285 * <code>filter</code> 286 */ 287 public static final String ELEMENT_FILTER = "filter"; //$NON-NLS-1$ 288 /** 289 * Constant representing a method element node in XML. Value is: 290 * <code>method</code> 291 */ 292 public static final String ELEMENT_METHOD = "method"; //$NON-NLS-1$ 293 /** 294 * Constant representing a package element node in XML. Value is: 295 * <code>package</code> 296 */ 297 public static final String ELEMENT_PACKAGE = "package"; //$NON-NLS-1$ 298 /** 299 * Constant representing a package fragment element node in XML. Value is: 300 * <code>package</code> 301 */ 302 public static final String ELEMENT_PACKAGE_FRAGMENT = "fragment"; //$NON-NLS-1$ 303 /** 304 * Constant representing a plugin element node in XML. Value is: 305 * <code>plugin</code> 306 */ 307 public static final String ELEMENT_PLUGIN = "plugin"; //$NON-NLS-1$ 308 /** 309 * Constant representing the API component pool node name for an API profile 310 * XML file. Value is <code>pool</code> 311 */ 312 public static final String ELEMENT_POOL = "pool"; //$NON-NLS-1$ 313 /** 314 * Constant representing a resource element node in XML. Value is: 315 * <code>resource</code> 316 */ 317 public static final String ELEMENT_RESOURCE = "resource"; //$NON-NLS-1$ 318 /** 319 * Constant representing a type element node in XML. Value is: 320 * <code>type</code> 321 */ 322 public static final String ELEMENT_TYPE = "type"; //$NON-NLS-1$ 323 324 /** 325 * Constant representing a target element node in XML. Value is: 326 * <code>target</code> 327 */ 328 public static final String ELEMENT_TARGET = "target"; //$NON-NLS-1$ 329 330 /** 331 * Constant representing an API problems element node in XML. Value is: 332 * <code>api_problems</code> 333 */ 334 public static final String ELEMENT_API_PROBLEMS = "api_problems"; //$NON-NLS-1$ 335 /** 336 * Constant representing an API problem element node in XML. Value is: 337 * <code>api_problem</code> 338 */ 339 public static final String ELEMENT_API_PROBLEM = "api_problem"; //$NON-NLS-1$ 340 /** 341 * Constant representing an extra arguments element node for an API problem 342 * element in XML. Value is: <code>extra_arguments</code> 343 */ 344 public static final String ELEMENT_PROBLEM_EXTRA_ARGUMENTS = "extra_arguments"; //$NON-NLS-1$ 345 /** 346 * Constant representing an extra argument element node for an API problem 347 * element in XML. Value is: <code>extra_argument</code> 348 */ 349 public static final String ELEMENT_PROBLEM_EXTRA_ARGUMENT = "extra_argument"; //$NON-NLS-1$ 350 /** 351 * Constant representing the value attribute for extra argument element node 352 * or a category node. Value is: <code>value</code> 353 */ 354 public static final String ATTR_VALUE = "value"; //$NON-NLS-1$ 355 /** 356 * Constant representing a message arguments element node for an API problem 357 * element in XML. Value is: <code>message_arguments</code> 358 */ 359 public static final String ELEMENT_PROBLEM_MESSAGE_ARGUMENTS = "message_arguments"; //$NON-NLS-1$ 360 /** 361 * Constant representing a message argument element node for an API problem 362 * element in XML. Value is: <code>message_argument</code> 363 */ 364 public static final String ELEMENT_PROBLEM_MESSAGE_ARGUMENT = "message_argument"; //$NON-NLS-1$ 365 /** 366 * Constant representing the component id attribute for report element XML 367 * node. Value is: <code>componentID</code> 368 */ 369 public static final String ATTR_COMPONENT_ID = "componentID"; //$NON-NLS-1$ 370 /** 371 * Constant representing a report element node in XML. Value is: 372 * <code>report</code> 373 */ 374 public static final String ELEMENT_API_TOOL_REPORT = "report"; //$NON-NLS-1$< 375 /** 376 * Constant representing the key attribute for category node. Value is: 377 * <code>key</code> 378 */ 379 public static final String ATTR_KEY = "key"; //$NON-NLS-1$ 380 /** 381 * Constant representing the type attribute for resource node inside API 382 * filters. Value is: <code>type</code> 383 */ 384 public static final String ATTR_TYPE = "type"; //$NON-NLS-1$ 385 /** 386 * Constant representing the type name attribute for API problem node. Value 387 * is: <code>typeName</code> 388 */ 389 public static final String ATTR_TYPE_NAME = "typeName"; //$NON-NLS-1$ 390 /** 391 * Constant representing the bundle element for for a report element in XML. 392 * Value is: <code>bundle</code> 393 */ 394 public static final String ELEMENT_BUNDLE = "bundle"; //$NON-NLS-1$ 395 /** 396 * Constant representing a message arguments element node for a delta 397 * element in XML. Value is: <code>message_arguments</code> 398 */ 399 public static final String ELEMENT_DELTA_MESSAGE_ARGUMENTS = "message_arguments"; //$NON-NLS-1$ 400 /** 401 * Constant representing a message argument element node for a delta element 402 * in XML. Value is: <code>message_argument</code> 403 */ 404 public static final String ELEMENT_DELTA_MESSAGE_ARGUMENT = "message_argument"; //$NON-NLS-1$ 405 public static final String REFERENCES = "references"; //$NON-NLS-1$ 406 public static final String REFERENCE_KIND = "reference_kind"; //$NON-NLS-1$ 407 public static final String ATTR_REFERENCE_KIND_NAME = "reference_kind_name"; //$NON-NLS-1$ 408 public static final String ATTR_ORIGIN = "origin"; //$NON-NLS-1$ 409 public static final String ATTR_REFEREE = "referee"; //$NON-NLS-1$ 410 public static final String ATTR_REFERENCE_COUNT = "reference_count"; //$NON-NLS-1$ 411 public static final String ATTR_REFERENCE_VISIBILITY = "reference_visibility"; //$NON-NLS-1$ 412 public static final String SKIPPED_DETAILS = "details"; //$NON-NLS-1$ 413 public static final String EXCLUDED = "excluded"; //$NON-NLS-1$ 414 public static final String ATTR_MEMBER_NAME = "member"; //$NON-NLS-1$ 415 416 /** 417 * Constant representing an alternate API component in which references were 418 * resolved. Value is: <code>alternate</code> 419 */ 420 public static final String ATTR_ALTERNATE = "alternate"; //$NON-NLS-1$ 421 /** 422 * Constant representing the root element of a reference count XML file 423 * Value is: <code>referenceCount</code> 424 */ 425 public static final String ELEMENT_REPORTED_COUNT = "reportedcount"; //$NON-NLS-1$ 426 /** 427 * XML attribute name for the total number of references or problems found 428 * Value is: <code>total</code> 429 */ 430 public static final String ATTR_TOTAL = "total"; //$NON-NLS-1$ 431 /** 432 * XML attribute name for the total number of problems with severity 433 * 'warning' found Value is: <code>warnings</code> 434 */ 435 public static final String ATTR_COUNT_WARNINGS = "warnings"; //$NON-NLS-1$ 436 /** 437 * XML attribute name for the total number of problems with severity 'error' 438 * found Value is: <code>errors</code> 439 */ 440 public static final String ATTR_COUNT_ERRORS = "errors"; //$NON-NLS-1$ 441 /** 442 * XML attribute name for the total number of illegal references found Value 443 * is: <code>illegal</code> 444 */ 445 public static final String ATTR_COUNT_ILLEGAL = "illegal"; //$NON-NLS-1$ 446 /** 447 * XML attribute name for the total number of internal references found 448 * Value is: <code>internal</code> 449 */ 450 public static final String ATTR_COUNT_INTERNAL = "internal"; //$NON-NLS-1$ 451 452 /** 453 * XML attribute name for the total number of filtered illegal references found 454 * Value is: <code>filtered</code> 455 */ 456 public static final String ATTR_COUNT_FILTERED = "filtered"; //$NON-NLS-1$ 457 /** 458 * XML element describing a resolver error found in a bundle Value is: 459 * <code>resolver_error</code> 460 */ 461 public static final String ELEMENT_RESOLVER_ERROR = "resolver_error"; //$NON-NLS-1$ 462 /** 463 * XML element containing a list of components with resolver errors Value 464 * is: <code>resolver_errors</code> 465 */ 466 public static final String ELEMENT_RESOLVER_ERRORS = "resolver_errors"; //$NON-NLS-1$ 467 } 468