Revision 7165

View differences:

org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.vcsgis.swing.VCSGisSwingLibrary
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJCheckoutDataModel.java
1
package org.gvsig.vcsgis.swing;
2

  
3
/*
4
 * gvSIG. Desktop Geographic Information System.
5
 * 
6
 * Copyright (C) 2007-2020 gvSIG Association.
7
 * 
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 3
11
 * of the License, or (at your option) any later version.
12
 * 
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 * 
18
 * You should have received a copy of the GNU General Public License 
19
 * along with this program. If not, see <https://www.gnu.org/licenses/>. 
20
 * 
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

  
25

  
26
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
27

  
28
/**
29
 *
30
 * @author jjdelcerro
31
 */
32
public interface VCSGisJCheckoutDataModel extends VCSGisPanel {
33
    
34
    public int connectToModel();
35
    
36
    public VCSGisWorkspace getWorkspace();
37

  
38
    public String getDataModel();
39
    
40
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisSwingServices.java
1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.vcsgis.swing;
7

  
8
import java.util.Set;
9
import javax.swing.ComboBoxModel;
10
import javax.swing.Icon;
11
import javax.swing.ListModel;
12
import javax.swing.tree.TreeModel;
13
import org.gvsig.fmap.dal.feature.FeatureStore;
14
import org.gvsig.fmap.geom.Geometry;
15
import org.gvsig.fmap.mapcontrol.MapControl;
16
import org.gvsig.tools.util.LabeledValue;
17
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
18

  
19
/**
20
 *
21
 * @author fdiaz
22
 */
23
public interface VCSGisSwingServices {
24
    
25
    public static int HIGHLIGHT_REPOSITORY = 1;
26
    public static int HIGHLIGHT_WORKSPACE = 2;
27
    public static int HIGHLIGHT_WORKSPACE_PREVIOUS = 3;
28
    
29
    public TreeModel getFeatureStoresTreeModel();
30

  
31
    public ListModel getFeatureStoresListModel();
32

  
33
    public void addTableToProject(VCSGisWorkspace ws, FeatureStore store);
34

  
35
    public ComboBoxModel<LabeledValue> getViewDocumentsComboBoxModel();
36

  
37
    public void addLayerToView(FeatureStore store, LabeledValue view, String groupName, String name, boolean replaceLayerIfExists);
38

  
39
    public void centerActiveViewToGeometry(Geometry geometry);
40

  
41
    public void centerViewsHavingAStoreToGeometry(FeatureStore store, Geometry geometry);
42

  
43
    public void zoomActiveViewToGeometry(Geometry geometry);
44

  
45
    public void zoomViewsHavingAStoreToGeometry(FeatureStore store, Geometry geometry);
46

  
47
    public void cleanHighligthed();
48
    
49
    public void cleanActiveViewHighligthed();
50
    
51
    public void refreshDocuments();
52
    
53
    public void refreshDocument(FeatureStore store);
54
    
55
    public void refreshDocument(Set<FeatureStore> stores);
56

  
57
    public void highlight(int mode, Geometry geometry);
58
    
59
    public void highlight(int mode, Geometry geom, FeatureStore store);
60
    
61
    public boolean isThereAnyActiveView();
62
    
63
    public void addTableToProject(VCSGisWorkspace ws, FeatureStore store, String tableName);
64
    
65
    public Icon getFeatureStoresTreeModelIcon(TreeModel model, Object obj);
66
    
67
    public void connectedToModel(VCSGisWorkspace workspace, String model);
68
    
69
    public Geometry getExtentOfCurrentDocument();
70

  
71
    public boolean isInSomeDocument(FeatureStore store);
72

  
73
    public MapControl getActiveMapControl();
74

  
75
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJRevisions.java
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.vcsgis.swing;
23

  
24
/**
25
 *
26
 * @author jjdelcerro
27
 */
28
public interface VCSGisJRevisions extends VCSGisPanel {
29
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJExport.java
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.vcsgis.swing;
23

  
24
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
25
import org.gvsig.vcsgis.lib.VCSGisEntity;
26

  
27
/**
28
 *
29
 * @author gvSIG Team
30
 */
31
public interface VCSGisJExport extends VCSGisPanel {
32
    
33
    public int export();
34
    
35
    public VCSGisWorkspace getWorkspace();
36

  
37
    public VCSGisEntity getTable();
38
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJInitWorkspace.java
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.vcsgis.swing;
23

  
24
/**
25
 *
26
 * @author jjdelcerro
27
 */
28
public interface VCSGisJInitWorkspace extends VCSGisPanel {
29
 
30
    public int initializeWorkspace();
31
    
32
    public String getWorkspaceName();
33
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJCreateResourceTable.java
1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.vcsgis.swing;
7

  
8
import org.gvsig.vcsgis.lib.VCSGisEntity;
9
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
10

  
11
/**
12
 *
13
 * @author jovivas
14
 */
15
public interface VCSGisJCreateResourceTable extends VCSGisPanel {
16
    
17
    public int createResourceTable();
18
    
19
    public String getWorkspaceName();
20
    
21
    public VCSGisWorkspace getWorkspace();
22

  
23
    public VCSGisEntity getTable();
24
    
25
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSWorkspacePickerController.java
1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.vcsgis.swing;
7

  
8
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
9
import org.gvsig.tools.swing.api.pickercontroller.PickerController;
10

  
11
/**
12
 *
13
 * @author gvSIG Team
14
 */
15
public interface VCSWorkspacePickerController extends PickerController<VCSGisWorkspace>{
16
    
17
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJAddLayer.java
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.vcsgis.swing;
23

  
24
import org.gvsig.fmap.dal.feature.OpenFeatureStoreParameters;
25
import org.gvsig.tools.swing.api.Component;
26

  
27
/**
28
 *
29
 * @author gvSIG Team
30
 */
31
public interface VCSGisJAddLayer extends Component {
32
    
33
    public OpenFeatureStoreParameters getOpenFeatureStoreParameters();
34

  
35
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisPanel.java
1
/*
2
 * gvSIG. Desktop Geographic Information System.
3
 * 
4
 * Copyright (C) 2007-2021 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.vcsgis.swing;
23

  
24
import org.gvsig.tools.swing.api.Component;
25
import org.gvsig.tools.swing.api.windowmanager.Dialog;
26

  
27
/**
28
 *
29
 * @author gvSIG Team
30
 */
31
public interface VCSGisPanel extends Component {
32
    
33
        public boolean isProcessing();
34

  
35
        public void setDialog(Dialog dialog);
36
    
37
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJBackupHistory.java
1
package org.gvsig.vcsgis.swing;
2

  
3
/*
4
 * gvSIG. Desktop Geographic Information System.
5
 * 
6
 * Copyright (C) 2007-2020 gvSIG Association.
7
 * 
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 3
11
 * of the License, or (at your option) any later version.
12
 * 
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 * 
18
 * You should have received a copy of the GNU General Public License 
19
 * along with this program. If not, see <https://www.gnu.org/licenses/>. 
20
 * 
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

  
25

  
26
import java.util.List;
27
import org.gvsig.vcsgis.lib.VCSGisEntity;
28
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
29

  
30
/**
31
 *
32
 * @author fdiaz
33
 */
34
public interface VCSGisJBackupHistory extends VCSGisPanel {
35
    
36
    public int backupHistory();
37
    
38
    public VCSGisWorkspace getWorkspace();
39

  
40
    public List<VCSGisEntity> getTables();
41
    
42
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJPrepareWorkingcopy.java
1
package org.gvsig.vcsgis.swing;
2

  
3
/**
4
 *
5
 * @author gvSIG Team
6
 */
7
public interface VCSGisJPrepareWorkingcopy extends VCSGisPanel {
8
    
9
    public int prepare();
10

  
11
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJInitServer.java
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.vcsgis.swing;
23

  
24
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters;
25
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
26

  
27
/**
28
 *
29
 * @author jjdelcerro
30
 */
31
public interface VCSGisJInitServer extends VCSGisPanel {
32
    
33
    public int initialize();
34
    
35
    public JDBCServerExplorerParameters getConnection();
36

  
37
    public JDBCServerExplorer getServer();
38
    
39
    public String getConnectionLabel();
40
 
41
    
42
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJImportHistory.java
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.vcsgis.swing;
23

  
24
import java.io.File;
25
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
26
import org.gvsig.fmap.dal.feature.FeatureStore;
27
import org.gvsig.tools.swing.api.Component;
28
import org.gvsig.tools.swing.api.windowmanager.Dialog;
29

  
30
/**
31
 *
32
 * @author jjdelcerro
33
 */
34
public interface VCSGisJImportHistory extends VCSGisPanel {
35
    
36
    public int importHistory();
37
    
38
    public VCSGisWorkspace getWorkspace();
39
    
40
    public File getLastLogFile();
41
    
42
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisSwingLocator.java
1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright (c) 2007-2020 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.vcsgis.swing;
24

  
25
import org.gvsig.tools.locator.AbstractLocator;
26
import org.gvsig.tools.locator.Locator;
27
import org.gvsig.tools.locator.LocatorException;
28

  
29

  
30
/**
31
 * @author gvSIG Team
32
 *
33
 */
34
public class VCSGisSwingLocator extends AbstractLocator {
35

  
36
    private static final String LOCATOR_NAME = "vcsgisSwingLocator";
37
    public static final String MANAGER_NAME = "vcsgisSwingManager";
38
    private static final String MANAGER_DESCRIPTION = "vcsgis Swing Algorithms Manager of gvSIG";
39

  
40
    private static final VCSGisSwingLocator INSTANCE = new VCSGisSwingLocator();
41

  
42

  
43
    public static Locator getInstance() {
44
        return INSTANCE;
45
    }
46

  
47
    @Override
48
    public String getLocatorName() {
49
        return LOCATOR_NAME;
50
    }
51

  
52

  
53
    /**
54
     * Registers the Class implementing the vcsgisSwingManager interface.
55
     *
56
     * @param clazz implementing the vcsgisSwingManager interface
57
     */
58
    public static void registerVCSGisSwingManager(Class clazz){
59
        getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz);
60
    }
61

  
62
    /**
63
     * Registers the default Class implementing the vcsgisSwingManager interface
64
     *
65
     * @param clazz implementing the vcsgisSwingManager interface
66
     */
67
    public static void registerDefaultVCSGisSwingManager(Class clazz){
68
        getInstance().registerDefault(MANAGER_NAME, MANAGER_DESCRIPTION, clazz);
69
    }
70

  
71
    /**
72
     * Return a reference to vcsgisSwingManager.
73
     *
74
     * @return a reference to vcsgisSwingManager
75
     * @throws LocatorException
76
     *             if there is no access to the class or the class
77
     *             cannot be instantiated
78
     * @see Locator#get(String)
79
     */
80
    public static VCSGisSwingManager getVCSGisSwingManager() throws LocatorException {
81
        return (VCSGisSwingManager)(getInstance().get(MANAGER_NAME));
82
    }
83

  
84
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisSwingLibrary.java
1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright (c) 2007-2020 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.vcsgis.swing;
24

  
25
import org.gvsig.tools.library.AbstractLibrary;
26
import org.gvsig.tools.library.LibraryException;
27
import org.gvsig.tools.locator.ReferenceNotRegisteredException;
28

  
29
/**
30
 * @author gvSIG Team
31
 *
32
 */
33
public class VCSGisSwingLibrary extends AbstractLibrary {
34

  
35
    @Override
36
    protected void doInitialize() throws LibraryException {
37
        registerAsAPI(VCSGisSwingLibrary.class);
38

  
39
    }
40

  
41
    @Override
42
    protected void doPostInitialize() throws LibraryException {
43
        // Validate there is any implementation registered.
44
        VCSGisSwingManager swingManager = VCSGisSwingLocator.getVCSGisSwingManager();
45
        if (swingManager == null) {
46
            throw new ReferenceNotRegisteredException(
47
                    VCSGisSwingLocator.MANAGER_NAME, VCSGisSwingLocator.getInstance());
48
        }
49
    }
50

  
51
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJShowServerTableForm.java
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.vcsgis.swing;
23

  
24
import org.gvsig.tools.swing.api.Component;
25

  
26
/**
27
 *
28
 * @author jjdelcerro
29
 */
30
public interface VCSGisJShowServerTableForm extends Component {
31
    
32
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJDownloadWorkingcopy.java
1
package org.gvsig.vcsgis.swing;
2

  
3
/**
4
 *
5
 * @author gvSIG Team
6
 */
7
public interface VCSGisJDownloadWorkingcopy extends VCSGisPanel {
8
    
9
    public int download(boolean quietly);
10

  
11
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJRegisterWorkspace.java
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.vcsgis.swing;
23

  
24
/**
25
 *
26
 * @author jjdelcerro
27
 */
28
public interface VCSGisJRegisterWorkspace extends VCSGisPanel {
29
 
30
    public void registerWorkspace();
31
    
32
    public void deregisterWorkspace();
33

  
34
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJRestoreHistory.java
1
package org.gvsig.vcsgis.swing;
2

  
3
/*
4
 * gvSIG. Desktop Geographic Information System.
5
 * 
6
 * Copyright (C) 2007-2020 gvSIG Association.
7
 * 
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 3
11
 * of the License, or (at your option) any later version.
12
 * 
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 * 
18
 * You should have received a copy of the GNU General Public License 
19
 * along with this program. If not, see <https://www.gnu.org/licenses/>. 
20
 * 
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

  
25

  
26
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
27

  
28
/**
29
 *
30
 * @author fdiaz
31
 */
32
public interface VCSGisJRestoreHistory extends VCSGisPanel {
33
    
34
    public int restoreHistory();
35
    
36
    public VCSGisWorkspace getWorkspace();
37

  
38
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJCheckout.java
1
package org.gvsig.vcsgis.swing;
2

  
3
/*
4
 * gvSIG. Desktop Geographic Information System.
5
 * 
6
 * Copyright (C) 2007-2020 gvSIG Association.
7
 * 
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 3
11
 * of the License, or (at your option) any later version.
12
 * 
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 * 
18
 * You should have received a copy of the GNU General Public License 
19
 * along with this program. If not, see <https://www.gnu.org/licenses/>. 
20
 * 
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

  
25

  
26
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
27
import org.gvsig.vcsgis.lib.VCSGisEntity;
28

  
29
/**
30
 *
31
 * @author jjdelcerro
32
 */
33
public interface VCSGisJCheckout extends VCSGisPanel {
34
    
35
    public int checkout();
36
    
37
    public VCSGisWorkspace getWorkspace();
38

  
39
    public VCSGisEntity getTable();
40
    
41
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisEntitySelectorController.java
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.vcsgis.swing;
23

  
24
import java.util.Collection;
25
import java.util.Collections;
26
import java.util.List;
27
import java.util.function.Function;
28
import java.util.function.Predicate;
29
import javax.swing.tree.DefaultMutableTreeNode;
30
import javax.swing.tree.DefaultTreeModel;
31
import javax.swing.tree.TreePath;
32
import org.gvsig.tools.swing.api.ActionListenerSupport;
33
import org.gvsig.tools.swing.api.ChangeListenerSupport;
34
import org.gvsig.vcsgis.lib.VCSGisEntity;
35
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
36
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity;
37

  
38
/**
39
 *
40
 * @author gvSIG Team
41
 */
42
public interface VCSGisEntitySelectorController extends ActionListenerSupport, ChangeListenerSupport { //, ListSelectionListenerSupport {
43

  
44
    public static Predicate<VCSGisEntity> ALL_ENTITIES = (VCSGisEntity t) -> true;
45
    public static Predicate<VCSGisEntity> REMOTE_ENTITIES = (VCSGisEntity t) -> !(t instanceof VCSGisWorkspaceEntity);
46
    public static Predicate<VCSGisEntity> LOCAL_ENTITIES = (VCSGisEntity t) -> (t instanceof VCSGisWorkspaceEntity);
47
   
48
    public static final int ACTION_SELECT_ID = 0;
49
    public static final int ACTION_CHECK_ID = 1;
50
    public static final int ACTION_RELOAD_ID = 2;
51
    public static final int ACTION_BEGIN_PROCESSING_ID = 3;
52
    public static final int ACTION_END_PROCESSING_ID = 4;
53
    
54
    public static final String ACTION_SELECT = "select";
55
    public static final String ACTION_CHECK = "check";
56
    public static final String ACTION_RELOAD = "reload";
57
    public static final String ACTION_BEGIN_PROCESSING = "begin_processing";
58
    public static final String ACTION_END_PROCESSING = "end_processing";
59
    
60
    public VCSGisEntity getSelectedEntity();
61

  
62
    public void setSelectedEntity(VCSGisEntity entity);
63

  
64
    public List<VCSGisEntity> getCheckedEntities();
65

  
66
    public Collection<VCSGisEntity> getEntities();
67

  
68
    public VCSGisWorkspace getWorkspace();
69
    
70
    public void reloadEntities();
71

  
72
    public boolean isProcessing();
73
    
74
    public void setChecksEnabled(boolean enabled);
75
    
76
    public boolean isChecksEnabled();
77
    
78
    public void setEnabled(boolean enabled);
79

  
80
    public boolean isEnabled();
81
    
82
    public void setWorkspace(VCSGisWorkspace workspace);
83
    
84
    public void setViewFilter(Predicate<VCSGisEntity> viewFilter);
85

  
86
    public void setFilter(Predicate<VCSGisEntity> filter);
87
    
88
    public void clearChecks();
89
    
90
    public void check(VCSGisEntity entity);
91

  
92
    public void unCheck(VCSGisEntity entity);
93
    
94
    public void setCheck(Collection<String> entityCodes, boolean check);
95

  
96
    public void checkAll();
97
    
98
    public void clear();
99
    
100
    public void setLabelEntityFormatter(Function<VCSGisEntity,String> formatter);
101
    
102
    public String getCategory(VCSGisEntity category);
103
    
104
    public void collapseAll();
105
    
106
    public void expandAll();
107
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisSwingManager.java
1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright (c) 2007-2020 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.vcsgis.swing;
24

  
25
import javax.swing.JButton;
26
import javax.swing.JComboBox;
27
import javax.swing.JList;
28
import javax.swing.JTree;
29
import javax.swing.text.JTextComponent;
30
import org.gvsig.tools.swing.api.pickercontroller.PickerController;
31
import org.gvsig.vcsgis.lib.VCSGisEntity;
32
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
33
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceEntity;
34

  
35

  
36

  
37
/**
38
 * @author gvSIG Team
39
 *
40
 */
41
public interface VCSGisSwingManager {
42

  
43
    public VCSGisJChanges createChangesPanel();
44
    
45
    public VCSGisJRevisions createRevisionsPanel();
46
    
47
    public PickerController<VCSGisWorkspace> createPickerWorkspaceController(JComboBox combo);
48

  
49
    public VCSGisJInitServer createInitRepositoryPanel();
50
    
51
    public VCSGisJInitWorkspace createInitWorkspacePanel();
52
    
53
    public VCSGisJAddToWorkspace createAddToWorkspacePanel();
54

  
55
    public VCSGisJCheckout createCheckoutPanel();
56

  
57
    public VCSGisJCheckoutDataModel createCheckoutDataModelPanel();
58
    
59
    public VCSGisJExport createExportPanel();
60
    
61
    public VCSGisJImportHistory createImportHistoryPanel();
62
    
63
    public void setDefaultServices(VCSGisSwingServices services);
64

  
65
    public VCSGisSwingServices getDefaultServices();
66
    
67
    public PickerController<VCSGisWorkspace> createWorkspacePickerController(JComboBox combo, JButton button);
68

  
69
    public VCSGisJRegisterWorkspace createRegisterWorkspacePanel();
70

  
71
    public VCSGisJShowServerTableForm createShowTableServerFormPanel(String tableName);
72
    
73
    public String getHTMLColoredForEntity(VCSGisWorkspaceEntity entity, String name);
74

  
75
    public String getHTMLColoredForEntity(VCSGisWorkspaceEntity entity, String name, int defaultState);
76
    
77
    public VCSGisJCreateResourceTable createResourceTablePanel();
78
    
79
    public VCSGisJLogout createLogoutPanel();
80
    
81
    public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables, JTextComponent txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll);
82
    
83
    public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables, JTextComponent txtFilter, JButton btnTable);
84
    
85
    public VCSGisEntitySelectorController createEntitySelectorController(JList lstTables);
86
    
87
    public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities, JTextComponent txtFilter, JButton btnTable, JButton btnCheckAll, JButton btnUnCheckAll);
88

  
89
    public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities, JTextComponent txtFilter, JButton btnTable);
90
    
91
    public VCSGisEntitySelectorController createEntitySelectorController(JTree treeEntities);
92
    
93
    public VCSGisEntitySelectorController createEntitySelectorController(JComboBox cboTables);
94

  
95
    public VCSGisJDownloadWorkingcopy createDownloadWorkingcopyPanel();
96
    
97
    public boolean executeTopologyPlan(VCSGisWorkspace ws, VCSGisEntity entity, boolean autoclose);
98

  
99
    public VCSGisJPrepareWorkingcopy createPrepareWorkingcopyPanel();
100

  
101
    public VCSGisJBackupHistory createBackupHistoryPanel();
102
    
103
    public VCSGisJRestoreHistory createRestoreHistoryPanel();
104

  
105
    public VCSGisPanel createRegistrationOfEditingStoresPanel();
106
    
107
    public VCSGisPanel createRepositoryEntityFeatureTypeEditor();
108
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJChanges.java
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.vcsgis.swing;
23

  
24
/**
25
 *
26
 * @author jjdelcerro
27
 */
28
public interface VCSGisJChanges extends VCSGisPanel {
29
    
30
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJLogout.java
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.vcsgis.swing;
23

  
24
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
25

  
26
/**
27
 *
28
 * @author gvSIG Team
29
 */
30
public interface VCSGisJLogout extends VCSGisPanel {
31
    
32
    public VCSGisWorkspace getWorkspace();
33
    
34
    public void logout();
35
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/src/main/java/org/gvsig/vcsgis/swing/VCSGisJAddToWorkspace.java
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.vcsgis.swing;
23

  
24
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
25

  
26
/**
27
 *
28
 * @author jjdelcerro
29
 */
30
public interface VCSGisJAddToWorkspace extends VCSGisPanel {
31
    
32
    public int add();
33
    
34
    public VCSGisWorkspace getWorkspace();
35
    
36
    public String getLastErrorMessage();
37
    
38
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.api/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2
  <modelVersion>4.0.0</modelVersion>
3
  <parent>
4
    <groupId>org.gvsig</groupId>
5
    <artifactId>org.gvsig.vcsgis.swing</artifactId>
6
    <version>1.0.77</version>
7
  </parent>
8
  <artifactId>org.gvsig.vcsgis.swing.api</artifactId>
9
  <name>${project.artifactId}</name>
10
  <dependencies>
11
    <dependency>
12
      <groupId>org.gvsig</groupId>
13
      <artifactId>org.gvsig.tools.swing.api</artifactId>
14
    </dependency>
15
    <dependency>
16
      <groupId>org.gvsig</groupId>
17
      <artifactId>org.gvsig.vcsgis.lib.api</artifactId>
18
    </dependency>
19
    <dependency>
20
      <groupId>org.gvsig</groupId>
21
      <artifactId>org.gvsig.fmap.control</artifactId>
22
    </dependency>
23
  </dependencies>
24
</project>
0 25

  
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/test/resources/org/gvsig/vcsgis/swing/impl/importhistory/ENT_010101_HIST.csv
1
"ID/String/set/size=18/set/pk=true/set/order=0";"VCSGISCODE/String/set/size=30/set/order=10";"N_VERSION/Decimal/set/precision=20/set/scale=3/set/roundMode=4/set/order=20";"FECHA/Timestamp/set/order=30";"FECHA_BAJA/Timestamp/set/order=40"
2
"000000001000000001";"HISTENT01010100000000000000001";"1.000";"2012-12-04 09:25:37.0";
3
"000000001000000002";"HISTENT01010100000000000000002";"1.000";"2012-12-04 09:25:37.0";
4
"000000001000000003";"HISTENT01010100000000000000003";"1.000";"2012-12-04 09:25:37.0";
5
"000000001000000004";"HISTENT01010100000000000000004";"1.000";"2012-12-04 09:25:37.0";
6
"000000001000000005";"HISTENT01010100000000000000005";"1.000";"2012-12-04 09:25:37.0";
7
"000000001000000006";"HISTENT01010100000000000000006";"1.000";"2012-12-04 09:25:37.0";
8
"000000001000000007";"HISTENT01010100000000000000007";"1.000";"2012-12-04 09:25:37.0";
9
"000000849000000001";"HISTENT01010100000000000000001";"849.000";"2013-06-17 14:33:45.0";
10
"000000849000000002";"HISTENT01010100000000000000002";"849.000";"2013-06-17 14:33:45.0";
11
"000000849000000003";"HISTENT01010100000000000000003";"849.000";"2013-06-17 14:33:45.0";
12
"000000849000000004";"HISTENT01010100000000000000004";"849.000";"2013-06-17 14:33:45.0";
13
"000000849000000005";"HISTENT01010100000000000000005";"849.000";"2013-06-17 14:33:45.0";
14
"000000849000000006";"HISTENT01010100000000000000006";"849.000";"2013-06-17 14:33:45.0";
15
"000000849000000007";"HISTENT01010100000000000000007";"849.000";"2013-06-17 14:33:45.0";
16
"000004804000000007";"HISTENT01010100000000000000007";"4804.000";"2017-04-19 14:44:41.0";
17
"000006312000000007";"HISTENT01010100000000000000007";"6312.000";"2018-06-19 12:19:12.0";"2018-06-19 12:19:12.0"
18
"000006312000000011";"HISTENT01010100000000000000011";"6312.000";"2018-06-19 12:19:12.0";
19
"000009420000000011";"HISTENT01010100000000000000011";"9420.000";"2020-05-14 19:42:51.0";
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/test/resources/org/gvsig/vcsgis/swing/impl/importhistory/ENT_010101.csv
1
"VCSGISCODE/String/set/size=60/set/pk=true/set/order=10";"GEOMETRY/Geometry/set/srs=EPSG@25830/set/geomtype=Polygon@2D/set/order=20"
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.77/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/test/java/org/gvsig/vcsgis/swing/impl/managehistory/Test01BackupHistory.java
1
package org.gvsig.vcsgis.swing.impl.managehistory;
2

  
3
import java.io.File;
4
import java.sql.Timestamp;
5
import java.util.List;
6
import java.util.Locale;
7
import junit.framework.TestCase;
8
import static junit.framework.TestCase.assertEquals;
9
import org.apache.commons.io.FileUtils;
10
import org.apache.commons.io.FilenameUtils;
11
import org.gvsig.expressionevaluator.Expression;
12
import org.gvsig.fmap.dal.feature.EditableFeature;
13
import org.gvsig.fmap.dal.feature.Feature;
14
import org.gvsig.fmap.dal.feature.FeatureStore;
15
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer;
16
import org.gvsig.tools.dispose.DisposeUtils;
17
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
18
import org.gvsig.vcsgis.lib.VCSGisLocator;
19
import org.gvsig.vcsgis.lib.VCSGisManager;
20
import static org.gvsig.vcsgis.lib.VCSGisManager.ERR_NO_ERROR;
21
import org.gvsig.vcsgis.lib.impl.AbstractTestUtils;
22
import org.gvsig.vcsgis.lib.repository.VCSGisRepository;
23
import org.gvsig.vcsgis.lib.workspace.VCSGisWorkspace;
24
import org.slf4j.Logger;
25
import org.slf4j.LoggerFactory;
26

  
27
public class Test01BackupHistory extends TestCase {
28

  
29
    protected static final Logger LOGGER = LoggerFactory.getLogger(Test01BackupHistory.class);
30

  
31
    static {
32
        Locale.setDefault(Locale.forLanguageTag("es-ES"));
33
    }
34

  
35
    public Test01BackupHistory(String testName) {
36
        super(testName);
37
    }
38

  
39
    @Override
40
    protected void setUp() throws Exception {
41
        super.setUp();
42
        new DefaultLibrariesInitializer().fullInitialize();
43
    }
44

  
45
    @Override
46
    protected void tearDown() throws Exception {
47
        super.tearDown();
48
    }
49

  
50
    private static class LocalTestUtilsH2Spatial extends org.gvsig.vcsgis.lib.impl.h2spatial.TestUtilsH2Spatial {
51
        // Esto fuerza a que el class loader de esta clase esta en este proyecto.
52
    }
53

  
54
    private static LocalTestUtilsH2Spatial utils = null;
55
    
56
    public static AbstractTestUtils utils() {
57
        if( utils==null ) {
58
            utils = new LocalTestUtilsH2Spatial();
59
        }
60
        return utils;
61
    }
62

  
63
    // TODO add test methods here. The name must begin with 'test'. For example:
64
    // public void testHello() {}
65
    
66
    public void testBackupHistory() throws Exception {
67
        try {
68
            utils().cleanRepositoryDatabase();
69

  
70
            VCSGisManager manager = VCSGisLocator.getVCSGisManager();
71

  
72
            JDBCServerExplorer sourceServer = utils().openRepositoryServerExplorer("srv-source");
73
            JDBCServerExplorer targetServer = utils().openRepositoryServerExplorer("srv-target");
74
            File ws1file = utils().getFile(FileUtils.getFile("test-dbs", "ws1-update"));
75
            File ws2file = utils().getFile(FileUtils.getFile("test-dbs", "ws2-update"));
76

  
77
            int r;
78
            Feature f;
79
            EditableFeature ef;
80
            List<Feature> features;
81
            FeatureStore store1;
82
            FeatureStore store2;
83

  
84
            // ------------------------------------------------------------
85
            // Inicializamos el repositorio y lo abrimos
86
            r = manager.initRepository(sourceServer.getParameters(), null);
87
            assertEquals("init_server status", ERR_NO_ERROR, r);
88

  
89
            VCSGisRepository repo = manager.openRepository(sourceServer.getParameters());
90
            utils().info_repository(repo);
91

  
92
            // ------------------------------------------------------------
93
            // Creamos workspace1 y lo abrimos.
94
            r = manager.initWorkspace(ws1file, repo, "Test update1", null);
95
            assertEquals("init_ws1 status", ERR_NO_ERROR, r);
96

  
97
            VCSGisWorkspace ws1 = manager.openWorkspace(ws1file);
98
            utils().info_workspace(ws1);
99

  
100
            // ------------------------------------------------------------
101
            // Adicionamos al workspace1 la tabla "test" y la commitamos.
102
            //REV 0
103
            FeatureStore sourceTest = utils().openSourceStore2();
104
            r = ws1.add("test", sourceTest, "text");
105
            DisposeUtils.disposeQuietly(sourceTest);
106
            assertEquals("ws1.add status", ERR_NO_ERROR, r);
107

  
108
            store1 = ws1.openFeatureStore("test", false);
109
            store1.edit();
110
            utils().test_insert(store1, 4, "DDD");
111
            utils().test_insert(store1, 5, "EEE");
112

  
113
            store1.finishEditing();
114
            DisposeUtils.disposeQuietly(store1);
115

  
116
            r = ws1.commit(null, Timestamp.valueOf("2021-01-01 00:00:00.000"), "2021-01-01 00:00:00.000", null);
117
            assertEquals("ws1.commit-1 status", ERR_NO_ERROR, r);
118

  
119
            //REV 1
120
            store1 = ws1.openFeatureStore("test", false);
121
            store1.edit();
122
            utils().test_insert(store1, 6, "FFF");
123
            utils().test_insert(store1, 7, "GGG");
124
            utils().test_insert(store1, 8, "HHH");
125
            utils().test_insert(store1, 9, "III");
126
            utils().test_insert(store1, 10, "JJJ");
127
            utils().test_delete(store1, 5, "EEE");
128
            utils().test_update(store1, 2, "BB2");
129
            utils().test_update(store1, 4, "DD2");
130

  
131
            store1.finishEditing();
132
            DisposeUtils.disposeQuietly(store1);
133

  
134
            r = ws1.commit(null, Timestamp.valueOf("2021-02-01 00:00:00.000"), "2021-02-01 00:00:00.000", null);
135
            assertEquals("ws1.commit-1 status", ERR_NO_ERROR, r);
136

  
137
            //REV 2
138
            store1 = ws1.openFeatureStore("test", false);
139
            store1.edit();
140
            utils().test_insert(store1, 11, "KKK");
141
            utils().test_insert(store1, 12, "LLL");
142
            utils().test_insert(store1, 13, "MMM");
143
            utils().test_delete(store1, 4, "DD2");
144
            utils().test_delete(store1, 7, "GGG");
145

  
146
            store1.finishEditing();
147
            DisposeUtils.disposeQuietly(store1);
148

  
149
            r = ws1.commit(null, Timestamp.valueOf("2021-03-01 00:00:00.000"), "2021-03-01 00:00:00.000", null);
150
            assertEquals("ws1.commit-1 status", ERR_NO_ERROR, r);
151

  
152
            //REV 3
153
            store1 = ws1.openFeatureStore("test", false);
154
            store1.edit();
155

  
156
            utils().test_insert(store1, 14, "NNN");
157
            utils().test_insert(store1, 15, "OOO");
158
            utils().test_insert(store1, 16, "PPP");
159
            utils().test_insert(store1, 17, "QQQ");
160
            utils().test_delete(store1, 3, "CCC");
161
            utils().test_delete(store1, 10, "JJJ");
162
            utils().test_update(store1, 13, "MM2");
163

  
164
            store1.finishEditing();
165
            DisposeUtils.disposeQuietly(store1);
166

  
167
            r = ws1.commit(null, Timestamp.valueOf("2021-04-01 00:00:00.000"), "2021-04-01 00:00:00.000", null);
168
            assertEquals("ws1.commit-1 status", ERR_NO_ERROR, r);
169

  
170
            //REV 4
171
            store1 = ws1.openFeatureStore("test", false);
172
            store1.edit();
173

  
174
            utils().test_insert(store1, 18, "RRR");
175
            utils().test_insert(store1, 19, "SSS");
176
            utils().test_insert(store1, 20, "TTT");
177
            utils().test_insert(store1, 21, "UUU");
178
            utils().test_delete(store1, 9, "III");
179
            utils().test_update(store1, 17, "QQ2");
180
            utils().test_delete(store1, 16, "PPP");
181

  
182
            store1.finishEditing();
183
            DisposeUtils.disposeQuietly(store1);
184

  
185
            r = ws1.commit(null, Timestamp.valueOf("2021-05-01 00:00:00.000"), "2021-05-01 00:00:00.000", null);
186
            assertEquals("ws1.commit-1 status", ERR_NO_ERROR, r);
187

  
188
            //REV 5
189
            store1 = ws1.openFeatureStore("test", false);
190
            store1.edit();
191

  
192
            utils().test_insert(store1, 22, "VVV");
193
            utils().test_insert(store1, 23, "WWW");
194
            utils().test_insert(store1, 24, "XXX");
195
            utils().test_insert(store1, 25, "YYY");
196
            utils().test_insert(store1, 26, "ZZZ");
197
            utils().test_delete(store1, 13, "MM2");
198
            utils().test_delete(store1, 19, "SSS");
199

  
200
            store1.finishEditing();
201
            DisposeUtils.disposeQuietly(store1);
202

  
203
            r = ws1.commit(null, Timestamp.valueOf("2021-06-01 00:00:00.000"), "2021-06-01 00:00:00.000", null);
204
            assertEquals("ws1.commit-1 status", ERR_NO_ERROR, r);
205

  
206
            //Export enero
207
            r = ws1.export("test", "exp_enero", null, Timestamp.valueOf("2021-01-15 00:00:00.000"), null, null);
208
            assertEquals("ws1.export-1 status", 0, r);
209
            store2 = ws1.openFeatureStore("exp_enero", false);
210
            features = store2.getFeatures((Expression) null, "id", true);
211

  
212
            utils().test_check(features, 0, 1, "AAA");
213
            utils().test_check(features, 1, 2, "BBB");
214
            utils().test_check(features, 2, 3, "CCC");
215
            utils().test_check(features, 3, 4, "DDD");
216
            utils().test_check(features, 4, 5, "EEE");
217

  
218
            DisposeUtils.disposeQuietly(features);
219
            DisposeUtils.disposeQuietly(store2);
220

  
221
            //Export febrero
222
            r = ws1.export("test", "exp_febrero", null, Timestamp.valueOf("2021-02-15 00:00:00.000"), null, null);
223
            assertEquals("ws1.export-1 status", 0, r);
224
            store2 = ws1.openFeatureStore("exp_febrero", false);
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff