public abstract class AbstractObjectWriterHandler extends java.lang.Object implements IObjectWriterHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
flattening
The flattening flag for tags, i.e.
|
protected boolean |
gentypetags
Control flag for generating container tags.
|
protected boolean |
prefertags
Flag indicating if writing tags should be preferred wrt.
|
protected TypeInfoTypeManager |
titmanager
The type info manager.
|
Constructor and Description |
---|
AbstractObjectWriterHandler(boolean gentypetags,
boolean prefertags,
boolean flattening,
java.util.Set typeinfos)
Create a new writer handler.
|
Modifier and Type | Method and Description |
---|---|
protected QName[] |
createPath(QName[] xmlpath,
java.lang.Object value,
IContext context)
Create a qname path.
|
protected java.lang.Object |
getDefaultValue(java.lang.Object property)
Get the default value.
|
abstract java.lang.Object |
getObjectType(java.lang.Object object,
IContext context)
Get the object type
|
WriteObjectInfo |
getObjectWriteInfo(java.lang.Object object,
TypeInfo typeinfo,
IContext context)
Get write info for an object.
|
IPreProcessor[] |
getPreProcessors(java.lang.Object object,
java.lang.Object typeinfo)
Get the pre-processors.
|
protected abstract java.util.Collection |
getProperties(java.lang.Object object,
IContext context,
boolean includemethods,
boolean includefields)
Get the properties of an object.
|
protected abstract java.lang.Object |
getProperty(java.lang.Object info)
Get the property.
|
protected abstract java.lang.String |
getPropertyName(java.lang.Object property)
Get the name of a property.
|
TypeInfo |
getTypeInfo(java.lang.Object object,
QName[] fullpath,
IContext context)
Get the most specific mapping info.
|
TypeInfoTypeManager |
getTypeInfoManager()
Get the titmanager.
|
protected abstract java.lang.Object |
getValue(java.lang.Object object,
java.lang.Object attr,
IContext context,
java.lang.Object info)
Get a value from an object.
|
protected abstract boolean |
isBasicType(java.lang.Object property,
java.lang.Object value)
Test is a value is a basic type (and can be mapped to an attribute).
|
protected abstract boolean |
isDecodableToSameType(java.lang.Object property,
java.lang.Object value,
IContext context)
Test if a value is decodable to the same type.
|
protected abstract boolean |
isTypeCompatible(java.lang.Object object,
ObjectInfo info,
IContext context)
Test if a value is compatible with the defined typeinfo.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTagName, getTagWithPrefix
protected boolean gentypetags
protected boolean prefertags
protected boolean flattening
protected TypeInfoTypeManager titmanager
public AbstractObjectWriterHandler(boolean gentypetags, boolean prefertags, boolean flattening, java.util.Set typeinfos)
public TypeInfo getTypeInfo(java.lang.Object object, QName[] fullpath, IContext context)
getTypeInfo
in interface IObjectWriterHandler
type
- The type.fullpath
- The full path.public TypeInfoTypeManager getTypeInfoManager()
public abstract java.lang.Object getObjectType(java.lang.Object object, IContext context)
object
- The object.public WriteObjectInfo getObjectWriteInfo(java.lang.Object object, TypeInfo typeinfo, IContext context) throws java.lang.Exception
getObjectWriteInfo
in interface IObjectWriterHandler
object
- The object.typeinfo
- The Typeinfo.java.lang.Exception
protected QName[] createPath(QName[] xmlpath, java.lang.Object value, IContext context)
protected java.lang.Object getDefaultValue(java.lang.Object property)
public IPreProcessor[] getPreProcessors(java.lang.Object object, java.lang.Object typeinfo)
getPreProcessors
in interface IObjectWriterHandler
protected abstract java.lang.Object getValue(java.lang.Object object, java.lang.Object attr, IContext context, java.lang.Object info) throws java.lang.Exception
java.lang.Exception
protected abstract java.lang.Object getProperty(java.lang.Object info)
protected abstract java.lang.String getPropertyName(java.lang.Object property)
protected abstract java.util.Collection getProperties(java.lang.Object object, IContext context, boolean includemethods, boolean includefields)
protected abstract boolean isBasicType(java.lang.Object property, java.lang.Object value)
protected abstract boolean isTypeCompatible(java.lang.Object object, ObjectInfo info, IContext context)
protected abstract boolean isDecodableToSameType(java.lang.Object property, java.lang.Object value, IContext context)