Revision 3313
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceImpl.java | ||
---|---|---|
3390 | 3390 |
return request.getLastErrorCode(); |
3391 | 3391 |
} |
3392 | 3392 |
status.message("Updating " + tableName + " metadata"); |
3393 |
VCSGisEntity rentity = request.getEntity(); |
|
3393 |
// VCSGisEntity rentity = request.getEntity();
|
|
3394 | 3394 |
// entitiesStore = this.openFeatureStore(EntitiesTable.TABLE_NAME); |
3395 | 3395 |
// entitiesStore.edit(FeatureStore.MODE_FULLEDIT); |
3396 | 3396 |
// VCSGisEntity rentity = request.getEntity(); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/RevisionsRepoTable.java | ||
---|---|---|
17 | 17 |
import org.gvsig.tools.dataTypes.DataTypes; |
18 | 18 |
import org.gvsig.tools.dispose.DisposableIterable; |
19 | 19 |
import org.gvsig.tools.dispose.DisposeUtils; |
20 |
import org.gvsig.tools.dynform.spi.DynFormSPIManager; |
|
20 | 21 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
21 | 22 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_NOTPASSED; |
22 | 23 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_PASSED; |
... | ... | |
34 | 35 |
public class RevisionsRepoTable extends AbstractRepoTable { |
35 | 36 |
public static final String TABLE_NAME = "VCSGISREPO_REVISIONS"; |
36 | 37 |
|
37 |
private static final String COD_REVISION = "COD_REVISION";
|
|
38 |
public static final String COD_REVISION = "COD_REVISION";
|
|
38 | 39 |
private static final String COD_USER = "COD_USER"; |
39 | 40 |
private static final String COD_ENTITY = "COD_ENTITY"; |
40 |
private static final String REVISION_NUMBER = "REV_NUMBER";
|
|
41 |
public static final String REVISION_NUMBER = "REV_NUMBER";
|
|
41 | 42 |
private static final String REVISION_COMMENT = "REV_COMMENT"; |
42 | 43 |
private static final String REVISION_EFECTIVEDATE = "REV_EFECTIVEDATE"; |
43 | 44 |
private static final String REVISION_OPERATIONDATE = "REV_OPERATIONDATE"; |
... | ... | |
229 | 230 |
EditableFeatureType ft = dataManager.createFeatureType(); |
230 | 231 |
ft.setLabel("VCSGIS Revisions"); |
231 | 232 |
ft.getTags().set("ID", TABLE_NAME); |
233 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_HEIGHT, 225); |
|
234 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_WIDTH, 450); |
|
232 | 235 |
ft.add(COD_REVISION, DataTypes.STRING) |
233 | 236 |
.setSize(40) |
234 | 237 |
.setIsPrimaryKey(true) |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/UsersRepoTable.java | ||
---|---|---|
11 | 11 |
import org.gvsig.json.JsonObjectBuilder; |
12 | 12 |
import org.gvsig.tools.dataTypes.DataTypes; |
13 | 13 |
import org.gvsig.tools.dispose.DisposeUtils; |
14 |
import org.gvsig.tools.dynform.spi.DynFormSPIManager; |
|
14 | 15 |
import org.gvsig.vcsgis.lib.VCSGisUser; |
15 | 16 |
import org.gvsig.vcsgis.lib.VCSGisUserEditable; |
16 | 17 |
import org.gvsig.vcsgis.lib.VCSGisUserImpl; |
17 | 18 |
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb; |
18 |
import static org.gvsig.vcsgis.lib.repository.localdb.tables.ConfigRepoTable.TABLE_NAME; |
|
19 | 19 |
|
20 | 20 |
/** |
21 | 21 |
* |
... | ... | |
26 | 26 |
|
27 | 27 |
public static final String TABLE_NAME = "VCSGISREPO_USERS"; |
28 | 28 |
|
29 |
private static final String COD_USER = "COD_USER";
|
|
30 |
private static final String USER_ID = "USER_ID";
|
|
29 |
public static final String COD_USER = "COD_USER";
|
|
30 |
public static final String USER_ID = "USER_ID";
|
|
31 | 31 |
private static final String USER_PASSWORD = "USER_PASS"; |
32 | 32 |
private static final String USER_ROLES = "USER_ROLES"; |
33 | 33 |
private static final String USER_DESCRIPTION = "USER_DESCRIPTION"; |
... | ... | |
37 | 37 |
EditableFeatureType ft = dataManager.createFeatureType(); |
38 | 38 |
ft.setLabel("VCSGIS repository users"); |
39 | 39 |
ft.getTags().set("ID", TABLE_NAME); |
40 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_HEIGHT, 130); |
|
41 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_WIDTH, 450); |
|
40 | 42 |
ft.add(COD_USER, DataTypes.STRING) |
41 | 43 |
.setSize(40) |
42 | 44 |
.setIsPrimaryKey(true) |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/EntitiesRepoTable.java | ||
---|---|---|
7 | 7 |
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb; |
8 | 8 |
import org.gvsig.fmap.dal.DALLocator; |
9 | 9 |
import org.gvsig.fmap.dal.DataManager; |
10 |
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
|
10 | 11 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
11 | 12 |
import org.gvsig.fmap.dal.feature.Feature; |
12 | 13 |
import org.gvsig.fmap.dal.feature.FeatureSet.DisposableFeatureSetIterable; |
... | ... | |
16 | 17 |
import org.gvsig.json.JsonObjectBuilder; |
17 | 18 |
import org.gvsig.tools.dataTypes.DataTypes; |
18 | 19 |
import org.gvsig.tools.dispose.DisposeUtils; |
20 |
import org.gvsig.tools.dynform.spi.DynFormSPIManager; |
|
21 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
|
19 | 22 |
import org.gvsig.vcsgis.lib.VCSGisUtils; |
20 | 23 |
import org.gvsig.vcsgis.lib.VCSGisEntityEditable; |
21 | 24 |
import org.gvsig.vcsgis.lib.VCSGisEntity; |
25 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_MODE_MANDATORY; |
|
26 |
import static org.gvsig.vcsgis.lib.VCSGisManager.TOPOLOGYPLAN_MODE_RECOMMENDED; |
|
22 | 27 |
|
23 | 28 |
/** |
24 | 29 |
* |
... | ... | |
356 | 361 |
EditableFeatureType ft = dataManager.createFeatureType(); |
357 | 362 |
ft.setLabel("VCSGIS Entities"); |
358 | 363 |
ft.getTags().set("ID", TABLE_NAME); |
364 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_HEIGHT, 475); |
|
365 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_WIDTH, 450); |
|
359 | 366 |
ft.add(COD_ENTITY, DataTypes.STRING) |
360 | 367 |
.setSize(40) |
361 | 368 |
.setIsPrimaryKey(true) |
... | ... | |
399 | 406 |
.setSize(200) |
400 | 407 |
.setLabel("Label"); |
401 | 408 |
ft.add(AUTHORIZATIONS, DataTypes.STRING) |
409 |
.setDataProfileName("Text") |
|
402 | 410 |
.setSize(10240) |
403 | 411 |
.setLabel("Authorizations"); |
404 | 412 |
ft.add(DESCRIPTION, DataTypes.STRING) |
413 |
.setDataProfileName("Text") |
|
405 | 414 |
.setSize(10240) |
406 | 415 |
.setLabel("Description"); |
407 | 416 |
ft.add(FEATURETYPE, DataTypes.STRING) |
417 |
.setDataProfileName("Text") |
|
408 | 418 |
.setSize(10240) |
409 | 419 |
.setLabel("Feature type"); |
410 | 420 |
ft.add(TOPOLOGYPLAN_MODE, DataTypes.INTEGER) |
411 |
.setLabel("Topology plan mode"); |
|
412 |
|
|
421 |
.setLabel("Topology plan mode") |
|
422 |
.setAvailableValues(new DynObjectValueItem[] { |
|
423 |
new DynObjectValueItem(TOPOLOGYPLAN_MODE_RECOMMENDED, "Recommended"), |
|
424 |
new DynObjectValueItem(TOPOLOGYPLAN_MODE_MANDATORY, "Mandatory") |
|
425 |
}); |
|
413 | 426 |
|
427 |
|
|
428 |
EditableFeatureAttributeDescriptor topologyPlan = (EditableFeatureAttributeDescriptor) ft.getAttributeDescriptor(COD_TOPOLOGYPLAN); |
|
429 |
topologyPlan.getForeingKey().setTableName(TopologyplanRepoTable.TABLE_NAME); |
|
430 |
topologyPlan.getForeingKey().setClosedList(false); |
|
431 |
topologyPlan.getForeingKey().setCodeName(TopologyplanRepoTable.COD_TOPOLOGYPLAN); |
|
432 |
topologyPlan.getForeingKey().setForeingKey(true); |
|
433 |
topologyPlan.getForeingKey().setLabelFormula(TopologyplanRepoTable.TOPPLAN_NAME); |
|
434 |
|
|
435 |
EditableFeatureAttributeDescriptor user = (EditableFeatureAttributeDescriptor) ft.getAttributeDescriptor(COD_USER); |
|
436 |
user.getForeingKey().setTableName(UsersRepoTable.TABLE_NAME); |
|
437 |
user.getForeingKey().setClosedList(false); |
|
438 |
user.getForeingKey().setCodeName(UsersRepoTable.COD_USER); |
|
439 |
user.getForeingKey().setForeingKey(true); |
|
440 |
user.getForeingKey().setLabelFormula(UsersRepoTable.USER_ID); |
|
441 |
|
|
442 |
EditableFeatureAttributeDescriptor revision = (EditableFeatureAttributeDescriptor) ft.getAttributeDescriptor(COD_REVISION); |
|
443 |
revision.getForeingKey().setTableName(RevisionsRepoTable.TABLE_NAME); |
|
444 |
revision.getForeingKey().setClosedList(false); |
|
445 |
revision.getForeingKey().setCodeName(RevisionsRepoTable.COD_REVISION); |
|
446 |
revision.getForeingKey().setForeingKey(true); |
|
447 |
revision.getForeingKey().setLabelFormula("format('r%d %s', REV_NUMBER, REV_OPERATIONDATE)"); |
|
448 |
|
|
414 | 449 |
return ft.getNotEditableCopy(); |
415 | 450 |
} |
416 | 451 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/tables/TopologyplanRepoTable.java | ||
---|---|---|
8 | 8 |
import org.gvsig.fmap.dal.feature.FeatureType; |
9 | 9 |
import org.gvsig.tools.dataTypes.DataTypes; |
10 | 10 |
import org.gvsig.tools.dispose.DisposeUtils; |
11 |
import org.gvsig.tools.dynform.spi.DynFormSPIManager; |
|
11 | 12 |
import org.gvsig.vcsgis.lib.repository.localdb.VCSGisRepositoryLocaldb; |
12 | 13 |
|
13 | 14 |
/** |
... | ... | |
19 | 20 |
|
20 | 21 |
public static final String TABLE_NAME = "VCSGISREPO_TOPOLOGYPLANS"; |
21 | 22 |
|
22 |
private static final String COD_TOPOLOGYPLAN = "COD_TOPOLOGYPLAN";
|
|
23 |
private static final String TOPPLAN_NAME = "TOPP_NAME";
|
|
23 |
public static final String COD_TOPOLOGYPLAN = "COD_TOPOLOGYPLAN";
|
|
24 |
public static final String TOPPLAN_NAME = "TOPP_NAME";
|
|
24 | 25 |
private static final String TOPPLAN_DESCRIPTION = "TOPP_DESCRIPTION"; |
25 | 26 |
private static final String TOPPLAN_DATA = "TOPP_DATA"; |
26 | 27 |
|
... | ... | |
29 | 30 |
EditableFeatureType ft = dataManager.createFeatureType(); |
30 | 31 |
ft.setLabel("VCSGIS TopologyPlans"); |
31 | 32 |
ft.getTags().set("ID", TABLE_NAME); |
33 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_HEIGHT, 160); |
|
34 |
ft.getTags().set(DynFormSPIManager.TAG_DYNFORM_WIDTH, 450); |
|
32 | 35 |
ft.add(COD_TOPOLOGYPLAN, DataTypes.STRING) |
33 | 36 |
.setSize(40) |
34 | 37 |
.setIsPrimaryKey(true) |
35 | 38 |
.setLabel("Code") |
36 |
.setReadOnly(true); |
|
39 |
.setReadOnly(false) |
|
40 |
.setDefaultFieldValue("<%=replace(UUID(),'-','')%>"); |
|
37 | 41 |
ft.add(TOPPLAN_NAME, DataTypes.STRING) |
38 | 42 |
.setIsIndexed(true) |
39 | 43 |
.setAllowIndexDuplicateds(true) |
40 | 44 |
.setSize(50) |
41 | 45 |
.setLabel("Name"); |
42 | 46 |
ft.add(TOPPLAN_DESCRIPTION, DataTypes.STRING) |
47 |
.setDataProfileName("Text") |
|
43 | 48 |
.setSize(10240) |
44 |
.setLabel("Description");
|
|
49 |
.setLabel("Description"); |
|
45 | 50 |
ft.add(TOPPLAN_DATA, DataTypes.STRING) |
51 |
.setDataProfileName("Text") |
|
46 | 52 |
.setSize(10240) |
47 | 53 |
.setLabel("Serialized topology plan in json."); |
48 | 54 |
|
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/pom.xml | ||
---|---|---|
85 | 85 |
<artifactId>httpclient</artifactId> |
86 | 86 |
<scope>compile</scope> |
87 | 87 |
</dependency> |
88 |
<dependency> |
|
89 |
<groupId>org.gvsig</groupId> |
|
90 |
<artifactId>org.gvsig.tools.dynform.spi</artifactId> |
|
91 |
<scope>compile</scope> |
|
92 |
</dependency> |
|
88 | 93 |
</dependencies> |
89 | 94 |
<build> |
90 | 95 |
<plugins> |
Also available in: Unified diff