public class BeanObjectReaderHandler extends Object implements IObjectReaderHandler
Constructor and Description |
---|
BeanObjectReaderHandler()
Create a new handler for custom XML formats.
|
BeanObjectReaderHandler(Set typeinfos)
Create a new handler for Java XML supporting on-the-fly
type info creation for arrays.
|
Modifier and Type | Method and Description |
---|---|
void |
addPostProcessor(IFilter filter,
IPostProcessor processor)
Add a post processor.
|
void |
bulkLinkObjects(List childs,
Object parent,
Object linkinfo,
QName[] pathname,
AReadContext context)
Link an object to its parent.
|
void |
bulkLinkObjects(Object parent,
List children,
AReadContext context)
Bulk link chilren to its parent.
|
Object |
convertContentObject(String value,
QName tag,
AReadContext context)
Convert an object to another type of object.
|
Object |
createObject(Object type,
boolean root,
AReadContext context,
Map rawattributes)
Create an object for the current tag.
|
Object |
getObjectType(Object object,
AReadContext context)
Get the object type
|
IPostProcessor[] |
getPostProcessors(Object object,
Object typeinfo)
Get the post-processor.
|
TypeInfo |
getTypeInfo(Object object,
QName[] fullpath,
AReadContext context)
Get the most specific mapping info.
|
void |
handleAttributeValue(Object object,
QName xmlattrname,
List attrpath,
String attrval,
Object attrinfo,
AReadContext context)
Handle the attribute of an object.
|
void |
linkObject(Object object,
Object parent,
Object linkinfo,
QName[] pathname,
AReadContext context)
Link an object to its parent.
|
void |
removePostProcessor(IFilter filter)
Remove a post processor.
|
public BeanObjectReaderHandler()
public BeanObjectReaderHandler(Set typeinfos)
public TypeInfo getTypeInfo(Object object, QName[] fullpath, AReadContext context)
getTypeInfo
in interface IObjectReaderHandler
tag
- The tag.fullpath
- The full path.public Object createObject(Object type, boolean root, AReadContext context, Map rawattributes) throws Exception
createObject
in interface IObjectReaderHandler
type
- The object type to create.root
- Flag, if object should be root object.context
- The context.Exception
public Object getObjectType(Object object, AReadContext context)
object
- The object.public Object convertContentObject(String value, QName tag, AReadContext context) throws Exception
convertContentObject
in interface IObjectReaderHandler
Exception
public void handleAttributeValue(Object object, QName xmlattrname, List attrpath, String attrval, Object attrinfo, AReadContext context) throws Exception
handleAttributeValue
in interface IObjectReaderHandler
object
- The object.attrname
- The attribute name.attrval
- The attribute value.attrinfo
- The attribute info.context
- The context.Exception
public void linkObject(Object object, Object parent, Object linkinfo, QName[] pathname, AReadContext context) throws Exception
linkObject
in interface IObjectLinker
object
- The object.parent
- The parent object.linkinfo
- The link info.tagname
- The current tagname (for name guessing).context
- The context.Exception
public void bulkLinkObjects(List childs, Object parent, Object linkinfo, QName[] pathname, AReadContext context) throws Exception
object
- The object.parent
- The parent object.linkinfo
- The link info.tagname
- The current tagname (for name guessing).context
- The context.Exception
public void bulkLinkObjects(Object parent, List children, AReadContext context) throws Exception
bulkLinkObjects
in interface IBulkObjectLinker
parent
- The parent object.children
- The children objects (link datas).context
- The context.classloader
- The classloader.root
- The root object.Exception
public IPostProcessor[] getPostProcessors(Object object, Object typeinfo)
getPostProcessors
in interface IObjectReaderHandler
public void addPostProcessor(IFilter filter, IPostProcessor processor)
filter
- The filter.processor
- The post processor.public void removePostProcessor(IFilter filter)
filter
- The filter.processor
- The post processor.Copyright © 2012. All Rights Reserved.