1 /* 2 * Copyright 2004,2007 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.ws.commons.schema; 18 19 import javax.xml.namespace.QName; 20 21 22 /** 23 * Class for simple types that are derived by extension. Extends the simple 24 * type content of the element by adding attributes. Represents the World Wide 25 * Web Consortium (W3C) extension element for simple content. 26 */ 27 28 public class XmlSchemaSimpleContentExtension extends XmlSchemaContent { 29 30 /** 31 * Creates new XmlSchemaSimpleContentExtension 32 */ 33 public XmlSchemaSimpleContentExtension() { 34 attributes = new XmlSchemaObjectCollection(); 35 36 } 37 38 /* Allows an XmlSchemaAnyAttribute to be used for the attribute value.*/ 39 XmlSchemaAnyAttribute anyAttribute; 40 41 public void setAnyAttribute(XmlSchemaAnyAttribute anyAttribute) { 42 this.anyAttribute = anyAttribute; 43 } 44 45 public XmlSchemaAnyAttribute getAnyAttribute() { 46 return this.anyAttribute; 47 } 48 49 /* Contains XmlSchemaAttribute and XmlSchemaAttributeGroupRef. Collection of attributes for the simple type.*/ 50 XmlSchemaObjectCollection attributes; 51 52 public XmlSchemaObjectCollection getAttributes() { 53 return this.attributes; 54 } 55 56 /* Name of the built-in data type, simple type, or complex type.*/ 57 QName baseTypeName; 58 59 public void setBaseTypeName(QName baseTypeName) { 60 this.baseTypeName = baseTypeName; 61 } 62 63 public QName getBaseTypeName() { 64 return this.baseTypeName; 65 } 66 67 } 68