Java Doc for AttributeHolder.java in  » Web-Server » Jigsaw » org » w3c » tools » resources » 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 » Web Server » Jigsaw » org.w3c.tools.resources 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.w3c.tools.resources.AttributeHolder

All known Subclasses:   org.w3c.jigedit.filters.PutedEntry,  org.w3c.tools.resources.Resource,  org.w3c.www.protocol.http.cache.CachedResource,  org.w3c.tools.resources.store.ResourceStoreState,  org.w3c.www.protocol.http.cache.StoreState,
AttributeHolder
public class AttributeHolder implements Cloneable(Code)
An attribute holder is an object that holds a list of attributes. Each of the attributes maintained by a holder are described by an Attribute object, wich is able to pickle/unpickle its value, provides the status of the attribute (eg mandatory, editable, etc), etc.

Given this, an attribute holder is able to pickle its state (made of its attribute values), and unpickle it to any DataOutputStream (resp. DataInputStream).
See Also:   Attribute
See Also:   Resource



Field Summary
protected  Attributeattributes
     Pointer to this class registered list of attributes.
protected  Objectvalues
     Attribute values.

Constructor Summary
public  AttributeHolder()
     Create an attribute holder.

Method Summary
public  booleandefinesAttribute(int idx)
     Does this resource has defined a value for the given attribute.
Parameters:
  idx - The index of the attribute to check.
public  booleandefinesAttribute(String name)
     Does this resource has defined a value for the given attribute.
Parameters:
  name - The name of the attribute to check.
public  Attribute[]getAttributes()
     Get this attribute holders attributes description. The attribute list is guaranteed to be returned always in the same order, wich is fixed at compilation time.
public  booleangetBoolean(int idx, boolean def)
    
public  chargetChar(int idx, char def)
    
public  ObjectgetClone(Object values)
     Clone this attribute holder, and init it with the given attributes.
Parameters:
  values - Attribute values to overide in the clone.
public synchronized  ObjectgetClone()
     Clone this attribute holder. The resulting clone will share the attribute values of the cloned attribute holder.
public synchronized  ObjectgetClone(Hashtable defs)
     Clone this AttributeHolder instance, and initialize it with defaults. This method first clones the receiving attribute holder, and then uses the defaults provided to finish the initialization.
Parameters:
  defs - The attribute values, in a Hashtable.
public  doublegetDouble(int idx, double def)
    
public  floatgetFloat(int idx, float def)
    
public  intgetInt(int idx, int def)
    
public  longgetLong(int idx, long def)
    
public  StringgetString(int idx, String def)
    
public synchronized  ObjectgetValue(int idx, Object def)
     Generic get of an attribute value. Retreive an attribute value from its index in the resource's attribute list.
Parameters:
  idx - The index of the attribute whose value is queried.
Parameters:
  def - The default value (if the attribute isn't defined).
public  ObjectgetValue(String name, Object def)
     Generic get of an attribute value.
public synchronized  voidinitialize(Object nvalues)
     Initialization method for attribute holders. Each time an attribute holder get restored, its initialize method gets called.
public synchronized  voidinitialize(Hashtable defs)
     Initialization method for attribute holders.
public  intlookupAttribute(String name)
     Lookup up the index of an attribute in our attribute description.
Parameters:
  name - The name of the attribute to look for.
public synchronized  voidpickleValues(Hashtable defs)
     Set the values.
public  voidprint(PrintStream out)
     Debugging purposes only, print this attribute holder.
public  voidsetBoolean(int idx, boolean b)
    
public  voidsetChar(int idx, char ch)
    
public  voidsetDouble(int idx, double d)
    
public  voidsetFloat(int idx, float f)
    
public  voidsetInt(int idx, int i)
    
public  voidsetLong(int idx, long l)
    
public  voidsetString(int idx, String s)
    
public synchronized  voidsetValue(int idx, Object value)
     Set an attribute value. This method sets the value of some attribute of the resource.
public  voidsetValue(String name, Object value)
     Set an attribute value.
public  booleanunsafeDefinesAttribute(int idx)
     Does this resource has defined a value for the given attribute.
Parameters:
  idx - The index of the attribute to check.
public  doubleunsafeGetDouble(int idx, double def)
    
public  StringunsafeGetString(int idx, String def)
    
public  ObjectunsafeGetValue(int idx, Object def)
     Generic get of an attribute value. Retreive an attribute value from its index in the resource's attribute list. THIS VERSION IS NOT SYNCHRONIZED AND THEREFORE SHOULD BE USED ONLY WHEN YOU ARE SURE YOU SHOULD USE THIS, WHICH MEANS ALMOST NEVER!
Parameters:
  idx - The index of the attribute whose value is queried.
Parameters:
  def - The default value (if the attribute isn't defined).

Field Detail
attributes
protected Attribute attributes(Code)
Pointer to this class registered list of attributes.



values
protected Object values(Code)
Attribute values.




Constructor Detail
AttributeHolder
public AttributeHolder()(Code)
Create an attribute holder.




Method Detail
definesAttribute
public boolean definesAttribute(int idx) throws IllegalAttributeAccess(Code)
Does this resource has defined a value for the given attribute.
Parameters:
  idx - The index of the attribute to check. A boolean true if the resource has a valuefor this attribute, false otherwise.



definesAttribute
public boolean definesAttribute(String name) throws IllegalAttributeAccess(Code)
Does this resource has defined a value for the given attribute.
Parameters:
  name - The name of the attribute to check. A boolean true if the resource has a valuefor this attribute, false otherwise.



getAttributes
public Attribute[] getAttributes()(Code)
Get this attribute holders attributes description. The attribute list is guaranteed to be returned always in the same order, wich is fixed at compilation time. This allows for fast access to resource by their position rather than by name. An array of Attribute objects, each one containing thedescription of one single attribute of the resource.
See Also:   org.w3c.tools.resources.Attribute



getBoolean
public boolean getBoolean(int idx, boolean def)(Code)



getChar
public char getChar(int idx, char def)(Code)



getClone
public Object getClone(Object values)(Code)
Clone this attribute holder, and init it with the given attributes.
Parameters:
  values - Attribute values to overide in the clone. A clone of this resource.



getClone
public synchronized Object getClone()(Code)
Clone this attribute holder. The resulting clone will share the attribute values of the cloned attribute holder. An attribute holder sharing its ancestor attribute values.



getClone
public synchronized Object getClone(Hashtable defs)(Code)
Clone this AttributeHolder instance, and initialize it with defaults. This method first clones the receiving attribute holder, and then uses the defaults provided to finish the initialization.
Parameters:
  defs - The attribute values, in a Hashtable. The clone.



getDouble
public double getDouble(int idx, double def)(Code)



getFloat
public float getFloat(int idx, float def)(Code)



getInt
public int getInt(int idx, int def)(Code)



getLong
public long getLong(int idx, long def)(Code)



getString
public String getString(int idx, String def)(Code)



getValue
public synchronized Object getValue(int idx, Object def) throws IllegalAttributeAccess(Code)
Generic get of an attribute value. Retreive an attribute value from its index in the resource's attribute list.
Parameters:
  idx - The index of the attribute whose value is queried.
Parameters:
  def - The default value (if the attribute isn't defined). An object, giving the attribute value, or the provideddefault if this attribute isn't currently define for the resource.
exception:
  IllegalAttributeAccess - if the given index doesn't match anyof the resource's attributes.



getValue
public Object getValue(String name, Object def) throws IllegalAttributeAccess(Code)
Generic get of an attribute value. Get the method of an attribute, by name.
Parameters:
  name - The name of the queried attribute.
Parameters:
  def - The default value.
exception:
  IllegalAttributeAccess - if the given name doesn't match anyof the attribute's name.



initialize
public synchronized void initialize(Object nvalues)(Code)
Initialization method for attribute holders. Each time an attribute holder get restored, its initialize method gets called. The holder should initialize itself with the set of provided values and perform any additional startup code.
Parameters:
  values - The attribute values the holder should initialize from.



initialize
public synchronized void initialize(Hashtable defs)(Code)
Initialization method for attribute holders. This method allows to initialize an attribute holder by providing its attributes values through a Hashtable mapping attribute names to attribute values.
Parameters:
  defs - The Hashtable containing the default values.



lookupAttribute
public int lookupAttribute(String name)(Code)
Lookup up the index of an attribute in our attribute description.
Parameters:
  name - The name of the attribute to look for. An integer, positive if found, negative otherwise.



pickleValues
public synchronized void pickleValues(Hashtable defs)(Code)
Set the values. (MUST be called before initialize).
Parameters:
  defs - The Hashtable containing the values.



print
public void print(PrintStream out)(Code)
Debugging purposes only, print this attribute holder.
Parameters:
  out - The print stream to print to.



setBoolean
public void setBoolean(int idx, boolean b)(Code)



setChar
public void setChar(int idx, char ch) throws IllegalAttributeAccess(Code)



setDouble
public void setDouble(int idx, double d) throws IllegalAttributeAccess(Code)



setFloat
public void setFloat(int idx, float f) throws IllegalAttributeAccess(Code)



setInt
public void setInt(int idx, int i) throws IllegalAttributeAccess(Code)



setLong
public void setLong(int idx, long l) throws IllegalAttributeAccess(Code)



setString
public void setString(int idx, String s) throws IllegalAttributeAccess(Code)



setValue
public synchronized void setValue(int idx, Object value)(Code)
Set an attribute value. This method sets the value of some attribute of the resource. It marks the resource as being modified, and alert its resource store (so that it knows it will have to save the object at some time in the future).
Parameters:
  idx - The attribute index, in the list of attributes advertized by the resource.
Parameters:
  value - The new value for this attribute.
exception:
  IllegalAttributeAccess - if the provided value doesn't match the attribute expected type.



setValue
public void setValue(String name, Object value)(Code)
Set an attribute value. This method sets the value of an attribute, referenced by its name.
Parameters:
  name - The attribute name.
Parameters:
  value - The new value for the attribute.
exception:
  IllegalAttributeAccess - if the provided value doesn't matchthe attribute expected type.



unsafeDefinesAttribute
public boolean unsafeDefinesAttribute(int idx) throws IllegalAttributeAccess(Code)
Does this resource has defined a value for the given attribute.
Parameters:
  idx - The index of the attribute to check. A boolean true if the resource has a valuefor this attribute, false otherwise.



unsafeGetDouble
public double unsafeGetDouble(int idx, double def)(Code)



unsafeGetString
public String unsafeGetString(int idx, String def)(Code)



unsafeGetValue
public Object unsafeGetValue(int idx, Object def) throws IllegalAttributeAccess(Code)
Generic get of an attribute value. Retreive an attribute value from its index in the resource's attribute list. THIS VERSION IS NOT SYNCHRONIZED AND THEREFORE SHOULD BE USED ONLY WHEN YOU ARE SURE YOU SHOULD USE THIS, WHICH MEANS ALMOST NEVER!
Parameters:
  idx - The index of the attribute whose value is queried.
Parameters:
  def - The default value (if the attribute isn't defined). An object, giving the attribute value, or the provideddefault if this attribute isn't currently define for the resource.
exception:
  IllegalAttributeAccess - if the given index doesn't match anyof the resource's attributes.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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