Source Code Cross Referenced for AttrImpl.java in  » J2EE » Enhydra-Application-Framework » org » enhydra » xml » 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 » J2EE » Enhydra Application Framework » org.enhydra.xml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)HashMapNode.java	1.36 02/03/21
003:         *
004:         * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
005:         * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
006:         */
007:        package org.enhydra.xml;
008:
009:        import org.w3c.dom.Attr;
010:        import org.w3c.dom.DOMException;
011:        import org.w3c.dom.Element;
012:        import org.w3c.dom.Node;
013:        import org.w3c.dom.TypeInfo;
014:        import org.w3c.dom.UserDataHandler;
015:
016:        /**
017:         * @author Tweety
018:         *
019:         * A class representing a node in a meta-data tree, which implements
020:         * the <a href="../../../../api/org/w3c/dom/Attr.html">
021:         *
022:         * <p> Namespaces are ignored in this implementation.  The terms "tag
023:         * name" and "node name" are always considered to be synonymous.
024:         *
025:         * @version 1.0
026:         */
027:        public class AttrImpl extends NodeImpl implements  Attr {
028:
029:            /**
030:             * If this attribute was explicitly given a value in the original 
031:             * document, this is <code>true</code>; otherwise, it is 
032:             * <code>false</code>. 
033:             */
034:            boolean specified = true;
035:
036:            /**
037:             * Document owner.
038:             */
039:            Element owner;
040:
041:            /**
042:             * Attribute name.
043:             */
044:            String name;
045:
046:            /**
047:             * Attribute value.
048:             */
049:            String value;
050:
051:            /**
052:             * Constructs an empty <code>AttrImpl</code>.
053:             * 
054:             * @param owner document owner.
055:             * @param name node name.
056:             * @param value node value.
057:             */
058:            public AttrImpl(Element owner, String name, String value) {
059:                this .owner = owner;
060:                this .name = name;
061:                this .value = value;
062:            }
063:
064:            /**
065:             * Constructs a <code>AttrImpl</code> from the given node.
066:             * 
067:             * @param node, as a <code>AttrImpl</code>.
068:             */
069:            public AttrImpl(Attr attr) {
070:                this .owner = attr.getOwnerElement();
071:                this .name = attr.getName();
072:                this .value = attr.getValue();
073:            }
074:
075:            /**
076:             * Returns the attribute name associated with this node.
077:             *
078:             * @return the attribute name, as a <code>String</code>.
079:             */
080:            public String getName() {
081:                return name;
082:            }
083:
084:            /**
085:             * Returns the name associated with this node.
086:             *
087:             * @return the name, as a <code>String</code>.
088:             */
089:            public String getNodeName() {
090:                return name;
091:            }
092:
093:            /**
094:             * Returns the node type.
095:             *
096:             * @return the <code>ATTRIBUTE_NODE</code> node type.
097:             */
098:            public short getNodeType() {
099:                return ATTRIBUTE_NODE;
100:            }
101:
102:            /**
103:             * If this attribute was explicitly given a value in the original 
104:             * document, this is <code>true</code>; otherwise, it is 
105:             * <code>false</code>. Note that the implementation is in charge of this 
106:             * attribute, not the user. If the user changes the value of the 
107:             * attribute (even if it ends up having the same value as the default 
108:             * value) then the <code>specified</code> flag is automatically flipped 
109:             * to <code>true</code>. To re-specify the attribute as the default 
110:             * value from the DTD, the user must delete the attribute. The 
111:             * implementation will then make a new attribute available with 
112:             * <code>specified</code> set to <code>false</code> and the default 
113:             * value (if one exists).
114:             * <br>In summary: If the attribute has an assigned value in the document 
115:             * then <code>specified</code> is <code>true</code>, and the value is 
116:             * the assigned value.If the attribute has no assigned value in the 
117:             * document and has a default value in the DTD, then 
118:             * <code>specified</code> is <code>false</code>, and the value is the 
119:             * default value in the DTD.If the attribute has no assigned value in 
120:             * the document and has a value of #IMPLIED in the DTD, then the 
121:             * attribute does not appear in the structure model of the document.If 
122:             * the <code>ownerElement</code> attribute is <code>null</code> (i.e. 
123:             * because it was just created or was set to <code>null</code> by the 
124:             * various removal and cloning operations) <code>specified</code> is 
125:             * <code>true</code>. 
126:             * 
127:             * Retuns always <code>true</code>.
128:             */
129:            public boolean getSpecified() {
130:                return specified;
131:            }
132:
133:            /**
134:             * Returns the value associated with this attributes.
135:             *
136:             * @return the node attributes, as a <code>String</code>.
137:             */
138:            public String getValue() {
139:                return value;
140:            }
141:
142:            /**
143:             * Returns the value associated with this node.
144:             *
145:             * @return the node value, as a <code>String</code>.
146:             */
147:            public String getNodeValue() {
148:                return value;
149:            }
150:
151:            /**
152:             * Sets the value of this attribute to the given one.
153:             *
154:             * @param value the new attribute value, as a <code>String</code>.
155:             */
156:            public void setValue(String value) {
157:                this .value = value;
158:            }
159:
160:            /**
161:             * Sets the value of this node to the given one.
162:             *
163:             * @return the node value, as a <code>String</code>.
164:             */
165:            public void setNodeValue(String value) {
166:                this .value = value;
167:            }
168:
169:            /**
170:             * Returns the owner of this attribute.
171:             *
172:             * @return the attribute owner node.
173:             */
174:            public Element getOwnerElement() {
175:                return owner;
176:            }
177:
178:            /* (non-Javadoc)
179:             * @see org.w3c.dom.Attr#getSchemaTypeInfo()
180:             */
181:            public TypeInfo getSchemaTypeInfo() {
182:                // TODO Auto-generated method stub
183:                return null;
184:            }
185:
186:            /* (non-Javadoc)
187:             * @see org.w3c.dom.Attr#isId()
188:             */
189:            public boolean isId() {
190:                // TODO Auto-generated method stub
191:                return false;
192:            }
193:
194:            /* (non-Javadoc)
195:             * @see org.w3c.dom.Node#getNamespaceURI()
196:             */
197:            public String getNamespaceURI() {
198:                // TODO Auto-generated method stub
199:                return null;
200:            }
201:
202:            /* (non-Javadoc)
203:             * @see org.w3c.dom.Node#getBaseURI()
204:             */
205:            public String getBaseURI() {
206:                // TODO Auto-generated method stub
207:                return null;
208:            }
209:
210:            /* (non-Javadoc)
211:             * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)
212:             */
213:            public short compareDocumentPosition(Node arg0) throws DOMException {
214:                // TODO Auto-generated method stub
215:                return 0;
216:            }
217:
218:            /* (non-Javadoc)
219:             * @see org.w3c.dom.Node#getTextContent()
220:             */
221:            public String getTextContent() throws DOMException {
222:                // TODO Auto-generated method stub
223:                return null;
224:            }
225:
226:            /* (non-Javadoc)
227:             * @see org.w3c.dom.Node#setTextContent(java.lang.String)
228:             */
229:            public void setTextContent(String arg0) throws DOMException {
230:                // TODO Auto-generated method stub
231:
232:            }
233:
234:            /* (non-Javadoc)
235:             * @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node)
236:             */
237:            public boolean isSameNode(Node arg0) {
238:                // TODO Auto-generated method stub
239:                return false;
240:            }
241:
242:            /* (non-Javadoc)
243:             * @see org.w3c.dom.Node#lookupPrefix(java.lang.String)
244:             */
245:            public String lookupPrefix(String arg0) {
246:                // TODO Auto-generated method stub
247:                return null;
248:            }
249:
250:            /* (non-Javadoc)
251:             * @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String)
252:             */
253:            public boolean isDefaultNamespace(String arg0) {
254:                // TODO Auto-generated method stub
255:                return false;
256:            }
257:
258:            /* (non-Javadoc)
259:             * @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String)
260:             */
261:            public String lookupNamespaceURI(String arg0) {
262:                // TODO Auto-generated method stub
263:                return null;
264:            }
265:
266:            /* (non-Javadoc)
267:             * @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
268:             */
269:            public boolean isEqualNode(Node arg0) {
270:                // TODO Auto-generated method stub
271:                return false;
272:            }
273:
274:            /* (non-Javadoc)
275:             * @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String)
276:             */
277:            public Object getFeature(String arg0, String arg1) {
278:                // TODO Auto-generated method stub
279:                return null;
280:            }
281:
282:            /* (non-Javadoc)
283:             * @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
284:             */
285:            public Object setUserData(String arg0, Object arg1,
286:                    UserDataHandler arg2) {
287:                // TODO Auto-generated method stub
288:                return null;
289:            }
290:
291:            /* (non-Javadoc)
292:             * @see org.w3c.dom.Node#getUserData(java.lang.String)
293:             */
294:            public Object getUserData(String arg0) {
295:                // TODO Auto-generated method stub
296:                return null;
297:            }
298:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.