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 @ 46261
History | View | Annotate | Download (2.68 KB)
1 | 40558 | jjdelcerro | /**
|
---|---|---|---|
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 | 40435 | jjdelcerro | 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 | 41248 | jjdelcerro | public interface DocumentsContainer extends Iterable<Document>, Observable { |
34 | 40435 | jjdelcerro | |
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 | 41248 | jjdelcerro | * @param document as Document
|
55 | 40435 | jjdelcerro | */
|
56 | 41248 | jjdelcerro | public void addDocument(Document document); |
57 | 40435 | jjdelcerro | |
58 | /**
|
||
59 | * Remove a document of the project
|
||
60 | *
|
||
61 | 41248 | jjdelcerro | * @param document as Document
|
62 | 40435 | jjdelcerro | */
|
63 | 41248 | jjdelcerro | public void removeDocument(Document document); |
64 | 40435 | jjdelcerro | |
65 | public Iterator<Document> iterator(); |
||
66 | |||
67 | public boolean isEmpty(); |
||
68 | 41248 | jjdelcerro | |
69 | 40435 | jjdelcerro | /**
|
70 | 42319 | jjdelcerro | * Returns the document of the type indicated and the name specified by name.
|
71 | * If documnt don't exists return null
|
||
72 | 40435 | jjdelcerro | *
|
73 | 42293 | jjdelcerro | * @param name name of the document to retrieve
|
74 | * @param type name of the type of document to retrieve
|
||
75 | 40435 | jjdelcerro | *
|
76 | * @return Documento
|
||
77 | */
|
||
78 | public Document getDocument(String name, String type); |
||
79 | 42293 | jjdelcerro | |
80 | /**
|
||
81 | 42319 | jjdelcerro | * Returns the document with the name specified by name.
|
82 | * If documnt don't exists return null
|
||
83 | *
|
||
84 | 42293 | jjdelcerro | * @param name
|
85 | * @return Document with the name specified by name
|
||
86 | */
|
||
87 | public Document getDocument(String name); |
||
88 | 40435 | jjdelcerro | |
89 | public Document getActiveDocument(); |
||
90 | |||
91 | public Document getActiveDocument(Class<? extends Document> documentClass); |
||
92 | |||
93 | 41248 | jjdelcerro | public Document getActiveDocument(String documentTypeName); |
94 | |||
95 | 40435 | jjdelcerro | public Document createDocument(String type); |
96 | } |