Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / project / Project.java @ 44088

History | View | Annotate | Download (5.33 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 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, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
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
package org.gvsig.app.project;
25

    
26
import java.awt.Color;
27
import java.awt.image.BufferedImage;
28
import java.beans.PropertyChangeListener;
29
import java.io.File;
30
import java.io.InputStream;
31
import java.io.OutputStream;
32
import java.util.List;
33
import java.util.Set;
34

    
35
import org.cresques.cts.IProjection;
36

    
37
import org.gvsig.app.project.documents.Document;
38
import org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesSupport;
39
import org.gvsig.fmap.mapcontext.layers.FLayer;
40
import org.gvsig.tools.persistence.Persistent;
41
import org.gvsig.tools.persistence.exception.PersistenceException;
42

    
43
public interface Project extends DocumentsContainer, Persistent, ExtendedPropertiesSupport {
44

    
45
    public static final String PROJECT_PANEL_PAGE_GROUP = "ProyectPanel";
46

    
47
    public static final String PROJECT_PROPERTIES_PAGE_GROUP = "Proyect";
48

    
49
    public static final String FILE_EXTENSION = ".gvsproj";
50
    
51
    public static final String FILE_BAK = FILE_EXTENSION + ".bak";
52

    
53
    public void addPropertyChangeListener(PropertyChangeListener listener);
54

    
55
    public void removePropertyChangeListener(PropertyChangeListener listener);
56

    
57
    /**
58
     * Return the creation date of the project
59
     *
60
     * @return
61
     */
62
    public String getCreationDate();
63

    
64
    /**
65
     * Return the name of the project
66
     *
67
     * @return
68
     */
69
    public String getName();
70

    
71
    /**
72
     * Set the name of he project.
73
     *
74
     * @param name
75
     */
76
    public void setName(String name);
77

    
78
    /**
79
     * Return the comments associateds with the project
80
     *
81
     * @return comments
82
     */
83
    public String getComments();
84

    
85
    /**
86
     * Set the comments associateds with the project
87
     *
88
     * @param comments as string
89
     */
90
    public void setComments(String comments);
91

    
92
    /**
93
     * Retuen the modification date of the project.
94
     *
95
     * @return modification date as string
96
     */
97
    public String getModificationDate();
98

    
99
    /**
100
     * Return the author of the project,
101
     *
102
     * @return author as string
103
     */
104
    public String getOwner();
105

    
106
    /**
107
     * Sets the author of the project
108
     *
109
     * @param owner
110
     */
111
    public void setOwner(String owner);
112

    
113
    /**
114
     * Obtiene el color de selecci�n que se usar� en el proyecto
115
     *
116
     * @return
117
     */
118
    public Color getSelectionColor();
119

    
120
    /**
121
     * Sets the selecction color
122
     *
123
     * @param selectionColor
124
     */
125
    public void setSelectionColor(String selectionColor);
126

    
127
    /**
128
     * Sets the selecction color
129
     *
130
     * @param selectionColor
131
     */
132
    public void setSelectionColor(Color selectionColor);
133

    
134
    public IProjection getProjection();
135

    
136
    public void setProjection(IProjection projection);
137

    
138
    /**
139
     * Sets the modified state of project.
140
     *
141
     * Can't set to not modified.
142
     *
143
     * @param modified as boolean
144
     */
145
    public void setModified(boolean modified);
146

    
147
    public boolean hasChanged();
148

    
149
    /**
150
     * Adds a document to the project
151
     *
152
     * @param document as IProjectDocument
153
     * @deprecated use addDocument
154
     */
155
    public void add(Document document);
156

    
157
    /**
158
     * Remove a document of the project
159
     *
160
     * @param document as Document
161
     * @deprecated use removeDocument
162
     */
163
    public void remove(Document document);
164

    
165
    /**
166
     * Return the view that contains the especified layer.
167
     *
168
     * @param layer
169
     *
170
     * @return name of the view that contains the layer
171
     *
172
     * @throws RuntimeException Si la capa que se pasa como par�metro no se
173
     * encuentra en ninguna vista
174
     */
175
    public String getViewName(FLayer layer);
176

    
177
    public void addExtent(ProjectExtent arg1);
178

    
179
    public ProjectExtent removeExtent(int arg0);
180

    
181
    public ProjectExtent[] getExtents();
182

    
183
    public void saveState(File out, BufferedImage preview);
184

    
185
    @Deprecated
186
    public void saveState(File out) throws PersistenceException;
187

    
188
    @Deprecated
189
    public void saveState(OutputStream out) throws PersistenceException;
190

    
191
    @Deprecated
192
    public void saveState(OutputStream out, File rootFolder) throws PersistenceException;
193

    
194
    @Deprecated
195
    public void loadState(InputStream in);
196

    
197
    public void loadState(File in);
198

    
199
    public String exportDocumentsAsText(List<Document> documents);
200

    
201
    public void importDocuments(String data, String doctype);
202

    
203
    public boolean canImportDocuments(String data, String doctype);
204

    
205
    public File getFile();
206

    
207
    public Set<String> getUnloadedObjects();
208

    
209
    public List<Exception> getLoadErrors();
210
}