OSDN Git Service

Import testrunner changes from puppetmaster to keep them in sync.
[android-x86/development.git] / tools / eclipse / plugins / com.android.ide.eclipse.adt / src / com / android / ide / eclipse / adt / internal / sdk / LayoutConfigsXsd.java
1 /*\r
2  * Copyright (C) 2009 The Android Open Source Project\r
3  *\r
4  * Licensed under the Eclipse Public License, Version 1.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *      http://www.eclipse.org/org/documents/epl-v10.php\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 package com.android.ide.eclipse.adt.internal.sdk;\r
18 \r
19 \r
20 import java.io.InputStream;\r
21 \r
22 /**\r
23  * Public constants for the sdk-repository XML Schema.\r
24  */\r
25 public class LayoutConfigsXsd {\r
26 \r
27     /** The XML namespace of the layout-configs XML. */\r
28     public static final String NS_LAYOUT_CONFIG_XSD =\r
29         "http://schemas.android.com/sdk/android/layout-configs/1";                  //$NON-NLS-1$\r
30 \r
31     /**\r
32      * The "layout-configs" element is the root element of this schema.\r
33      *\r
34      * It must contain one or more "device" elements that each define the configurations\r
35      * available for a given device.\r
36      *\r
37      * These definitions are used in the Graphical Layout Editor in the\r
38      * Android Development Tools (ADT) plugin for Eclipse.\r
39      */\r
40     public static final String NODE_LAYOUT_CONFIGS = "layout-configs";              //$NON-NLS-1$\r
41 \r
42     /**\r
43      * A device element must contain at most one "default" element followed\r
44      * by one or more ""config" elements.\r
45      *\r
46      * The "default" element defines all the default parameters inherited\r
47      * by the following "config" elements. Each "config" element can override\r
48      * the default values, if any.\r
49      *\r
50      * A "device" element also has a required "name" attribute that represents\r
51      * the user-interface name of this device.\r
52      */\r
53     public static final String NODE_DEVICE = "device";                              //$NON-NLS-1$\r
54 \r
55     /**\r
56      * The "default" element contains zero or more of all the parameter elements\r
57      * listed below. It defines all the parameters that are common to all\r
58      * declared "config" elements.\r
59      */\r
60     public static final String NODE_DEFAULT = "default";                            //$NON-NLS-1$\r
61 \r
62     /**\r
63      * The "config" element contains zero or more of all the parameter elements\r
64      * listed below. The parameters from the "default" element (if present) are\r
65      * automatically inherited and can be overridden.\r
66      */\r
67     public static final String NODE_CONFIG = "config";                              //$NON-NLS-1$\r
68 \r
69 \r
70     public static final String NODE_SCREEN_SIZE = "screen-size";                    //$NON-NLS-1$\r
71 \r
72     public static final String NODE_SCREEN_RATIO = "screen-ratio";                  //$NON-NLS-1$\r
73 \r
74     public static final String NODE_SCREEN_ORIENTATION = "screen-orientation";      //$NON-NLS-1$\r
75 \r
76     public static final String NODE_PIXEL_DENSITY = "pixel-density";                //$NON-NLS-1$\r
77 \r
78     public static final String NODE_TOUCH_TYPE = "touch-type";                      //$NON-NLS-1$\r
79 \r
80     public static final String NODE_KEYBOARD_STATE = "keyboard-state";              //$NON-NLS-1$\r
81 \r
82     public static final String NODE_TEXT_INPUT_METHOD = "text-input-method";        //$NON-NLS-1$\r
83 \r
84     public static final String NODE_NAV_METHOD = "nav-method";                      //$NON-NLS-1$\r
85 \r
86     public static final String NODE_SCREEN_DIMENSION = "screen-dimension";          //$NON-NLS-1$\r
87 \r
88     public static final String NODE_SIZE = "size";                                  //$NON-NLS-1$\r
89 \r
90     /**\r
91      * The "name" attribute, used by both the "device" and the "config"\r
92      * elements. It represents the user-interface name of these objects.\r
93      */\r
94     public static final String ATTR_NAME = "name";                                  //$NON-NLS-1$\r
95 \r
96     /**\r
97      * Helper to get an input stream of the layout config XML schema.\r
98      */\r
99     public static InputStream getXsdStream() {\r
100         return LayoutConfigsXsd.class.getResourceAsStream("layout-configs.xsd");    //$NON-NLS-1$\r
101     }\r
102 \r
103 }\r