public interface Type
SimpleType
,
ComplexType
Modifier and Type | Method and Description |
---|---|
boolean |
canEncode(Element element,
Object value,
Map hints)
Can I write this object out as element specified?
|
void |
encode(Element element,
Object value,
PrintHandler output,
Map hints)
Encode value as element on the provided output.
|
Element |
findChildElement(String name)
Convinience method used to search this type's children for the requested element by
localName.
|
Class |
getInstanceType()
This will return the intended Java Class for this element type.
|
String |
getName()
This returns the XML Schema declaration name of this type (both complex and simple types have
names ...)
|
URI |
getNamespace()
This is used for validation of an XML document, and represents the targetNamespace of that
this type resides in.
|
Object |
getValue(Element element,
ElementValue[] value,
Attributes attrs,
Map hints)
This method is intended to receive the child elements in the form of ElementValues (@see
ElementValue).
|
Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException
If the element had #CData (Nested Child Text), this will appear in the first slot, with a null Element.
A SAXNotSupportedException should be thrown when the child's [inherited, default implementation of getValue(ElementValue[],Attributes)] method should be used.
OperationNotSupportedException
SAXException
ElementValue
String getName()
URI getNamespace()
Class getInstanceType()
boolean canEncode(Element element, Object value, Map hints)
element
- The element which may be used to represent the Object. This is included to
allow for child definitions to include addition information where appropriate.value
- An Object which may or may not be encodeable by this type. The value may also be
null.Type#encode(Element, Object, Writer, Map)
void encode(Element element, Object value, PrintHandler output, Map hints) throws IOException, OperationNotSupportedException
This is encoding because the PrintHandler does not have to go back to a stream.
element
- The original element declaration to which we should encode.value
- The Object to encode.output
- This is where the output should be written to.hints
- For providing additional context information to specific schemas.IOException
- When there is an error with the Writer.OperationNotSupportedException
- When this type cannot be encoded ... and wasn't
checked first.Copyright © 1996–2019 Geotools. All rights reserved.