Class AbstractComplexBinding

    • Constructor Detail

      • AbstractComplexBinding

        public AbstractComplexBinding()
    • Method Detail

      • initializeChildContext

        public void initializeChildContext​(ElementInstance childInstance,
                                           Node node,
                                           MutablePicoContainer context)
        Does nothing, subclasses should override this method.
        Specified by:
        initializeChildContext in interface ComplexBinding
        Parameters:
        childInstance - The child element instance
        node - The parse node for the parent element.
        context - the context in which the child element will be parsed.
      • initialize

        public void initialize​(ElementInstance instance,
                               Node node,
                               MutablePicoContainer context)
        Does nothing, subclasses should override this method.
        Specified by:
        initialize in interface ComplexBinding
        Parameters:
        instance - The element being parsed.
        node - The node in the parse tree representing the element being parsed. It is important to note that at the time this method is called the node contains no child element nodes, only child attribute nodes.
        context - The container to be used as context for child binding.
      • parse

        public Object parse​(ElementInstance instance,
                            Node node,
                            Object value)
                     throws Exception
        Subclasses should override this method, the default implementation return null.
        Specified by:
        parse in interface ComplexBinding
        Parameters:
        instance - The element being parsed.
        node - The node in the parse tree representing the element being parsed.
        value - The result of the parse from another strategy in the type hierarchy. Could be null if this is the first strategy being executed.
        Returns:
        The parsed object, or null if the component could not be parsed.
        Throws:
        Exception - Strategy objects should not attempt to handle any exceptions.
      • encode

        public Element encode​(Object object,
                              Document document,
                              Element value)
                       throws Exception
        Subclasses should override this method if need be, the default implementation returns value.
        Specified by:
        encode in interface ComplexBinding
        Parameters:
        object - The object being encoded.
        document - The document containing the encoded element.
        value - The object as encoded by the parent binding.
        Returns:
        The element for the objcet being encoded, or null
        Throws:
        Exception
      • getProperties

        public List<Object[]> getProperties​(Object object,
                                            XSDElementDeclaration element)
                                     throws Exception
        Subclasses should override this method if need be, the default implementation returns null.

        Note that this method only needs to be implemented for schema types which are open-ended in which the contents are not specifically specified by the schema.

        Specified by:
        getProperties in interface ComplexBinding
        Parameters:
        object - the object being encoded.
        Returns:
        A list of the properties for the object.
        Throws:
        Exception