KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > dv > XSFacets


1 /*
2  * Copyright 2001, 2002,2004 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.xerces.impl.dv;
18
19 import java.util.Vector JavaDoc;
20
21 import org.apache.xerces.xs.XSAnnotation;
22 import org.apache.xerces.xs.XSObjectList;
23 import org.apache.xerces.impl.xs.util.XSObjectListImpl;
24
25 /**
26  * The class used to pass all facets to {@link XSSimpleType#applyFacets}.
27  *
28  * @xerces.internal
29  *
30  * @author Sandy Gao, IBM
31  *
32  * @version $Id: XSFacets.java,v 1.10 2004/10/06 14:56:50 mrglavas Exp $
33  */

34 public class XSFacets {
35
36     /**
37      * value of length facet.
38      */

39     public int length;
40
41     /**
42      * value of minLength facet.
43      */

44     public int minLength;
45
46     /**
47      * value of maxLength facet.
48      */

49     public int maxLength;
50
51     /**
52      * value of whiteSpace facet.
53      */

54     public short whiteSpace;
55
56     /**
57      * value of totalDigits facet.
58      */

59     public int totalDigits;
60
61     /**
62      * value of fractionDigits facet.
63      */

64     public int fractionDigits;
65
66     /**
67      * string containing value of pattern facet, for multiple patterns values
68      * are ORed together.
69      */

70     public String JavaDoc pattern;
71
72     /**
73      * Vector containing values of Enumeration facet, as String's.
74      */

75     public Vector JavaDoc enumeration;
76
77     /**
78      * An array parallel to "Vector enumeration". It contains namespace context
79      * of each enumeration value. Elements of this vector are NamespaceContext
80      * objects.
81      */

82     public Vector JavaDoc enumNSDecls;
83
84     /**
85      * value of maxInclusive facet.
86      */

87     public String JavaDoc maxInclusive;
88
89     /**
90      * value of maxExclusive facet.
91      */

92     public String JavaDoc maxExclusive;
93
94     /**
95      * value of minInclusive facet.
96      */

97     public String JavaDoc minInclusive;
98
99     /**
100      * value of minExclusive facet.
101      */

102     public String JavaDoc minExclusive;
103     
104     
105    
106     public XSAnnotation lengthAnnotation;
107     public XSAnnotation minLengthAnnotation;
108     public XSAnnotation maxLengthAnnotation;
109     public XSAnnotation whiteSpaceAnnotation;
110     public XSAnnotation totalDigitsAnnotation;
111     public XSAnnotation fractionDigitsAnnotation;
112     public XSObjectListImpl patternAnnotations;
113     public XSObjectList enumAnnotations;
114     public XSAnnotation maxInclusiveAnnotation;
115     public XSAnnotation maxExclusiveAnnotation;
116     public XSAnnotation minInclusiveAnnotation;
117     public XSAnnotation minExclusiveAnnotation;
118     
119     public void reset(){
120         lengthAnnotation = null;
121         minLengthAnnotation = null;
122         maxLengthAnnotation = null;
123         whiteSpaceAnnotation = null;
124         totalDigitsAnnotation = null;
125         fractionDigitsAnnotation = null;
126         patternAnnotations = null;
127         enumAnnotations = null;
128         maxInclusiveAnnotation = null;
129         maxExclusiveAnnotation = null;
130         minInclusiveAnnotation = null;
131         minExclusiveAnnotation = null;
132     }
133 }
134
Popular Tags