Package org.apache.cxf.aegis.type.basic
Class BeanTypeInfo
- java.lang.Object
-
- org.apache.cxf.aegis.type.basic.BeanTypeInfo
-
- Direct Known Subclasses:
AnnotatedTypeInfo,XMLBeanTypeInfo
public class BeanTypeInfo extends Object
-
-
Constructor Summary
Constructors Constructor Description BeanTypeInfo(Class<?> typeClass, String defaultNamespace)BeanTypeInfo(Class<?> typeClass, String defaultNamespace, boolean initialize)Create a BeanTypeInfo class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected QNamecreateMappedName(PropertyDescriptor desc, boolean qualified)Specifies the name of the property as it shows up in the xml schema.List<QName>getAttributes()StringgetDefaultNamespace()List<QName>getElements()intgetMaxOccurs(QName name)Return the maxOccurs value.longgetMinOccurs()intgetMinOccurs(QName name)Return the minOccurs value.protected PropertyDescriptorgetPropertyDescriptor(String name)PropertyDescriptorgetPropertyDescriptorFromMappedName(QName name)protected PropertyDescriptor[]getPropertyDescriptors()AegisTypegetType(QName name)Get the type class for the field with the specified QName.protected Class<?>getTypeClass()TypeMappinggetTypeMapping()voidinitialize()protected booleanisAttribute(PropertyDescriptor desc)protected booleanisElement(PropertyDescriptor desc)booleanisExtensibleAttributes()booleanisExtensibleElements()booleanisExtension()booleanisMapped(PropertyDescriptor pd)booleanisNillable(QName name)Nillable is only allowed if the actual property is NullablebooleanisQualifyAttributes()booleanisQualifyElements()protected booleanisSerializable(PropertyDescriptor desc)voidmapAttribute(String property, QName mappedName)voidmapElement(String property, QName mappedName)protected voidmapProperty(PropertyDescriptor pd)voidmapType(QName name, AegisType type)voidmapTypeName(QName mappedName, QName type)Specifies the SchemaType for a particular class.protected booleanregisterType(PropertyDescriptor desc)voidsetDefaultMinOccurs(int m)voidsetDefaultNillable(boolean n)voidsetExtensibleAttributes(boolean extensibleAttributes)voidsetExtensibleElements(boolean futureProof)voidsetExtension(boolean extension)voidsetQualifyAttributes(boolean qualifyAttributes)voidsetQualifyElements(boolean qualifyElements)voidsetTypeMapping(TypeMapping typeMapping)
-
-
-
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)
-
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 returnspropertyDescriptor.getName();- Parameters:
desc-- Returns:
-
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)
-
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.
-
-