Package org.apache.sis.feature.builder
Class PropertyTypeBuilder
Object
TypeBuilder
PropertyTypeBuilder
- All Implemented Interfaces:
- Localized
- Direct Known Subclasses:
- AssociationRoleBuilder,- AttributeTypeBuilder
Describes one property of the 
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 template
- FeatureTypeBuilder.addAssociation(DefaultFeatureType)
- FeatureTypeBuilder.addAssociation(GenericName)
- FeatureTypeBuilder.addAssociation(DefaultAssociationRole)for using an existing association as a template
- Since:
- 0.8
Defined in the sis-feature module
- 
Method SummaryModifier and TypeMethodDescriptionabstract AbstractIdentifiedTypebuild()Builds the property type from the information specified to this builder.final intReturns the maximum number of property values.intReturns the minimum number of property values.voidremove()Removes this property from theFeatureTypeBuilder.setDefinition(CharSequence definition) Sets a concise definition of the element.setDeprecated(boolean deprecated) Sets whether the type is deprecated.setDescription(CharSequence description) Sets optional information beyond that required for concise definition of the element.setDesignation(CharSequence designation) Sets a natural language designator for the element.setMaximumOccurs(int occurs) Sets the maximum number of property values.setMinimumOccurs(int occurs) Sets the minimum number of property values.setName(CharSequence localPart) Sets thePropertyTypename as a simple string (local name).setName(CharSequence... components) Sets thePropertyTypename as a string in the given scope.setName(GenericName name) Sets thePropertyTypename as a generic name.Methods inherited from class TypeBuildergetDefinition, getDescription, getDesignation, getLocale, getName, isDeprecated, toString
- 
Method Details- 
setNameSets thePropertyTypename as a generic name. See the parent class for more information.- Overrides:
- setNamein class- TypeBuilder
- Parameters:
- name- the generic name (cannot be- null).
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
setNameSets thePropertyTypename as a simple string (local name). See the parent class for more information.- Overrides:
- setNamein class- TypeBuilder
- Parameters:
- localPart- the local part of the generic name as a- Stringor- InternationalString.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
setNameSets thePropertyTypename as a string in the given scope. See the parent class for more information.- Overrides:
- setNamein class- TypeBuilder
- Parameters:
- components- the name components as an array of- Stringor- InternationalStringinstances.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
getMinimumOccurspublic int getMinimumOccurs()Returns the minimum number of property values. The returned value is greater than or equal to zero.- Returns:
- the minimum number of property values.
- See Also:
 
- 
setMinimumOccursSets the minimum number of property values. If the given number is greater than the maximal number of property values, than the maximum is also set to that value.- Parameters:
- occurs- the new minimum number of property values.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
getMaximumOccurspublic final int getMaximumOccurs()Returns the maximum number of property values. The returned value is greater than or equal to thegetMinimumOccurs()value. If there is no maximum, then this method returnsInteger.MAX_VALUE.- Returns:
- the maximum number of property values, or Integer.MAX_VALUEif none.
- See Also:
 
- 
setMaximumOccursSets the maximum number of property values. If the given number is less than the minimal number of property values, than the minimum is also set to that value.Integer.MAX_VALUEmeans that there is no maximum.- Parameters:
- occurs- the new maximum number of property values.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
setDefinitionSets a concise definition of the element.- Overrides:
- setDefinitionin class- TypeBuilder
- Parameters:
- definition- a concise definition of the element, or- nullif none.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
setDesignationSets a natural language designator for the element. This can be used as an alternative to the name in user interfaces.- Overrides:
- setDesignationin class- TypeBuilder
- Parameters:
- designation- a natural language designator for the element, or- nullif none.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
setDescriptionSets optional information beyond that required for concise definition of the element. The description may assist in understanding the feature scope and application. If the type is deprecated, then the description should give indication about the replacement (e.g. "superceded by …").- Overrides:
- setDescriptionin class- TypeBuilder
- Parameters:
- description- information beyond that required for concise definition of the element, or- nullif none.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
setDeprecatedSets whether the type is deprecated. If the type is deprecated, then the description should be set to an indication about the replacement (e.g. "superceded by …").- Overrides:
- setDeprecatedin class- TypeBuilder
- Parameters:
- deprecated- whether this type is deprecated.
- Returns:
- thisfor allowing method calls chaining.
- See Also:
 
- 
buildBuilds the property type from the information specified to this builder. If a type has already been built and this builder state has not changed since the type creation, then the previously createdPropertyTypeinstance is returned (seeAttributeTypeBuilder.build()for more information).Warning: In a future SIS version, the return type may be changed toorg.opengis.feature.PropertyType. This change is pending GeoAPI revision.- Specified by:
- buildin class- TypeBuilder
- Returns:
- the property type.
- Throws:
- IllegalStateException- if the builder contains inconsistent information.
 
- 
removepublic void remove()Removes this property from theFeatureTypeBuilder. After this method has been invoked, thisPropertyTypeBuilderinstance is no longer in the list returned byFeatureTypeBuilder.properties()and attempts to invoke any setter method onthiswill cause anIllegalStateExceptionto be thrown.
 
-