|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAttributeTypeFactory
public abstract class AttributeTypeFactory
Abstract class for AttributeType factories. Extending classes need only implement createAttributeType
modules/library/legacy (gt-legacy.jar)
Constructor Summary | |
---|---|
AttributeTypeFactory()
|
Method Summary | |
---|---|
protected abstract AttributeType |
createAttributeType(String name,
Class clazz,
boolean isNillable,
Filter restriction,
Object defaultValue,
Object metadata)
Create an AttributeType with the given name, Class, nillability, fieldLength, and provided defaultValue. |
protected abstract AttributeType |
createAttributeType(String name,
Class type,
boolean isNillable,
Filter restriction,
Object defaultValue,
Object metaData,
int min,
int max)
Create an AttributeType with the given name, Class, nillability, fieldLength, and provided defaultValue. |
protected abstract AttributeType |
createAttributeType(String name,
Class clazz,
boolean isNillable,
int fieldLength)
Create an AttributeType with the given name, Class, nillability, and fieldLength, defering the defaultValue to the type of Attribute. |
protected abstract AttributeType |
createAttributeType(String name,
Class clazz,
boolean isNillable,
int fieldLength,
Object defaultValue)
Create an AttributeType with the given name, Class, nillability, fieldLength, and provided defaultValue. |
protected abstract AttributeType |
createAttributeType(String name,
Class type,
boolean isNillable,
int fieldLength,
Object defaultValue,
Object metaData)
Create a Feature AttributeType which holds the a Feature instance which is of the given FeatureType or null if any arbitrary Feature can be held. |
protected abstract AttributeType |
createAttributeType(String name,
FeatureType type,
boolean isNillable)
Create a Feature AttributeType which holds the a Feature instance which is of the given FeatureType or null if any arbitrary Feature can be held. |
static AttributeTypeFactory |
defaultInstance()
Returns the default attribute factory for the system - constucting a new one if this is first time the method has been called. |
Map |
getImplementationHints()
Returns the implementation hints. |
static AttributeType |
newAttributeType(String name,
Class clazz)
Convenience method to just specify name and class. |
static AttributeType |
newAttributeType(String name,
Class clazz,
boolean isNillable)
Creates a new AttributeType with the given name, class and nillable values. |
static AttributeType |
newAttributeType(String name,
Class clazz,
boolean isNillable,
Filter restriction,
Object defaultValue,
Object metaData)
Creates a new AttributeType with the addition of metadata like CRS. |
static AttributeType |
newAttributeType(String name,
Class clazz,
boolean isNillable,
Filter restriction,
Object defaultValue,
Object metaData,
int min,
int max)
Creates a new AttributeType. |
static AttributeType |
newAttributeType(String name,
Class clazz,
boolean isNillable,
int fieldLength)
Creates a new AttributeType with the given name, class and nillable values. |
static AttributeType |
newAttributeType(String name,
Class clazz,
boolean isNillable,
int fieldLength,
Object defaultValue)
Creates a new AttributeType with the given name, class and nillable values. |
static AttributeType |
newAttributeType(String name,
Class clazz,
boolean isNillable,
int fieldLength,
Object defaultValue,
Object metaData)
Creates a new AttributeType with the addition of metadata like CRS. |
static AttributeType |
newAttributeType(String name,
FeatureType type)
Constucts a new AttributeType that accepts Feature (specified by a FeatureType). |
static AttributeType |
newAttributeType(String name,
FeatureType type,
boolean isNillable)
Constucts a new AttributeType that accepts Features (specified by a FeatureType) |
static AttributeTypeFactory |
newInstance()
Deprecated. Please use CommonFactoryFinder |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeTypeFactory()
Method Detail |
---|
public static AttributeTypeFactory defaultInstance()
public static AttributeTypeFactory newInstance()
If no implementations are found then DefaultAttributeTypeFactory is returned.
public static AttributeType newAttributeType(String name, Class clazz, boolean isNillable, int fieldLength, Object defaultValue)
name
- The name of the AttributeType to be created.clazz
- The class that objects will validate against.isNillable
- If nulls are allowed (will force min=0)
public static AttributeType newAttributeType(String name, Class clazz, boolean isNillable, int fieldLength, Object defaultValue, Object metaData)
Currently MetaData is used to supply the CoordinateSequence when making a GeometryAttributeType.
name
- name of the attribute type to be createdclazz
- Class that objects will validate againstisNillable
- If nulls are allowed (will force min=0)fieldLength
- A common restriction (this will produce a Filter)defaultValue
- Initial valid value for new FeaturemetaData
- Additional information (example a CoordinateReferenceSystem for a Geometry)
public static AttributeType newAttributeType(String name, Class clazz, boolean isNillable, Filter restriction, Object defaultValue, Object metaData)
name
- name of the attribute type to be createdclazz
- Class that objects will validate againstisNillable
- If nulls are allowed (will force min=0)restriction
- Filter restricting valid contentdefaultValue
- Initial valid value for new FeaturemetaData
- Additional information (example a CoordinateReferenceSystem for a Geometry)
public static AttributeType newAttributeType(String name, Class clazz, boolean isNillable, Filter restriction, Object defaultValue, Object metaData, int min, int max)
name
- name of the attribute type to be createdclazz
- Class that objects will validate againstisNillable
- If nulls are allowed (will force min=0)restriction
- defaultValue
- metaData
- metaData Additional information (example a CoordinateReferenceSystem for a Geometry)min
- minimum number of occurances for an array classmax
- maximum number of occurances for an array class
public static AttributeType newAttributeType(String name, Class clazz, boolean isNillable, int fieldLength)
name
- The name of the AttributeType to be created.clazz
- The class that objects will validate against.isNillable
- If nulls are allowed (will force min=0)
public static AttributeType newAttributeType(String name, Class clazz, boolean isNillable)
name
- The name of the AttributeType to be created.clazz
- The class that objects will validate against.isNillable
- If nulls are allowed (will force min=0)
public static AttributeType newAttributeType(String name, Class clazz)
true
).
name
- The name of the AttributeType to be created.clazz
- The class that objects will validate against.
public static AttributeType newAttributeType(String name, FeatureType type, boolean isNillable)
name
- The name of the AttributeType to be created.type
- the FeatureType that features will validate agistisNillable
- If nulls are allowed (will force min=0)
public static AttributeType newAttributeType(String name, FeatureType type)
true
).
name
- The name of the AttributeType to be created.type
- the FeatureType that features will validate agist
protected abstract AttributeType createAttributeType(String name, Class clazz, boolean isNillable, int fieldLength, Object defaultValue)
name
- The name of the AttributeType to be created.clazz
- The class that objects will validate against.isNillable
- if nulls are allowed in the new type.
IllegalArgumentException
- If the field is not nillable, yetprotected abstract AttributeType createAttributeType(String name, Class clazz, boolean isNillable, Filter restriction, Object defaultValue, Object metadata)
name
- The name of the AttributeType to be created.clazz
- The class that objects will validate against.isNillable
- if nulls are allowed in the new type.restriction
- Used to limit the valid values
IllegalArgumentException
- If the field is not nillable, yetprotected abstract AttributeType createAttributeType(String name, Class type, boolean isNillable, Filter restriction, Object defaultValue, Object metaData, int min, int max)
name
- The name of the AttributeType to be created.clazz
- The class that objects will validate against.isNillable
- if nulls are allowed in the new type.restriction
- Used to limit the valid valuesmin
- the minimum number of occurences of the attributemax
- the maximum number of occurences of the attribute
IllegalArgumentException
- If the field is not nillable, yetprotected abstract AttributeType createAttributeType(String name, Class clazz, boolean isNillable, int fieldLength)
protected abstract AttributeType createAttributeType(String name, FeatureType type, boolean isNillable)
name
- The name of the AttributeType to be created.type
- The FeatureType that Features will validate against.isNillable
- if nulls are allowed in the new type.
protected abstract AttributeType createAttributeType(String name, Class type, boolean isNillable, int fieldLength, Object defaultValue, Object metaData)
name
- The name of the AttributeType to be created.type
- The FeatureType that Features will validate against.isNillable
- if nulls are allowed in the new type.defaultValue
- default value, may be null if isNilable is truemetaData
- metadata for attribute type (such as CoordianteReferenceSystem)
public Map getImplementationHints()
getImplementationHints
in interface Factory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |