Statistics
| Revision:

svn-gvsig-desktop / tags / v2_0_0_Build_2020 / applications / appgvSIG / src / org / gvsig / app / project / Project.java @ 33813

History | View | Annotate | Download (4.39 KB)

1
package org.gvsig.app.project;
2

    
3
import java.awt.Color;
4
import java.beans.PropertyChangeListener;
5
import java.io.File;
6
import java.io.InputStream;
7
import java.io.OutputStream;
8
import java.util.Iterator;
9
import java.util.List;
10

    
11
import org.cresques.cts.IProjection;
12
import org.gvsig.app.project.documents.Document;
13
import org.gvsig.app.project.documents.table.TableDocument;
14
import org.gvsig.fmap.mapcontext.layers.FLayer;
15
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
16
import org.gvsig.tools.persistence.Persistent;
17
import org.gvsig.tools.persistence.exception.PersistenceException;
18

    
19
public interface Project extends Iterable<Document>,  Persistent{
20

    
21
        public void addPropertyChangeListener(PropertyChangeListener arg0);
22

    
23
        /**
24
         * Return the creation date of the project
25
         *
26
         * @return
27
         */
28
        public String getCreationDate();
29

    
30
        /**
31
         * Return the name of the project
32
         *
33
         * @return
34
         */
35
        public String getName();
36

    
37
        /**
38
         * Set the name of he project.
39
         *
40
         * @param string
41
         */
42
        public void setName(String name);
43

    
44
        /**
45
         * Return the comments associateds with the project
46
         *
47
         * @return comments
48
         */
49
        public String getComments();
50

    
51
        /**
52
         * Set the comments associateds with the project
53
         *
54
         * @param comments as string
55
         */
56
        public void setComments(String string);
57

    
58
        /**
59
         * Retuen the modification date of the project.
60
         *
61
         * @return modification date as string
62
         */
63
        public String getModificationDate();
64

    
65
        /**
66
         * Return the author of the project,
67
         *
68
         * @return author as string
69
         */
70
        public String getOwner();
71

    
72
        /**
73
         * Sets the author of the project
74
         *
75
         * @param author name as string
76
         */
77
        public void setOwner(String owner);
78

    
79
        /**
80
         * Obtiene el color de selecci�n que se usar� en el proyecto
81
         *
82
         * @return
83
         */
84
        public Color getSelectionColor();
85

    
86
        /**
87
         * Sets the selecction color
88
         *
89
         * @param selection color as string
90
         */
91
        public void setSelectionColor(String selectionColor);
92

    
93
        /**
94
         * Sets the selecction color
95
         *
96
         * @param selection color as Color
97
         */
98
        public void setSelectionColor(Color selectionColor);
99

    
100
        public IProjection getProjection();
101

    
102
        public void setProjection(IProjection projection);
103

    
104
        /**
105
         * Sets the modified state of project.
106
         * 
107
         * Can't set to not modified.
108
         *
109
         * @param modified as boolean
110
         */
111
        public void setModified(boolean modified);
112

    
113
        public boolean hasChanged();
114

    
115
        /**
116
         * Return a list of documents in the project.
117
         *
118
         * @return documents as List of IProjectDocument
119
         */
120
        public List<Document> getDocuments();
121

    
122
        /**
123
         * Return a list with all documents of especified type.
124
         *
125
         * @param type of document
126
         *
127
         * @return List of IProjectDocument
128
         */
129
        public List<Document> getDocuments(String type);
130

    
131
        /**
132
         * Adds a document to the project
133
         *
134
         * @param document as IProjectDocument
135
         */
136
        public void add(Document document);
137

    
138
        /**
139
         * Remove a document of the project
140
         *
141
         * @param document as IProjectDocument
142
         */
143
        public void remove(Document doc);
144

    
145
        public Iterator<Document> iterator();
146

    
147
        public boolean isEmpty();
148

    
149
        /**
150
         * Return the FeatureTableDocument associated with a layer
151
         *
152
         * @param layer
153
         *
154
         * @return FeatureTableDocument associated with the layer.
155
         */
156
        public TableDocument getTable(FLyrVect layer);
157

    
158
        /**
159
         * Return the view that contains the especified layer.
160
         *
161
         * @param layer
162
         *
163
         * @return name of the view that contains the layer
164
         *
165
         * @throws RuntimeException 
166
         *             Si la capa que se pasa como par�metro no se encuentra en
167
         *             ninguna vista
168
         */
169
        public String getViewName(FLayer layer);
170

    
171
        public void addExtent(ProjectExtent arg1);
172

    
173
        public ProjectExtent removeExtent(int arg0);
174

    
175
        public ProjectExtent[] getExtents();
176

    
177
        /**
178
         * Obtiene un documento a partir de su nombre y el nombre de registro en el
179
         * pointExtension, este �ltimo se puede obtener del
180
         * Project****Factory.registerName.
181
         *
182
         * @param name
183
         *            Nombre del documento
184
         * @param type
185
         *            nombre de registro en el extensionPoint
186
         *
187
         * @return Documento
188
         */
189
        public Document getDocument(String name, String type);
190

    
191
        public void saveState(File out) throws PersistenceException;
192
        
193
        public void saveState(OutputStream out) throws PersistenceException;
194

    
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 Document getActiveDocument();
206
        
207
}