public abstract class AbstractComplexBinding extends Object implements ComplexBinding
Constructor and Description |
---|
AbstractComplexBinding() |
Modifier and Type | Method and Description |
---|---|
Element |
encode(Object object,
Document document,
Element value)
Subclasses should ovverride this method if need be, the default implementation returns
value.
|
int |
getExecutionMode()
This implementation returns
Binding.OVERRIDE . |
List |
getProperties(Object object)
Deprecated.
|
List |
getProperties(Object object,
XSDElementDeclaration element)
Subclasses should override this method if need be, the default implementation returns
null . |
Object |
getProperty(Object object,
QName name)
Subclasses should override this method if need be, the default implementation returns
null . |
void |
initialize(ElementInstance instance,
Node node,
MutablePicoContainer context)
Does nothing, subclasses should override this method.
|
void |
initializeChildContext(ElementInstance childInstance,
Node node,
MutablePicoContainer context)
Does nothing, subclasses should override this method.
|
Object |
parse(ElementInstance instance,
Node node,
Object value)
Subclasses should override this method, the default implementation return
null . |
public void initializeChildContext(ElementInstance childInstance, Node node, MutablePicoContainer context)
initializeChildContext
in interface ComplexBinding
node
- The parse node for the parent element.context
- the context in which the child element will be parsed.public void initialize(ElementInstance instance, Node node, MutablePicoContainer context)
initialize
in interface ComplexBinding
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.public int getExecutionMode()
Binding.OVERRIDE
.
Subclasses should override to change this behaviour.
getExecutionMode
in interface Binding
Binding.AFTER
,
Binding.BEFORE
,
Binding.OVERRIDE
public Object parse(ElementInstance instance, Node node, Object value) throws Exception
null
.parse
in interface ComplexBinding
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.Exception
- Strategy objects should not attempt to handle any exceptions.public Element encode(Object object, Document document, Element value) throws Exception
encode
in interface ComplexBinding
object
- The object being encoded.document
- The document containing the encoded element.value
- The object as encoded by the parent binding.null
Exception
ComplexBinding.encode(Object, Document, Element).
public Object getProperty(Object object, QName name) throws Exception
null
.getProperty
in interface ComplexBinding
object
- The object being encoded.name
- The name of the property to obtain.null
.Exception
ComplexBinding.getProperty(Object, QName)
public List getProperties(Object object) throws Exception
getProperties(Object, XSDElementDeclaration)
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.
getProperties
in interface ComplexBinding
object
- the object being encoded.Exception
ComplexBinding.getProperties(Object)
public List getProperties(Object object, XSDElementDeclaration element) throws Exception
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.
getProperties
in interface ComplexBinding
object
- the object being encoded.Exception
ComplexBinding.getProperties(Object)
Copyright © 1996–2019 Geotools. All rights reserved.