Revision 3752

View differences:

org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/images/action/.directory
1
[Dolphin]
2
PreviewsShown=true
3
Timestamp=2020,10,4,20,43,26
4
Version=4
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/VCSGisEntityColors.properties
1
#Color format supported:
2
# - rgb(0xRR,0xGG,0xBB) (HTML CCS format)
3
# - rgb(red,green,blue) (HTML CCS format)
4
# - #RRGGBB  (HTML format)
5
# - color_number (integer)
6
# - color_name (https://www.w3schools.com/colors/colors_names.asp)
7
#
8
COLOR_LOCAL_NEW=darkgreen
9
COLOR_LOCAL_MODIFIED=darkblue
10
COLOR_LOCAL_UNMODIFIED=black
11
COLOR_LOCAL_AND_REPOSITORY_MODIFIED=red
12
COLOR_REPOSITORY_NEW=darkgoldenRod
13
COLOR_REPOSITORY_MODIFIED=darkmagenta
14
COLOR_CONFLICT=darkred
15
COLOR_UNKNOWN_STATE=lightgray
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/plugin-persistence.def
1
<?xml version="1.0"?>
2
<!--
3
Definitions of plugin persistence org.gvsig.vcsgis.app.mainplugin.
4
 -->
5
<definitions>
6
  <version>1.0.0</version>
7
  <classes>
8
    <class name="org.gvsig.vcsgis.app.mainplugin">
9
      <description>Persistence of VCSGis plugin</description>
10
      <fields>
11
        <field name="workspaces" type="Map" classOfItems="org.gvsig.vcsgis.lib.workspace.VCSGisWorkspaceDescriptor" mandatory="false">
12
          <description></description>
13
        </field>
14
      </fields>
15
    </class>
16
  </classes>
17
</definitions>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties
1
_connection=Connection
2
initialize=Initialize
3
initialize_server=Initialize server
4
init_server=Initialize server
5
_Initialize_workspace=Initialize working copy
6
init_workspace=Initialize workspace
7
_name=Name
8
_file=File
9
_repository=Repository
10
_url=URL
11
_layers=Layers
12
_tables=Tables
13
_Add_to_workspace=Add to workspace
14
_workspace=Workspace
15
_Workspace=Workspace
16
_Cant_initialize_server_{0}=Can't initialize server ''{0}''.
17
_Cant_initialize_workspace_{0}=Can't initialize workspace ''{0}''.
18
_Cant_add_{0}_as_{1}_in_{2}=Can't add ''{0}'' as ''{1}'' in ''{2}''.
19
_table=Table
20
_Table=Table
21
_branch=Branch
22
_revision=Revision
23
checkout=Checkout
24
failed_checkout_of_{0}=failed checkout of ''{0}''
25
_VCS_Register_workspace=Register workspace
26
_Register_workspace=Register workspace
27
_Selected_connection_is_not_a_valid_workspace=Selected connection is not a valid workspace
28
_Cant_register_workspace=Can't register workspace
29
_Administration=Administration
30
_Field_for_label=Field for label
31
_Select_all=Check all
32
_Unselect_all=Uncheck all
33
_Refresh=Refresh
34
_Revert=Revert
35
_Commit=Commit
36
_Show_form=Show form
37
_Effective_date=Effective date
38
_Coment=Comment
39
_No_errors=No errors
40
_dbfile_is_null=dbfile is null
41
_workspace_explorer_is_null=workspace explorer is null
42
_label_is_null=label is null
43
_Cant_open_workspace=Can't open workspace
44
_Store_not_in_control_version=Store not in control version
45
_Cant_create_table=Can't create table
46
_Cant_create_config_table=Can't create config table
47
_Cant_create_table_entities=Can't create table entities
48
_Cant_create_table_changes=Can't create table changes
49
_Entity_already_exists=Entity already exists
50
_Entity_has_not_VCSGISCODE=Entity has not VCSGISCODE
51
_Cant_open_entities=Can't open entities
52
_Cant_insert_entities=Can't insert entities
53
_Cant_open_changes=Can't open changes
54
_Cant_insert_change=Can't insert change
55
_Cant_open_store=Can't open store
56
_Cant_retrieve_source_features=Can't retrieve source features
57
_Cant_insert_features=Can't insert features
58
_Cant_commit=Can't commit
59
_Cant_commit_workspace_is_out_of_date=Can't commit, workspace is out of date
60
_Cant_checkout=Can't checkout
61
_Table_already_exists_in_the_workspace=Table already exists in the workspace
62
_Table_not_in_repository=Table not in repository
63
_Cant_update_entities=Can't update entities
64
_Cant_prepare_update=Can't prepare update
65
_Cant_update=Can't update
66
_Reload_remote_changes=Reload remote changes
67
_Clean_remote_changes=Clear remote changes
68
_Update_tables_with_remote_changes=Update tables.\nThe local tables will be updated with the repository changes.\nIf there are local changes they will be lost.
69
_Merge_tables_with_remote_changes=Merge tables.\nRemote changes will be kept for selected records,\nand local changes for unselected records.
70
_Download_remote_changes_of_selected_table=Download remote changes of selected table
71
_VCS_Show_server_entities=Show server entities
72
_Show_server_entities=Show server entities
73
_VCS_Show_server_hooks=Show server hooks
74
_Show_server_hooks=Show server hooks
75
_The_selected_connection_does_not_correspond_to_a_version_control_server=The selected connection does not correspond to a version control server.
76
_Add_new_table_to_project=Add new table to project
77
_Add_new_layer_to_view=Add new layer to view
78
_Select_a_view=Select a view
79
_Cant_show_form_because_entity_isnt_in_workspace_yet=Can't show form because entity isn't in workspace yet.
80
_Dont_add_the_table_or_layer_to_the_project=Don't add the table or layer to the project
81
_Add_layer_to_view=Add layer to view
82
_Add_table_to_project=Add table to project
83
_Cant_retrieve_entities_from_repository=Cant retrieve entities from repository
84
_Cant_retrieve_entities=Cant retrieve entities
85
_Working_copy=Working copy
86
_VCS_Show_changes=Show VCS changes
87
_Show_changes=Show chabges
88
_VCS_changes=VCS Changes
89
_VCS_Server_entities=VCS Server entities
90
_VCS_server_hooks=VCS server hooks||||||| .r2891
91
_Cant_retrieve_entities=Cant retrieve entities
92
_Add_layer=Add layer
93
_Adding_table_layer=Adding table/layer
94
_Preparing_source=Preparing source
95
_Finishing=Finishing
96
_If_you_cant_find_the_layer_click_here_to_initialize_a_new_workspace=If you can't find the layer click here to initialize a new workspace
97
_Repository_info=Repository info
98
_Layer=Layer
99
_Name=Name
100
_Committing_changes=Commiting changes
101
_The_selected_table_is_already_in_the_working_copy=The selected table is already in the working copy
102
_To_download_updated_data_use_show_changes_tool=To download updated data use show changes tool
103
_Processing=Processing
104
_Ended_process=Ended process
105
_Workspace_changes_list_updated=Working copy changes list updated (%s)
106
_Repository_changes_list_updated=Repository changes list updated (%s)
107
_If_you_cant_find_the_layer_click_here_to_initialize_a_new_workspace=If you can't find the layer click here to initialize a new workspace.
108
_Projection=Projection
109
_Zoom=Zoom
110
_Center=Center
111
_Clean_Highlighted=Clean highlighted
112
_Do_you_want_add_layer_to_active_view=Do you want add layer to active view?
113
_Do_you_want_add_table_to_project=Do you want add table to project?
114
_Clean_highlighted=Clean highlighted
115
_Category=Category
116
_Overwrite_table=Overwrite table
117
_Delete_existing_table_in_workspace_and_checkout_table_from_repository=Delete existing table in workspace and checkout table from repository
118
_Select_revision=Select revision
119
_Next_page=Next page
120
table=table
121
operation=operation
122
label=label
123
_VCS_Show_revisions=Show revisions
124
_VCS_Revisions=Revisions
125
_Cant_remove_entity=Can't remove entity
126
_Cant_remove_changes=Can't remove changes
127
_Add_the_table_to_the_project=Add the table to the project
128
_Identifier_field=Identifier field
129
_Sort_field=Sort field
130
_Use_revision_date=Use revision date
131
_Revision_date_field=Revision date field
132
_Time_interval_to_group_changes=Time interval to group changes
133
_Use_revision_code=Use revision code
134
_Revision_code_field=Revision code field
135
_VCS_Import_history=Import history
136
_Import_history=Import history
137
_The_process_has_created_local_changes_that_would_need_to_be_committed_to_the_repository=The process has created local changes that would need to be committed to the repository
138
_VCSGis_Merge=VCSGis merge
139
_User=User
140
_Password=Password
141
_User_login=User login
142
_Others=Others
143
_Table_already_exists_in_working_copy=Table already exists in working copy
144
_You_can_rename_the_table=You can rename the table
145
_VCS_Create_resource_table=Create resource table
146
_Create_resource_table_parameters=Create resource table parameters
147
_TableName=Table name
148
_Enter_the_identifier_and_password_of_a_user_with_permissions_to_perform_the_requested_operation=Enter the identifier and password of a user with permissions to perform the requested operation
149
_Authorization_required_for_this_operation=Authorization required for this operation
150
_VCS_Checkout_DataModel=Checkout data model
151
_VCS_Connect_to_datamodel=Connect to datamodel
152
_Data_models=Data models
153
_Failed_connect_to_{0}=Failed connect to ''{0}''
154
_Overwrite_existing_tables=Overwrite existing tables
155
_Delete_existing_tables_in_workspace_and_then_checkout_them_from_repository=Delete existing tables in workspace and then checkout them from repository
156
_VCS_Logout=Logout
157
_Logout_the_current_user_from_a_VCSGis_working_copy=Logout the current user from a VCSGis working copy
158
_VCS_operation_add_entity=Add entity
159
_VCS_operation_insert=Insert
160
_VCS_operation_update=Update
161
_VCS_operation_delete=Delete
162
_Highlight=Highlight
163
_Topology_plan_execution_failed_Do_you_wish_to_continue=Topology plan execution failed. Do you wish to continue?
164
_Cant_pass_topology_plans=Can't pass topology plans
165
_TopologyPlan_has_been_updated_please_retry_commit=TopologyPlan has been updated. Please retry commit.
166
_Sending_topology_plans=Sending topology plans
167
_Execute_topology_plan=Execute topology plan
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/i18n/text.properties
1
_Connection=Conexi\u00f3n
2
_Initialize=Inicializar
3
_VCS_Initialize_repository=Inicializar repositorio
4
_VCS_Initialize_workspace=Inicializar copia de trabajo
5
_Name=Nombre
6
_File=Archivo
7
_Repository=Repositorio
8
_URL=URL
9
_Layers=Capas
10
_Tables=Tablas
11
_VCS_Add_layer=A\u00f1adir capa
12
_VCS_Add_to_workspace=A\u00f1adir a la copia de trabajo
13
_Add_table_or_layer_to_VCS_workspace=A\u00f1adir tabla o capa a la copia de trabajo de VCSGis
14
_workspace=Copia de trabajo
15
_Workspace=Copia de trabajo
16
_Cant_initialize_server_{0}=No se ha podido inicializar el repositorio ''{0}''.
17
_Cant_initialize_workspace_{0}=No se ha podido inicializar la copia de trabajo ''{0}''.
18
_Cant_add_{0}_as_{1}_in_{2}=No se ha podido a\u00f1adir ''{0}'' como ''{1}'' en ''{2}''.
19
_table=Tabla
20
_Table=Tabla
21
_Revision=Revisi\u00f3n
22
_VCS_Checkout=Obtener copia local (checkout)
23
_Failed_checkout_of_{0}=Ha fallado la obtenci\u00f3n de la copia local de ''{0}''
24
_VCSGis=VCSGis
25
_Workspace_VCS=Copia de trabajo VCSGis
26
_Database_server=Servidor de base de datos
27
_Personal_database_H2=Base de datos personal (H2Spatial)
28
_Create_conexion_to_database=Crear conexi\u00f3n a la base de datos
29
_VCS_Repository=Repositorio VCSGis
30
_Database_server=Servidor de base de datos
31
_Remote_repository=Repositorio remoto
32
_URL=URL
33
_Close=Cerrar
34
_Checkout_table_from_VCS_repository=Obtener una tabla desde un repositorio VCSGis
35
_VCS_Show_changes=Mostrar cambios
36
_VCS_Changes=VCSGis Cambios
37
_Local=Local
38
_Remote=Remoto
39
_VCS_Register_workspace=Registrar copia de trabajo
40
_Selected_connection_is_not_a_valid_workspace=La conexi\u00f3n seleccionada no es una copia de trabajo v\u00e1lida
41
_Cant_register_workspace=No se ha podido registrar la copia de trabajo
42
_Administration=Administraci\u00f3n
43
_Field_for_label=Campo para etiqueta
44
_Select_all=Seleccionar todo
45
_Unselect_all=Deseleccionar todo
46
_Refresh=Refrescar
47
_Revert=Revertir
48
_VCS_Commit=Confirmar (commit)
49
_Show_form=Mostrar formulario
50
_Effective_date=Fecha de entrada en vigor
51
_Comment=Comentario
52
_No_errors=Sin errores
53
_dbfile_is_null=El archivo de la base de datos no exite
54
_workspace_explorer_is_null=El explorador de la copia de trabajo no exite
55
_label_is_null=La etiqueta no existe
56
_Cant_open_workspace=No se puede abrir la copia de trabajo
57
_Store_not_in_control_version=El almac\u00e9n no est\u00e1 en el control de versiones
58
_Cant_create_table=No se puede crear la tabla
59
_Cant_create_config_table=No se puede crear la configuraci\u00f3n de la tabla
60
_Cant_create_table_entities=No se puede crear la tabla de entidades
61
_Cant_create_table_changes=No se puede crear la tabla de cambios
62
_Entity_already_exists=La entidad ya existe
63
_Entity_has_not_VCSGISCODE=La entidad no tiene VCSGISCODE
64
_Cant_open_entities=No se pueden abrir las entidades
65
_Cant_insert_entities=No pueden insertar entidades
66
_Cant_open_changes=No se puedea abrir los cambios
67
_Cant_insert_change=No se puede insertar el cambio
68
_Cant_open_store=No se puede abrir el almac\u00e9n
69
_Cant_retrieve_source_features=No se pueden obtener los datos de la fuente
70
_Cant_insert_features=No se pueden insertar los datos
71
_Cant_commit=No se puede hacer el commit
72
_Cant_commit_workspace_is_out_of_date=No se puede hacer el commit, la copia de trabajo est\u00e1 desactualizada
73
_Cant_checkout=No se puede hacer el checkout
74
_Table_already_exists_in_the_workspace=La tabla ya existe en la copia de trabajo
75
_Table_not_in_repository=La tabla no est\u00e1 en el repositorio
76
_Cant_update_entities=No se pueden actualizar las entidades
77
_Cant_prepare_update=No se puede preparar la actualizaci\u00f3n
78
_Cant_update=No se puede actualizar
79
_Reload_remote_changes=Recargar cambios remotos
80
_Clean_remote_changes=Limpiar cambios remotos
81
_Update_tables_with_remote_changes=Actualizar tablas.\nSe actualizar\u00e1n las tablas locales con los cambios del repositorio.\nSi hay cambios locales se perder\u00e1n.
82
_Merge_tables_with_remote_changes=Mezclar tablas.\nSe mantendr\u00e1n los cambios remotos para los registros seleccionados,\ny los cambios locales para los registros no seleccionados.
83
_Download_remote_changes_of_selected_table=Descargar cambios remotos de la tabla seleccionada
84
_VCS_Show_server_entities=Mostrar entidades del repositorio
85
_VCS_Show_server_hooks=Mostrar hooks del repositorio VCSGis
86
_The_selected_connection_does_not_correspond_to_a_version_control_server=La conexi\u00f3n seleccionada no se corresponde con un repositorio de control de versiones
87
_Add_new_table_to_project=A\u00f1adir la tabla nueva al proyecto
88
_Add_new_layer_to_view=A\u00f1adir la nueva capa a la vista
89
_Select_a_view=Seleccione una vista
90
_Cant_show_form_because_entity_isnt_in_workspace_yet=No se puede mostrar el formulario porque la entidad no est\u00e1 en la copia de trabajo todav\u00eda.
91
_Dont_add_the_table_or_layer_to_the_project=No a\u00f1adir la tabla/capa al proyecto
92
_Add_layer_to_view=A\u00f1adir la capa a la vista
93
_Add_table_to_project=A\u00f1adir la tabla al projecto
94
_Cant_retrieve_entities_from_repository=No se han podido obtener las entidades del repositorio
95
_Cant_retrieve_entities=No se han podido obtener las entidades
96
_Working_copy=Copia de trabajo
97
_VCS_Server_entities=Entidades del servidor
98
_VCS_Server_hooks=Hooks del servidor
99
_VCS_Export=Exportar
100
_Export_to_a_local_table_a_table_of_the_repository=Exporta a una tabla local una tabla del repositorio
101
_Add=A\u00f1adir
102
_Remove=Eliminar
103
_Cant_retrieve_entities=No se han podido obtener las entidades
104
_Add_layer=A\u00f1adir capa
105
_Adding_table_layer=A\u00f1adiendo tabla/capa
106
_Preparing_source=Preparando fuente
107
_Finishing=Finalizando
108
_If_you_cant_find_the_layer_click_here_to_initialize_a_new_workspace=Si no puede encontar la capa, pulse aqu\u00ed para inicializar una nueva copia de trabajo
109
_Repository_info=Informaci\u00f3n del repositorio
110
_Layer=Capa
111
_Name=Nombre
112
_Committing_changes=Enviando cambios
113
_The_selected_table_is_already_in_the_working_copy=La tabla seleccionada ya est\u00e1 en la copia de trabajo
114
_To_download_updated_data_use_show_changes_tool=Para descargar los datos actualizados utilice la herramienta de mostrar cambios
115
_Processing=Procesando
116
_Ended_process=Proceso finalizado
117
_Workspace_changes_list_updated=Lista de cambios de la copia de trabajo actualizada (%s)
118
_Repository_changes_list_updated=Lista de cambios del repositorio actualizada (%s)
119
_If_you_cant_find_the_layer_click_here_to_initialize_a_new_workspace=Si no puede encontrar la capa, pulse aqu\u00ed para inicializar una nueva copia de trabajo.
120
_Projection=Proyecci\u00f3n
121
_Zoom=Zoom
122
_Center=Centrar
123
_Clean_highlighted=Limpiar resaltados
124
_Do_you_want_add_layer_to_active_view=\u00bfDesea a\u00f1adir la capa a la vista activa?
125
_Do_you_want_add_table_to_project=\u00bfDesea a\u00f1adir la tabla al proyecto?
126
_Clean_highlighted=Limpiar geometr\u00edas resaltadas
127
_Category=Categor\u00eda
128
_Overwrite_table=Sobrescribir tabla
129
_Delete_existing_table_in_workspace_and_checkout_table_from_repository=Borra la copia de local y obtiene de nuevo una copia desde el repositorio.
130
_Select_revision=Seleccionar revisi\u00f3n
131
_Next_page=Siguiente p\u00e1gina
132
table=tabla
133
operation=operaci\u00f3n
134
label=etiqueta
135
_VCS_Show_revisions=Mostrar revisiones
136
_VCS_Revisions=Revisiones
137
_Cant_remove_entity=No se ha podido eliminar la entidad
138
_Cant_remove_changes=No se han podido eliminar los cambios
139
_Add_the_table_to_the_project=A\u00f1adir la tabla al proyecto
140
_Identifier_field=Campo del identificador
141
_Sort_field=Campo contador
142
_Use_revision_date=Usar fecha de revisi\u00f3n
143
_Revision_date_field=Campo fecha de revisi\u00f3n
144
_Time_interval_to_group_changes=Intervalo de agrupaci\u00f3n
145
_Use_revision_code=Usar c\u00f3digo de revisi\u00f3n
146
_Revision_code_field=Campo c\u00f3digo de revisi\u00f3n
147
_VCS_Import_history=Importar historial
148
_Import_history=Importar historial
149
_The_process_has_created_local_changes_that_would_need_to_be_committed_to_the_repository=El proceso ha creado cambios locales que ser\u00eda necesario "confirmar" en el repositorio
150
_VCSGis_Merge=VCSGis mezcla
151
_User=Usuario
152
_Password=Contrase\u00f1a
153
_User_login=Inicio de sesi\u00f3n de usuario
154
_Others=Otras
155
_Table_already_exists_in_working_copy=La tabla ya existe en la copia de trabajo
156
_You_can_rename_the_table=Puede usted cambiar el nombre de la tabla
157
_VCS_Create_resource_table=Crear tabla de recursos
158
_Create_resource_table_parameters=Par\u00e1metros para la creaci\u00f3n de la tabla de recursos
159
_TableName= Nombre de tabla
160
_Enter_the_identifier_and_password_of_a_user_with_permissions_to_perform_the_requested_operation=Introduzca identificador y contrase\u00f1a de un usuario con permisos para realizar la operaci\u00f3n solicitada
161
_Authorization_required_for_this_operation=Autorizaci\u00f3n necesaria para esta operaci\u00f3n
162
_VCS_Checkout_DataModel=Obtener copia local del modelo de datos
163
_VCS_Connect_to_datamodel=Conectar a modelo de datos
164
_Data_models=Modelos de datos
165
_Failed_connect_to_{0}=Ha fallado la conexi\u00f3n con ''{0}''
166
_Overwrite_existing_tables=Sobreescribir las tablas existentes
167
_Delete_existing_tables_in_workspace_and_then_checkout_them_from_repository=Elimina las tablas existentes en la copia de trabajo y las vuelve a obtener del repositorio.
168
_VCS_Logout=Cerrar sesi\u00f3n
169
_Logout_the_current_user_from_a_VCSGis_working_copy=Cierra la sesi\u00f3n de usuario en una copia de trabajo
170
_VCS_operation_add_entity=Nueva entidad
171
_VCS_operation_insert=Nuevo
172
_VCS_operation_update=Modificado
173
_VCS_operation_delete=Borrado
174
_Highlight=Resaltar
175
_Topology_plan_execution_failed_Do_you_wish_to_continue=Ha fallado la ejecuci\u00f3n del plan de topolog\u00eda. \u00bfDesea continuar?
176
_Cant_pass_topology_plans=No se pueden pasar los planes topol\u00f3gicos
177
_TopologyPlan_has_been_updated_please_retry_commit=El plan topol\u00f3gico se ha actualizado. Por favor, reintente el commit.
178
_Sending_topology_plans=Enviando los planes topol\u00f3gicos
179
_Execute_topology_plan=Ejecutar plan de topolog\u00eda
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/resources-plugin/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 gvSIG
3
  Association. This program is free software; you can redistribute it and/or modify
4
  it under the terms of the GNU General Public License as published by the Free Software
5
  Foundation; either version 3 of the License, or (at your option) any later version.
6
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8
  PURPOSE. See the GNU General Public License for more details. You should have received
9
  a copy of the GNU General Public License along with this program; if not, write to
10
  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
11
  USA. For any additional information, do not hesitate to contact us at info AT gvsig.com,
12
  or visit our website www.gvsig.com. -->
13
<plugin-config>
14
  <depends plugin-name="org.gvsig.app.mainplugin" />
15
  <depends plugin-name="org.gvsig.app.document.table.app.mainplugin" />
16
  <depends plugin-name="org.gvsig.topology.app.mainplugin" optional="true"/>
17
<!--  <depends plugin-name="org.gvsig.shp.app.mainplugin" />-->
18
  <depends plugin-name="org.gvsig.geodb.app.mainplugin" />
19
  <resourceBundle name="text" />
20
  <libraries library-dir="lib" />
21
  <extensions>
22
    <extension class-name="org.gvsig.vcsgis.app.VCSGisExtension"
23
      description="" active="true" priority="1">
24

  
25
      <action 
26
            name="tools-vcsgis-init-server" 
27
            label="_VCS_Initialize_repository" 
28
            tooltip="_VCS_Initialize_repository"
29
            position="900700101" 
30
            action-command="tools-vcsgis-init-server" 
31
            icon="tools-vcsgis-init-server"
32
            accelerator="" 
33
      />
34

  
35
      <action 
36
          name="tools-vcsgis-register-workspace" 
37
          label="_VCS_Register_workspace" 
38
          tooltip="_Register_workspace"
39
            position="900700103" 
40
          action-command="tools-vcsgis-register-workspace" 
41
          icon="tools-vcsgis-register-workspace"
42
          accelerator="" 
43
      />
44

  
45
      <action 
46
          name="tools-vcsgis-show_server-entities" 
47
          label="_VCS_Show_server_entities" 
48
          tooltip="_VCS_Show_server_entities"
49
          position="900700104" 
50
          action-command="tools-vcsgis-show_server-entities" 
51
          icon="tools-vcsgis-show-server-entities"
52
          accelerator="" 
53
      />
54

  
55
      <action 
56
          name="tools-vcsgis-show_server-hooks" 
57
          label="_VCS_Show_server_hooks" 
58
          tooltip="_VCS_Show_server_hooks"
59
          position="900700105" 
60
          action-command="tools-vcsgis-show_server-hooks" 
61
          icon="tools-vcsgis-show-server-hooks"
62
          accelerator="" 
63
      />
64

  
65
      <action 
66
          name="tools-vcsgis-init-workspace" 
67
          label="_VCS_Initialize_workspace" 
68
          tooltip="_VCS_Initialize_workspace"
69
          position="900700200" 
70
          action-command="tools-vcsgis-init-workspace" 
71
          icon="tools-vcsgis-init-workspace"
72
          accelerator="" 
73
      />
74

  
75
      <action 
76
          name="tools-vcsgis-add-to-workspace" 
77
          label="_Add_to_VCS_workspace" 
78
          tooltip="_Add_table_or_layer_to_VCS_workspace"
79
          position="900700300" 
80
          action-command="tools-vcsgis-add-to-workspace" 
81
          icon="tools-vcsgis-add-to-workspace"
82
          accelerator="" 
83
      />
84

  
85
      <action 
86
          name="tools-vcsgis-import-history" 
87
          label="_Add_to_VCS_workspaceXXXXXXXXX" 
88
          tooltip="_Add_table_or_layer_to_VCS_workspaceXXXXX"
89
          position="900700300" 
90
          action-command="tools-vcsgis-import-history" 
91
          icon="tools-vcsgis-add-to-workspace"
92
          accelerator="" 
93
      />
94

  
95
      <action 
96
          name="tools-vcsgis-checkout" 
97
          label="_VCS_checkout" 
98
          tooltip="_Checkout_table_from_VCS_repository"
99
          position="900700400" 
100
          action-command="tools-vcsgis-checkout" 
101
          icon="tools-vcsgis-checkout"
102
          accelerator="" 
103
      />
104

  
105
      <action 
106
          name="tools-vcsgis-checkout-datamodel" 
107
          label="_VCS_Connect_to_datamodel" 
108
          tooltip="_VCS_Connect_to_datamodel"
109
          position="900700450" 
110
          action-command="tools-vcsgis-checkout-datamodel" 
111
          icon="tools-vcsgis-checkout-datamodel"
112
          accelerator="" 
113
      />
114

  
115
      <action 
116
          name="tools-vcsgis-export" 
117
          label="_VCS_Export" 
118
          tooltip="_Export_to_a_local_table_a_table_of_the_repository"
119
          position="900700500" 
120
          action-command="tools-vcsgis-export" 
121
          icon="tools-vcsgis-export"
122
          accelerator="" 
123
      />
124

  
125
      <action 
126
          name="tools-vcsgis-showchanges" 
127
          label="_VCS_Show_changes" 
128
          tooltip="_VCS_Show_changes"
129
          position="900700600" 
130
          action-command="tools-vcsgis-showchanges" 
131
          icon="tools-vcsgis-showchanges"
132
          accelerator="" 
133
      />
134

  
135
      <action 
136
          name="tools-vcsgis-register-workspace" 
137
          label="_VCS_Register_workspace" 
138
          tooltip="_Register_workspace"
139
          position="900700300" 
140
          action-command="tools-vcsgis-register-workspace" 
141
          icon="tools-vcsgis-register-workspace"
142
          accelerator="" 
143
      />
144

  
145
      <action 
146
          name="tools-vcsgis-show_server-entities" 
147
          label="_VCS_Show_server_entities" 
148
          tooltip="_Show_server_entities"
149
          position="900700700" 
150
          action-command="tools-vcsgis-show_server-entities" 
151
          icon="tools-vcsgis-show-server-entities"
152
          accelerator="" 
153
      />
154

  
155
      <action 
156
          name="tools-vcsgis-show_server-hooks" 
157
          label="_VCS_Show_server_hooks" 
158
          tooltip="_Show_server_hooks"
159
          position="900700800" 
160
          action-command="tools-vcsgis-show_server-hooks" 
161
          icon="tools-vcsgis-show-server-hooks"
162
          accelerator="" 
163
      />
164

  
165
      <action 
166
          name="tools-vcsgis-show-revisions" 
167
          label="_VCS_Revisions" 
168
          tooltip="_Show_revisions_panel"
169
          position="900701000" 
170
          action-command="tools-vcsgis-show-revisions" 
171
          icon="tools-vcsgis-show-revisions"
172
          accelerator="" 
173
      />
174
      
175
    <action 
176
          name="tools-vcsgis-create-resource-table" 
177
          label="_VCS_Create_resource_table" 
178
          tooltip="_Create_resource_table"
179
          position="900700104" 
180
          action-command="tools-vcsgis-create-resource-table" 
181
          icon=""
182
          accelerator="" 
183
      />
184
      
185
    <action 
186
          name="tools-vcsgis-logout" 
187
          label="_VCS_Logout_from_working_copy" 
188
          tooltip="_Logout_from_working_copy"
189
          position="900700104" 
190
          action-command="tools-vcsgis-logout" 
191
          icon=""
192
          accelerator="" 
193
      />
194

  
195
      <menu text="tools/_VCSGis/_Administration/_VCS_Initialize_repository" name="tools-vcsgis-init-server" />
196
      <menu text="tools/_VCSGis/_Administration/_VCS_Register_workspace" name="tools-vcsgis-register-workspace" />
197
      <menu text="tools/_VCSGis/_Administration/_VCS_Show_server_entities" name="tools-vcsgis-show_server-entities" />
198
      <menu text="tools/_VCSGis/_Administration/_VCS_Show_server_hooks" name="tools-vcsgis-show_server-hooks" />
199
      <menu text="tools/_VCSGis/_Administration/_VCS_Create_resource_table" name="tools-vcsgis-create-resource-table" />
200
      <menu text="tools/_VCSGis/_VCS_Initialize_workspace" name="tools-vcsgis-init-workspace" />
201
      <menu text="tools/_VCSGis/_VCS_Add_to_workspace" name="tools-vcsgis-add-to-workspace" />
202
      <menu text="tools/_VCSGis/_VCS_Checkout" name="tools-vcsgis-checkout" />
203
      <menu text="tools/_VCSGis/_VCS_Export" name="tools-vcsgis-export" />
204
      <menu text="tools/_VCSGis/_VCS_Import_history" name="tools-vcsgis-import-history" />
205
      <menu text="tools/_VCSGis/_VCS_Show_revisions" name="tools-vcsgis-show-revisions" />
206
      <menu text="tools/_VCSGis/_VCS_Logout" name="tools-vcsgis-logout" />
207
      <menu text="tools/_VCSGis/_VCS_Show_changes" name="tools-vcsgis-showchanges" />
208
      <menu text="tools/_VCSGis/_VCS_Connect_to_datamodel" name="tools-vcsgis-checkout-datamodel" />
209

  
210
      <tool-bar name="vcsgis" position="900700300">
211
        <!--<action-tool name="tools-vcsgis-init-server" />-->
212
        <!--<action-tool name="tools-vcsgis-init-workspace" />-->
213
        <action-tool name="tools-vcsgis-add-to-workspace" />
214
        <action-tool name="tools-vcsgis-checkout" />
215
        <action-tool name="tools-vcsgis-showchanges" />
216
      </tool-bar>
217

  
218
    </extension>
219
  </extensions>
220
</plugin-config>
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml
1
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2013 gvSIG
2
  Association. This program is free software; you can redistribute it and/or modify
3
  it under the terms of the GNU General Public License as published by the Free Software
4
  Foundation; either version 3 of the License, or (at your option) any later version.
5
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
6
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
7
  PURPOSE. See the GNU General Public License for more details. You should have received
8
  a copy of the GNU General Public License along with this program; if not, write to
9
  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
10
  USA. For any additional information, do not hesitate to contact us at info AT gvsig.com,
11
  or visit our website www.gvsig.com. -->
12
<assembly>
13
  <id>gvsig-plugin-package</id>
14
  <formats>
15
    <format>zip</format>
16
  </formats>
17
  <baseDirectory>${project.artifactId}</baseDirectory>
18
  <includeBaseDirectory>true</includeBaseDirectory>
19
  <files>
20
    <file>
21
      <source>target/${project.artifactId}-${project.version}.jar</source>
22
      <outputDirectory>lib</outputDirectory>
23
    </file>
24
    <file>
25
      <source>target/package.info</source>
26
    </file>
27
  </files>
28

  
29
  <fileSets>
30
    <fileSet>
31
      <directory>src/main/resources-plugin</directory>
32
      <outputDirectory>.</outputDirectory>
33
    </fileSet>
34
  </fileSets>
35

  
36

  
37
  <dependencySets>
38
    <dependencySet>
39
      <useProjectArtifact>false</useProjectArtifact>
40
      <useTransitiveDependencies>false</useTransitiveDependencies>
41
      <outputDirectory>lib</outputDirectory>
42
      <includes>
43
        <include>org.gvsig:org.gvsig.vcsgis.lib.api</include>
44
        <include>org.gvsig:org.gvsig.vcsgis.lib.impl</include>
45
        <include>org.gvsig:org.gvsig.vcsgis.swing.api</include>
46
        <include>org.gvsig:org.gvsig.vcsgis.swing.impl</include>
47
        <!--<include>org.apache.httpcomponents:httpclient</include>-->
48

  
49
        
50
      </includes>
51
    </dependencySet>
52
  </dependencySets>
53

  
54
</assembly>
55

  
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/java/org/gvsig/vcsgis/app/VCSGisDialogsHelper.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

  
23
package org.gvsig.vcsgis.app;
24

  
25
import java.awt.event.ActionEvent;
26
import java.awt.event.ComponentAdapter;
27
import java.awt.event.ComponentEvent;
28
import java.util.HashMap;
29
import java.util.Map;
30
import org.gvsig.tools.ToolsLocator;
31
import org.gvsig.tools.i18n.I18nManager;
32
import org.gvsig.tools.swing.api.Component;
33
import org.gvsig.tools.swing.api.ToolsSwingLocator;
34
import org.gvsig.tools.swing.api.windowmanager.Dialog;
35
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
36
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
37
import org.gvsig.vcsgis.swing.VCSGisPanel;
38
import org.slf4j.Logger;
39
import org.slf4j.LoggerFactory;
40

  
41
/**
42
 *
43
 * @author gvSIG Team
44
 */
45
public class VCSGisDialogsHelper {
46
    private static final Logger LOGGER = LoggerFactory.getLogger(VCSGisDialogsHelper.class);
47

  
48
    public static class VCSGisDialogInfo {
49

  
50
        private VCSGisPanel panel;
51
        private final String name;
52
        private final String title;
53
        private String header;
54
        private String okLabel;
55
        private boolean closed;
56
        private Runnable action;
57
        private Dialog dialog;
58
        private boolean autoclose;
59

  
60
        public VCSGisDialogInfo(String name, VCSGisPanel thePanel, String title) {
61
            this.name = name;
62
            this.panel = thePanel;
63
            this.title = title;
64
            this.closed = true;
65
            this.autoclose = false;
66

  
67
            this.panel.asJComponent().addComponentListener(new ComponentAdapter() {
68
                @Override
69
                public void componentHidden(ComponentEvent e) {
70
                    closed = true;
71
                    if (!panel.isProcessing()) {
72
                        panel = null;
73
                        dialog = null;
74
                    }
75
                }
76
            });
77
        }
78
        
79
        public VCSGisDialogInfo(String name, VCSGisPanel thePanel, String title, String header, String okLabel) {
80
            this(name, thePanel, title);
81
            this.header = header;
82
            this.okLabel = okLabel;
83
        }
84

  
85
        private void performDialogAction() {
86
            action.run();
87
        }
88

  
89
        public void setAction(Runnable action) {
90
            this.action = action;
91
        }
92

  
93
        public Component getPanel() {
94
            return this.panel;
95
        }
96

  
97
        public boolean isClosed() {
98
            return this.closed;
99
        }
100

  
101
        public String getName() {
102
            return this.name;
103
        }
104

  
105
        public void setAutoclose(boolean autoclose) {
106
            if( this.dialog!=null ) {
107
                this.dialog.setAutoclose(autoclose);
108
            }
109
            this.autoclose = autoclose;
110
        }
111
        
112
        private Dialog createDialog() {
113
            I18nManager i18n = ToolsLocator.getI18nManager();
114
            WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager();
115

  
116
            Dialog theDialog = winManager.createDialog(
117
                    this.panel.asJComponent(),
118
                    i18n.getTranslation(title),
119
                    i18n.getTranslation(header),
120
                    WindowManager_v2.BUTTONS_OK_CANCEL
121
            );
122
            theDialog.setAutoclose(this.autoclose);
123

  
124
            this.panel.setDialog(theDialog);
125
            theDialog.setButtonLabel(
126
                    WindowManager_v2.BUTTON_OK,
127
                    i18n.getTranslation(okLabel)
128
            );
129
            theDialog.setButtonLabel(
130
                    WindowManager_v2.BUTTON_CANCEL,
131
                    i18n.getTranslation("_Close")
132
            );
133
            if (this.panel.isProcessing()) {
134
                theDialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, false);
135
            }
136
            theDialog.addActionListener((ActionEvent e) -> {
137
                switch (theDialog.getAction()) {
138
                    case WindowManager_v2.BUTTON_OK:
139
                        Thread task = new Thread(() -> {
140
                            performDialogAction();
141
                        }, "VCSGis" + name);
142
                        task.start();
143
                        break;
144
                    case WindowManager_v2.BUTTON_CANCEL:
145
                        theDialog.asJComponent().setVisible(false);
146
                        break;
147
                }
148
            });
149
            return theDialog;
150
        }
151

  
152
        public void show() {
153
            if (!this.closed) {
154
                return;
155
            }
156
            if( this.action==null ) {
157
                I18nManager i18n = ToolsLocator.getI18nManager();
158
                WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager();
159
                winManager.showWindow(
160
                        this.panel.asJComponent(),
161
                        i18n.getTranslation(this.title),
162
                        WindowManager.MODE.WINDOW
163
                );
164
            } else {
165
                this.dialog = this.createDialog();
166
                this.dialog.show(WindowManager.MODE.WINDOW);
167
            }
168
        }
169
    }
170

  
171
    private Map<String, VCSGisDialogInfo> dialogsInfo;
172

  
173
    public VCSGisDialogInfo getDialog(String name) {
174
        if (this.dialogsInfo == null) {
175
            return null;
176
        }
177
        VCSGisDialogInfo info = this.dialogsInfo.get(name);
178
        return info;
179
    }
180

  
181
    public VCSGisDialogInfo getOrCreateDialog(String name, VCSGisPanel panel, String title, String header, String okLabel, Runnable action) {
182
        if (this.dialogsInfo == null) {
183
            this.dialogsInfo = new HashMap<>();
184
        }
185
        VCSGisDialogInfo info = this.dialogsInfo.get(name);
186
        if (info == null || info.isClosed() ) {
187
            info = new VCSGisDialogInfo(name, panel, title, header, okLabel);
188
            info.setAction(action);
189
            this.dialogsInfo.put(name, info);
190
        }
191
        return info;
192
    }
193

  
194
    public VCSGisDialogInfo getOrCreateDialog(String name, VCSGisPanel panel, String title) {
195
        if (this.dialogsInfo == null) {
196
            this.dialogsInfo = new HashMap<>();
197
        }
198
        VCSGisDialogInfo info = this.dialogsInfo.get(name);
199
        if (info == null || info.isClosed()) {
200
            info = new VCSGisDialogInfo(name, panel, title);
201
            this.dialogsInfo.put(name, info);
202
        }
203
        return info;
204
    }
205

  
206
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/java/org/gvsig/vcsgis/app/addlayer/WizardVCSGisVectorial.java
1
package org.gvsig.vcsgis.app.addlayer;
2

  
3
import java.awt.event.ActionEvent;
4
import java.util.ArrayList;
5
import java.util.Arrays;
6
import java.util.List;
7
import java.util.Map;
8
import javax.swing.SwingUtilities;
9
import org.apache.commons.codec.binary.Hex;
10
import org.apache.commons.lang3.StringUtils;
11
import org.gvsig.andami.PluginServices;
12
import org.gvsig.andami.PluginsLocator;
13
import org.gvsig.andami.PluginsManager;
14
import org.gvsig.fmap.dal.DALLocator;
15
import org.gvsig.fmap.dal.DataManager;
16
import org.gvsig.fmap.dal.DataStore;
17
import org.gvsig.fmap.dal.DataStoreParameters;
18
import org.gvsig.fmap.dal.exception.DataException;
19
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
20
import org.gvsig.fmap.dal.feature.FeatureSet;
21
import org.gvsig.fmap.dal.feature.FeatureStore;
22
import org.gvsig.fmap.dal.store.db.DBStoreParameters;
23
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorer;
24
import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters;
25
import org.gvsig.fmap.mapcontext.MapContext;
26
import org.gvsig.fmap.mapcontext.MapContextLocator;
27
import org.gvsig.fmap.mapcontext.MapContextManager;
28
import org.gvsig.fmap.mapcontext.layers.CancelationException;
29
import org.gvsig.fmap.mapcontext.layers.FLayer;
30
import org.gvsig.fmap.mapcontext.layers.FLayers;
31
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
32
import org.gvsig.fmap.mapcontrol.MapControl;
33
import org.gvsig.geodb.ExtDB_Spatial;
34
import org.gvsig.geodb.TableInfo;
35
import org.gvsig.geodb.vectorialdb.visibility.LayerScaleVisibility;
36
import org.gvsig.geodb.vectorialdb.visibility.VisibilityScaleSelector;
37
import org.gvsig.tools.ToolsLocator;
38
import org.gvsig.tools.dispose.DisposeUtils;
39
import org.gvsig.tools.dynobject.DynObject;
40
import org.gvsig.tools.i18n.I18nManager;
41
import org.gvsig.tools.swing.api.ToolsSwingLocator;
42
import org.gvsig.tools.swing.api.windowmanager.Dialog;
43
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
44
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
45
import static org.gvsig.vcsgis.app.addlayer.AbstractWizardVCSGis.LOGGER;
46

  
47
/**
48
 *
49
 * @author gvSIG Team
50
 */
51
@SuppressWarnings("UseSpecificCatch")
52
public class WizardVCSGisVectorial extends AbstractWizardVCSGis {
53
    
54
    public static final int NUMBER_OF_FEATURES_TO_ASK_FOR_VISIBILITY_SCALE = 10000;
55
    public static final String LAYERS_SCALE_VISIBILITY_PARAMETER="layersScaleVisibility";
56

  
57
    public WizardVCSGisVectorial() {
58
        super();
59
    }
60

  
61
    @Override
62
    protected boolean requireGeometry() {
63
        return true;
64
    }
65

  
66
    @Override
67
    public Object executeWizard() {
68
        DataManager man = DALLocator.getDataManager();
69
        MapContextManager mapContextManager = MapContextLocator.getMapContextManager();
70

  
71
        MapControl mapControl = this.getMapCtrl();
72
        MapContext mapContext = mapControl.getMapContext();
73

  
74
        String groupName = null;
75
        List<FLayer> all_layers = new ArrayList();
76

  
77
        try {
78
            FLayer layer = null;
79
            for (TableInfo tableInfo : this.getTablesInformation()) {
80
                if (!tableInfo.isSelected()) {
81
                    continue;
82
                }
83
                DBStoreParameters params = tableInfo.getParameters();
84
                fixCRS(params);
85
                if (groupName == null) {
86
                    String dbname = params.getDBName();
87
                    if (StringUtils.isEmpty(dbname)) {
88
                        dbname = "Group";
89
                    }
90
                    String host = params.getHost();
91
                    if (StringUtils.isEmpty(host)) {
92
                        groupName = dbname;
93
                    } else {
94
                        groupName = dbname + " (" + host + ")";
95
                    }
96
                }
97
                FeatureStore store;
98
                try {
99
                    store = (FeatureStore) man.openStore(params.getDataStoreName(),
100
                            params);
101
                } catch (Exception e) {
102
                    LOGGER.warn("While opening DB store.", e);
103
                    return null;
104
                }
105
                downloadAndRegisterResources(params.getTable());
106
                try {
107

  
108
                    layer = mapContextManager.createLayer(
109
                            tableInfo.getDocumentName(),
110
                            store
111
                    );
112
                    checkForVisibilityScale(layer);
113
                    all_layers.add(layer);
114
                } catch (Exception e) {
115
                    LOGGER.warn("Can't create layer '" + tableInfo.getDocumentName() + "'.", e);
116
                } finally {
117
                    DisposeUtils.disposeQuietly(store);
118
                }
119
            }
120

  
121
            if (all_layers.size() > 1) {
122
                FLayers group = new FLayers();
123
                group.setMapContext(mapContext);
124
                group.setParentLayer(mapContext.getLayers());
125
                group.setName(groupName);
126

  
127
                for (FLayer aLayer : all_layers) {
128
                    group.addLayer(aLayer);
129
                }
130
                if ( group.isOk() ) {
131
                    group.setVisible(true);
132
                    mapContext.beginAtomicEvent();
133
                    try {
134
                        mapControl.addLayer(group);
135
                        group.dispose();
136
                    } catch (CancelationException e) {
137
                        LOGGER.warn("Can't add group to mapcontext layers.", e);
138
                    } finally {
139
                        mapContext.endAtomicEvent();
140
                    }
141
                } else {
142
                    fireLayerErrorEvent(layer, mapControl);
143
                }
144

  
145
            } else if (all_layers.size() == 1) {
146
                layer = (FLayer) all_layers.get(0);
147
                if ( layer.isOk() ) {
148
                    layer.setVisible(true);
149
                    mapContext.beginAtomicEvent();
150
                    try {
151
                        mapControl.addLayer(layer);
152
                    } catch (CancelationException e) {
153
                        LOGGER.warn("Can't add group to mapcontext layers.", e);
154
                    } finally {
155
                        mapContext.endAtomicEvent();
156
                    }
157
                } else {
158
                    fireLayerErrorEvent(layer, mapControl);
159
                }
160
            }
161

  
162
        } finally {
163
            // Dispose all created layers. If they have been included into
164
            // a FLayers object, they will have been binded there.
165
            for (FLayer layer : all_layers) {
166
                layer.dispose();
167
            }
168
        }
169
        return null;
170
    }
171

  
172
    private void fireLayerErrorEvent(FLayer lyr, MapControl mapControl) {
173
        mapControl.getMapContext().callNewErrorEvent(null);
174
    }
175
    
176
    
177
    private void checkForVisibilityScale(FLayer layer) throws DataException, ValidateDataParametersException {
178
        
179
        PluginsManager pluginManager = PluginsLocator.getPluginsManager();
180
        PluginServices plugin = pluginManager.getPlugin(ExtDB_Spatial.class);
181
        DynObject pluginProperties = plugin.getPluginProperties();
182
        
183
        Map<String, LayerScaleVisibility> layersScaleVisibility = (Map) pluginProperties.getDynValue(LAYERS_SCALE_VISIBILITY_PARAMETER);
184
        String layerKey = buildLayerKey(layer);
185
        if(layerKey != null) {
186
            LayerScaleVisibility layerScaleVisibility = layersScaleVisibility.get(layerKey);
187
            if(layerScaleVisibility!=null){
188
                int scaleAboveDenominator = layerScaleVisibility.getScaleAboveDenominator();
189
                int scaleBelowDenominator = layerScaleVisibility.getScaleBelowDenominator();
190

  
191
                layer.setMaxScale(scaleAboveDenominator);
192
                layer.setMinScale(scaleBelowDenominator);
193
                return;
194
            }
195
        }
196
        
197
        if (layer instanceof FLyrVect) {
198
            FLyrVect lyrVect = (FLyrVect)layer;
199
            FeatureStore store = lyrVect.getFeatureStore();
200
            
201
            if(store.getExplorer() instanceof JDBCServerExplorer) {
202
                FeatureSet fset = store.getFeatureSet();
203
                if(fset.size()>NUMBER_OF_FEATURES_TO_ASK_FOR_VISIBILITY_SCALE) {
204
                    askUserForVisibilityScale(layer);
205
                }
206
                DisposeUtils.disposeQuietly(fset);
207
            }
208
        }
209
    }
210

  
211
    private void askUserForVisibilityScale(FLayer layer) {
212
        if (!SwingUtilities.isEventDispatchThread()) {
213
            try {
214
                SwingUtilities.invokeAndWait(() -> {askUserForVisibilityScale(layer);});
215
            } catch (Exception ex) {
216
                LOGGER.warn("Con show selection wisivility scale dialog.", ex);
217
            }
218
            return;
219
        }
220
        I18nManager i18n = ToolsLocator.getI18nManager();
221
        WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager();
222
        
223
        VisibilityScaleSelector visibilityScaleSelector = new VisibilityScaleSelector();
224
        Dialog dialog = winManager.createDialog(
225
                visibilityScaleSelector.asJComponent(), 
226
                i18n.getTranslation("select_visibility_scale"), 
227
                null, 
228
                WindowManager_v2.BUTTONS_OK_CANCEL
229
        );
230
        dialog.addActionListener((ActionEvent e) -> {
231
            if (dialog.getAction()==WindowManager_v2.BUTTON_OK ) {
232
                layer.setMaxScale(visibilityScaleSelector.getScaleAboveDenominator());
233
                layer.setMinScale(visibilityScaleSelector.getScaleBelowDenominator());
234
                if(visibilityScaleSelector.getRememberAnswer()){
235
                    PluginsManager pluginManager = PluginsLocator.getPluginsManager();
236
                    PluginServices plugin = pluginManager.getPlugin(ExtDB_Spatial.class);
237
                    DynObject pluginProperties = plugin.getPluginProperties();
238
                    String layerKey = buildLayerKey(layer);
239
                    String layerLabel = buildLayerLabel(layer);
240
                    if(layerKey != null && layerLabel != null){
241
                        Map<String, LayerScaleVisibility> layersScaleVisibility = (Map) pluginProperties.getDynValue(LAYERS_SCALE_VISIBILITY_PARAMETER);
242
                        LayerScaleVisibility layerScaleVisibility = new LayerScaleVisibility();
243
                        layerScaleVisibility.setScaleAboveDenominator(visibilityScaleSelector.getScaleAboveDenominator());
244
                        layerScaleVisibility.setScaleBelowDenominator(visibilityScaleSelector.getScaleBelowDenominator());
245
                        layerScaleVisibility.setLabel(layerLabel);
246
                        layersScaleVisibility.put(layerKey, layerScaleVisibility);
247
                    }
248
                }
249
            }
250
        });
251
        dialog.show(WindowManager.MODE.DIALOG);
252
    }
253

  
254
    private String buildLayerKey(FLayer layer) {
255
        if(layer!=null){
256
            DataStore dataStore = ((FLyrVect)layer).getDataStore();
257
            if(dataStore != null){
258
                DataStoreParameters parameters = dataStore.getParameters();
259
                if(parameters != null){
260
                    return Arrays.toString(Hex.encodeHex(parameters.toByteArray()));
261
                }
262
            }
263
        }
264
        return null;
265
    }
266

  
267
    private String buildLayerLabel(FLayer layer) {
268
        
269
        if(layer!=null){
270
            DataStore dataStore = ((FLyrVect)layer).getDataStore();
271
            if(dataStore != null){
272
                    StringBuilder builder = new StringBuilder();
273
                    DataStoreParameters parameters = dataStore.getParameters();
274
                    if(parameters != null && parameters instanceof DBStoreParameters){
275
                        JDBCStoreParameters jdbcParameters = (JDBCStoreParameters)parameters;
276
                        builder.append(jdbcParameters.getDBName());
277
                        builder.append(".");
278
                        builder.append(jdbcParameters.getSchema());
279
                        builder.append(".");
280
                        builder.append(jdbcParameters.getTable());
281
                        return builder.toString();
282
                }
283
            }
284
        }
285
        return null;
286
    }
287
    
288
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/java/org/gvsig/vcsgis/app/addlayer/WizardVCSGisTabular.java
1
package org.gvsig.vcsgis.app.addlayer;
2

  
3
import java.util.ArrayList;
4
import java.util.List;
5
import org.gvsig.app.ApplicationLocator;
6
import org.gvsig.app.ApplicationManager;
7
import org.gvsig.app.project.documents.table.TableDocument;
8
import org.gvsig.app.project.documents.table.TableManager;
9
import org.gvsig.fmap.dal.DALLocator;
10
import org.gvsig.fmap.dal.DataManager;
11
import org.gvsig.fmap.dal.feature.FeatureStore;
12
import org.gvsig.fmap.dal.store.db.DBStoreParameters;
13
import org.gvsig.geodb.TableInfo;
14
import static org.gvsig.vcsgis.app.addlayer.AbstractWizardVCSGis.LOGGER;
15

  
16
/**
17
 *
18
 * @author jjdelcerro
19
 */
20
public class WizardVCSGisTabular extends AbstractWizardVCSGis {
21

  
22
    public WizardVCSGisTabular() {
23
        super();
24
    }
25

  
26
    @Override
27
    protected boolean requireGeometry() {
28
        return false;
29
    }
30

  
31
    @Override
32
    public Object executeWizard() {
33
        DataManager man = DALLocator.getDataManager();
34
        ApplicationManager application = ApplicationLocator.getManager();
35

  
36
        List<TableDocument> tabledocs= new ArrayList<>();
37
        for ( TableInfo tableInfo : this.getTablesInformation() ) {
38
            if (!tableInfo.isSelected()) {
39
                continue;
40
            }
41
            DBStoreParameters storeParams = tableInfo.getParameters();
42
            FeatureStore store;
43
            try {
44
                store = (FeatureStore) man.openStore(
45
                        storeParams.getDataStoreName(), 
46
                        storeParams
47
                );
48
            } catch (Exception e) {
49
                LOGGER.warn("Can't open store ", e);
50
                return null;
51
            }
52
            downloadAndRegisterResources(storeParams.getTable());
53
            TableDocument document = (TableDocument) application.getProjectManager().createDocument(
54
                    TableManager.TYPENAME, 
55
                    tableInfo.getDocumentName()
56
            );
57
            document.setStore(store);
58
            tabledocs.add(document);
59
        }
60
        return tabledocs;
61
    }
62
    
63
}
org.gvsig.vcsgis/tags/org.gvsig.vcsgis-1.0.17/org.gvsig.vcsgis.app/org.gvsig.vcsgis.app.mainplugin/src/main/java/org/gvsig/vcsgis/app/addlayer/AbstractWizardVCSGisView.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<object classname="com.jeta.forms.store.memento.FormPackage">
4
 <at name="fileversion">
5
  <object classname="com.jeta.forms.store.memento.FormsVersion2">
6
   <at name="major">2</at>
7
   <at name="minor">0</at>
8
   <at name="sub">0</at>
9
  </object>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff