Source Code Cross Referenced for AttrImpl.java in  » IDE-Netbeans » xml » org » netbeans » tax » 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 » IDE Netbeans » xml » org.netbeans.tax.dom 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         *
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common
008:         * Development and Distribution License("CDDL") (collectively, the
009:         * "License"). You may not use this file except in compliance with the
010:         * License. You can obtain a copy of the License at
011:         * http://www.netbeans.org/cddl-gplv2.html
012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013:         * specific language governing permissions and limitations under the
014:         * License.  When distributing the software, include this License Header
015:         * Notice in each file and include the License file at
016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017:         * particular file as subject to the "Classpath" exception as provided
018:         * by Sun in the GPL Version 2 section of the License file that
019:         * accompanied this code. If applicable, add the following below the
020:         * License Header, with the fields enclosed by brackets [] replaced by
021:         * your own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         *
024:         * Contributor(s):
025:         *
026:         * The Original Software is NetBeans. The Initial Developer of the Original
027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028:         * Microsystems, Inc. All Rights Reserved.
029:         *
030:         * If you wish your version of this file to be governed by only the CDDL
031:         * or only the GPL Version 2, indicate your decision by adding
032:         * "[Contributor] elects to include this software in this distribution
033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034:         * single choice of license, a recipient has the option to distribute
035:         * your version of this file under either the CDDL, the GPL Version 2 or
036:         * to extend the choice of license to its licensees as provided above.
037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
038:         * Version 2 license, then the option applies only if the new code is
039:         * made subject to such option by the copyright holder.
040:         */
041:
042:        package org.netbeans.tax.dom;
043:
044:        import org.w3c.dom.*;
045:        import org.netbeans.tax.*;
046:
047:        /**
048:         *
049:         * @author  Petr Kuzel
050:         */
051:        class AttrImpl extends NodeImpl implements  Attr {
052:
053:            private final TreeAttribute peer;
054:
055:            /** Creates a new instance of AttrImpl */
056:            public AttrImpl(TreeAttribute peer) {
057:                this .peer = peer;
058:            }
059:
060:            /** The name of this node, depending on its type; see the table above.
061:             *
062:             */
063:            public String getNodeName() {
064:                return getName();
065:            }
066:
067:            /** A code representing the type of the underlying object, as defined above.
068:             *
069:             */
070:            public short getNodeType() {
071:                return Node.ATTRIBUTE_NODE;
072:            }
073:
074:            /** The value of this node, depending on its type; see the table above.
075:             * When it is defined to be <code>null</code>, setting it has no effect.
076:             * @exception DOMException
077:             *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
078:             * @exception DOMException
079:             *   DOMSTRING_SIZE_ERR: Raised when it would return more characters than
080:             *   fit in a <code>DOMString</code> variable on the implementation
081:             *   platform.
082:             *
083:             */
084:            public String getNodeValue() throws DOMException {
085:                return getValue();
086:            }
087:
088:            /** The parent of this node. All nodes, except <code>Attr</code>,
089:             * <code>Document</code>, <code>DocumentFragment</code>,
090:             * <code>Entity</code>, and <code>Notation</code> may have a parent.
091:             * However, if a node has just been created and not yet added to the
092:             * tree, or if it has been removed from the tree, this is
093:             * <code>null</code>.
094:             *
095:             */
096:            public Node getParentNode() {
097:                return null;
098:            }
099:
100:            /** Returns the name of this attribute.
101:             *
102:             */
103:            public String getName() {
104:                return peer.getQName();
105:            }
106:
107:            /** The <code>Element</code> node this attribute is attached to or
108:             * <code>null</code> if this attribute is not in use.
109:             * @since DOM Level 2
110:             *
111:             */
112:            public Element getOwnerElement() {
113:                return Wrapper.wrap(peer.getOwnerElement());
114:            }
115:
116:            /** If this attribute was explicitly given a value in the original
117:             * document, this is <code>true</code>; otherwise, it is
118:             * <code>false</code>. Note that the implementation is in charge of this
119:             * attribute, not the user. If the user changes the value of the
120:             * attribute (even if it ends up having the same value as the default
121:             * value) then the <code>specified</code> flag is automatically flipped
122:             * to <code>true</code>. To re-specify the attribute as the default
123:             * value from the DTD, the user must delete the attribute. The
124:             * implementation will then make a new attribute available with
125:             * <code>specified</code> set to <code>false</code> and the default
126:             * value (if one exists).
127:             * <br>In summary: If the attribute has an assigned value in the document
128:             * then <code>specified</code> is <code>true</code>, and the value is
129:             * the assigned value.If the attribute has no assigned value in the
130:             * document and has a default value in the DTD, then
131:             * <code>specified</code> is <code>false</code>, and the value is the
132:             * default value in the DTD.If the attribute has no assigned value in
133:             * the document and has a value of #IMPLIED in the DTD, then the
134:             * attribute does not appear in the structure model of the document.If
135:             * the <code>ownerElement</code> attribute is <code>null</code> (i.e.
136:             * because it was just created or was set to <code>null</code> by the
137:             * various removal and cloning operations) <code>specified</code> is
138:             * <code>true</code>.
139:             *
140:             */
141:            public boolean getSpecified() {
142:                return peer.isSpecified();
143:            }
144:
145:            /** On retrieval, the value of the attribute is returned as a string.
146:             * Character and general entity references are replaced with their
147:             * values. See also the method <code>getAttribute</code> on the
148:             * <code>Element</code> interface.
149:             * <br>On setting, this creates a <code>Text</code> node with the unparsed
150:             * contents of the string. I.e. any characters that an XML processor
151:             * would recognize as markup are instead treated as literal text. See
152:             * also the method <code>setAttribute</code> on the <code>Element</code>
153:             * interface.
154:             * @exception DOMException
155:             *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
156:             *
157:             */
158:            public String getValue() {
159:                return peer.getValue();
160:            }
161:
162:            /** On retrieval, the value of the attribute is returned as a string.
163:             * Character and general entity references are replaced with their
164:             * values. See also the method <code>getAttribute</code> on the
165:             * <code>Element</code> interface.
166:             * <br>On setting, this creates a <code>Text</code> node with the unparsed
167:             * contents of the string. I.e. any characters that an XML processor
168:             * would recognize as markup are instead treated as literal text. See
169:             * also the method <code>setAttribute</code> on the <code>Element</code>
170:             * interface.
171:             * @exception DOMException
172:             *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
173:             *
174:             */
175:            public void setValue(String value) throws DOMException {
176:                throw new ROException();
177:            }
178:
179:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.