|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vfny.geoserver.config.AttributeTypeInfoConfig
Allows editing of AttributeTypeInfo.
Represents most of a xs:element for an XMLSchema.
we have three types of information to store, Schema defined types, references and extentions on types. If the type represented is either a reference or a Schema defined type then isRef should be true.
Non-complex types are of the form:
{element name='test' type='xs:string'/}
{element name='test' type='gml:PointType'/}
These cases have their type name stored in this.type
For complex types such as {element
name='test'}{xs:complexContent}{xs:extension
base="gml:AbstractFeatureType"}{xs:sequence}{xs:element name="id"
type="xs:string" minOccurs="0"/}{xs:element ref="gml:pointProperty"
minOccurs="0"/}{/xs:sequence}{/xs:extension}{/xs:complexContent}{/element}
The type contains a similar XML fragment.
minOccurs, maxOccurs and nillable are all attributes for all cases. There is more stuff in the XMLSchema spec but we don't care.
Field Summary | |
java.lang.String |
type
Element type, a well-known gml or xs type or TYPE_FRAGMENT . |
static java.lang.String |
TYPE_FRAGMENT
Value of getType() used to indicate that fragement is in use |
Constructor Summary | |
AttributeTypeInfoConfig(org.geotools.feature.AttributeType attributeType)
Set up AttributeTypeInfo based on attributeType. |
|
AttributeTypeInfoConfig(AttributeTypeInfoDTO dto)
Set up AttributeTypeInfo based on Data Transfer Object. |
Method Summary | |
java.lang.String |
getFragment()
XML Fragment used to define stuff. |
int |
getMaxOccurs()
getMaxOccurs purpose. |
int |
getMinOccurs()
getMinOccurs purpose. |
java.lang.String |
getName()
getName purpose. |
java.lang.String |
getType()
Element type, a well-known gml or xs type or TYPE_FRAGMENT . |
boolean |
isNillable()
Indicate if the attribute is allowed to be null . |
void |
setFragment(java.lang.String fragment)
XML Fragment used to define stuff. |
void |
setMaxOccurs(int max)
Maxmium number of occurances of this attribute in a feature. |
void |
setMinOccurs(int min)
Minimum number of occrances of this attribute in a feature. |
void |
setNillable(boolean nillable)
Indicate if the attribute is allowed to be null . |
void |
setType(java.lang.String type)
Element type, a well-known gml or xs type or TYPE_FRAGMENT . |
AttributeTypeInfoDTO |
toDTO()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String TYPE_FRAGMENT
public java.lang.String type
TYPE_FRAGMENT
.
If getType is equals to TYPE_FRAGMENT please consult getFragment() to examin the actual user's definition.
Other than that getType should be one of the constants defined by GMLUtils.
Constructor Detail |
public AttributeTypeInfoConfig(org.geotools.feature.AttributeType attributeType)
Set up is determined by the AttributeTypeInfoDTO( AttributeType ) constructor. This allows all Schema generation to be acomplished in the same palce.
attributeType
- GeoTools2 attributeType used for configurationpublic AttributeTypeInfoConfig(AttributeTypeInfoDTO dto)
dto
- AttributeTypeInfoDTO used for configurationMethod Detail |
public java.lang.String getFragment()
This property is only used with getType() is equals to "(xml fragment)".
baseGMLTypes can only be used in your XML fragment.
public int getMaxOccurs()
The max number of occurences for this element.
public int getMinOccurs()
the min number of occurences for this element
public java.lang.String getName()
returns the element name
public java.lang.String getType()
TYPE_FRAGMENT
.
If getType is equals to TYPE_FRAGMENT
please consult
getFragment() to examine the actual user's definition.
Other than that getType should be one of the constants defined by GMLUtils.
TYPE_FRAGMENT
public boolean isNillable()
null
.
Nillable is often used to indicate that an attribute is optional. The use of minOccurs and maxOccurs may be a more correct way to indicate optional attribtues.
true
to indicate attribute is alloed to be
null
AttributeTypeInfoDTO.setMinOccurs
,
AttributeTypeInfoDTO.setMaxOccurs
public void setFragment(java.lang.String fragment)
This property is only used with getType() is equals to "(xml fragment)".
baseGMLTypes can only be used in your XML fragment.
fragment
- The fragment to set.public void setMaxOccurs(int max)
For Features based on the Simple Feature Specification this should be a
value of 1. If the attribute is optional it should still be 1, although
often optional is represented by allowing the Attribute to be
nillable
.
Common Min..Max Occurs values:
max
- The maximum number of occurancesAttributeTypeInfoDTO.isNillable
public void setMinOccurs(int min)
For Features based on the Simple Feture Specification this should be a value of 1. If the attribute is optional is should be 0, although often optional is represented by allowing the attribute to be nillable.
Common Min..Max Occurs values:
min
- The minimum number of occurancesAttributeTypeInfoDTO.isNillable
public void setNillable(boolean nillable)
null
.
Nillable is often used to indicate that an attribute is optional. The use of minOccurs and maxOccurs may be a more correct way to indicate optional attribtues.
nillable
- true
to indicate attribute is alloed to be
null
AttributeTypeInfoDTO.setMinOccurs
,
AttributeTypeInfoDTO.setMaxOccurs
public void setType(java.lang.String type)
TYPE_FRAGMENT
.
If getType is equals to TYPE_FRAGMENT
please consult
getFragment() to examin the actual user's definition.
Other than that getType should be one of the constants defined by
GMLUtils.
type
- DOCUMENT ME!public AttributeTypeInfoDTO toDTO()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |