Class OAVObjectReaderHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONTEXT_STATE
      Key of the state in the user context map.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bulkLinkObjects​(java.lang.Object parent, java.util.List children, AReadContext context)
      Bulk link an object to its parent.
      java.lang.Object convertContentObject​(java.lang.String object, QName tag, AReadContext context)
      Convert an object to another type of object.
      java.lang.Object createObject​(java.lang.Object type, boolean root, AReadContext context, java.util.Map rawattributes)
      Create an object for the current tag.
      java.lang.Object getObjectType​(java.lang.Object object, AReadContext context)
      Get the object type
      IPostProcessor[] getPostProcessors​(java.lang.Object object, java.lang.Object typeinfo)
      Get the post-processor.
      TypeInfo getTypeInfo​(java.lang.Object object, QName[] fullpath, AReadContext context)
      Get the most specific mapping info.
      void handleAttributeValue​(java.lang.Object object, QName xmlattrname, java.util.List attrpath, java.lang.String attrval, java.lang.Object attrinfo, AReadContext context)
      Handle the attribute of an object.
      protected boolean internalLinkObjects​(java.lang.String attrname, java.lang.Object elem, java.lang.Object parent, IOAVState state)
      Internal method for linking objects.
      void linkObject​(java.lang.Object elem, java.lang.Object parent, java.lang.Object linkinfo, QName[] pathname, AReadContext context)
      Link an object to its parent.
      protected void setAttributeValue​(IOAVState state, java.lang.Object object, OAVAttributeType attrtype, java.lang.Object elem)
      Set/add an attribute value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CONTEXT_STATE

        public static final java.lang.String CONTEXT_STATE
        Key of the state in the user context map.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OAVObjectReaderHandler

        public OAVObjectReaderHandler()
        Create a new handler.
    • Method Detail

      • getTypeInfo

        public TypeInfo getTypeInfo​(java.lang.Object object,
                                    QName[] fullpath,
                                    AReadContext context)
        Get the most specific mapping info.
        Specified by:
        getTypeInfo in interface IObjectReaderHandler
        Parameters:
        tag - The tag.
        fullpath - The full path.
        Returns:
        The most specific mapping info.
      • createObject

        public java.lang.Object createObject​(java.lang.Object type,
                                             boolean root,
                                             AReadContext context,
                                             java.util.Map rawattributes)
                                      throws java.lang.Exception
        Create an object for the current tag.
        Specified by:
        createObject in interface IObjectReaderHandler
        Parameters:
        type - The object type to create.
        root - Flag, if object should be root object.
        context - The context.
        Returns:
        The created object (or null for none).
        Throws:
        java.lang.Exception
      • getObjectType

        public java.lang.Object getObjectType​(java.lang.Object object,
                                              AReadContext context)
        Get the object type
        Parameters:
        object - The object.
        Returns:
        The object type.
      • convertContentObject

        public java.lang.Object convertContentObject​(java.lang.String object,
                                                     QName tag,
                                                     AReadContext context)
                                              throws java.lang.Exception
        Convert an object to another type of object.
        Specified by:
        convertContentObject in interface IObjectReaderHandler
        Throws:
        java.lang.Exception
      • handleAttributeValue

        public void handleAttributeValue​(java.lang.Object object,
                                         QName xmlattrname,
                                         java.util.List attrpath,
                                         java.lang.String attrval,
                                         java.lang.Object attrinfo,
                                         AReadContext context)
                                  throws java.lang.Exception
        Handle the attribute of an object.
        Specified by:
        handleAttributeValue in interface IObjectReaderHandler
        Parameters:
        object - The object.
        attrname - The attribute name.
        attrval - The attribute value.
        attrinfo - The attribute info.
        context - The context.
        Throws:
        java.lang.Exception
      • linkObject

        public void linkObject​(java.lang.Object elem,
                               java.lang.Object parent,
                               java.lang.Object linkinfo,
                               QName[] pathname,
                               AReadContext context)
                        throws java.lang.Exception
        Link an object to its parent.
        Specified by:
        linkObject in interface IObjectLinker
        Parameters:
        object - The object.
        parent - The parent object.
        linkinfo - The link info.
        tagname - The current tagname (for name guessing).
        context - The context.
        Throws:
        java.lang.Exception
      • bulkLinkObjects

        public void bulkLinkObjects​(java.lang.Object parent,
                                    java.util.List children,
                                    AReadContext context)
                             throws java.lang.Exception
        Bulk link an object to its parent.
        Specified by:
        bulkLinkObjects in interface IBulkObjectLinker
        Parameters:
        parent - The parent object.
        children - The children objects (link datas).
        context - The context.
        classloader - The classloader.
        rootobject - The root object.
        Throws:
        java.lang.Exception
      • internalLinkObjects

        protected boolean internalLinkObjects​(java.lang.String attrname,
                                              java.lang.Object elem,
                                              java.lang.Object parent,
                                              IOAVState state)
        Internal method for linking objects.
      • setAttributeValue

        protected void setAttributeValue​(IOAVState state,
                                         java.lang.Object object,
                                         OAVAttributeType attrtype,
                                         java.lang.Object elem)
        Set/add an attribute value.