Package jadex.xml.writer
Class AbstractObjectWriterHandler
- java.lang.Object
- 
- jadex.xml.writer.AbstractObjectWriterHandler
 
- 
- All Implemented Interfaces:
- IObjectWriterHandler
 - Direct Known Subclasses:
- BeanObjectWriterHandler,- OAVObjectWriterHandler
 
 public abstract class AbstractObjectWriterHandler extends java.lang.Object implements IObjectWriterHandler Abstract base class for an object writer handler. Is object type agnostic and uses several abstract methods that have to be overridden by concrete handlers.
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanflatteningThe flattening flag for tags, i.e.protected booleangentypetagsControl flag for generating container tags.protected booleanprefertagsFlag indicating if writing tags should be preferred wrt.protected TypeInfoTypeManagertitmanagerThe type info manager.
 - 
Constructor SummaryConstructors Constructor Description AbstractObjectWriterHandler(boolean gentypetags, boolean prefertags, boolean flattening, java.util.Set typeinfos)Create a new writer handler.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected QName[]createPath(QName[] xmlpath, java.lang.Object value, IContext context)Create a qname path.protected java.lang.ObjectgetDefaultValue(java.lang.Object property)Get the default value.abstract java.lang.ObjectgetObjectType(java.lang.Object object, IContext context)Get the object typeWriteObjectInfogetObjectWriteInfo(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.CollectiongetProperties(java.lang.Object object, IContext context, boolean includemethods, boolean includefields)Get the properties of an object.protected abstract java.lang.ObjectgetProperty(java.lang.Object info)Get the property.protected abstract java.lang.StringgetPropertyName(java.lang.Object property)Get the name of a property.TypeInfogetTypeInfo(java.lang.Object object, QName[] fullpath, IContext context)Get the most specific mapping info.TypeInfoTypeManagergetTypeInfoManager()Get the titmanager.protected abstract java.lang.ObjectgetValue(java.lang.Object object, java.lang.Object attr, IContext context, java.lang.Object info)Get a value from an object.protected abstract booleanisBasicType(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 booleanisDecodableToSameType(java.lang.Object property, java.lang.Object value, IContext context)Test if a value is decodable to the same type.protected abstract booleanisTypeCompatible(java.lang.Object object, ObjectInfo info, IContext context)Test if a value is compatible with the defined typeinfo.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jadex.xml.writer.IObjectWriterHandlergetTagName, getTagWithPrefix
 
- 
 
- 
- 
- 
Field Detail- 
gentypetagsprotected boolean gentypetags Control flag for generating container tags.
 - 
prefertagsprotected boolean prefertags Flag indicating if writing tags should be preferred wrt. attributes.
 - 
flatteningprotected boolean flattening The flattening flag for tags, i.e. generate always new containing tags or use one.
 - 
titmanagerprotected TypeInfoTypeManager titmanager The type info manager.
 
- 
 - 
Method Detail- 
getTypeInfopublic TypeInfo getTypeInfo(java.lang.Object object, QName[] fullpath, IContext context) Get the most specific mapping info.- Specified by:
- getTypeInfoin interface- IObjectWriterHandler
- Parameters:
- type- The type.
- fullpath- The full path.
- Returns:
- The most specific mapping info.
 
 - 
getTypeInfoManagerpublic TypeInfoTypeManager getTypeInfoManager() Get the titmanager.- Returns:
- The titmanager.
 
 - 
getObjectTypepublic abstract java.lang.Object getObjectType(java.lang.Object object, IContext context)Get the object type- Parameters:
- object- The object.
- Returns:
- The object type.
 
 - 
getObjectWriteInfopublic WriteObjectInfo getObjectWriteInfo(java.lang.Object object, TypeInfo typeinfo, IContext context) throws java.lang.Exception Get write info for an object.- Specified by:
- getObjectWriteInfoin interface- IObjectWriterHandler
- Parameters:
- object- The object.
- typeinfo- The Typeinfo.
- Throws:
- java.lang.Exception
 
 - 
createPathprotected QName[] createPath(QName[] xmlpath, java.lang.Object value, IContext context) Create a qname path.
 - 
getDefaultValueprotected java.lang.Object getDefaultValue(java.lang.Object property) Get the default value.
 - 
getPreProcessorspublic IPreProcessor[] getPreProcessors(java.lang.Object object, java.lang.Object typeinfo) Get the pre-processors.- Specified by:
- getPreProcessorsin interface- IObjectWriterHandler
- Returns:
- The pre-processors.
 
 - 
getValueprotected abstract java.lang.Object getValue(java.lang.Object object, java.lang.Object attr, IContext context, java.lang.Object info) throws java.lang.ExceptionGet a value from an object.- Throws:
- java.lang.Exception
 
 - 
getPropertyprotected abstract java.lang.Object getProperty(java.lang.Object info) Get the property.
 - 
getPropertyNameprotected abstract java.lang.String getPropertyName(java.lang.Object property) Get the name of a property.
 - 
getPropertiesprotected abstract java.util.Collection getProperties(java.lang.Object object, IContext context, boolean includemethods, boolean includefields)Get the properties of an object.
 - 
isBasicTypeprotected 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).
 - 
isTypeCompatibleprotected abstract boolean isTypeCompatible(java.lang.Object object, ObjectInfo info, IContext context)Test if a value is compatible with the defined typeinfo.
 - 
isDecodableToSameTypeprotected abstract boolean isDecodableToSameType(java.lang.Object property, java.lang.Object value, IContext context)Test if a value is decodable to the same type.
 
- 
 
-