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   * This interface represents the Attribute Use schema component.
25   */
26  public interface XSAttributeUse extends XSObject {
27      /**
28       * [required]: determines whether this use of an attribute declaration
29       * requires an appropriate attribute information item to be present, or
30       * merely allows it.
31       */
32      public boolean getRequired();
33  
34      /**
35       * [attribute declaration]: provides the attribute declaration itself,
36       * which will in turn determine the simple type definition used.
37       */
38      public XSAttributeDeclaration getAttrDeclaration();
39  
40      /**
41       * Value Constraint: one of default, fixed.
42       */
43      public short getConstraintType();
44  
45      /**
46       * Value Constraint: The constraint value, otherwise <code>null</code>.
47       */
48      public String getConstraintValue();
49  
50      /**
51       * Value Constraint: Binding specific actual constraint value or
52       * <code>null</code> if the value is in error or there is no value
53       * constraint.
54       * @exception XSException
55       *   NOT_SUPPORTED_ERR: Raised if the implementation does not support this
56       *   method.
57       */
58      public Object getActualVC()
59                                         throws XSException;
60  
61      /**
62       * The actual constraint value built-in datatype, e.g.
63       * <code>STRING_DT, SHORT_DT</code>. If the type definition of this
64       * value is a list type definition, this method returns
65       * <code>LIST_DT</code>. If the type definition of this value is a list
66       * type definition whose item type is a union type definition, this
67       * method returns <code>LISTOFUNION_DT</code>. To query the actual
68       * constraint value of the list or list of union type definitions use
69       * <code>itemValueTypes</code>. If the <code>actualNormalizedValue</code>
70       *  is <code>null</code>, this method returns <code>UNAVAILABLE_DT</code>
71       * .
72       * @exception XSException
73       *   NOT_SUPPORTED_ERR: Raised if the implementation does not support this
74       *   method.
75       */
76      public short getActualVCType()
77                                         throws XSException;
78  
79      /**
80       * In the case the actual constraint value represents a list, i.e. the
81       * <code>actualValueType</code> is <code>LIST_DT</code>, the returned
82       * array consists of one type kind which represents the itemType. If the
83       * actual constraint value represents a list type definition whose item
84       * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>,
85       * for each actual constraint value in the list the array contains the
86       * corresponding memberType kind. For examples, see
87       * <code>ItemPSVI.itemValueTypes</code>.
88       * @exception XSException
89       *   NOT_SUPPORTED_ERR: Raised if the implementation does not support this
90       *   method.
91       */
92      public ShortList getItemValueTypes()
93                                         throws XSException;
94  
95      /**
96       * A sequence of [annotations] or an empty <code>XSObjectList</code>.
97       */
98      public XSObjectList getAnnotations();
99  }