gvsig-projects-pool / org.gvsig.cvsgis / trunk / org.gvsig.cvsgis / org.gvsig.cvsgis.lib / org.gvsig.cvsgis.lib.api / src / main / java / org / gvsig / cvsgis / lib / CvsGisWorkspace.java @ 2278
History | View | Annotate | Download (4.48 KB)
1 |
/*
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2020 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
18 |
*
|
19 |
* For any additional information, do not hesitate to contact us
|
20 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
21 |
*/
|
22 |
package org.gvsig.cvsgis.lib; |
23 |
|
24 |
import java.awt.Color; |
25 |
import java.util.List; |
26 |
import org.gvsig.fmap.dal.feature.Feature; |
27 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
28 |
import org.gvsig.fmap.dal.feature.FeatureType; |
29 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
30 |
import org.gvsig.tools.dispose.Disposable; |
31 |
import org.gvsig.tools.util.GetItemWithSize64; |
32 |
|
33 |
/**
|
34 |
*
|
35 |
* @author gvSIG Team
|
36 |
*/
|
37 |
public interface CvsGisWorkspace extends Disposable { |
38 |
|
39 |
|
40 |
public static int ERR_NO_ERROR = 0; |
41 |
public static int ERR_DBFILE_IS_NULL = 1; |
42 |
public static int ERR_CANT_OPEN_WORKSPACE = 2; |
43 |
public static int ERR_CANT_OPEN_WORKSPACE_SERVEREXPLORER = 3; |
44 |
public static int ERR_STORE_NOT_IN_VERSION_CONTROL = 4; |
45 |
|
46 |
public static int ERR_CANT_CREATE_TABLE = 10; |
47 |
public static int ERR_CANT_CREATE_TABLE_CONFIG = 11; |
48 |
public static int ERR_CANT_CREATE_TABLE_ENTITIES = 12; |
49 |
public static int ERR_CANT_CREATE_TABLE_CHANGES = 13; |
50 |
|
51 |
public static int ERR_ENTITY_ALREADY_EXISTS = 20; |
52 |
public static int ERR_ENTITY_NOT_HAS_CVSGISID = 21; |
53 |
public static int ERR_CANT_OPEN_ENTITIES = 22; |
54 |
public static int ERR_CANT_INSERT_ENTITIES = 23; |
55 |
|
56 |
public static int ERR_CANT_OPEN_CHANGES = 30; |
57 |
public static int ERR_CANT_INSERT_CHANGE = 31; |
58 |
|
59 |
public static int ERR_CANT_OPEN_STORE = 40; |
60 |
public static int ERR_CANT_RETRIEVE_SOURCE_FEATURES = 41; |
61 |
public static int ERR_CANT_INSERT_FEATURES = 42; |
62 |
|
63 |
public static int ERR_CANT_COMMIT = 50; |
64 |
|
65 |
public static int ERR_CANT_CHECKOUT = 60; |
66 |
public static int ERR_TABLE_ALREADY_IN_WORKSPACE = 61; |
67 |
public static int ERR_TABLE_NOT_IN_REPOSITORY = 62; |
68 |
|
69 |
public static int ERR_CANT_UPDATE_ENTITIES = 70; |
70 |
|
71 |
|
72 |
public static int STATE_UNMODIFIED = 0; |
73 |
public static int STATE_NEW = 1; |
74 |
public static int STATE_MODIFIED = 2; |
75 |
public static int STATE_OUTDATED = 4; |
76 |
public static int STATE_OUTDATED_AND_MODIFIED = 6; |
77 |
public static int STATE_CONFLICT = 8; |
78 |
|
79 |
public interface Entity { |
80 |
public String getEntityCode(); |
81 |
public String getBranchCode(); |
82 |
public String getLocalRevisionCode(); |
83 |
public String getRepositoryRevisionCode(); |
84 |
public String getEntityName(); |
85 |
public String getBranchName(); |
86 |
public String getDataTableName(); |
87 |
public String getDescription(); |
88 |
public FeatureType getFeatureType();
|
89 |
public long getCountLocalChanges(); |
90 |
/**
|
91 |
* Return the state of the entity.
|
92 |
* This operation is an expensive operation.
|
93 |
* @return the state
|
94 |
*/
|
95 |
public int getState(); |
96 |
} |
97 |
|
98 |
public interface Change { |
99 |
public String getCode(); |
100 |
public String getEntityCode(); |
101 |
public boolean isSelected(); |
102 |
public int getOperation(); |
103 |
public String getRelatedFeatureCode(); |
104 |
public Feature getRelatedFeature();
|
105 |
} |
106 |
|
107 |
public String getCode(); |
108 |
|
109 |
public String getLabel(); |
110 |
|
111 |
public JDBCServerExplorerParameters getExplorerParameters();
|
112 |
|
113 |
public FeatureStore getFeatureStore(String tableName); |
114 |
|
115 |
public void create_table(String name); |
116 |
|
117 |
public int add_entity(FeatureType featureType, String name, String description); |
118 |
|
119 |
public int add(String name, FeatureStore store, String filter, String order, boolean asc); |
120 |
|
121 |
public int commit(); |
122 |
|
123 |
public int checkout(String tableName, String brachName); |
124 |
|
125 |
public int update(String tableName); |
126 |
|
127 |
public int update_entities(); |
128 |
|
129 |
public GetItemWithSize64<Change> getLocalChanges(String entityCode); |
130 |
|
131 |
public List<Entity> getEntities(); |
132 |
|
133 |
public Entity getEntityByName(String entity); |
134 |
} |