Statistics
| Revision:

root / org.gvsig.toolbox / trunk / org.gvsig.toolbox / org.gvsig.toolbox.core / src / main / java / es / unex / sextante / outputs / FileOutputChannel.java @ 129

History | View | Annotate | Download (999 Bytes)

1 59 nbrodin
package es.unex.sextante.outputs;
2
3
public class FileOutputChannel
4
         implements
5
            IOutputChannel {
6
7
   private String m_sFilename;
8 129 jjdelcerro
   private boolean temporary = false;
9 59 nbrodin
10 129 jjdelcerro
   public FileOutputChannel(final String sFilename, boolean temporary) {
11
     this.m_sFilename = sFilename;
12
     this.temporary = temporary;
13
   }
14
15 59 nbrodin
   public FileOutputChannel(final String sFilename) {
16 129 jjdelcerro
       this(sFilename,false);
17
   }
18 59 nbrodin
19 129 jjdelcerro
   public boolean isTemporary() {
20
       return this.temporary;
21 59 nbrodin
   }
22 129 jjdelcerro
23
   public void setTemporary(boolean temporary ) {
24
       this.temporary = temporary;
25
   }
26
27 59 nbrodin
   public String getAsCommandLineParameter() {
28
29
      if (m_sFilename == null) {
30
         return "#";
31
      }
32
      else {
33
         return m_sFilename;
34
      }
35
36
   }
37
38
39
   public String getFilename() {
40
41
      return m_sFilename;
42
43
   }
44
45
46
   public void setFilename(final String filename) {
47
48
      m_sFilename = filename;
49
50
   }
51
52
53
   @Override
54
   public String toString() {
55
56
      return m_sFilename;
57
58
   }
59
60
}