Package org.geotools.xml.xsi
Class XSISimpleTypes.Date
-
- All Implemented Interfaces:
SimpleType
,Type
- Enclosing class:
- XSISimpleTypes
public static class XSISimpleTypes.Date extends XSISimpleTypes.XSISimpleType
XSI Schema instance of Date- Author:
- dzwiers
-
-
Field Summary
-
Fields inherited from interface SimpleType
ALL, LIST, NONE, RESTRICTION, UNION
-
-
Constructor Summary
Constructors Constructor Description Date()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(Element element, Object value, PrintHandler output, Map<String,Object> hints)
Encode value as element on the provided output.static SimpleType
getInstance()
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 ...)Object
getValue(Element element, ElementValue[] value, Attributes attrs, Map<String,Object> hints)
This method is intended to receive the child elements in the form of ElementValues (@see ElementValue).-
Methods inherited from class XSISimpleTypes.XSISimpleType
canCreateAttributes, canEncode, findChildElement, findChildElement, getChildType, getFacets, getFinal, getId, getNamespace, getParent, getParents, toAttribute
-
-
-
-
Method Detail
-
getInstance
public static SimpleType getInstance()
- See Also:
schema.xsi.XSISimpleTypes.XSISimpleType#getInstance()
-
getName
public String getName()
Description copied from interface:Type
This returns the XML Schema declaration name of this type (both complex and simple types have names ...)- See Also:
schema.SimpleType#getLocalName()
-
getValue
public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map<String,Object> hints) throws SAXException
Description copied from interface:Type
This method is intended to receive the child elements in the form of ElementValues (@see ElementValue). Recall that this is a pairing containing a reference to the type and the actual value (do not call .getValue on the types). This should return the real value (interpreted value) for this element based on it's children. Remember, this is a XML is a tree structure, so if you don't include some children, they are gone forever (so be careful when ignoring data).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.
- Returns:
- Object
- Throws:
SAXException
- See Also:
schema.Type#getValue(java.lang.Object, org.xml.sax.Attributes)
-
encode
public void encode(Element element, Object value, PrintHandler output, Map<String,Object> hints) throws IOException
Description copied from interface:Type
Encode value as element on the provided output.This is encoding because the PrintHandler does not have to go back to a stream.
- Specified by:
encode
in interfaceType
- Overrides:
encode
in classXSISimpleTypes.XSISimpleType
- Parameters:
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.- Throws:
IOException
- When there is an error with the Writer.- See Also:
Type.encode(org.geotools.xml.schema.Element, java.lang.Object, org.geotools.xml.PrintHandler, java.util.Map)
-
getInstanceType
public Class getInstanceType()
Description copied from interface:Type
This will return the intended Java Class for this element type. For generic complex types this will be an object array. SimpleTypes will match as they are parsed, and custom extensions will also return the appropriate class value.- See Also:
org.geotools.xml.xsi.Type#getInstanceType()
-
-