001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.xs;
019:
020: /**
021: * The interface represents the Attribute Declaration schema component.
022: */
023: public interface XSAttributeDeclaration extends XSObject {
024: /**
025: * [type definition]: A simple type definition.
026: */
027: public XSSimpleTypeDefinition getTypeDefinition();
028:
029: /**
030: * [scope]. One of <code>SCOPE_GLOBAL</code>, <code>SCOPE_LOCAL</code>, or
031: * <code>SCOPE_ABSENT</code>. If the scope is local, then the
032: * <code>enclosingCTDefinition</code> is present.
033: */
034: public short getScope();
035:
036: /**
037: * The complex type definition for locally scoped declarations (see
038: * <code>scope</code>), otherwise <code>null</code> if no such
039: * definition exists.
040: */
041: public XSComplexTypeDefinition getEnclosingCTDefinition();
042:
043: /**
044: * Value constraint: one of <code>VC_NONE, VC_DEFAULT, VC_FIXED</code>.
045: */
046: public short getConstraintType();
047:
048: /**
049: * Value constraint: The constraint value with respect to the [type
050: * definition], otherwise <code>null</code>.
051: */
052: public String getConstraintValue();
053:
054: /**
055: * Value Constraint: Binding specific actual constraint value or
056: * <code>null</code> if the value is in error or there is no value
057: * constraint.
058: * @exception XSException
059: * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
060: * method.
061: */
062: public Object getActualVC() throws XSException;
063:
064: /**
065: * The actual constraint value built-in datatype, e.g.
066: * <code>STRING_DT, SHORT_DT</code>. If the type definition of this
067: * value is a list type definition, this method returns
068: * <code>LIST_DT</code>. If the type definition of this value is a list
069: * type definition whose item type is a union type definition, this
070: * method returns <code>LISTOFUNION_DT</code>. To query the actual
071: * constraint value of the list or list of union type definitions use
072: * <code>itemValueTypes</code>. If the <code>actualValue</code> is
073: * <code>null</code>, this method returns <code>UNAVAILABLE_DT</code>.
074: * @exception XSException
075: * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
076: * method.
077: */
078: public short getActualVCType() throws XSException;
079:
080: /**
081: * In the case the actual constraint value represents a list, i.e. the
082: * <code>actualValueType</code> is <code>LIST_DT</code>, the returned
083: * array consists of one type kind which represents the itemType. If the
084: * actual constraint value represents a list type definition whose item
085: * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>,
086: * for each actual constraint value in the list the array contains the
087: * corresponding memberType kind. For examples, see
088: * <code>ItemPSVI.itemValueTypes</code>.
089: * @exception XSException
090: * NOT_SUPPORTED_ERR: Raised if the implementation does not support this
091: * method.
092: */
093: public ShortList getItemValueTypes() throws XSException;
094:
095: /**
096: * An annotation if it exists, otherwise <code>null</code>.
097: * If not null then the first [annotation] from the sequence of annotations.
098: */
099: public XSAnnotation getAnnotation();
100:
101: /**
102: * A sequence of [annotations] or an empty <code>XSObjectList</code>.
103: */
104: public XSObjectList getAnnotations();
105: }
|