KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > doclet > PageData


1 /*
2  * Copyright (c) 2005, Rob Gordon.
3  */

4 package org.oddjob.doclet;
5
6 import java.util.ArrayList JavaDoc;
7 import java.util.List JavaDoc;
8
9
10 /**
11  * Collect all the data required to write a manual page together in one
12  * place.
13  *
14  * @author Rob Gordon.
15  */

16 public class PageData {
17
18     /** The tag name */
19     private final String JavaDoc name;
20     
21     /** The relative path to the directory where
22      * this page should be written.
23      */

24     private final String JavaDoc fileName;
25     
26     private String JavaDoc firstSentence;
27     
28     /** The description */
29     private String JavaDoc description;
30     
31     /** Exmples as Strings */
32     private final List JavaDoc examples = new ArrayList JavaDoc();
33     
34     /** Attributes as Property objects */
35     private final List JavaDoc attributes = new ArrayList JavaDoc();
36     
37     /** Elements as Property objects */
38     private final List JavaDoc elements = new ArrayList JavaDoc();
39     
40     /**
41      * Constructor.
42      *
43      * @param name The tag name.
44      */

45     public PageData(String JavaDoc name, String JavaDoc filename) {
46         this.name = name;
47         this.fileName = filename;
48     }
49
50     /**
51      * Get the short (xml tag) name for this page data.
52      *
53      * @return The short name.
54      */

55     public String JavaDoc getName() {
56         return name;
57     }
58     
59     public void setFirstSentence(String JavaDoc firstSentence) {
60         this.firstSentence = firstSentence;
61     }
62     
63     public String JavaDoc getFirstSentence() {
64         return firstSentence;
65     }
66     
67     public void setDescription(String JavaDoc description) {
68         this.description = description;
69     }
70     
71     public String JavaDoc getDescription() {
72         return description;
73     }
74     
75     public void addAttribute(Property attribute) {
76         attributes.add(attribute);
77     }
78     
79     public List JavaDoc getAttributes() {
80         return attributes;
81     }
82     
83     public void addElement(Property element) {
84         elements.add(element);
85     }
86     
87     public List JavaDoc getElements() {
88         return elements;
89     }
90     
91     public void addExample(String JavaDoc example) {
92         examples.add(example);
93     }
94     
95     public List JavaDoc getExamples() {
96         return examples;
97     }
98     /**
99      * @return Returns the file name.
100      */

101     public String JavaDoc getFileName() {
102         return fileName;
103     }
104 }
105
106
Popular Tags