Revision 259 org.gvsig.projection/trunk/org.gvsig.projection.api/src/main/java/org/gvsig/fmap/crs/persistence/CoordTransPersistenceFactory.java
CoordTransPersistenceFactory.java | ||
---|---|---|
42 | 42 |
|
43 | 43 |
private static final String FIELD_SOURCE_PROJECTION = "source"; |
44 | 44 |
private static final String DESCRIPTION_SOURCE_PROJECTION = "Source projection"; |
45 |
|
|
45 |
|
|
46 | 46 |
private static final String FIELD_DESTINATION_PROJECTION = "destination"; |
47 | 47 |
private static final String DESCRIPTION_DESTINATION_PROJECTION = "Destination Projection"; |
48 | 48 |
|
... | ... | |
57 | 57 |
|
58 | 58 |
DynStruct definition = this.getDefinition(); |
59 | 59 |
|
60 |
definition.addDynField(FIELD_SOURCE_PROJECTION).setDescription( |
|
61 |
DESCRIPTION_SOURCE_PROJECTION).setMandatory(true).setType( |
|
62 |
DataTypes.CRS); |
|
63 |
|
|
64 |
definition.addDynField(FIELD_DESTINATION_PROJECTION).setDescription( |
|
65 |
DESCRIPTION_DESTINATION_PROJECTION).setMandatory(true).setType( |
|
66 |
DataTypes.CRS); |
|
60 |
definition.addDynFieldObject(FIELD_SOURCE_PROJECTION).setDescription( |
|
61 |
DESCRIPTION_SOURCE_PROJECTION).setMandatory(true).setClassOfValue(IProjection.class); |
|
62 |
|
|
63 |
definition.addDynFieldObject(FIELD_DESTINATION_PROJECTION).setDescription( |
|
64 |
DESCRIPTION_DESTINATION_PROJECTION).setMandatory(true).setClassOfValue(IProjection.class); |
|
67 | 65 |
} |
68 | 66 |
|
69 | 67 |
public Object createFromState(PersistentState state) |
70 | 68 |
throws PersistenceException { |
71 | 69 |
IProjection sourceProjection = (IProjection)state.get(FIELD_SOURCE_PROJECTION); |
72 |
IProjection destinationProjection = (IProjection)state.get(FIELD_DESTINATION_PROJECTION);
|
|
70 |
IProjection destinationProjection = (IProjection)state.get(FIELD_DESTINATION_PROJECTION); |
|
73 | 71 |
return sourceProjection.getCT(destinationProjection); |
74 | 72 |
} |
75 | 73 |
|
Also available in: Unified diff