KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > elementprocessor > impl > poi > hssf > elements > EPWorkbook


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements;
18
19 import java.io.IOException JavaDoc;
20
21 /**
22  * ElementProcessor that handles the "Workbook" tag
23  *
24  * The Workbook element includes one attribute ("gmr"), which
25  * basically gives us the Gnumeric major version. At some point we
26  * might care about that, but not today.
27  *
28  * @author Marc Johnson (marc_johnson27591@hotmail.com)
29  * @version CVS $Id: EPWorkbook.java 30932 2004-07-29 17:35:38Z vgritsenko $
30  */

31 public class EPWorkbook extends BaseElementProcessor {
32     private Workbook _workbook;
33
34     /**
35      * constructor
36      */

37     public EPWorkbook() {
38         // the Workbook element has no implied attributes
39
super(null);
40         _workbook = new Workbook();
41     }
42
43     /**
44      * override of getWorkbook()
45      * @return the workbook
46      */

47     protected Workbook getWorkbook() {
48         return _workbook;
49     }
50
51     /**
52      * override of endProcessing()
53      * @exception IOException
54      */

55     public void endProcessing() throws IOException JavaDoc {
56         _workbook.write(getFilesystem());
57     }
58 } // end public class EPWorkbook
59
Popular Tags