View Javadoc
1   /*
2    * reserved comment block
3    * DO NOT REMOVE OR ALTER!
4    */
5   /*
6    * Copyright 2001, 2002,2004 The Apache Software Foundation.
7    *
8    * Licensed under the Apache License, Version 2.0 (the "License");
9    * you may not use this file except in compliance with the License.
10   * 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.impl.dv;
22  
23  import java.util.Vector;
24  
25  import com.sun.org.apache.xerces.internal.xs.XSAnnotation;
26  import com.sun.org.apache.xerces.internal.xs.XSObjectList;
27  import com.sun.org.apache.xerces.internal.impl.xs.util.XSObjectListImpl;
28  
29  /**
30   * The class used to pass all facets to {@link XSSimpleType#applyFacets}.
31   *
32   * @xerces.internal
33   *
34   * @author Sandy Gao, IBM
35   *
36   */
37  public class XSFacets {
38  
39      /**
40       * value of length facet.
41       */
42      public int length;
43  
44      /**
45       * value of minLength facet.
46       */
47      public int minLength;
48  
49      /**
50       * value of maxLength facet.
51       */
52      public int maxLength;
53  
54      /**
55       * value of whiteSpace facet.
56       */
57      public short whiteSpace;
58  
59      /**
60       * value of totalDigits facet.
61       */
62      public int totalDigits;
63  
64      /**
65       * value of fractionDigits facet.
66       */
67      public int fractionDigits;
68  
69      /**
70       * string containing value of pattern facet, for multiple patterns values
71       * are ORed together.
72       */
73      public String pattern;
74  
75      /**
76       * Vector containing values of Enumeration facet, as String's.
77       */
78      public Vector enumeration;
79  
80      /**
81       * An array parallel to "Vector enumeration". It contains namespace context
82       * of each enumeration value. Elements of this vector are NamespaceContext
83       * objects.
84       */
85      public Vector enumNSDecls;
86  
87      /**
88       * value of maxInclusive facet.
89       */
90      public String maxInclusive;
91  
92      /**
93       * value of maxExclusive facet.
94       */
95      public String maxExclusive;
96  
97      /**
98       * value of minInclusive facet.
99       */
100     public String minInclusive;
101 
102     /**
103      * value of minExclusive facet.
104      */
105     public String minExclusive;
106 
107 
108 
109     public XSAnnotation lengthAnnotation;
110     public XSAnnotation minLengthAnnotation;
111     public XSAnnotation maxLengthAnnotation;
112     public XSAnnotation whiteSpaceAnnotation;
113     public XSAnnotation totalDigitsAnnotation;
114     public XSAnnotation fractionDigitsAnnotation;
115     public XSObjectListImpl patternAnnotations;
116     public XSObjectList enumAnnotations;
117     public XSAnnotation maxInclusiveAnnotation;
118     public XSAnnotation maxExclusiveAnnotation;
119     public XSAnnotation minInclusiveAnnotation;
120     public XSAnnotation minExclusiveAnnotation;
121 
122     public void reset(){
123         lengthAnnotation = null;
124         minLengthAnnotation = null;
125         maxLengthAnnotation = null;
126         whiteSpaceAnnotation = null;
127         totalDigitsAnnotation = null;
128         fractionDigitsAnnotation = null;
129         patternAnnotations = null;
130         enumAnnotations = null;
131         maxInclusiveAnnotation = null;
132         maxExclusiveAnnotation = null;
133         minInclusiveAnnotation = null;
134         minExclusiveAnnotation = null;
135     }
136 }