Revision 31 org.gvsig.sextante/trunk/org.gvsig.sextante.app/org.gvsig.sextante.app.extension/src/main/java/org/gvsig/sextante/app/extension/core/gvOutputFactory.java
gvOutputFactory.java | ||
---|---|---|
8 | 8 |
import org.gvsig.andami.messages.NotificationManager; |
9 | 9 |
import org.gvsig.app.ApplicationLocator; |
10 | 10 |
import org.gvsig.app.project.ProjectPreferences; |
11 |
import org.gvsig.fmap.dal.DataTypes; |
|
12 | 11 |
|
13 | 12 |
import es.unex.sextante.core.ITaskMonitor; |
14 | 13 |
import es.unex.sextante.core.OutputFactory; |
... | ... | |
82 | 81 |
int[] fieldSize) |
83 | 82 |
throws UnsupportedOutputChannelException { |
84 | 83 |
|
85 |
if (channel instanceof FileOutputChannel) {
|
|
86 |
String sFilename = ((FileOutputChannel)channel).getFilename();
|
|
84 |
if (channel != null) {
|
|
85 |
Object inputParams = channel.getParameters();
|
|
87 | 86 |
gvVectorLayer layer = new gvVectorLayer(); |
88 |
layer.create(sName, sFilename, iShapeType, |
|
89 |
types, sFields, crs, fieldSize); |
|
87 |
if(inputParams instanceof String) |
|
88 |
layer.create(sName, (String)inputParams, iShapeType, |
|
89 |
types, sFields, crs, fieldSize); |
|
90 |
else |
|
91 |
layer.create(sName, inputParams, iShapeType, |
|
92 |
types, sFields, crs, fieldSize); |
|
90 | 93 |
|
91 | 94 |
return layer; |
92 | 95 |
} else |
... | ... | |
103 | 106 |
Object crs) |
104 | 107 |
throws UnsupportedOutputChannelException { |
105 | 108 |
if (channel instanceof FileOutputChannel) { |
106 |
String sFilename = ((FileOutputChannel)channel).getFilename();
|
|
109 |
Object inputParams = ((FileOutputChannel)channel).getParameters();
|
|
107 | 110 |
gvRasterLayer layer = new gvRasterLayer(); |
108 |
layer.create(sName, sFilename, extent, |
|
109 |
iDataType, iBands, crs); |
|
111 |
if(inputParams instanceof String) |
|
112 |
layer.create(sName, (String)inputParams, extent, iDataType, iBands, crs); |
|
113 |
else |
|
114 |
layer.create(sName, inputParams, extent, iDataType, iBands, crs); |
|
110 | 115 |
return layer; |
111 | 116 |
} else |
112 | 117 |
throw new UnsupportedOutputChannelException(); |
... | ... | |
117 | 122 |
throws UnsupportedOutputChannelException { |
118 | 123 |
|
119 | 124 |
if (channel instanceof FileOutputChannel) { |
120 |
String sFilename = ((FileOutputChannel)channel).getFilename();
|
|
125 |
Object inputParams = ((FileOutputChannel)channel).getParameters();
|
|
121 | 126 |
gvTable table = new gvTable(); |
122 |
table.create(sName, sFilename, types, sFields); |
|
127 |
if(inputParams instanceof String) |
|
128 |
table.create(sName, (String)inputParams, types, sFields); |
|
129 |
else |
|
130 |
table.create(sName, inputParams, types, sFields); |
|
123 | 131 |
return table; |
124 | 132 |
} else |
125 | 133 |
throw new UnsupportedOutputChannelException(); |
Also available in: Unified diff