org.exolab.castor.xml.util
public class XMLFieldDescriptorImpl extends AbstractFieldDescriptor implements XMLFieldDescriptor
Version: $Revision: 6230 $ $Date: 2006-04-13 06:47:36 -0600 (Thu, 13 Apr 2006) $
Field Summary | |
---|---|
boolean | _isReference True if the field is a reference to another Object in the hierarchy. |
Constructor Summary | |
---|---|
XMLFieldDescriptorImpl(Class fieldType, String fieldName, String xmlName, NodeType nodeType) | |
XMLFieldDescriptorImpl(FieldDescriptor fieldDesc, String xmlName, NodeType nodeType, NodeType primitiveNodeType)
Construct a new field descriptor for the specified field. |
Method Summary | |
---|---|
boolean | equals(Object obj)
Returns true if two XMLFieldDescriptors should be treated as
equal. |
int | getConstructorArgumentIndex() |
String | getLocationPath() |
String | getNameSpacePrefix() |
String | getNameSpaceURI() |
NodeType | getNodeType() |
String | getProperty(String propertyName) |
String | getQNamePrefix()
Returns the prefix used in case the value of the field described by this
descriptor is of type QName. |
String | getSchemaType() |
FieldValidator | getValidator() |
String | getXMLName() |
int | hashCode()
Returns the hashCode for this XMLFieldDescriptor |
boolean | isConstructorArgument() |
boolean | isContainer() |
boolean | isIncremental() |
boolean | isMapped() |
boolean | isNillable() |
boolean | isReference() |
boolean | matches(String xmlName) |
boolean | matches(String xmlName, String namespace) |
void | setConstructorArgumentIndex(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. |
void | setContainer(boolean isContainer)
Set if the field is a container field or not.
|
void | setIncremental(boolean incremental)
Sets the incremental flag which indicates whether this member
can be added before the unmarshaller is finished unmarshalling it.
|
void | setLocationPath(String path)
Sets the location path for the field being described.
|
void | setMapped(boolean mapped)
Sets whether or not this field has been mapped in a Map or Hashtable.
|
void | setMatches(String matchExpr)
This is a space separated list of xml names that this Field descriptor matches.
|
void | setNameSpacePrefix(String nsPrefix)
Sets the namespace prefix used when marshalling as XML.
|
void | setNameSpaceURI(String nsURI)
Sets the namespace URI used when marshalling and unmarshalling as XML.
|
void | setNillable(boolean nillable)
Sets whether or not the described field is allowed to be nil. |
void | setNodeType(NodeType nodeType)
Sets the XML node type for the described field.
|
void | setProperty(String propertyName, String value)
Sets the value property with the given name.
|
void | setQNamePrefix(String qNamePrefix)
Sets the prefix used in case the value of the field described by this descriptor
is of type QName.
|
void | setReference(boolean isReference)
Sets the flag indicating that the field described by this descriptor is a
reference to another field in the object model.
|
void | setSchemaType(String schemaType)
Sets the type of the XML Schema type of the value for the field being described.
|
void | setUseParentsNamespace(boolean useParentsNamespace)
Sets whether or not the namespace for the parent "containing"
class should be used during marshalling/unmarshalling when
no specific namespace URI has been set for this field. |
void | setValidator(FieldValidator validator) |
void | setXMLName(String xmlName)
Sets the xml name for the described field.
|
String | toString() |
Parameters: fieldDesc The field descriptor xmlName The XML name of the field nodeType The node type of this field
Throws: MappingException Invalid mapping information
Returns: true if two XMLFieldDescriptors should be treated as equal.
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
Returns: the prefix used in the QName value.
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
Returns: the hashCode for this XMLFieldDescriptor
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
Parameters: index the index within the argument array. A value less than zero indicates that this field should not be part of the constructor arguments.
Parameters: isContainer a boolean indicating whether or not the field is a container field.
Parameters: incremental the boolean which if true indicated that this member can safely be added before the unmarshaller is finished unmarshalling it.
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
Parameters: mapped a boolean that when true indicates this field is a Hashtable or Map.
Parameters: matchExpr the space separated list of xml names, matched by this descriptor.
Parameters: nsPrefix The namespace prefix used when marshalling the "described" object.
Parameters: nsURI The namespace URI used when marshalling and unmarshalling the "described" Object.
Parameters: nillable a boolean indicating whether or not the described field may be nillable.
Parameters: nodeType the NodeType for the described field.
Parameters: propertyName The name of the property to set the value of. value The value of the property.
See Also: XMLFieldDescriptorImpl
Parameters: qNamePrefix
Parameters: isReference true if the field is a reference to another field.
Parameters: schemaType The value type.
Parameters: xmlName the XML name for the described field.