KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xs > XSAttributeUse


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.xs;
18
19 /**
20  * This interface represents the Attribute Use schema component.
21  */

22 public interface XSAttributeUse extends XSObject {
23     /**
24      * [required]: determines whether this use of an attribute declaration
25      * requires an appropriate attribute information item to be present, or
26      * merely allows it.
27      */

28     public boolean getRequired();
29
30     /**
31      * [attribute declaration]: provides the attribute declaration itself,
32      * which will in turn determine the simple type definition used.
33      */

34     public XSAttributeDeclaration getAttrDeclaration();
35
36     /**
37      * Value Constraint: one of default, fixed.
38      */

39     public short getConstraintType();
40
41     /**
42      * Value Constraint: The constraint value, otherwise <code>null</code>.
43      */

44     public String JavaDoc getConstraintValue();
45
46     /**
47      * Value Constraint: Binding specific actual constraint value or
48      * <code>null</code> if the value is in error or there is no value
49      * constraint.
50      * @exception XSException
51      * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
52      * method.
53      */

54     public Object JavaDoc getActualVC()
55                                        throws XSException;
56
57     /**
58      * The actual constraint value built-in datatype, e.g.
59      * <code>STRING_DT, SHORT_DT</code>. If the type definition of this
60      * value is a list type definition, this method returns
61      * <code>LIST_DT</code>. If the type definition of this value is a list
62      * type definition whose item type is a union type definition, this
63      * method returns <code>LISTOFUNION_DT</code>. To query the actual
64      * constraint value of the list or list of union type definitions use
65      * <code>itemValueTypes</code>. If the <code>actualNormalizedValue</code>
66      * is <code>null</code>, this method returns <code>UNAVAILABLE_DT</code>
67      * .
68      * @exception XSException
69      * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
70      * method.
71      */

72     public short getActualVCType()
73                                        throws XSException;
74
75     /**
76      * In the case the actual constraint value represents a list, i.e. the
77      * <code>actualValueType</code> is <code>LIST_DT</code>, the returned
78      * array consists of one type kind which represents the itemType. If the
79      * actual constraint value represents a list type definition whose item
80      * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>,
81      * for each actual constraint value in the list the array contains the
82      * corresponding memberType kind. For examples, see
83      * <code>ItemPSVI.itemValueTypes</code>.
84      * @exception XSException
85      * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
86      * method.
87      */

88     public ShortList getItemValueTypes()
89                                        throws XSException;
90
91 }
92
Popular Tags