1 /*
2  * reserved comment block
3  * DO NOT REMOVE OR ALTER!
4  */
5 /*
6  * Licensed to the Apache Software Foundation (ASF) under one or more
7  * contributor license agreements.  See the NOTICE file distributed with
8  * this work for additional information regarding copyright ownership.
9  * The ASF licenses this file to You under the Apache License, Version 2.0
10  * (the "License"); you may not use this file except in compliance with
11  * the License.  You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 package com.sun.org.apache.xerces.internal.impl.dv.xs;
23 
24 import com.sun.org.apache.xerces.internal.impl.dv.DatatypeException;
25 import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeFacetException;
26 import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException;
27 import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo;
28 import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext;
29 import com.sun.org.apache.xerces.internal.impl.dv.XSFacets;
30 import com.sun.org.apache.xerces.internal.impl.dv.XSSimpleType;
31 import com.sun.org.apache.xerces.internal.xs.StringList;
32 import com.sun.org.apache.xerces.internal.xs.XSNamespaceItem;
33 import com.sun.org.apache.xerces.internal.xs.XSObject;
34 import com.sun.org.apache.xerces.internal.xs.XSObjectList;
35 import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition;
36 import com.sun.org.apache.xerces.internal.xs.XSTypeDefinition;
37 
38 /**
39  * Base class for XSSimpleType wrapper implementations.
40  *
41  * @xerces.internal
42  *
43  */
44 public class XSSimpleTypeDelegate
45     implements XSSimpleType {
46 
47     protected final XSSimpleType type;
48 
XSSimpleTypeDelegate(XSSimpleType type)49     public XSSimpleTypeDelegate(XSSimpleType type) {
50         if (type == null) {
51             throw new NullPointerException();
52         }
53         this.type = type;
54     }
55 
getWrappedXSSimpleType()56     public XSSimpleType getWrappedXSSimpleType() {
57         return type;
58     }
59 
getAnnotations()60     public XSObjectList getAnnotations() {
61         return type.getAnnotations();
62     }
63 
getBounded()64     public boolean getBounded() {
65         return type.getBounded();
66     }
67 
getBuiltInKind()68     public short getBuiltInKind() {
69         return type.getBuiltInKind();
70     }
71 
getDefinedFacets()72     public short getDefinedFacets() {
73         return type.getDefinedFacets();
74     }
75 
getFacets()76     public XSObjectList getFacets() {
77         return type.getFacets();
78     }
79 
getFacet(int facetType)80     public XSObject getFacet(int facetType) {
81         return type.getFacet(facetType);
82     }
83 
getFinite()84     public boolean getFinite() {
85         return type.getFinite();
86     }
87 
getFixedFacets()88     public short getFixedFacets() {
89         return type.getFixedFacets();
90     }
91 
getItemType()92     public XSSimpleTypeDefinition getItemType() {
93         return type.getItemType();
94     }
95 
getLexicalEnumeration()96     public StringList getLexicalEnumeration() {
97         return type.getLexicalEnumeration();
98     }
99 
getLexicalFacetValue(short facetName)100     public String getLexicalFacetValue(short facetName) {
101         return type.getLexicalFacetValue(facetName);
102     }
103 
getLexicalPattern()104     public StringList getLexicalPattern() {
105         return type.getLexicalPattern();
106     }
107 
getMemberTypes()108     public XSObjectList getMemberTypes() {
109         return type.getMemberTypes();
110     }
111 
getMultiValueFacets()112     public XSObjectList getMultiValueFacets() {
113         return type.getMultiValueFacets();
114     }
115 
getNumeric()116     public boolean getNumeric() {
117         return type.getNumeric();
118     }
119 
getOrdered()120     public short getOrdered() {
121         return type.getOrdered();
122     }
123 
getPrimitiveType()124     public XSSimpleTypeDefinition getPrimitiveType() {
125         return type.getPrimitiveType();
126     }
127 
getVariety()128     public short getVariety() {
129         return type.getVariety();
130     }
131 
isDefinedFacet(short facetName)132     public boolean isDefinedFacet(short facetName) {
133         return type.isDefinedFacet(facetName);
134     }
135 
isFixedFacet(short facetName)136     public boolean isFixedFacet(short facetName) {
137         return type.isFixedFacet(facetName);
138     }
139 
derivedFrom(String namespace, String name, short derivationMethod)140     public boolean derivedFrom(String namespace, String name, short derivationMethod) {
141         return type.derivedFrom(namespace, name, derivationMethod);
142     }
143 
derivedFromType(XSTypeDefinition ancestorType, short derivationMethod)144     public boolean derivedFromType(XSTypeDefinition ancestorType, short derivationMethod) {
145         return type.derivedFromType(ancestorType, derivationMethod);
146     }
147 
getAnonymous()148     public boolean getAnonymous() {
149         return type.getAnonymous();
150     }
151 
getBaseType()152     public XSTypeDefinition getBaseType() {
153         return type.getBaseType();
154     }
155 
getFinal()156     public short getFinal() {
157         return type.getFinal();
158     }
159 
getTypeCategory()160     public short getTypeCategory() {
161         return type.getTypeCategory();
162     }
163 
isFinal(short restriction)164     public boolean isFinal(short restriction) {
165         return type.isFinal(restriction);
166     }
167 
getName()168     public String getName() {
169         return type.getName();
170     }
171 
getNamespace()172     public String getNamespace() {
173         return type.getNamespace();
174     }
175 
getNamespaceItem()176     public XSNamespaceItem getNamespaceItem() {
177         return type.getNamespaceItem();
178     }
179 
getType()180     public short getType() {
181         return type.getType();
182     }
183 
applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context)184     public void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context)
185         throws InvalidDatatypeFacetException {
186         type.applyFacets(facets, presentFacet, fixedFacet, context);
187     }
188 
getPrimitiveKind()189     public short getPrimitiveKind() {
190         return type.getPrimitiveKind();
191     }
192 
getWhitespace()193     public short getWhitespace() throws DatatypeException {
194         return type.getWhitespace();
195     }
196 
isEqual(Object value1, Object value2)197     public boolean isEqual(Object value1, Object value2) {
198         return type.isEqual(value1, value2);
199     }
200 
isIDType()201     public boolean isIDType() {
202         return type.isIDType();
203     }
204 
validate(ValidationContext context, ValidatedInfo validatedInfo)205     public void validate(ValidationContext context, ValidatedInfo validatedInfo)
206         throws InvalidDatatypeValueException {
207         type.validate(context, validatedInfo);
208     }
209 
validate(String content, ValidationContext context, ValidatedInfo validatedInfo)210     public Object validate(String content, ValidationContext context, ValidatedInfo validatedInfo)
211         throws InvalidDatatypeValueException {
212         return type.validate(content, context, validatedInfo);
213     }
214 
validate(Object content, ValidationContext context, ValidatedInfo validatedInfo)215     public Object validate(Object content, ValidationContext context, ValidatedInfo validatedInfo)
216         throws InvalidDatatypeValueException {
217         return type.validate(content, context, validatedInfo);
218     }
219 
toString()220     public String toString() {
221         return type.toString();
222     }
223 }
224