Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / scripts / filters / MinimalFilter / MinimalFilter.groovy @ 1000

History | View | Annotate | Download (1.9 kB)

1
// Copyright © 2010-2013 ENS de Lyon.
2
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
3
// Lyon 2, University of Franche-Comté, University of Nice
4
// Sophia Antipolis, University of Paris 3.
5
// 
6
// The TXM platform is free software: you can redistribute it
7
// and/or modify it under the terms of the GNU General Public
8
// License as published by the Free Software Foundation,
9
// either version 2 of the License, or (at your option) any
10
// later version.
11
// 
12
// The TXM platform is distributed in the hope that it will be
13
// useful, but WITHOUT ANY WARRANTY; without even the implied
14
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
// PURPOSE. See the GNU General Public License for more
16
// details.
17
// 
18
// You should have received a copy of the GNU General
19
// Public License along with the TXM platform. If not, see
20
// http://www.gnu.org/licenses.
21
// 
22
// 
23
// 
24
// $LastChangedDate:$
25
// $LastChangedRevision:$
26
// $LastChangedBy:$ 
27
//
28
package org.txm.scripts.filters.MinimalFilter;
29

    
30
import org.txm.importer.scripts.filters.*;
31

    
32
// TODO: Auto-generated Javadoc
33
/**
34
 * The Class MinimalFilter.
35
 */
36
class MinimalFilter extends Filter {
37
        
38
        /** The linecounter. */
39
        int linecounter = 0;
40

    
41
        /* (non-Javadoc)
42
         * @see org.txm.importer.filters.Filter#SetUsedParam(java.lang.Object)
43
         */
44
        void SetUsedParam(Object args) {
45

    
46
        }
47

    
48
        /* (non-Javadoc)
49
         * @see org.txm.importer.filters.Filter#before()
50
         */
51
        boolean before() {
52
                System.out.println("strat Minimal " + this);
53
                return true;
54
        }
55

    
56
        /**
57
         * Sets the used param.
58
         *
59
         * @param args the args
60
         */
61
        void SetUsedParam(Object[] args) {
62

    
63
        }
64

    
65
        /* (non-Javadoc)
66
         * @see org.txm.importer.filters.Filter#after()
67
         */
68
        void after() {
69
                System.out.println("readed lines : " + linecounter);
70
        }
71

    
72
        /* (non-Javadoc)
73
         * @see org.txm.importer.filters.Filter#filter()
74
         */
75
        void filter() {
76
                linecounter++;
77
                output.write(line + lineSeparator);
78
                output.flush();
79
        }
80

    
81
}