Source Code Cross Referenced for AttributePSVImpl.java in  » XML » xerces-2_9_1 » org » apache » xerces » impl » xs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xerces 2_9_1 » org.apache.xerces.impl.xs 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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.xs;
019:
020:        import org.apache.xerces.xs.ShortList;
021:        import org.apache.xerces.xs.StringList;
022:        import org.apache.xerces.xs.XSAttributeDeclaration;
023:        import org.apache.xerces.xs.XSSimpleTypeDefinition;
024:        import org.apache.xerces.xs.XSTypeDefinition;
025:        import org.apache.xerces.impl.xs.util.StringListImpl;
026:        import org.apache.xerces.xs.AttributePSVI;
027:        import org.apache.xerces.xs.XSConstants;
028:
029:        /**
030:         * Attribute PSV infoset augmentations implementation.
031:         * The PSVI information for attributes will be available at the startElement call.
032:         * 
033:         * @xerces.internal 
034:         *
035:         * @author Elena Litani IBM
036:         * @version $Id: AttributePSVImpl.java 446734 2006-09-15 20:51:23Z mrglavas $
037:         */
038:        public class AttributePSVImpl implements  AttributePSVI {
039:
040:            /** attribute declaration */
041:            protected XSAttributeDeclaration fDeclaration = null;
042:
043:            /** type of attribute, simpleType */
044:            protected XSTypeDefinition fTypeDecl = null;
045:
046:            /** If this attribute was explicitly given a 
047:             * value in the original document, this is false; otherwise, it is true */
048:            protected boolean fSpecified = false;
049:
050:            /** schema normalized value property */
051:            protected String fNormalizedValue = null;
052:
053:            /** schema actual value */
054:            protected Object fActualValue = null;
055:
056:            /** schema actual value type */
057:            protected short fActualValueType = XSConstants.UNAVAILABLE_DT;
058:
059:            /** actual value types if the value is a list */
060:            protected ShortList fItemValueTypes = null;
061:
062:            /** member type definition against which attribute was validated */
063:            protected XSSimpleTypeDefinition fMemberType = null;
064:
065:            /** validation attempted: none, partial, full */
066:            protected short fValidationAttempted = AttributePSVI.VALIDATION_NONE;
067:
068:            /** validity: valid, invalid, unknown */
069:            protected short fValidity = AttributePSVI.VALIDITY_NOTKNOWN;
070:
071:            /** error codes */
072:            protected String[] fErrorCodes = null;
073:
074:            /** validation context: could be QName or XPath expression*/
075:            protected String fValidationContext = null;
076:
077:            //
078:            // AttributePSVI methods
079:            //
080:
081:            /**
082:             * [schema default]
083:             *
084:             * @return The canonical lexical representation of the declaration's {value constraint} value.
085:             * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a>
086:             */
087:            public String getSchemaDefault() {
088:                return fDeclaration == null ? null : fDeclaration
089:                        .getConstraintValue();
090:            }
091:
092:            /**
093:             * [schema normalized value]
094:             *
095:             *
096:             * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a>
097:             * @return the normalized value of this item after validation
098:             */
099:            public String getSchemaNormalizedValue() {
100:                return fNormalizedValue;
101:            }
102:
103:            /**
104:             * [schema specified] 
105:             * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_specified">XML Schema Part 1: Structures [schema specified]</a>
106:             * @return true - value was specified in schema, false - value comes from the infoset
107:             */
108:            public boolean getIsSchemaSpecified() {
109:                return fSpecified;
110:            }
111:
112:            /**
113:             * Determines the extent to which the document has been validated
114:             *
115:             * @return return the [validation attempted] property. The possible values are
116:             *         NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION
117:             */
118:            public short getValidationAttempted() {
119:                return fValidationAttempted;
120:            }
121:
122:            /**
123:             * Determine the validity of the node with respect
124:             * to the validation being attempted
125:             *
126:             * @return return the [validity] property. Possible values are:
127:             *         UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY
128:             */
129:            public short getValidity() {
130:                return fValidity;
131:            }
132:
133:            /**
134:             * A list of error codes generated from validation attempts.
135:             * Need to find all the possible subclause reports that need reporting
136:             *
137:             * @return list of error codes
138:             */
139:            public StringList getErrorCodes() {
140:                if (fErrorCodes == null)
141:                    return null;
142:                return new StringListImpl(fErrorCodes, fErrorCodes.length);
143:            }
144:
145:            // This is the only information we can provide in a pipeline.
146:            public String getValidationContext() {
147:                return fValidationContext;
148:            }
149:
150:            /**
151:             * An item isomorphic to the type definition used to validate this element.
152:             * 
153:             * @return  a type declaration
154:             */
155:            public XSTypeDefinition getTypeDefinition() {
156:                return fTypeDecl;
157:            }
158:
159:            /**
160:             * If and only if that type definition is a simple type definition
161:             * with {variety} union, or a complex type definition whose {content type}
162:             * is a simple thype definition with {variety} union, then an item isomorphic
163:             * to that member of the union's {member type definitions} which actually
164:             * validated the element item's normalized value.
165:             * 
166:             * @return  a simple type declaration
167:             */
168:            public XSSimpleTypeDefinition getMemberTypeDefinition() {
169:                return fMemberType;
170:            }
171:
172:            /**
173:             * An item isomorphic to the attribute declaration used to validate
174:             * this attribute.
175:             * 
176:             * @return  an attribute declaration
177:             */
178:            public XSAttributeDeclaration getAttributeDeclaration() {
179:                return fDeclaration;
180:            }
181:
182:            /* (non-Javadoc)
183:             * @see org.apache.xerces.xs.ItemPSVI#getActualNormalizedValue()
184:             */
185:            public Object getActualNormalizedValue() {
186:                return this .fActualValue;
187:            }
188:
189:            /* (non-Javadoc)
190:             * @see org.apache.xerces.xs.ItemPSVI#getActualNormalizedValueType()
191:             */
192:            public short getActualNormalizedValueType() {
193:                return this .fActualValueType;
194:            }
195:
196:            /* (non-Javadoc)
197:             * @see org.apache.xerces.xs.ItemPSVI#getItemValueTypes()
198:             */
199:            public ShortList getItemValueTypes() {
200:                return this .fItemValueTypes;
201:            }
202:
203:            /**
204:             * Reset() 
205:             */
206:            public void reset() {
207:                fNormalizedValue = null;
208:                fActualValue = null;
209:                fActualValueType = XSConstants.UNAVAILABLE_DT;
210:                fItemValueTypes = null;
211:                fDeclaration = null;
212:                fTypeDecl = null;
213:                fSpecified = false;
214:                fMemberType = null;
215:                fValidationAttempted = AttributePSVI.VALIDATION_NONE;
216:                fValidity = AttributePSVI.VALIDITY_NOTKNOWN;
217:                fErrorCodes = null;
218:                fValidationContext = null;
219:            }
220:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.