org.vfny.geoserver.global.dto
Class DataTransferObjectFactory

java.lang.Object
  extended byorg.vfny.geoserver.global.dto.DataTransferObjectFactory

public class DataTransferObjectFactory
extends java.lang.Object

Generate Data Transfer Objects from "real" objects in the system.

This class is used to isolate the DTO from the details of generating them. This allows DTO objects to be safely used as a wire protocol with out unrequired dependencies on such things as AttributeType and FeatureType.

This class may choose to opperate as a facade on the services of global.xml?


Constructor Summary
DataTransferObjectFactory()
           
 
Method Summary
static AttributeTypeInfoDTO create(org.geotools.feature.AttributeType attributeType)
          Construct DTO based on provided attributeType.
static FeatureTypeInfoDTO create(java.lang.String dataStoreId, org.geotools.feature.FeatureType schema)
          Construct DTO based on provided schema.
static java.util.List generateAttributes(org.geotools.feature.FeatureType schema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTransferObjectFactory

public DataTransferObjectFactory()
Method Detail

create

public static AttributeTypeInfoDTO create(org.geotools.feature.AttributeType attributeType)
Construct DTO based on provided attributeType.

GMLUtils is used to provide the mapping from attributeType.getName/attributeType.getType() to an XML type/fragement.

Parameters:
attributeType - Real geotools2 AttributeType
Returns:
Data Transfer Object for provided attributeType

create

public static FeatureTypeInfoDTO create(java.lang.String dataStoreId,
                                        org.geotools.feature.FeatureType schema)
Construct DTO based on provided schema.

GMLUtils is used to provide the mapping to an XML type/fragement for each attribute

Parameters:
dataStoreId - Used as a backpointer to locate dataStore
schema - Real geotools2 FeatureType
Returns:
Data Transfer Object for provided schema

generateAttributes

public static java.util.List generateAttributes(org.geotools.feature.FeatureType schema)