Java Doc for Attributable.java in  » Ajax » zk » org » zkoss » idom » 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 » Ajax » zk » org.zkoss.idom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.zkoss.idom.Attributable

All known Subclasses:   org.zkoss.idom.Element,
Attributable
public interface Attributable (Code)
Represents a class that has attributes. It is usually implemented by a class that also implements Item or Group. Currently, only Element implements it.

Design consideration: Be as similar to Group as possible.
author:
   tomyeh
See Also:   Item
See Also:   Attribute





Method Summary
public  intgetAttributeIndex(int indexFrom, String namespace, String name, int mode)
     Gets the index of the first attribute that matches the specified criteria.
public  intgetAttributeIndex(int indexFrom, String tname)
     Gets the index of the attribute with the giving local name.
public  AttributegetAttributeItem(String namespace, String name, int mode)
     Gets the first attribute that matches the specified criteria.
public  AttributegetAttributeItem(String tname)
     Gets the attribute with the tag name.
public  ListgetAttributeItems()
     Returns all attributes of this object.

The returned list is "live".

public  StringgetAttributeValue(String namespace, String name, int mode)
     Gets the value of the first attribute that matches the giving criteria, or null if not found.
public  StringgetAttributeValue(String tname)
     Returns the value of the attribute of the specified tag name, or null if not specified.
public  ListgetAttributes(String namespace, String name, int mode)
     Gets a list of attributes of the specified criteria.
public  booleanisAttributeModificationAware()
     Returns whether it is aware of the modificatioin of attributes.
public  AttributesetAttribute(Attribute attr)
     Adds the giving attribute. If there is any existent one with the same tag name, it will be replaced.
public  voidsetAttributeModificationAware(boolean aware)
     Sets whether it is aware of the modificatioin of attributes.
public  AttributesetAttributeValue(String tname, String value)
     Sets the value of the attribute with the giving tag name. If the attribute doesn't exist, a new attribute will be created and added.

Note: it looks similar to Attribute(String, String), but this method requires the tag name.
Parameters:
  tname - the tag name (i.e., Attribute.getName)
Parameters:
  value - the new value.




Method Detail
getAttributeIndex
public int getAttributeIndex(int indexFrom, String namespace, String name, int mode)(Code)
Gets the index of the first attribute that matches the specified criteria.
Parameters:
  indexFrom - the index to start searching from; 0 for beginning
Parameters:
  namespace - the namspace URI if FIND_BY_PREFIX is not specified;the namespace prefix if FIND_BY_PREFIX specified; null to ingore
Parameters:
  name - the local name if FIND_BY_TAGNAME is not sepcified;the tag name if FIND_BY_TAGNAME specified; null to ignore
Parameters:
  mode - the serach mode; zero or any combination of Item.FIND_xxx the index if found; -1 if not found



getAttributeIndex
public int getAttributeIndex(int indexFrom, String tname)(Code)
Gets the index of the attribute with the giving local name.
Parameters:
  indexFrom - the index to start searching from; 0 for beginning
Parameters:
  tname - the tag name (i.e., Attribute.getName) --consists of the prefix and the local name the index if found; -1 if not found



getAttributeItem
public Attribute getAttributeItem(String namespace, String name, int mode)(Code)
Gets the first attribute that matches the specified criteria.

The name is a bit strange because we have to avoid name conflicts with org.w3c.dom.Node.
Parameters:
  namespace - the namspace URI if FIND_BY_PREFIX is not specified;the namespace prefix if FIND_BY_PREFIX specified; null to ingore
Parameters:
  name - the local name if FIND_BY_TAGNAME is not sepcified;the tag name if FIND_BY_TAGNAME specified; null to ignore
Parameters:
  mode - the serach mode; zero or any combination of Item.FIND_xxx the index if found; -1 if not found




getAttributeItem
public Attribute getAttributeItem(String tname)(Code)
Gets the attribute with the tag name.

The name is a bit strange because we have to avoid name conflicts with org.w3c.dom.Node.
Parameters:
  tname - the tag name (i.e., Attribute.getName) --consists of the prefix and the local name null if not found




getAttributeItems
public List getAttributeItems()(Code)
Returns all attributes of this object.

The returned list is "live". Any modification to it affects the object that owns the attributes.

If the new added attribute has the same tag name as that of any existent attribute, DOMException is thrown. Thus, it is, sometimes, more convenient to ue setAttribute.

Naming reason: we don't call it getAttributes() to avoid the name conflict with Node.getAttributes(). an empty list if no attribute at all




getAttributeValue
public String getAttributeValue(String namespace, String name, int mode)(Code)
Gets the value of the first attribute that matches the giving criteria, or null if not found.

According to Section 3.3.3 of XML 1.0 spec, the value is normalized, including trimmed.
Parameters:
  namespace - the namspace URI if FIND_BY_PREFIX is not specified;the namespace prefix if FIND_BY_PREFIX specified; null to ingore
Parameters:
  name - the local name if FIND_BY_TAGNAME is not sepcified;the tag name if FIND_BY_TAGNAME specified; null to ignore the value of the attribute; null if not found




getAttributeValue
public String getAttributeValue(String tname)(Code)
Returns the value of the attribute of the specified tag name, or null if not specified.

Note: unlike W3C's getAttribute, which returns empty if not specified, this method returns null if not specified.




getAttributes
public List getAttributes(String namespace, String name, int mode)(Code)
Gets a list of attributes of the specified criteria.
Parameters:
  namespace - the namspace URI if FIND_BY_PREFIX is not specified;the namespace prefix if FIND_BY_PREFIX specified; null to ingore
Parameters:
  name - the local name if FIND_BY_TAGNAME is not sepcified;the tag name if FIND_BY_TAGNAME specified; null to ignore
Parameters:
  mode - the serach mode; zero or any combination of Item.FIND_xxx null if not found



isAttributeModificationAware
public boolean isAttributeModificationAware()(Code)
Returns whether it is aware of the modificatioin of attributes. If true, the modified flag is set if any of its attribute is modified.

Default: false.




setAttribute
public Attribute setAttribute(Attribute attr)(Code)
Adds the giving attribute. If there is any existent one with the same tag name, it will be replaced. If not, the new attribute will be appended.
Parameters:
  attr - the new attribute to add the attribute being replaced; null if no one is replaced



setAttributeModificationAware
public void setAttributeModificationAware(boolean aware)(Code)
Sets whether it is aware of the modificatioin of attributes.



setAttributeValue
public Attribute setAttributeValue(String tname, String value)(Code)
Sets the value of the attribute with the giving tag name. If the attribute doesn't exist, a new attribute will be created and added.

Note: it looks similar to Attribute(String, String), but this method requires the tag name.
Parameters:
  tname - the tag name (i.e., Attribute.getName)
Parameters:
  value - the new value. the attribute being replaced; null if no one is replaced




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.