Debian Codegraph @

src/com/adobe/internal/xmp/options/TemplateOptions.java

raw symbols SCIP
1 // =================================================================================================
2 // ADOBE SYSTEMS INCORPORATED
3 // Copyright 2006 Adobe Systems Incorporated
4 // All Rights Reserved
5 //
6 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
7 // of the Adobe license agreement accompanying it.
8 // =================================================================================================
9 package com.adobe.internal.xmp.options;
10
11 import com.adobe.internal.xmp.XMPException;
12
13 /**
14 * Options for XMPSchemaRegistryImpl#registerAlias.
15 *
16 * @author Anuj Gupta
17 * @version $Revision$
18 * @since 02.06.2016
19 */
20
21 public final class TemplateOptions extends Options{
22
23 /* Options used by apply Template functions */
24 public static final int CLEAR_UNNAMED_PROPERTIES = 0x00000002;
25
26 public static final int REPLACE_EXISTING_PROPERTIES = 0x00000010;
27
28 public static final int INCLUDE_INTERNAL_PROPERTIES = 0x00000020;
29
30 public static final int ADD_NEW_PROPERTIES = 0x00000040;
31
32 public static final int REPLACE_WITH_DELETE_EMPTY = 0x00000080;
33
34 public TemplateOptions()
35 {
36 // reveal default constructor
37 }
38
39
40 /**
41 * Intialization constructor
42 *
43 * @param options the initialization options
44 * @throws XMPException If the options are not valid
45 */
46 public TemplateOptions(int options) throws XMPException
47 {
48 super(options);
49 }
50
51 @Override
52 /**
53 * @see Options#getValidOptions()
54 */
55 protected int getValidOptions() {
56 return CLEAR_UNNAMED_PROPERTIES | REPLACE_EXISTING_PROPERTIES | INCLUDE_INTERNAL_PROPERTIES | ADD_NEW_PROPERTIES
57 | REPLACE_WITH_DELETE_EMPTY;
58 }
59
60 @Override
61 /**
62 * @see Options#defineOptionName(int)
63 */
64 protected String defineOptionName(int option) {
65 switch (option)
66 {
67 case CLEAR_UNNAMED_PROPERTIES : return "CLEAR_UNNAMED_PROPERTIES";
68 case REPLACE_EXISTING_PROPERTIES : return "REPLACE_EXISTING_PROPERTIES";
69 case INCLUDE_INTERNAL_PROPERTIES : return "INCLUDE_INTERNAL_PROPERTIES";
70 case ADD_NEW_PROPERTIES : return "ADD_NEW_PROPERTIES";
71 case REPLACE_WITH_DELETE_EMPTY : return "REPLACE_WITH_DELETE_EMPTY";
72 default: return null;
73 }
74 }
75 }