Java Doc for XMLFieldDescriptorImpl.java in  » Database-ORM » castor » org » exolab » castor » xml » util » 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 » Database ORM » castor » org.exolab.castor.xml.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.exolab.castor.mapping.loader.AbstractFieldDescriptor
      org.exolab.castor.xml.util.XMLFieldDescriptorImpl

All known Subclasses:   org.exolab.castor.xml.util.XMLContainerElementFieldDescriptor,
XMLFieldDescriptorImpl
public class XMLFieldDescriptorImpl extends AbstractFieldDescriptor implements XMLFieldDescriptor(Code)
XML field descriptor. Wraps FieldDescriptor and adds XML-related information, type conversion, etc.

Note: When using a GeneralizedFieldHandler the getFieldType() methods of handler and descriptor need to return the same result.
author:
   Keith Visco
author:
   Ralf Joachim
version:
   $Revision: 6907 $ $Date: 2006-04-13 06:47:36 -0600 (Thu, 13 Apr 2006) $



Field Summary
public  boolean_isReference
     True if the field is a reference to another Object in the hierarchy.

Constructor Summary
public  XMLFieldDescriptorImpl(Class fieldType, String fieldName, String xmlName, NodeType nodeType)
    
public  XMLFieldDescriptorImpl(FieldDescriptor fieldDesc, String xmlName, NodeType nodeType, NodeType primitiveNodeType)
     Construct a new field descriptor for the specified field.

Method Summary
public  booleanequals(Object obj)
     Returns true if two XMLFieldDescriptors should be treated as equal.
public  intgetConstructorArgumentIndex()
    
public  StringgetLocationPath()
    
public  StringgetNameSpacePrefix()
    
public  StringgetNameSpaceURI()
    
public  NodeTypegetNodeType()
    
public  StringgetProperty(String propertyName)
    
public  StringgetQNamePrefix()
     Returns the prefix used in case the value of the field described by this descriptor is of type QName.
public  StringgetSchemaType()
    
public  ListgetSubstitutes()
     Returns the possible substitution groups for this class.
public  FieldValidatorgetValidator()
    
public  StringgetXMLName()
    
public  inthashCode()
    
public  booleanisConstructorArgument()
    
public  booleanisContainer()
    
public  booleanisIncremental()
    
public  booleanisMapped()
    
public  booleanisNillable()
    
public  booleanisReference()
    
public  booleanmatches(String xmlName)
    
public  booleanmatches(String xmlName, String namespace)
    
public  voidsetConstructorArgumentIndex(int index)
     Sets whether or not the value of the field represented by this FieldDescriptor should be set via the constructor of the containing ClassDescriptor.
public  voidsetContainer(boolean isContainer)
     Set if the field is a container field or not.
public  voidsetIncremental(boolean incremental)
     Sets the incremental flag which indicates whether this member can be added before the unmarshaler is finished unmarshaling it.
public  voidsetLocationPath(String path)
     Sets the location path for the field being described.

In most cases, this isn't needed.

public  voidsetMapped(boolean mapped)
     Sets whether or not this field has been mapped in a Map or Hashtable.
public  voidsetMatches(String matchExpr)
     This is a space separated list of xml names that this Field descriptor matches.
public  voidsetNameSpacePrefix(String nsPrefix)
     Sets the namespace prefix used when marshaling as XML.
public  voidsetNameSpaceURI(String nsURI)
     Sets the namespace URI used when marshaling and unmarshaling as XML.
public  voidsetNillable(boolean nillable)
     Sets whether or not the described field is allowed to be nil.
public  voidsetNodeType(NodeType nodeType)
     Sets the XML node type for the described field.
public  voidsetProperty(String propertyName, String value)
     Sets the value property with the given name.
public  voidsetQNamePrefix(String qNamePrefix)
     Sets the prefix used in case the value of the field described by this descriptor is of type QName.
public  voidsetReference(boolean isReference)
     Sets the flag indicating that the field described by this descriptor is a reference to another field in the object model.
public  voidsetSchemaType(String schemaType)
     Sets the type of the XML Schema type of the value for the field being described.
public  voidsetSubstitutes(List substitutes)
     Sets the possible substitution groups for this class.
public  voidsetUseParentsNamespace(boolean useParentsNamespace)
     Sets whether or not the namespace for the parent "containing" class should be used during marshaling/unmarshaling when no specific namespace URI has been set for this field.
public  voidsetValidator(FieldValidator validator)
    
public  voidsetXMLName(String xmlName)
     Sets the xml name for the described field.
public  StringtoString()
    

Field Detail
_isReference
public boolean _isReference(Code)
True if the field is a reference to another Object in the hierarchy.




Constructor Detail
XMLFieldDescriptorImpl
public XMLFieldDescriptorImpl(Class fieldType, String fieldName, String xmlName, NodeType nodeType)(Code)



XMLFieldDescriptorImpl
public XMLFieldDescriptorImpl(FieldDescriptor fieldDesc, String xmlName, NodeType nodeType, NodeType primitiveNodeType) throws MappingException(Code)
Construct a new field descriptor for the specified field. This is an XML field descriptor wrapping a field descriptor and adding XML related properties and methods.
Parameters:
  fieldDesc - The field descriptor
Parameters:
  xmlName - The XML name of the field
Parameters:
  nodeType - The node type of this field
Parameters:
  primitiveNodeType -
throws:
  MappingException - Invalid mapping information




Method Detail
equals
public boolean equals(Object obj)(Code)
Returns true if two XMLFieldDescriptors should be treated as equal. Any XMLFieldDescriptor that handles the same field is considered equal.
Parameters:
  obj - The object to compare to this true if two XMLFieldDescriptors should be treated as equal.



getConstructorArgumentIndex
public int getConstructorArgumentIndex()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getConstructorArgumentIndex



getLocationPath
public String getLocationPath()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getLocationPath



getNameSpacePrefix
public String getNameSpacePrefix()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getNameSpacePrefix



getNameSpaceURI
public String getNameSpaceURI()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getNameSpaceURI



getNodeType
public NodeType getNodeType()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getNodeType



getProperty
public String getProperty(String propertyName)(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getProperty(java.lang.String)



getQNamePrefix
public String getQNamePrefix()(Code)
Returns the prefix used in case the value of the field described by this descriptor is of type QName. This is helpful for the marshaler but not mandatory. the prefix used in the QName value.



getSchemaType
public String getSchemaType()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getSchemaType



getSubstitutes
public List getSubstitutes()(Code)
Returns the possible substitution groups for this class. the possible substitution groups for this class.



getValidator
public FieldValidator getValidator()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getValidator



getXMLName
public String getXMLName()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.getXMLName



hashCode
public int hashCode()(Code)
Returns the hashCode for this XMLFieldDescriptor the hashCode for this XMLFieldDescriptor



isConstructorArgument
public boolean isConstructorArgument()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.isConstructorArgument



isContainer
public boolean isContainer()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.isContainer



isIncremental
public boolean isIncremental()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.isIncremental



isMapped
public boolean isMapped()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.isMapped



isNillable
public boolean isNillable()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.isNillable



isReference
public boolean isReference()(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.isReference



matches
public boolean matches(String xmlName)(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.matches(java.lang.String)



matches
public boolean matches(String xmlName, String namespace)(Code)

See Also:   org.exolab.castor.xml.XMLFieldDescriptor.matches(java.lang.Stringjava.lang.String)



setConstructorArgumentIndex
public void setConstructorArgumentIndex(int index)(Code)
Sets whether or not the value of the field represented by this FieldDescriptor should be set via the constructor of the containing ClassDescriptor. The index value greater than 0 specifies the index within the argument array that the value of this field should be.

Note: This only applies to attribute mapped fields at this time.
Parameters:
  index - the index within the argument array. A value less than zeroindicates that this field should not be part of the constructorarguments.




setContainer
public void setContainer(boolean isContainer)(Code)
Set if the field is a container field or not.
Parameters:
  isContainer - a boolean indicating whether or not the field is acontainer field.



setIncremental
public void setIncremental(boolean incremental)(Code)
Sets the incremental flag which indicates whether this member can be added before the unmarshaler is finished unmarshaling it.
Parameters:
  incremental - the boolean which if true indicated that this membercan safely be added before the unmarshaler is finishedunmarshaling it.



setLocationPath
public void setLocationPath(String path)(Code)
Sets the location path for the field being described.

In most cases, this isn't needed. However sometimes a field may be mapped to a nested element. In which case the value of the location path should be the nested element name. If more than one level of nesting is needed each nested element name should be separated by a path separator (forward slash '/').

The location path name is "relative" to the parent Class. The name of the parent should not be included in the path.

For example, give the following two classes: class Root { Bar bar; } class Bar { String value; } And the following XML: <root> <foo> <bar> value of bar </bar> </foo> </root> Since foo has no associated class, the path for 'bar' would be: "foo"
Parameters:
  path - the "relative" location path for the field.
See Also:   XMLFieldDescriptorImpl.getLocationPath




setMapped
public void setMapped(boolean mapped)(Code)
Sets whether or not this field has been mapped in a Map or Hashtable.
Parameters:
  mapped - a boolean that when true indicates this field is aHashtable or Map.



setMatches
public void setMatches(String matchExpr)(Code)
This is a space separated list of xml names that this Field descriptor matches. A '*' is wild.
Parameters:
  matchExpr - the space separated list of xml names, matched by thisdescriptor.



setNameSpacePrefix
public void setNameSpacePrefix(String nsPrefix)(Code)
Sets the namespace prefix used when marshaling as XML.
Parameters:
  nsPrefix - The namespace prefix used when marshaling the"described" object.



setNameSpaceURI
public void setNameSpaceURI(String nsURI)(Code)
Sets the namespace URI used when marshaling and unmarshaling as XML.
Parameters:
  nsURI - The namespace URI used when marshaling and unmarshaling the"described" Object.



setNillable
public void setNillable(boolean nillable)(Code)
Sets whether or not the described field is allowed to be nil. A nillable field can have empty content (text or element content), but may have attribute values, and still be considered value, even if the child elements are required.
Parameters:
  nillable - a boolean indicating whether or not the described fieldmay be nillable.



setNodeType
public void setNodeType(NodeType nodeType)(Code)
Sets the XML node type for the described field.
Parameters:
  nodeType - the NodeType for the described field.



setProperty
public void setProperty(String propertyName, String value)(Code)
Sets the value property with the given name.
Parameters:
  propertyName - The name of the property to set the value of.
Parameters:
  value - The value of the property.
See Also:   XMLFieldDescriptorImpl.getProperty



setQNamePrefix
public void setQNamePrefix(String qNamePrefix)(Code)
Sets the prefix used in case the value of the field described by this descriptor is of type QName.
Parameters:
  qNamePrefix -



setReference
public void setReference(boolean isReference)(Code)
Sets the flag indicating that the field described by this descriptor is a reference to another field in the object model.
Parameters:
  isReference - true if the field is a reference to another field.



setSchemaType
public void setSchemaType(String schemaType)(Code)
Sets the type of the XML Schema type of the value for the field being described.
Parameters:
  schemaType - The value type.



setSubstitutes
public void setSubstitutes(List substitutes)(Code)
Sets the possible substitution groups for this class.
Parameters:
  substitutes - Possible substitution groups for this class.



setUseParentsNamespace
public void setUseParentsNamespace(boolean useParentsNamespace)(Code)
Sets whether or not the namespace for the parent "containing" class should be used during marshaling/unmarshaling when no specific namespace URI has been set for this field.



setValidator
public void setValidator(FieldValidator validator)(Code)



setXMLName
public void setXMLName(String xmlName)(Code)
Sets the xml name for the described field.
Parameters:
  xmlName - the XML name for the described field.



toString
public String toString()(Code)



Methods inherited from org.exolab.castor.mapping.loader.AbstractFieldDescriptor
final public ClassDescriptor getClassDescriptor()(Code)(Java Doc)
final public ClassDescriptor getContainingClassDescriptor()(Code)(Java Doc)
final public String getFieldName()(Code)(Java Doc)
final public Class getFieldType()(Code)(Java Doc)
final public FieldHandler getHandler()(Code)(Java Doc)
final public boolean isIdentity()(Code)(Java Doc)
final public boolean isImmutable()(Code)(Java Doc)
final public boolean isMultivalued()(Code)(Java Doc)
final public boolean isRequired()(Code)(Java Doc)
final public boolean isTransient()(Code)(Java Doc)
final public void setClassDescriptor(ClassDescriptor classDescriptor)(Code)(Java Doc)
final public void setContainingClassDescriptor(ClassDescriptor parent)(Code)(Java Doc)
final public void setFieldName(String fieldName)(Code)(Java Doc)
final public void setFieldType(Class fieldType)(Code)(Java Doc)
final public void setHandler(FieldHandler handler)(Code)(Java Doc)
final public void setIdentity(boolean identity)(Code)(Java Doc)
final public void setImmutable(boolean immutable)(Code)(Java Doc)
final public void setMultivalued(boolean multivalued)(Code)(Java Doc)
final public void setRequired(boolean required)(Code)(Java Doc)
final public void setTransient(boolean isTransient)(Code)(Java Doc)

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.