Source Code Cross Referenced for DeferredAttrImpl.java in  » XML » xerces-2_9_1 » org » apache » xerces » dom » 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.dom 
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:        /*
019:         * WARNING: because java doesn't support multi-inheritance some code is
020:         * duplicated. If you're changing this file you probably want to change
021:         * DeferredAttrNSImpl.java at the same time.
022:         */
023:
024:        package org.apache.xerces.dom;
025:
026:        /**
027:         * Attribute represents an XML-style attribute of an
028:         * Element. Typically, the allowable values are controlled by its
029:         * declaration in the Document Type Definition (DTD) governing this
030:         * kind of document.
031:         * <P>
032:         * If the attribute has not been explicitly assigned a value, but has
033:         * been declared in the DTD, it will exist and have that default. Only
034:         * if neither the document nor the DTD specifies a value will the
035:         * Attribute really be considered absent and have no value; in that
036:         * case, querying the attribute will return null.
037:         * <P>
038:         * Attributes may have multiple children that contain their data. (XML
039:         * allows attributes to contain entity references, and tokenized
040:         * attribute types such as NMTOKENS may have a child for each token.)
041:         * For convenience, the Attribute object's getValue() method returns
042:         * the string version of the attribute's value.
043:         * <P>
044:         * Attributes are not children of the Elements they belong to, in the
045:         * usual sense, and have no valid Parent reference. However, the spec
046:         * says they _do_ belong to a specific Element, and an INUSE exception
047:         * is to be thrown if the user attempts to explicitly share them
048:         * between elements.
049:         * <P>
050:         * Note that Elements do not permit attributes to appear to be shared
051:         * (see the INUSE exception), so this object's mutability is
052:         * officially not an issue.
053:         * <P>
054:         * DeferredAttrImpl inherits from AttrImpl which does not support
055:         * Namespaces. DeferredAttrNSImpl, which inherits from AttrNSImpl, does.
056:         * @see DeferredAttrNSImpl
057:         *
058:         * @xerces.internal 
059:         *
060:         * @author Andy Clark, IBM
061:         * @author Arnaud  Le Hors, IBM
062:         * @version $Id: DeferredAttrImpl.java 447266 2006-09-18 05:57:49Z mrglavas $
063:         * @since  PR-DOM-Level-1-19980818.
064:         */
065:        public final class DeferredAttrImpl extends AttrImpl implements 
066:                DeferredNode {
067:
068:            //
069:            // Constants
070:            //
071:
072:            /** Serialization version. */
073:            static final long serialVersionUID = 6903232312469148636L;
074:
075:            //
076:            // Data
077:            //
078:
079:            /** Node index. */
080:            protected transient int fNodeIndex;
081:
082:            //
083:            // Constructors
084:            //
085:
086:            /**
087:             * This is the deferred constructor. Only the fNodeIndex is given here.
088:             * All other data, can be requested from the ownerDocument via the index.
089:             */
090:            DeferredAttrImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
091:                super (ownerDocument, null);
092:
093:                fNodeIndex = nodeIndex;
094:                needsSyncData(true);
095:                needsSyncChildren(true);
096:
097:            } // <init>(DeferredDocumentImpl,int)
098:
099:            //
100:            // DeferredNode methods
101:            //
102:
103:            /** Returns the node index. */
104:            public int getNodeIndex() {
105:                return fNodeIndex;
106:            }
107:
108:            //
109:            // Protected methods
110:            //
111:
112:            /** Synchronizes the data (name and value) for fast nodes. */
113:            protected void synchronizeData() {
114:
115:                // no need to sync in the future
116:                needsSyncData(false);
117:
118:                // fluff data
119:                DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) ownerDocument();
120:                name = ownerDocument.getNodeName(fNodeIndex);
121:                int extra = ownerDocument.getNodeExtra(fNodeIndex);
122:                isSpecified((extra & SPECIFIED) != 0);
123:                isIdAttribute((extra & ID) != 0);
124:
125:                int extraNode = ownerDocument.getLastChild(fNodeIndex);
126:                type = ownerDocument.getTypeInfo(extraNode);
127:            } // synchronizeData()
128:
129:            /**
130:             * Synchronizes the node's children with the internal structure.
131:             * Fluffing the children at once solves a lot of work to keep
132:             * the two structures in sync. The problem gets worse when
133:             * editing the tree -- this makes it a lot easier.
134:             */
135:            protected void synchronizeChildren() {
136:                DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) ownerDocument();
137:                ownerDocument.synchronizeChildren(this , fNodeIndex);
138:            } // synchronizeChildren()
139:
140:        } // class DeferredAttrImpl
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.