/** * Get the linker. * @return The linker. */ public Object getLinker() { return linkinfo!=null? linkinfo.getLinker(): mapinfo!=null && mapinfo.getSupertype()!=null ? mapinfo.getSupertype().getLinker() : null; }
/** * Get the type info. * @return The type. */ public Object getTypeInfo() { return getObjectInfo()!=null && getObjectInfo().getTypeInfo()!=null ? getObjectInfo().getTypeInfo() : mapinfo!=null && mapinfo.getSupertype()!=null ? mapinfo.getSupertype().getTypeInfo() : null; }
/** * Create a new subobject info. */ public SubobjectInfo(AccessInfo accessinfo, ISubObjectConverter converter, boolean multi, ObjectInfo objectinfo, Boolean flattening) { this(new XMLInfo(new QName[]{accessinfo.getXmlObjectName()}), accessinfo, converter, multi, objectinfo, flattening); }
/** * Get the default value. */ protected Object getDefaultValue(Object property) { Object ret = null; if(property instanceof AttributeInfo) { ret = ((AttributeInfo)property).getAccessInfo().getDefaultValue(); } return ret; }
/** * Get the post-processor. * @return The post-processor */ public IPostProcessor getPostProcessor() { IPostProcessor ret = objectinfo!=null? objectinfo.getPostProcessor(): null; return ret!=null? ret: getSupertype()!=null? getSupertype().getPostProcessor(): null; }
/** * Get the post-processor. * @return The post-processor */ public IPostProcessor[] getPostProcessors(Object object, Object typeinfo) { IPostProcessor pp = typeinfo instanceof TypeInfo? ((TypeInfo)typeinfo).getPostProcessor(): null; return pp==null? null: new IPostProcessor[]{pp}; }
/** * Get the comment info. * @return The comment */ public Object getCommentInfo() { Object cominfo = mapinfo!=null? mapinfo.getCommentInfo(): null; return cominfo!=null? cominfo: getSupertype()!=null? getSupertype().getCommentInfo(): null; }
/** * Get the content info. * @return The content info. */ public Object getContentInfo() { Object coninfo = mapinfo!=null? mapinfo.getContentInfo(): null; return coninfo!=null? coninfo: getSupertype()!=null? getSupertype().getContentInfo(): null; }
/** * Get the pre-processor. * @return The pre-processor */ public IPreProcessor getPreProcessor() { IPreProcessor ret = xmlinfo!=null? xmlinfo.getPreProcessor(): null; return ret!=null? ret: getSupertype()!=null? getSupertype().getPreProcessor(): null; }
/** * Get the objectinfo. * @return The objectinfo. */ public ObjectInfo getObjectInfo() { return objectinfo!=null ? objectinfo : mapinfo!=null && mapinfo.getSupertype()!=null ? mapinfo.getSupertype().getObjectInfo() : null; }
/** * Get the xmlpath */ public String getXMLPath() { return xmlinfo!=null? xmlinfo.getXMLPath(): null; }
/** * Get the reader handler associated to the object type (if any). */ public IObjectReaderHandler getReaderHandler() { return readerhandler!=null ? readerhandler : getSupertype()!=null ? getSupertype().getReaderHandler() : null; } }
/** * Create a new handler for Java XML supporting on-the-fly * type info creation for arrays. */ public BeanObjectReaderHandler(Set typeinfos) { this.titmanager = new TypeInfoTypeManager(typeinfos); }
/** * Get the xmlpath as string array. * @return The xmlpath. */ public QName[] getXMLPathElements() { return xmlinfo!=null && xmlinfo.getXMLPathElements()!=null? xmlinfo.getXMLPathElements(): null; }
/** * Get the pre-processors. * @return The pre-processors. */ public IPreProcessor[] getPreProcessors(Object object, Object typeinfo) { IPreProcessor pp = typeinfo instanceof TypeInfo? ((TypeInfo)typeinfo).getPreProcessor(): null; return pp==null? null: new IPreProcessor[]{pp}; }
/** * Is ignore write. * @return True, if should be ignored when writing. */ public boolean isIgnoreWrite() { return accessinfo.isIgnoreWrite(); }
/** * Create a new xml info. */ public XMLInfo(String xmlpath, IFilter filter, boolean createfromtag, IPreProcessor preprocessor) { setXMLPath(xmlpath); this.filter = filter; this.createfromtag = createfromtag; this.preprocessor = preprocessor; }
/** * Create a new subobject info. */ public SubobjectInfo(AccessInfo accessinfo, ISubObjectConverter converter, boolean multi, ObjectInfo objectinfo) { this(new XMLInfo(new QName[]{accessinfo.getXmlObjectName()}), accessinfo, converter, multi, objectinfo); }
/** * Get the post-processor. * @return The post-processor */ public IPostProcessor[] getPostProcessors(Object object, Object typeinfo) { IPostProcessor pp = typeinfo instanceof TypeInfo? ((TypeInfo)typeinfo).getPostProcessor(): null; return pp==null? null: new IPostProcessor[]{pp}; }
/** * Create a new writer handler. */ public AbstractObjectWriterHandler(boolean gentypetags, boolean prefertags, boolean flattening, Set typeinfos) { this.gentypetags = gentypetags; this.prefertags = prefertags; this.flattening = flattening; this.titmanager = new TypeInfoTypeManager(typeinfos); }