Java Doc for Attribute.java in  » Workflow-Engines » OpenWFE » org » jdom » 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 » Workflow Engines » OpenWFE » org.jdom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jdom.Attribute

Attribute
public class Attribute implements Serializable,Cloneable(Code)
An XML attribute. Methods allow the user to obtain the value of the attribute as well as namespace and type information.
version:
   $Revision: 1.1 $, $Date: 2005/04/27 09:32:37 $
author:
   Brett McLaughlin
author:
   Jason Hunter
author:
   Elliotte Rusty Harold
author:
   Wesley Biggs


Field Summary
final public static  intCDATA_TYPE
     Attribute type: the attribute value is a string.
final public static  intENTITIES_TYPE
    

Attribute type: the attribute value is a list of entity names.

final public static  intENTITY_TYPE
     Attribute type: the attribute value is the name of an entity.
final public static  intENUMERATED_TYPE
     Attribute type: the attribute value is a name token from an enumeration.
final public static  intIDREFS_TYPE
     Attribute type: the attribute value is a list of references to unique identifiers.
final public static  intIDREF_TYPE
     Attribute type: the attribute value is a reference to a unique identifier.
final public static  intID_TYPE
     Attribute type: the attribute value is a unique identifier.
final public static  intNMTOKENS_TYPE
     Attribute type: the attribute value is a list of name tokens.
final public static  intNMTOKEN_TYPE
     Attribute type: the attribute value is a name token.

According to SAX 2.0 specification, attributes of enumerated types should be reported as "NMTOKEN" by SAX parsers.

final public static  intNOTATION_TYPE
     Attribute type: the attribute value is the name of a notation.
final public static  intUNDECLARED_TYPE
     Attribute type: the attribute has not been declared or type is unknown.
protected  Stringname
    
protected transient  Namespacenamespace
    
protected  Objectparent
    
protected  inttype
    
protected  Stringvalue
    

Constructor Summary
protected  Attribute()
     Default, no-args constructor for implementations to use if needed.
public  Attribute(String name, String value, Namespace namespace)
     This will create a new Attribute with the specified (local) name and value, and in the provided Namespace .
Parameters:
  name - String name of Attribute.
Parameters:
  value - String value for new attribute.
Parameters:
  namespace - Namespace namespace for new attribute.
throws:
  IllegalNameException - if the given name is illegal as anattribute name or if if the new namespace is the defaultnamespace.
public  Attribute(String name, String value, int type, Namespace namespace)
     This will create a new Attribute with the specified (local) name, value, and type, and in the provided Namespace .
Parameters:
  name - String name of Attribute.
Parameters:
  value - String value for new attribute.
Parameters:
  type - int type for new attribute.
Parameters:
  namespace - Namespace namespace for new attribute.
throws:
  IllegalNameException - if the given name is illegal as anattribute name or if if the new namespace is the defaultnamespace.
public  Attribute(String name, String value)
     This will create a new Attribute with the specified (local) name and value, and does not place the attribute in a Namespace .
public  Attribute(String name, String value, int type)
     This will create a new Attribute with the specified (local) name, value and type, and does not place the attribute in a Namespace .

Method Summary
public  Objectclone()
     This will return a clone of this Attribute.
public  Attributedetach()
     This detaches the Attribute from its parent, or does nothing if the Attribute has no parent.
final public  booleanequals(Object ob)
     This tests for equality of this Attribute to the supplied Object.
Parameters:
  ob - Object to compare to.
public  intgetAttributeType()
     This will return the actual declared type of this Attribute.
public  booleangetBooleanValue()
     This gets the effective boolean value of the attribute, or throws a DataConversionException if a conversion can't be performed.
public  DocumentgetDocument()
     This retrieves the owning Document for this Attribute, or null if not a currently a member of a Document .
public  doublegetDoubleValue()
    
public  floatgetFloatValue()
    
public  intgetIntValue()
    
public  longgetLongValue()
    
public  StringgetName()
     This will retrieve the local name of the Attribute.
public  NamespacegetNamespace()
     This will return this Attribute's Namespace .
public  StringgetNamespacePrefix()
     This will retrieve the namespace prefix of the Attribute.
public  StringgetNamespaceURI()
     This returns the URI mapped to this Attribute's prefix.
public  ElementgetParent()
     This will return the parent of this Attribute.
public  StringgetQualifiedName()
     This will retrieve the qualified name of the Attribute. For any XML attribute whose name is [namespacePrefix]:[elementName], the qualified name of the attribute would be everything (both namespace prefix and element name).
public  StringgetValue()
     This will return the actual textual value of this Attribute.
final public  inthashCode()
     This returns the hash code for this Attribute.
public  AttributesetAttributeType(int type)
     This will set the type of the Attribute.
Parameters:
  type - int type for the attribute.
public  AttributesetName(String name)
     This sets the local name of the Attribute.
public  AttributesetNamespace(Namespace namespace)
     This sets this Attribute's Namespace . If the provided namespace is null, the attribute will have no namespace. The namespace must have a prefix.
Parameters:
  namespace - the new namespace Element - the element modified.
throws:
  IllegalNameException - if the new namespace is the defaultnamespace.
protected  AttributesetParent(Element parent)
     This will set the parent of this Attribute.
Parameters:
  parent - Element to be new parent.
public  AttributesetValue(String value)
     This will set the value of the Attribute.
Parameters:
  value - String value for the attribute.
public  StringtoString()
     This returns a String representation of the Attribute, suitable for debugging.

Field Detail
CDATA_TYPE
final public static int CDATA_TYPE(Code)
Attribute type: the attribute value is a string.
See Also:   Attribute.getAttributeType



ENTITIES_TYPE
final public static int ENTITIES_TYPE(Code)

Attribute type: the attribute value is a list of entity names.


See Also:   Attribute.getAttributeType



ENTITY_TYPE
final public static int ENTITY_TYPE(Code)
Attribute type: the attribute value is the name of an entity.
See Also:   Attribute.getAttributeType



ENUMERATED_TYPE
final public static int ENUMERATED_TYPE(Code)
Attribute type: the attribute value is a name token from an enumeration.
See Also:   Attribute.getAttributeType



IDREFS_TYPE
final public static int IDREFS_TYPE(Code)
Attribute type: the attribute value is a list of references to unique identifiers.
See Also:   Attribute.getAttributeType



IDREF_TYPE
final public static int IDREF_TYPE(Code)
Attribute type: the attribute value is a reference to a unique identifier.
See Also:   Attribute.getAttributeType



ID_TYPE
final public static int ID_TYPE(Code)
Attribute type: the attribute value is a unique identifier.
See Also:   Attribute.getAttributeType



NMTOKENS_TYPE
final public static int NMTOKENS_TYPE(Code)
Attribute type: the attribute value is a list of name tokens.
See Also:   Attribute.getAttributeType



NMTOKEN_TYPE
final public static int NMTOKEN_TYPE(Code)
Attribute type: the attribute value is a name token.

According to SAX 2.0 specification, attributes of enumerated types should be reported as "NMTOKEN" by SAX parsers. But the major parsers (Xerces and Crimson) provide specific values that permit to recognize them as Attribute.ENUMERATED_TYPE .
See Also:   Attribute.getAttributeType




NOTATION_TYPE
final public static int NOTATION_TYPE(Code)
Attribute type: the attribute value is the name of a notation.
See Also:   Attribute.getAttributeType



UNDECLARED_TYPE
final public static int UNDECLARED_TYPE(Code)
Attribute type: the attribute has not been declared or type is unknown.
See Also:   Attribute.getAttributeType



name
protected String name(Code)
The local name of the Attribute



namespace
protected transient Namespace namespace(Code)
The Namespace of the Attribute



parent
protected Object parent(Code)
Parent element, or null if none



type
protected int type(Code)
The type of the Attribute



value
protected String value(Code)
The value of the Attribute




Constructor Detail
Attribute
protected Attribute()(Code)
Default, no-args constructor for implementations to use if needed.



Attribute
public Attribute(String name, String value, Namespace namespace)(Code)
This will create a new Attribute with the specified (local) name and value, and in the provided Namespace .
Parameters:
  name - String name of Attribute.
Parameters:
  value - String value for new attribute.
Parameters:
  namespace - Namespace namespace for new attribute.
throws:
  IllegalNameException - if the given name is illegal as anattribute name or if if the new namespace is the defaultnamespace. Attributes cannot be in a default namespace.
throws:
  IllegalDataException - if the given attribute value isillegal character data (as determined byorg.jdom.Verifier.checkCharacterData).



Attribute
public Attribute(String name, String value, int type, Namespace namespace)(Code)
This will create a new Attribute with the specified (local) name, value, and type, and in the provided Namespace .
Parameters:
  name - String name of Attribute.
Parameters:
  value - String value for new attribute.
Parameters:
  type - int type for new attribute.
Parameters:
  namespace - Namespace namespace for new attribute.
throws:
  IllegalNameException - if the given name is illegal as anattribute name or if if the new namespace is the defaultnamespace. Attributes cannot be in a default namespace.
throws:
  IllegalDataException - if the given attribute value isillegal character data (as determined byorg.jdom.Verifier.checkCharacterData) orif the given attribute type is not one of thesupported types.



Attribute
public Attribute(String name, String value)(Code)
This will create a new Attribute with the specified (local) name and value, and does not place the attribute in a Namespace .

Note: This actually explicitly puts the Attribute in the "empty" Namespace ( Namespace.NO_NAMESPACE ).
Parameters:
  name - String name of Attribute.
Parameters:
  value - String value for new attribute.
throws:
  IllegalNameException - if the given name is illegal as anattribute name.
throws:
  IllegalDataException - if the given attribute value isillegal character data (as determined byorg.jdom.Verifier.checkCharacterData).




Attribute
public Attribute(String name, String value, int type)(Code)
This will create a new Attribute with the specified (local) name, value and type, and does not place the attribute in a Namespace .

Note: This actually explicitly puts the Attribute in the "empty" Namespace ( Namespace.NO_NAMESPACE ).
Parameters:
  name - String name of Attribute.
Parameters:
  value - String value for new attribute.
Parameters:
  type - int type for new attribute.
throws:
  IllegalNameException - if the given name is illegal as anattribute name.
throws:
  IllegalDataException - if the given attribute value isillegal character data (as determined byorg.jdom.Verifier.checkCharacterData) orif the given attribute type is not one of thesupported types.





Method Detail
clone
public Object clone()(Code)
This will return a clone of this Attribute. Object - clone of this Attribute.



detach
public Attribute detach()(Code)
This detaches the Attribute from its parent, or does nothing if the Attribute has no parent. Attribute - this Attribute modified.



equals
final public boolean equals(Object ob)(Code)
This tests for equality of this Attribute to the supplied Object.
Parameters:
  ob - Object to compare to. boolean - whether the Attribute isequal to the supplied Object.



getAttributeType
public int getAttributeType()(Code)
This will return the actual declared type of this Attribute. int - type for this attribute.



getBooleanValue
public boolean getBooleanValue() throws DataConversionException(Code)
This gets the effective boolean value of the attribute, or throws a DataConversionException if a conversion can't be performed. True values are: "true", "on", "1", and "yes". False values are: "false", "off", "0", and "no". Values are trimmed before comparison. Values other than those listed here throw the exception. boolean value of attribute.
throws:
  DataConversionException - when conversion fails.



getDocument
public Document getDocument()(Code)
This retrieves the owning Document for this Attribute, or null if not a currently a member of a Document . Document owning this Attribute, or null.



getDoubleValue
public double getDoubleValue() throws DataConversionException(Code)
This gets the value of the attribute, in double form, and if no conversion can occur, throws a DataConversionException double value of attribute.
throws:
  DataConversionException - when conversion fails.



getFloatValue
public float getFloatValue() throws DataConversionException(Code)
This gets the value of the attribute, in float form, and if no conversion can occur, throws a DataConversionException float value of attribute.
throws:
  DataConversionException - when conversion fails.



getIntValue
public int getIntValue() throws DataConversionException(Code)
This gets the value of the attribute, in int form, and if no conversion can occur, throws a DataConversionException int value of attribute.
throws:
  DataConversionException - when conversion fails.



getLongValue
public long getLongValue() throws DataConversionException(Code)
This gets the value of the attribute, in long form, and if no conversion can occur, throws a DataConversionException long value of attribute.
throws:
  DataConversionException - when conversion fails.



getName
public String getName()(Code)
This will retrieve the local name of the Attribute. For any XML attribute which appears as [namespacePrefix]:[attributeName], the local name of the attribute would be [attributeName]. When the attribute has no namespace, the local name is simply the attribute name.

To obtain the namespace prefix for this attribute, the Attribute.getNamespacePrefix() method should be used. String - name of this attribute,without any namespace prefix.




getNamespace
public Namespace getNamespace()(Code)
This will return this Attribute's Namespace . Namespace - Namespace object for this Attribute



getNamespacePrefix
public String getNamespacePrefix()(Code)
This will retrieve the namespace prefix of the Attribute. For any XML attribute which appears as [namespacePrefix]:[attributeName], the namespace prefix of the attribute would be [namespacePrefix]. When the attribute has no namespace, an empty String is returned. String - namespace prefix of thisattribute.



getNamespaceURI
public String getNamespaceURI()(Code)
This returns the URI mapped to this Attribute's prefix. If no mapping is found, an empty String is returned. String - namespace URI for this Attribute.



getParent
public Element getParent()(Code)
This will return the parent of this Attribute. If there is no parent, then this returns null. parent of this Attribute



getQualifiedName
public String getQualifiedName()(Code)
This will retrieve the qualified name of the Attribute. For any XML attribute whose name is [namespacePrefix]:[elementName], the qualified name of the attribute would be everything (both namespace prefix and element name). When the attribute has no namespace, the qualified name is simply the attribute's local name.

To obtain the local name of the attribute, the Attribute.getName() method should be used.

To obtain the namespace prefix for this attribute, the Attribute.getNamespacePrefix() method should be used. String - full name for this element.




getValue
public String getValue()(Code)
This will return the actual textual value of this Attribute. This will include all text within the quotation marks. String - value for this attribute.



hashCode
final public int hashCode()(Code)
This returns the hash code for this Attribute. int - hash code.



setAttributeType
public Attribute setAttributeType(int type)(Code)
This will set the type of the Attribute.
Parameters:
  type - int type for the attribute. Attribute - this Attribute modified.
throws:
  IllegalDataException - if the given attribute type isnot one of the supported types.



setName
public Attribute setName(String name)(Code)
This sets the local name of the Attribute.
Parameters:
  name - the new local name to set Attribute - the attribute modified.
throws:
  IllegalNameException - if the given name is illegal as anattribute name.



setNamespace
public Attribute setNamespace(Namespace namespace)(Code)
This sets this Attribute's Namespace . If the provided namespace is null, the attribute will have no namespace. The namespace must have a prefix.
Parameters:
  namespace - the new namespace Element - the element modified.
throws:
  IllegalNameException - if the new namespace is the defaultnamespace. Attributes cannot be in a default namespace.



setParent
protected Attribute setParent(Element parent)(Code)
This will set the parent of this Attribute.
Parameters:
  parent - Element to be new parent. this Attribute modified.



setValue
public Attribute setValue(String value)(Code)
This will set the value of the Attribute.
Parameters:
  value - String value for the attribute. Attribute - this Attribute modified.
throws:
  IllegalDataException - if the given attribute value isillegal character data (as determined byorg.jdom.Verifier.checkCharacterData).



toString
public String toString()(Code)
This returns a String representation of the Attribute, suitable for debugging. String - information about theAttribute



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.