Apache CXF API

org.apache.cxf.aegis.type.basic
Class BeanTypeInfo

java.lang.Object
  extended by org.apache.cxf.aegis.type.basic.BeanTypeInfo
Direct Known Subclasses:
AnnotatedTypeInfo, XMLBeanTypeInfo

public class BeanTypeInfo
extends Object


Constructor Summary
BeanTypeInfo(Class<?> typeClass, String defaultNamespace)
           
BeanTypeInfo(Class<?> typeClass, String defaultNamespace, boolean initialize)
          Create a BeanTypeInfo class.
 
Method Summary
protected  QName createMappedName(PropertyDescriptor desc, boolean qualified)
          Specifies the name of the property as it shows up in the xml schema.
 List<QName> getAttributes()
           
 String getDefaultNamespace()
           
 List<QName> getElements()
           
 int getMaxOccurs(QName name)
          Return the maxOccurs value.
 long getMinOccurs()
           
 int getMinOccurs(QName name)
          Return the minOccurs value.
protected  PropertyDescriptor getPropertyDescriptor(String name)
           
 PropertyDescriptor getPropertyDescriptorFromMappedName(QName name)
           
protected  PropertyDescriptor[] getPropertyDescriptors()
           
 AegisType getType(QName name)
          Get the type class for the field with the specified QName.
protected  Class<?> getTypeClass()
           
 TypeMapping getTypeMapping()
           
 void initialize()
           
protected  boolean isAttribute(PropertyDescriptor desc)
           
protected  boolean isElement(PropertyDescriptor desc)
           
 boolean isExtensibleAttributes()
           
 boolean isExtensibleElements()
           
 boolean isExtension()
           
 boolean isMapped(PropertyDescriptor pd)
           
 boolean isNillable(QName name)
          Nillable is only allowed if the actual property is Nullable
 boolean isQualifyAttributes()
           
 boolean isQualifyElements()
           
protected  boolean isSerializable(PropertyDescriptor desc)
           
 void mapAttribute(String property, QName mappedName)
           
 void mapElement(String property, QName mappedName)
           
protected  void mapProperty(PropertyDescriptor pd)
           
 void mapType(QName name, AegisType type)
           
 void mapTypeName(QName mappedName, QName type)
          Specifies the SchemaType for a particular class.
protected  boolean registerType(PropertyDescriptor desc)
           
 void setDefaultMinOccurs(int m)
           
 void setDefaultNillable(boolean n)
           
 void setExtensibleAttributes(boolean extensibleAttributes)
           
 void setExtensibleElements(boolean futureProof)
           
 void setExtension(boolean extension)
           
 void setQualifyAttributes(boolean qualifyAttributes)
           
 void setQualifyElements(boolean qualifyElements)
           
 void setTypeMapping(TypeMapping typeMapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanTypeInfo

public BeanTypeInfo(Class<?> typeClass,
                    String defaultNamespace)

BeanTypeInfo

public BeanTypeInfo(Class<?> typeClass,
                    String defaultNamespace,
                    boolean initialize)
Create a BeanTypeInfo class.

Parameters:
typeClass -
defaultNamespace -
initiallize - If true attempt default property/xml mappings.
Method Detail

getDefaultNamespace

public String getDefaultNamespace()

initialize

public void initialize()

isMapped

public boolean isMapped(PropertyDescriptor pd)

mapProperty

protected void mapProperty(PropertyDescriptor pd)

getPropertyDescriptors

protected PropertyDescriptor[] getPropertyDescriptors()

getPropertyDescriptor

protected PropertyDescriptor getPropertyDescriptor(String name)

getType

public AegisType getType(QName name)
Get the type class for the field with the specified QName.


registerType

protected boolean registerType(PropertyDescriptor desc)

mapType

public void mapType(QName name,
                    AegisType type)

getTypeMapping

public TypeMapping getTypeMapping()

setTypeMapping

public void setTypeMapping(TypeMapping typeMapping)

createMappedName

protected QName createMappedName(PropertyDescriptor desc,
                                 boolean qualified)
Specifies the name of the property as it shows up in the xml schema. This method just returns propertyDescriptor.getName();

Parameters:
desc -
Returns:

mapAttribute

public void mapAttribute(String property,
                         QName mappedName)

mapElement

public void mapElement(String property,
                       QName mappedName)

mapTypeName

public void mapTypeName(QName mappedName,
                        QName type)
Specifies the SchemaType for a particular class.

Parameters:
mappedName -
type -

getPropertyDescriptorFromMappedName

public PropertyDescriptor getPropertyDescriptorFromMappedName(QName name)

isAttribute

protected boolean isAttribute(PropertyDescriptor desc)

isElement

protected boolean isElement(PropertyDescriptor desc)

isSerializable

protected boolean isSerializable(PropertyDescriptor desc)

getTypeClass

protected Class<?> getTypeClass()

isNillable

public boolean isNillable(QName name)
Nillable is only allowed if the actual property is Nullable

Parameters:
name -
Returns:

getMinOccurs

public int getMinOccurs(QName name)
Return the minOccurs value. When there is no XML file or annotation (the situation if we are running from the base class here), there is no source for the minOccurs parameter except the default, which is supplied from the overall Aegis options.

Parameters:
name - Element QName
Returns:

getMaxOccurs

public int getMaxOccurs(QName name)
Return the maxOccurs value. When there is no XML file or annotation (the situation if we are in the base class here), there is no per-element source for this item, and the value is always 1.

Parameters:
name - Element QName
Returns:
1

getMinOccurs

public long getMinOccurs()

setDefaultMinOccurs

public void setDefaultMinOccurs(int m)

setDefaultNillable

public void setDefaultNillable(boolean n)

getAttributes

public List<QName> getAttributes()

getElements

public List<QName> getElements()

isExtensibleElements

public boolean isExtensibleElements()

setExtensibleElements

public void setExtensibleElements(boolean futureProof)

isExtensibleAttributes

public boolean isExtensibleAttributes()

setExtensibleAttributes

public void setExtensibleAttributes(boolean extensibleAttributes)

setExtension

public void setExtension(boolean extension)

isExtension

public boolean isExtension()

isQualifyAttributes

public boolean isQualifyAttributes()
Returns:
Returns the qualifyAttributes.

setQualifyAttributes

public void setQualifyAttributes(boolean qualifyAttributes)
Parameters:
qualifyAttributes - The qualifyAttributes to set.

isQualifyElements

public boolean isQualifyElements()
Returns:
Returns the qualifyElements.

setQualifyElements

public void setQualifyElements(boolean qualifyElements)
Parameters:
qualifyElements - The qualifyElements to set.

Apache CXF API

Apache CXF