Revision 8682 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.buffer/org.gvsig.raster.lib.buffer.spi/src/main/java/org/gvsig/raster/lib/buffer/spi/operations/AbstractOperation.java

View differences:

AbstractOperation.java
25 25
import org.gvsig.raster.lib.buffer.api.Buffer;
26 26
import org.gvsig.raster.lib.buffer.api.exceptions.BufferOperationException;
27 27
import org.gvsig.raster.lib.buffer.api.operations.OperationFactory;
28
import org.gvsig.raster.lib.buffer.spi.exceptions.ProcessingOperationException;
28 29
import org.gvsig.tools.dynobject.DynObject;
30
import org.gvsig.tools.persistence.PersistentState;
31
import org.gvsig.tools.persistence.exception.PersistenceException;
29 32

  
30 33

  
31 34
/**
......
34 37
 */
35 38
public abstract class AbstractOperation implements OperationServices {
36 39

  
40
    static public String COPY_UNPROCESSED_BANDS_PARAM = "copy_unprocessed_bands";
41

  
37 42
    protected Buffer buffer;
38 43
    protected DynObject parameters;
39 44
    protected Buffer outputBuffer;
40 45
    protected OperationFactory factory;
46
    protected boolean copyUnprocessedBands;
41 47

  
48

  
42 49
    /**
43 50
     *
44 51
     */
......
46 53
        // Nothing to do
47 54
    }
48 55

  
56
    @Override
57
    public void preProcess() throws BufferOperationException {
58
        if (this.parameters.getDynClass().getDynField(COPY_UNPROCESSED_BANDS_PARAM) != null
59
            && this.parameters.hasDynValue(COPY_UNPROCESSED_BANDS_PARAM)) {
60
            copyUnprocessedBands = (Boolean) this.parameters.getDynValue(COPY_UNPROCESSED_BANDS_PARAM);
61
        } else {
62
            copyUnprocessedBands = true;
63
        }
64
    }
65

  
66
    @Override
67
    public void process() throws ProcessingOperationException {
68
        //Nothing to do
69
    }
70

  
71
    @Override
72
    public void postProcess() throws BufferOperationException {
73
        //Nothing to do
74
    }
75

  
76

  
49 77
    /* (non-Javadoc)
50 78
     * @see org.gvsig.raster.lib.buffer.api.Operation#execute(org.gvsig.raster.lib.buffer.api.Buffer, org.gvsig.tools.dynobject.DynObject)
51 79
     */
......
90 118
    public Buffer getOutputBuffer() {
91 119
        return outputBuffer;
92 120
    }
93

  
94
//    /* (non-Javadoc)
95
//     * @see org.gvsig.raster.lib.buffer.spi.OperationServices#preProcess()
96
//     */
97
//    @Override
98
//    public void preProcess() {
99
//        // TODO Auto-generated method stub
100
//
101
//    }
102

  
103
//    /* (non-Javadoc)
104
//     * @see org.gvsig.raster.lib.buffer.spi.OperationServices#process()
105
//     */
106
//    @Override
107
//    public void process() {
108
//        // TODO Auto-generated method stub
109
//
110
//    }
111

  
112
//    /* (non-Javadoc)
113
//     * @see org.gvsig.raster.lib.buffer.spi.OperationServices#postProcess()
114
//     */
115
//    @Override
116
//    public void postProcess() {
117
//        // TODO Auto-generated method stub
118
//
119
//    }
120

  
121 121
}

Also available in: Unified diff