Statistics
| Revision:

gvsig-educa / org.gvsig.educa.portableview / trunk / org.gvsig.educa.portableview / org.gvsig.educa.portableview.lib / org.gvsig.educa.portableview.lib.impl / src / main / java / org / gvsig / educa / portableview / impl / compilation / process / ProcessData.java @ 256

History | View | Annotate | Download (3.89 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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 2
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
 */
22
package org.gvsig.educa.portableview.impl.compilation.process;
23

    
24
import java.io.File;
25
import java.util.HashMap;
26
import java.util.Map;
27

    
28
import org.gvsig.educa.portableview.compilation.PortableViewCompiler;
29
import org.gvsig.educa.portableview.compilation.PortableViewCompilerListener;
30
import org.gvsig.educa.portableview.impl.compilation.DefaultPortableViewCompilation;
31
import org.gvsig.educa.portableview.impl.compilation.DefaultPortableViewCompilationInformation;
32
import org.gvsig.educa.portableview.impl.compilation.DefaultPortableViewCompilerStatus;
33
import org.gvsig.educa.portableview.map.PortableViewInformation;
34
import org.gvsig.fmap.mapcontext.MapContext;
35

    
36
/**
37
 * Class to store all data about a {@link PortableViewCompiler} process
38
 *
39
 * @author gvSIG Team
40
 * @version $Id$
41
 *
42
 */
43
public class ProcessData {
44

    
45
    /**
46
     * Target file extension (ejmp: '.gvsthm')
47
     */
48
    public String targetFileExtension;
49

    
50
    /**
51
     * Current Process status
52
     */
53
    public DefaultPortableViewCompilerStatus status;
54

    
55
    /**
56
     * Current Process listener
57
     */
58
    public PortableViewCompilerListener listener;
59

    
60
    /**
61
     * Folder to put final file
62
     */
63
    public File targetFolder;
64

    
65
    /**
66
     * Folder installed portable view
67
     */
68
    public File targetInstalledMapFolder;
69

    
70
    /**
71
     * Final compress file
72
     */
73
    public File targetFileName;
74

    
75
    /**
76
     * Base name to use in final file and work folder.
77
     * Based in compilation data.
78
     */
79
    public String baseName;
80

    
81
    /**
82
     * Base folder to create work compilatio folder
83
     */
84
    public File baseWorkFolder;
85

    
86
    /**
87
     * Folder to prepare all files to include in final file
88
     */
89
    public File workFolder;
90

    
91
    /**
92
     * Final {@link PortableViewInformation} to store in
93
     * compilation.
94
     */
95
    public DefaultPortableViewCompilationInformation info;
96

    
97
    /**
98
     * File to store {@link PortableViewInformation}
99
     */
100
    public File infoFile;
101

    
102
    /**
103
     * Compilation data
104
     */
105
    public DefaultPortableViewCompilation compilation;
106

    
107
    /**
108
     * MapContext to workwith in the process
109
     */
110
    public MapContext mapContext;
111

    
112
    /**
113
     * Folder which will contain all MapContext data
114
     */
115
    public File mapContextFolder;
116

    
117
    /**
118
     * Folder which will contain all layers files
119
     */
120
    public File rootLayersFolder;
121

    
122
    /**
123
     * File to store mapContext information
124
     */
125
    public File mapContextFile;
126

    
127
    /**
128
     * This maps links source files with its final relative path into
129
     * Portable view
130
     */
131
    public Map<File, File> fileMapping = new HashMap<File, File>();
132

    
133
    /**
134
     * Additional values which can be used in process steps to
135
     * store and exchange extra information between them
136
     */
137
    @SuppressWarnings("rawtypes")
138
    public Map values = new HashMap();
139

    
140
    /**
141
     * Utility method which inform to {@link PortableViewCompilerListener}
142
     * current status
143
     */
144
    public void notifyStatus() {
145
        if (listener != null) {
146
            listener.updatedStatus(status);
147
        }
148
    }
149

    
150
}