01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xerces.xs;
19:
20: /**
21: * This interface represents the Attribute Use schema component.
22: */
23: public interface XSAttributeUse extends XSObject {
24: /**
25: * [required]: determines whether this use of an attribute declaration
26: * requires an appropriate attribute information item to be present, or
27: * merely allows it.
28: */
29: public boolean getRequired();
30:
31: /**
32: * [attribute declaration]: provides the attribute declaration itself,
33: * which will in turn determine the simple type definition used.
34: */
35: public XSAttributeDeclaration getAttrDeclaration();
36:
37: /**
38: * Value Constraint: one of default, fixed.
39: */
40: public short getConstraintType();
41:
42: /**
43: * Value Constraint: The constraint value, otherwise <code>null</code>.
44: */
45: public String getConstraintValue();
46:
47: /**
48: * Value Constraint: Binding specific actual constraint value or
49: * <code>null</code> if the value is in error or there is no value
50: * constraint.
51: * @exception XSException
52: * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
53: * method.
54: */
55: public Object getActualVC() 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() throws XSException;
73:
74: /**
75: * In the case the actual constraint value represents a list, i.e. the
76: * <code>actualValueType</code> is <code>LIST_DT</code>, the returned
77: * array consists of one type kind which represents the itemType. If the
78: * actual constraint value represents a list type definition whose item
79: * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>,
80: * for each actual constraint value in the list the array contains the
81: * corresponding memberType kind. For examples, see
82: * <code>ItemPSVI.itemValueTypes</code>.
83: * @exception XSException
84: * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
85: * method.
86: */
87: public ShortList getItemValueTypes() throws XSException;
88:
89: /**
90: * A sequence of [annotations] or an empty <code>XSObjectList</code>.
91: */
92: public XSObjectList getAnnotations();
93: }
|