| java.lang.Object org.geotools.feature.iso.AttributeBuilder
AttributeBuilder | public class AttributeBuilder (Code) | | Builder for attributes.
author: Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org |
Method Summary | |
public Attribute | add(Object value, String name) Adds an attribute to the complex attribute being built. | public Attribute | add(Object value, String name, String namespaceURI) Adds an attribute to the complex attribute being built. | public Attribute | add(String id, Object value, Name name, AttributeType type) Adds an attribute to the complex attribute being built overriding the
type of the declared attribute descriptor by a subtype of it. | public Attribute | add(Object value, Name name) Adds an attribute to the complex attribute being built. | public Attribute | add(String id, Object value, String name) Adds an attribute to the complex attribute being built. | public Attribute | add(String id, Object value, String name, String namespaceURI) Adds an attribute to the complex attribute being built. | public Attribute | add(String id, Object value, Name name) Adds an attribute to the complex attribute being built. | public void | associate(Attribute value, String name) Adds an association to the complex attribute being built. | public void | associate(Attribute attribute, String name, String namespaceURI) Adds an association to the complex attribute being built. | public void | associate(Attribute value, Name name) Adds an association to the complex attribute being built. | protected AssociationDescriptor | associationDescriptor(Name name) | protected AttributeDescriptor | attributeDescriptor(Name name) | protected AttributeDescriptor | attributeDescriptor(Name name, AttributeType actualType) | public Attribute | build() Builds the attribute. | public Attribute | build(String id) Builds the attribute.
The class of the attribute built is determined from its type set with
AttributeBuilder.setType(AttributeType) .
Parameters: id - The id of the attribute, or null. | protected Attribute | create(Object value, AttributeType type, AttributeDescriptor descriptor, String id) Factors out attribute creation code, needs to be called with either one
of type or descriptor null. | public CoordinateReferenceSystem | getCRS() | public Object | getDefaultGeometry() | public FeatureFactory | getFeatureFactory() Returns the underlying attribute factory. | public String | getNamespaceURI() This namespace will be used when constructing attribute names. | public AttributeType | getType() | public void | init() Initializes the builder to its initial state, the same state it is in
directly after being instantiated. | public void | init(Attribute attribute) Initializes the state of the builder based on a previously built
attribute. | protected List | properties() Convenience accessor for properties list which does the null check. | public void | setCRS(CoordinateReferenceSystem crs) Sets the coordinate reference system of the built feature. | public void | setDefaultGeometry(Object defaultGeometry) Sets the default geometry of the feature. | public void | setDescriptor(AttributeDescriptor descriptor) Sets the descriptor of the attribute being built. | public void | setFeatureFactory(FeatureFactory attributeFactory) Sets the underlying attribute factory. | public void | setNamespaceURI(String namespace) This namespace will be used when constructing attribute names. | public void | setType(AttributeType type) Sets the type of the attribute being built. |
attributeFactory | FeatureFactory attributeFactory(Code) | | Factory used to create attributes
|
crs | CoordinateReferenceSystem crs(Code) | | The crs of the attribute.
|
defaultGeometry | Object defaultGeometry(Code) | | Default geometry of the feature.
|
descriptor | AttributeDescriptor descriptor(Code) | | Descriptor of complex attribute being built.
This field is mutually exclusive with
AttributeBuilder.type |
properties | List properties(Code) | | Contained properties (associations + attributes)
|
AttributeBuilder | public AttributeBuilder(FeatureFactory attributeFactory)(Code) | | |
add | public Attribute add(Object value, String name, String namespaceURI)(Code) | | Adds an attribute to the complex attribute being built.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the attribute type.
Parameters: value - The value of the attribute. Parameters: name - The name of the attribute. Parameters: namespaceURI - The namespace of the attribute. |
add | public Attribute add(String id, Object value, Name name, AttributeType type)(Code) | | Adds an attribute to the complex attribute being built overriding the
type of the declared attribute descriptor by a subtype of it.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the attribute type.
Parameters: id - the attribtue id Parameters: value - The value of the attribute. Parameters: name - The name of the attribute. Parameters: type - the actual type of the attribute, which might be the same asthe declared type for the given AttributeDescriptor or aderived type. |
add | public Attribute add(Object value, Name name)(Code) | | Adds an attribute to the complex attribute being built.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the attribute type.
Parameters: name - The name of the attribute. Parameters: value - The value of the attribute. |
add | public Attribute add(String id, Object value, String name, String namespaceURI)(Code) | | Adds an attribute to the complex attribute being built.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the attribute type.
Parameters: id - The id of the attribute. Parameters: value - The value of the attribute. Parameters: name - The name of the attribute. Parameters: namespaceURI - The namespace of the attribute. |
add | public Attribute add(String id, Object value, Name name)(Code) | | Adds an attribute to the complex attribute being built.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the attribute type.
Parameters: id - The id of the attribute. Parameters: name - The name of the attribute. Parameters: value - The value of the attribute. |
associate | public void associate(Attribute value, String name)(Code) | | Adds an association to the complex attribute being built.
This method uses the result of
AttributeBuilder.getNamespaceURI() to build a
qualified attribute name.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the association type.
Parameters: value - The value of the association, an attribute. Parameters: name - The name of the association. |
associate | public void associate(Attribute attribute, String name, String namespaceURI)(Code) | | Adds an association to the complex attribute being built.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the association type.
Parameters: value - The value of the association, an attribute. Parameters: name - The name of the association. Parameters: namespaceURI - The namespace of the association |
associate | public void associate(Attribute value, Name name)(Code) | | Adds an association to the complex attribute being built.
This method uses the type supplied in
AttributeBuilder.setType(AttributeType) in
order to determine the association type.
Parameters: value - The value of the association, an attribute. Parameters: name - The name of the association. Parameters: namespaceURI - The namespace of the association |
associationDescriptor | protected AssociationDescriptor associationDescriptor(Name name)(Code) | | |
attributeDescriptor | protected AttributeDescriptor attributeDescriptor(Name name)(Code) | | |
attributeDescriptor | protected AttributeDescriptor attributeDescriptor(Name name, AttributeType actualType)(Code) | | |
create | protected Attribute create(Object value, AttributeType type, AttributeDescriptor descriptor, String id)(Code) | | Factors out attribute creation code, needs to be called with either one
of type or descriptor null.
|
getCRS | public CoordinateReferenceSystem getCRS()(Code) | | The coordinate reference system of the feature, or null if notset. |
getDefaultGeometry | public Object getDefaultGeometry()(Code) | | The default geometry of the feature. |
getFeatureFactory | public FeatureFactory getFeatureFactory()(Code) | | Returns the underlying attribute factory.
|
getNamespaceURI | public String getNamespaceURI()(Code) | | This namespace will be used when constructing attribute names.
namespace will be used when constructing attribute names. |
getType | public AttributeType getType()(Code) | | The type of the attribute being built. |
init | public void init()(Code) | | Initializes the builder to its initial state, the same state it is in
directly after being instantiated.
|
init | public void init(Attribute attribute)(Code) | | Initializes the state of the builder based on a previously built
attribute.
This method is useful when copying another attribute.
|
properties | protected List properties()(Code) | | Convenience accessor for properties list which does the null check.
|
setCRS | public void setCRS(CoordinateReferenceSystem crs)(Code) | | Sets the coordinate reference system of the built feature.
|
setDefaultGeometry | public void setDefaultGeometry(Object defaultGeometry)(Code) | | Sets the default geometry of the feature.
|
setDescriptor | public void setDescriptor(AttributeDescriptor descriptor)(Code) | | Sets the descriptor of the attribute being built.
When building a complex attribute, this type is used a reference to
obtain the types of contained attributes.
|
setFeatureFactory | public void setFeatureFactory(FeatureFactory attributeFactory)(Code) | | Sets the underlying attribute factory.
|
setNamespaceURI | public void setNamespaceURI(String namespace)(Code) | | This namespace will be used when constructing attribute names.
|
setType | public void setType(AttributeType type)(Code) | | Sets the type of the attribute being built.
When building a complex attribute, this type is used a reference to
obtain the types of contained attributes.
|
|
|