|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.feature.AttributeBuilder
public class AttributeBuilder
Builder for attributes.
Constructor Summary | |
---|---|
AttributeBuilder(org.opengis.feature.FeatureFactory attributeFactory)
|
Method Summary | |
---|---|
org.opengis.feature.Attribute |
add(java.lang.Object value,
org.opengis.feature.type.Name name)
Adds an attribute to the complex attribute being built. |
org.opengis.feature.Attribute |
add(java.lang.Object value,
java.lang.String name)
Adds an attribute to the complex attribute being built. |
org.opengis.feature.Attribute |
add(java.lang.Object value,
java.lang.String name,
java.lang.String namespaceURI)
Adds an attribute to the complex attribute being built. |
org.opengis.feature.Attribute |
add(java.lang.String id,
java.lang.Object value,
org.opengis.feature.type.Name name)
Adds an attribute to the complex attribute being built. |
org.opengis.feature.Attribute |
add(java.lang.String id,
java.lang.Object value,
org.opengis.feature.type.Name name,
org.opengis.feature.type.AttributeType type)
Adds an attribute to the complex attribute being built overriding the type of the declared attribute descriptor by a subtype of it. |
org.opengis.feature.Attribute |
add(java.lang.String id,
java.lang.Object value,
java.lang.String name)
Adds an attribute to the complex attribute being built. |
org.opengis.feature.Attribute |
add(java.lang.String id,
java.lang.Object value,
java.lang.String name,
java.lang.String namespaceURI)
Adds an attribute to the complex attribute being built. |
org.opengis.feature.Attribute |
addAnyTypeValue(java.lang.Object value,
org.opengis.feature.type.AttributeType type,
org.opengis.feature.type.AttributeDescriptor descriptor,
java.lang.String id)
Special case for any type. |
org.opengis.feature.Attribute |
addComplexAnyTypeAttribute(java.lang.Object value,
org.opengis.feature.type.AttributeDescriptor descriptor,
java.lang.String id)
Create a complex attribute for XS.AnyType, since it's defined as a simple type. |
void |
associate(org.opengis.feature.Attribute value,
org.opengis.feature.type.Name name)
Adds an association to the complex attribute being built. |
void |
associate(org.opengis.feature.Attribute value,
java.lang.String name)
Adds an association to the complex attribute being built. |
void |
associate(org.opengis.feature.Attribute attribute,
java.lang.String name,
java.lang.String namespaceURI)
Adds an association to the complex attribute being built. |
protected org.opengis.feature.type.AssociationDescriptor |
associationDescriptor(org.opengis.feature.type.Name name)
|
protected org.opengis.feature.type.AttributeDescriptor |
attributeDescriptor(org.opengis.feature.type.Name name)
|
protected org.opengis.feature.type.AttributeDescriptor |
attributeDescriptor(org.opengis.feature.type.Name name,
org.opengis.feature.type.AttributeType actualType)
|
org.opengis.feature.Attribute |
build()
Builds the attribute. |
org.opengis.feature.Attribute |
build(java.lang.String id)
Builds the attribute. |
protected org.opengis.feature.Attribute |
create(java.lang.Object value,
org.opengis.feature.type.AttributeType type,
org.opengis.feature.type.AttributeDescriptor descriptor,
java.lang.String id)
Factors out attribute creation code, needs to be called with either one of type or descriptor null. |
org.opengis.feature.ComplexAttribute |
createComplexAttribute(java.lang.Object value,
org.opengis.feature.type.ComplexType type,
org.opengis.feature.type.AttributeDescriptor descriptor,
java.lang.String id)
Create complex attribute |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCRS()
|
java.lang.Object |
getDefaultGeometry()
|
org.opengis.feature.FeatureFactory |
getFeatureFactory()
Returns the underlying attribute factory. |
java.lang.String |
getNamespaceURI()
This namespace will be used when constructing attribute names. |
org.opengis.feature.type.AttributeType |
getType()
|
void |
init()
Initializes the builder to its initial state, the same state it is in directly after being instantiated. |
void |
init(org.opengis.feature.Attribute attribute)
Initializes the state of the builder based on a previously built attribute. |
protected java.util.List |
properties()
Convenience accessor for properties list which does the null check. |
void |
setCRS(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Sets the coordinate reference system of the built feature. |
void |
setDefaultGeometry(java.lang.Object defaultGeometry)
Sets the default geometry of the feature. |
void |
setDescriptor(org.opengis.feature.type.AttributeDescriptor descriptor)
Sets the descriptor of the attribute being built. |
void |
setFeatureFactory(org.opengis.feature.FeatureFactory attributeFactory)
Sets the underlying attribute factory. |
void |
setNamespaceURI(java.lang.String namespace)
This namespace will be used when constructing attribute names. |
void |
setType(org.opengis.feature.type.AttributeType type)
Sets the type of the attribute being built. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeBuilder(org.opengis.feature.FeatureFactory attributeFactory)
Method Detail |
---|
public org.opengis.feature.FeatureFactory getFeatureFactory()
public void setFeatureFactory(org.opengis.feature.FeatureFactory attributeFactory)
public void init()
public void init(org.opengis.feature.Attribute attribute)
This method is useful when copying another attribute.
public void setNamespaceURI(java.lang.String namespace)
public java.lang.String getNamespaceURI()
public void setType(org.opengis.feature.type.AttributeType type)
When building a complex attribute, this type is used a reference to obtain the types of contained attributes.
public void setDescriptor(org.opengis.feature.type.AttributeDescriptor descriptor)
When building a complex attribute, this type is used a reference to obtain the types of contained attributes.
public org.opengis.feature.type.AttributeType getType()
public void setCRS(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
public org.opengis.referencing.crs.CoordinateReferenceSystem getCRS()
public void setDefaultGeometry(java.lang.Object defaultGeometry)
public java.lang.Object getDefaultGeometry()
public org.opengis.feature.Attribute add(java.lang.Object value, java.lang.String name)
This method uses the result of getNamespaceURI()
to build a qualified attribute
name.
This method uses the type supplied in setType(AttributeType)
in order to determine
the attribute type.
name
- The name of the attribute.value
- The value of the attribute.public void associate(org.opengis.feature.Attribute value, java.lang.String name)
This method uses the result of getNamespaceURI()
to build a qualified attribute
name.
This method uses the type supplied in setType(AttributeType)
in order to determine
the association type.
value
- The value of the association, an attribute.name
- The name of the association.public org.opengis.feature.Attribute add(java.lang.Object value, java.lang.String name, java.lang.String namespaceURI)
This method uses the type supplied in setType(AttributeType)
in order to determine
the attribute type.
value
- The value of the attribute.name
- The name of the attribute.namespaceURI
- The namespace of the attribute.public void associate(org.opengis.feature.Attribute attribute, java.lang.String name, java.lang.String namespaceURI)
This method uses the type supplied in setType(AttributeType)
in order to determine
the association type.
value
- The value of the association, an attribute.name
- The name of the association.namespaceURI
- The namespace of the associationpublic org.opengis.feature.Attribute add(java.lang.String id, java.lang.Object value, org.opengis.feature.type.Name name, org.opengis.feature.type.AttributeType type)
This method uses the type supplied in setType(AttributeType)
in order to determine
the attribute type.
id
- the attribtue idvalue
- The value of the attribute.name
- The name of the attribute.type
- the actual type of the attribute, which might be the same as the declared type
for the given AttributeDescriptor or a derived type.public org.opengis.feature.Attribute add(java.lang.Object value, org.opengis.feature.type.Name name)
This method uses the type supplied in setType(AttributeType)
in order to determine
the attribute type.
name
- The name of the attribute.value
- The value of the attribute.public void associate(org.opengis.feature.Attribute value, org.opengis.feature.type.Name name)
This method uses the type supplied in setType(AttributeType)
in order to determine
the association type.
value
- The value of the association, an attribute.name
- The name of the association.namespaceURI
- The namespace of the associationpublic org.opengis.feature.Attribute add(java.lang.String id, java.lang.Object value, java.lang.String name)
The result of getNamespaceURI()
to build a qualified attribute name.
This method uses the type supplied in setType(AttributeType)
in order to determine
the attribute type.
id
- The id of the attribute.name
- The name of the attribute.value
- The value of the attribute.public org.opengis.feature.Attribute add(java.lang.String id, java.lang.Object value, java.lang.String name, java.lang.String namespaceURI)
This method uses the type supplied in setType(AttributeType)
in order to determine
the attribute type.
id
- The id of the attribute.value
- The value of the attribute.name
- The name of the attribute.namespaceURI
- The namespace of the attribute.public org.opengis.feature.Attribute add(java.lang.String id, java.lang.Object value, org.opengis.feature.type.Name name)
This method uses the type supplied in setType(AttributeType)
in order to determine
the attribute type.
id
- The id of the attribute.name
- The name of the attribute.value
- The value of the attribute.protected java.util.List properties()
protected org.opengis.feature.type.AssociationDescriptor associationDescriptor(org.opengis.feature.type.Name name)
protected org.opengis.feature.type.AttributeDescriptor attributeDescriptor(org.opengis.feature.type.Name name)
protected org.opengis.feature.type.AttributeDescriptor attributeDescriptor(org.opengis.feature.type.Name name, org.opengis.feature.type.AttributeType actualType)
protected org.opengis.feature.Attribute create(java.lang.Object value, org.opengis.feature.type.AttributeType type, org.opengis.feature.type.AttributeDescriptor descriptor, java.lang.String id)
public org.opengis.feature.ComplexAttribute createComplexAttribute(java.lang.Object value, org.opengis.feature.type.ComplexType type, org.opengis.feature.type.AttributeDescriptor descriptor, java.lang.String id)
value
- type
- descriptor
- id
-
public org.opengis.feature.Attribute build()
The class of the attribute built is determined from its type set with
setType(AttributeType)
.
public org.opengis.feature.Attribute build(java.lang.String id)
The class of the attribute built is determined from its type set with
setType(AttributeType)
.
id
- The id of the attribute, or null.
public org.opengis.feature.Attribute addAnyTypeValue(java.lang.Object value, org.opengis.feature.type.AttributeType type, org.opengis.feature.type.AttributeDescriptor descriptor, java.lang.String id)
value
- the value to be settype
- the type of the valuedescriptor
- the attribute descriptor of anyType typeid
-
public org.opengis.feature.Attribute addComplexAnyTypeAttribute(java.lang.Object value, org.opengis.feature.type.AttributeDescriptor descriptor, java.lang.String id)
value
- descriptor
- id
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |