Statistics
| Revision:

root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / Project.java @ 31496

History | View | Annotate | Download (4.32 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

    
17
public interface Project extends Iterable<Document> {
18

    
19
        public void addPropertyChangeListener(PropertyChangeListener arg0);
20

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

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

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

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

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

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

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

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

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

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

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

    
98
        public IProjection getProjection();
99

    
100
        public void setProjection(IProjection projection);
101

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

    
111
        public boolean hasChanged();
112

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

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

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

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

    
143
        public Iterator<Document> iterator();
144

    
145
        public boolean isEmpty();
146

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

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

    
169
        public void addExtent(ProjectExtent arg1);
170

    
171
        public ProjectExtent removeExtent(int arg0);
172

    
173
        public ProjectExtent[] getExtents();
174

    
175
        public void addCamera(Object arg1);
176

    
177
        public Object removeCamera(int arg0);
178

    
179
        public Object[] getCameras();
180

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

    
195
        public void saveState(File out);
196
        
197
        public void saveState(OutputStream out);
198

    
199
        public void loadState(InputStream in);
200

    
201
        public void loadState(File in);
202
        
203
        public String exportDocumentsAsText(List<Document> documents);
204
        
205
        public void importDocuments(String data, String doctype);
206
        
207
        public boolean canImportDocuments(String data, String doctype);
208
        
209
        public Document getActiveDocument();
210
        
211
}