public abstract class PropertyTypeBuilder extends TypeBuilder
FeatureType
to be built by an FeatureTypeBuilder
.
A different instance of PropertyTypeBuilder
exists for each property to describe.
Those instances can be created by:
FeatureTypeBuilder.addAttribute(Class)
FeatureTypeBuilder.addAttribute(DefaultAttributeType)
for using an existing attribute as a templateFeatureTypeBuilder.addAssociation(DefaultFeatureType)
FeatureTypeBuilder.addAssociation(GenericName)
FeatureTypeBuilder.addAssociation(DefaultAssociationRole)
for using an existing association as a templateDefined in the sis-feature
module
Modifier and Type | Method and Description |
---|---|
abstract AbstractIdentifiedType |
build()
Builds the property type from the information specified to this builder.
|
int |
getMaximumOccurs()
Returns the maximum number of property values.
|
int |
getMinimumOccurs()
Returns the minimum number of property values.
|
void |
remove()
Removes this property from the
FeatureTypeBuilder . |
PropertyTypeBuilder |
setMaximumOccurs(int occurs)
Sets the maximum number of property values.
|
PropertyTypeBuilder |
setMinimumOccurs(int occurs)
Sets the minimum number of property values.
|
getDefinition, getDescription, getDesignation, getLocale, getName, isDeprecated, setDefinition, setDeprecated, setDescription, setDesignation, setName, setName, setName, toString
public int getMinimumOccurs()
DefaultAttributeType.getMinimumOccurs()
public PropertyTypeBuilder setMinimumOccurs(int occurs)
occurs
- the new minimum number of property values.this
for allowing method calls chaining.getMinimumOccurs()
public final int getMaximumOccurs()
getMinimumOccurs()
value.
If there is no maximum, then this method returns Integer.MAX_VALUE
.Integer.MAX_VALUE
if none.DefaultAttributeType.getMaximumOccurs()
public PropertyTypeBuilder setMaximumOccurs(int occurs)
occurs
- the new maximum number of property values.this
for allowing method calls chaining.getMaximumOccurs()
public abstract AbstractIdentifiedType build() throws IllegalStateException
PropertyType
instance is returned
(see AttributeTypeBuilder.build()
for more information).
org.opengis.feature.PropertyType
. This change is pending GeoAPI revision.build
in class TypeBuilder
IllegalStateException
- if the builder contains inconsistent information.public void remove()
FeatureTypeBuilder
.
After this method has been invoked, this PropertyTypeBuilder
instance
is no longer in the list returned by FeatureTypeBuilder.properties()
and attempts to invoke any setter method on this
will cause an
IllegalStateException
to be thrown.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.