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 / DocumentsContainer.java @ 42293

History | View | Annotate | Download (2.58 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.util.Iterator;
27
import java.util.List;
28

    
29

    
30
import org.gvsig.app.project.documents.Document;
31
import org.gvsig.tools.observer.Observable;
32

    
33
public interface DocumentsContainer extends Iterable<Document>,  Observable {
34

    
35
        /**
36
         * Return a list of documents in the project.
37
         *
38
         * @return documents as List of IProjectDocument
39
         */
40
        public List<Document> getDocuments();
41

    
42
        /**
43
         * Return a list with all documents of especified type.
44
         *
45
         * @param type of document
46
         *
47
         * @return List of IProjectDocument
48
         */
49
        public List<Document> getDocuments(String type);
50

    
51
        /**
52
         * Adds a document to the project
53
         *
54
         * @param document as Document
55
         */
56
        public void addDocument(Document document);
57

    
58
        /**
59
         * Remove a document of the project
60
         *
61
         * @param document as Document
62
         */
63
        public void removeDocument(Document document);
64

    
65
        public Iterator<Document> iterator();
66

    
67
        public boolean isEmpty();
68
        
69
        /**
70
         * Returns the document of the type indicated and the name specified by name
71
         *
72
         * @param name name of the document to retrieve
73
         * @param type name of the type of document to retrieve
74
         *
75
         * @return Documento
76
         */
77
        public Document getDocument(String name, String type);
78

    
79
        /**
80
         * Returns the document with the name specified by name
81
         * @param name
82
         * @return Document with the name specified by name
83
         */
84
        public Document getDocument(String name);
85
        
86
        public Document getActiveDocument();
87

    
88
        public Document getActiveDocument(Class<? extends Document> documentClass);
89

    
90
        public Document getActiveDocument(String documentTypeName);
91

    
92
        public Document createDocument(String type);
93
}