KickJava   Java API By Example, From Geeks To Geeks.

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


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  * The interface represents the Attribute Declaration schema component.
21  */

22 public interface XSAttributeDeclaration extends XSObject {
23     /**
24      * [type definition]: A simple type definition.
25      */

26     public XSSimpleTypeDefinition getTypeDefinition();
27
28     /**
29      * [scope]. One of <code>SCOPE_GLOBAL</code>, <code>SCOPE_LOCAL</code>, or
30      * <code>SCOPE_ABSENT</code>. If the scope is local, then the
31      * <code>enclosingCTDefinition</code> is present.
32      */

33     public short getScope();
34
35     /**
36      * The complex type definition for locally scoped declarations (see
37      * <code>scope</code>), otherwise <code>null</code> if no such
38      * definition exists.
39      */

40     public XSComplexTypeDefinition getEnclosingCTDefinition();
41
42     /**
43      * Value constraint: one of <code>VC_NONE, VC_DEFAULT, VC_FIXED</code>.
44      */

45     public short getConstraintType();
46
47     /**
48      * Value constraint: The constraint value with respect to the [type
49      * definition], otherwise <code>null</code>.
50      */

51     public String JavaDoc getConstraintValue();
52
53     /**
54      * Value Constraint: Binding specific actual constraint value or
55      * <code>null</code> if the value is in error or there is no value
56      * constraint.
57      * @exception XSException
58      * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
59      * method.
60      */

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

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

94     public ShortList getItemValueTypes()
95                                                         throws XSException;
96
97     /**
98      * An annotation if it exists, otherwise <code>null</code>.
99      */

100     public XSAnnotation getAnnotation();
101
102 }
103
Popular Tags