KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > syndication > io > impl > RSS091NetscapeGenerator


1 /*
2  * Copyright 2004 Sun Microsystems, Inc.
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 com.sun.syndication.io.impl;
18
19 import org.jdom.DocType;
20 import org.jdom.Document;
21 import org.jdom.Element;
22
23 /**
24  * Feed Generator for RSS 0.91
25  * <p/>
26  *
27  * @author Elaine Chien
28  *
29  */

30 public class RSS091NetscapeGenerator extends RSS091UserlandGenerator {
31     private String JavaDoc _version;
32
33     public RSS091NetscapeGenerator() {
34         this("rss_0.91N","0.91");
35     }
36
37     protected RSS091NetscapeGenerator(String JavaDoc type,String JavaDoc version) {
38         super(type,version);
39     }
40
41     protected Document createDocument(Element root) {
42         Document doc = new Document(root);
43         DocType docType = new DocType(RSS091NetscapeParser.ELEMENT_NAME,
44                                       RSS091NetscapeParser.PUBLIC_ID,
45                                       RSS091NetscapeParser.SYSTEM_ID);
46         doc.setDocType(docType);
47         return doc;
48     }
49
50     protected String JavaDoc getTextInputLabel() {
51         return "textinput";
52     }
53
54     /**
55      * To be overriden by RSS 0.91 Netscape and RSS 0.94
56      */

57     protected boolean isHourFormat24() {
58         return false;
59     }
60
61 }
62
Popular Tags