1 /* 2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. 3 */ 4 /* 5 * Licensed to the Apache Software Foundation (ASF) under one or more 6 * contributor license agreements. See the NOTICE file distributed with 7 * this work for additional information regarding copyright ownership. 8 * The ASF licenses this file to You under the Apache License, Version 2.0 9 * (the "License"); you may not use this file except in compliance with 10 * the License. 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, or none. 42 */ 43 public short getConstraintType(); 44 45 /** 46 * Value Constraint: The constraint value, otherwise <code>null</code>. 47 * 48 * @deprecated Use getValueConstraintValue().getNormalizedValue() instead 49 */ 50 @Deprecated 51 public String 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 * @deprecated Use getValueConstraintValue().getActualValue() instead 62 */ 63 @Deprecated 64 public Object getActualVC() 65 throws XSException; 66 67 /** 68 * The actual constraint value built-in datatype, e.g. 69 * <code>STRING_DT, SHORT_DT</code>. If the type definition of this 70 * value is a list type definition, this method returns 71 * <code>LIST_DT</code>. If the type definition of this value is a list 72 * type definition whose item type is a union type definition, this 73 * method returns <code>LISTOFUNION_DT</code>. To query the actual 74 * constraint value of the list or list of union type definitions use 75 * <code>itemValueTypes</code>. If the <code>actualNormalizedValue</code> 76 * is <code>null</code>, this method returns <code>UNAVAILABLE_DT</code>. 77 * @exception XSException 78 * NOT_SUPPORTED_ERR: Raised if the implementation does not support this 79 * method. 80 * 81 * @deprecated Use getValueConstraintValue().getActualValueType() instead 82 */ 83 @Deprecated 84 public short getActualVCType() 85 throws XSException; 86 87 /** 88 * In the case the actual constraint value represents a list, i.e. the 89 * <code>actualValueType</code> is <code>LIST_DT</code>, the returned 90 * array consists of one type kind which represents the itemType. If the 91 * actual constraint value represents a list type definition whose item 92 * type is a union type definition, i.e. <code>LISTOFUNION_DT</code>, 93 * for each actual constraint value in the list the array contains the 94 * corresponding memberType kind. For examples, see 95 * <code>ItemPSVI.itemValueTypes</code>. 96 * @exception XSException 97 * NOT_SUPPORTED_ERR: Raised if the implementation does not support this 98 * method. 99 * 100 * @deprecated Use getValueConstraintValue().getListValueTypes() instead 101 */ 102 @Deprecated 103 public ShortList getItemValueTypes() 104 throws XSException; 105 106 /** 107 * The actual value of the default or fixed value constraint. 108 */ 109 public XSValue getValueConstraintValue(); 110 111 /** 112 * A sequence of [annotations] or an empty <code>XSObjectList</code>. 113 */ 114 public XSObjectList getAnnotations(); 115 }