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.impl.dv;
019:
020: import java.util.Vector;
021:
022: import org.apache.xerces.xs.XSAnnotation;
023: import org.apache.xerces.xs.XSObjectList;
024: import org.apache.xerces.impl.xs.util.XSObjectListImpl;
025:
026: /**
027: * The class used to pass all facets to {@link XSSimpleType#applyFacets}.
028: *
029: * @xerces.internal
030: *
031: * @author Sandy Gao, IBM
032: *
033: * @version $Id: XSFacets.java 446751 2006-09-15 21:54:06Z mrglavas $
034: */
035: public class XSFacets {
036:
037: /**
038: * value of length facet.
039: */
040: public int length;
041:
042: /**
043: * value of minLength facet.
044: */
045: public int minLength;
046:
047: /**
048: * value of maxLength facet.
049: */
050: public int maxLength;
051:
052: /**
053: * value of whiteSpace facet.
054: */
055: public short whiteSpace;
056:
057: /**
058: * value of totalDigits facet.
059: */
060: public int totalDigits;
061:
062: /**
063: * value of fractionDigits facet.
064: */
065: public int fractionDigits;
066:
067: /**
068: * string containing value of pattern facet, for multiple patterns values
069: * are ORed together.
070: */
071: public String pattern;
072:
073: /**
074: * Vector containing values of Enumeration facet, as String's.
075: */
076: public Vector enumeration;
077:
078: /**
079: * An array parallel to "Vector enumeration". It contains namespace context
080: * of each enumeration value. Elements of this vector are NamespaceContext
081: * objects.
082: */
083: public Vector enumNSDecls;
084:
085: /**
086: * value of maxInclusive facet.
087: */
088: public String maxInclusive;
089:
090: /**
091: * value of maxExclusive facet.
092: */
093: public String maxExclusive;
094:
095: /**
096: * value of minInclusive facet.
097: */
098: public String minInclusive;
099:
100: /**
101: * value of minExclusive facet.
102: */
103: public String minExclusive;
104:
105: public XSAnnotation lengthAnnotation;
106: public XSAnnotation minLengthAnnotation;
107: public XSAnnotation maxLengthAnnotation;
108: public XSAnnotation whiteSpaceAnnotation;
109: public XSAnnotation totalDigitsAnnotation;
110: public XSAnnotation fractionDigitsAnnotation;
111: public XSObjectListImpl patternAnnotations;
112: public XSObjectList enumAnnotations;
113: public XSAnnotation maxInclusiveAnnotation;
114: public XSAnnotation maxExclusiveAnnotation;
115: public XSAnnotation minInclusiveAnnotation;
116: public XSAnnotation minExclusiveAnnotation;
117:
118: public void reset() {
119: lengthAnnotation = null;
120: minLengthAnnotation = null;
121: maxLengthAnnotation = null;
122: whiteSpaceAnnotation = null;
123: totalDigitsAnnotation = null;
124: fractionDigitsAnnotation = null;
125: patternAnnotations = null;
126: enumAnnotations = null;
127: maxInclusiveAnnotation = null;
128: maxExclusiveAnnotation = null;
129: minInclusiveAnnotation = null;
130: minExclusiveAnnotation = null;
131: }
132: }
|