View Javadoc
1   /*
2    * reserved comment block
3    * DO NOT REMOVE OR ALTER!
4    */
5   /*
6    * Copyright 2003,2004 The Apache Software Foundation.
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * you may not use this file except in compliance with the License.
10   * You may obtain a copy of the License at
11   *
12   *      http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package com.sun.org.apache.xerces.internal.xs;
22  
23  /**
24   * The interface represents the Attribute Declaration schema component.
25   */
26  public interface XSAttributeDeclaration extends XSObject {
27      /**
28       * [type definition]: A simple type definition.
29       */
30      public XSSimpleTypeDefinition getTypeDefinition();
31  
32      /**
33       * [scope]. One of <code>SCOPE_GLOBAL</code>, <code>SCOPE_LOCAL</code>, or
34       * <code>SCOPE_ABSENT</code>. If the scope is local, then the
35       * <code>enclosingCTDefinition</code> is present.
36       */
37      public short getScope();
38  
39      /**
40       * The complex type definition for locally scoped declarations (see
41       * <code>scope</code>), otherwise <code>null</code> if no such
42       * definition exists.
43       */
44      public XSComplexTypeDefinition getEnclosingCTDefinition();
45  
46      /**
47       * Value constraint: one of <code>VC_NONE, VC_DEFAULT, VC_FIXED</code>.
48       */
49      public short getConstraintType();
50  
51      /**
52       * Value constraint: The constraint value with respect to the [type
53       * definition], otherwise <code>null</code>.
54       */
55      public String getConstraintValue();
56  
57      /**
58       * Value Constraint: Binding specific actual constraint value or
59       * <code>null</code> if the value is in error or there is no value
60       * constraint.
61       * @exception XSException
62       *   NOT_SUPPORTED_ERR: Raised if the implementation does not support this
63       *   method.
64       */
65      public Object getActualVC()
66                                                          throws XSException;
67  
68      /**
69       * The actual constraint value built-in datatype, e.g.
70       * <code>STRING_DT, SHORT_DT</code>. If the type definition of this
71       * value is a list type definition, this method returns
72       * <code>LIST_DT</code>. If the type definition of this value is a list
73       * type definition whose item type is a union type definition, this
74       * method returns <code>LISTOFUNION_DT</code>. To query the actual
75       * constraint value of the list or list of union type definitions use
76       * <code>itemValueTypes</code>. If the <code>actualValue</code> is
77       * <code>null</code>, this method returns <code>UNAVAILABLE_DT</code>.
78       * @exception XSException
79       *   NOT_SUPPORTED_ERR: Raised if the implementation does not support this
80       *   method.
81       */
82      public short getActualVCType()
83                                                          throws XSException;
84  
85      /**
86       * In the case the actual constraint value represents a list, i.e. the
87       * <code>actualValueType</code> is <code>LIST_DT</code>, the returned
88       * array consists of one type kind which represents the itemType. If the
89       * actual constraint value represents a list type definition whose item
90       * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>,
91       * for each actual constraint value in the list the array contains the
92       * corresponding memberType kind. For examples, see
93       * <code>ItemPSVI.itemValueTypes</code>.
94       * @exception XSException
95       *   NOT_SUPPORTED_ERR: Raised if the implementation does not support this
96       *   method.
97       */
98      public ShortList getItemValueTypes()
99                                                          throws XSException;
100 
101     /**
102      * An annotation if it exists, otherwise <code>null</code>.
103      * If not null then the first [annotation] from the sequence of annotations.
104      */
105     public XSAnnotation getAnnotation();
106 
107     /**
108      * A sequence of [annotations] or an empty  <code>XSObjectList</code>.
109      */
110     public XSObjectList getAnnotations();
111 }