public class SimpleTypeGT extends Object implements SimpleType
ALL, LIST, NONE, RESTRICTION, UNION| Constructor and Description |
|---|
SimpleTypeGT(String id,
String name,
URI namespace,
int type,
SimpleType[] parents,
Facet[] constraints,
int finaL)
Creates a new SimpleTypeGT object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateAttributes(Attribute attribute,
Object value,
Map<String,Object> hints) |
boolean |
canEncode(Element element,
Object value,
Map<String,Object> hints)
Can I write this object out as element specified?
|
void |
encode(Element element,
Object value,
PrintHandler output,
Map<String,Object> hints)
Encode value as element on the provided output.
|
Element |
findChildElement(String name1)
Convinience method used to search this type's children for the requested element by
localName.
|
int |
getChildType()
Returns an int of either List, Union or Restriction
|
Facet[] |
getFacets()
The list of facets for this Restriction ...
|
int |
getFinal()
This specifies a mask which represents how this XML Schema SimpleType may be
extended/restricted ... through Schema declared derivations.
|
String |
getId()
The Schema ID for this simpleType definition.
|
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.
|
SimpleType[] |
getParents()
A simple simpleType when either a List or Restriction ...
|
Object |
getValue(Element element,
ElementValue[] value,
Attributes attrs,
Map<String,Object> hints)
This method ignores the attributes from the xml node
|
AttributeValue |
toAttribute(Attribute attribute,
Object value,
Map<String,Object> hints)
returns the value as a string
|
public SimpleTypeGT(String id, String name, URI namespace, int type, SimpleType[] parents, Facet[] constraints, int finaL)
public Class getInstanceType()
TypegetInstanceType in interface Typeorg.geotools.xml.xsi.Type#getInstanceType()public Element findChildElement(String name1)
TypefindChildElement in interface Typename1 - the element's localName to search for.Type.findChildElement(java.lang.String)public int getFinal()
SimpleTypegetFinal in interface SimpleTypeorg.geotools.xml.xsi.SimpleType#getFinal()public String getId()
SimpleTypegetId in interface SimpleTypeorg.geotools.xml.xsi.SimpleType#getId()public String getName()
Typepublic URI getNamespace()
TypegetNamespace in interface Typeorg.geotools.xml.xsi.Type#getLocalName()public SimpleType[] getParents()
SimpleTypegetParents in interface SimpleTypeorg.geotools.xml.xsi.Type#getParent()public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map<String,Object> hints) throws OperationNotSupportedException, SAXException
getValue in interface TypeOperationNotSupportedExceptionSAXExceptionschema.Type#getValue(java.lang.Object, org.xml.sax.Attributes)public int getChildType()
SimpleTypegetChildType in interface SimpleTypeSimpleType.getChildType()public Facet[] getFacets()
SimpleTypegetFacets in interface SimpleTypeSimpleType.getFacets()public AttributeValue toAttribute(Attribute attribute, Object value, Map<String,Object> hints) throws OperationNotSupportedException
SimpleTypetoAttribute in interface SimpleTypeOperationNotSupportedExceptionSimpleType.toAttribute(org.geotools.xml.schema.Attribute,
java.lang.Object, java.util.Map)public boolean canCreateAttributes(Attribute attribute, Object value, Map<String,Object> hints)
canCreateAttributes in interface SimpleTypeSimpleType.canCreateAttributes(org.geotools.xml.schema.Attribute,
java.lang.Object, java.util.Map)public boolean canEncode(Element element, Object value, Map<String,Object> hints)
TypecanEncode in interface Typeelement - 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.canEncode(org.geotools.xml.schema.Element,
java.lang.Object, java.util.Map)public void encode(Element element, Object value, PrintHandler output, Map<String,Object> hints) throws IOException, OperationNotSupportedException
TypeThis is encoding because the PrintHandler does not have to go back to a stream.
encode in interface Typeelement - 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.Type.encode(org.geotools.xml.schema.Element, java.lang.Object,
org.geotools.xml.PrintHandler, java.util.Map)Copyright © 1996–2021 Geotools. All rights reserved.