Source Code Cross Referenced for Section.java in  » EJB-Server-resin-3.1.5 » webutil » com » caucho » xtpdoc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server resin 3.1.5 » webutil » com.caucho.xtpdoc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1998-2000 Caucho Technology -- all rights reserved
003:         *
004:         * This file is part of Resin(R) Open Source
005:         *
006:         * Each copy or derived work must preserve the copyright notice and this
007:         * notice unmodified.
008:         *
009:         * Resin Open Source is free software; you can redistribute it and/or modify
010:         * it under the terms of the GNU General Public License as published by
011:         * the Free Software Foundation; either version 2 of the License, or
012:         * (at your option) any later version.
013:         *
014:         * Resin Open Source is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017:         * of NON-INFRINGEMENT.  See the GNU General Public License for more
018:         * details.
019:         *
020:         * You should have received a copy of the GNU General Public License
021:         * along with Resin Open Source; if not, write to the
022:         *
023:         *   Free Software Foundation, Inc.
024:         *   59 Temple Place, Suite 330
025:         *   Boston, MA 02111-1307  USA
026:         *
027:         * @author Emil Ong
028:         */
029:
030:        package com.caucho.xtpdoc;
031:
032:        import java.io.IOException;
033:        import java.io.PrintWriter;
034:
035:        public abstract class Section extends ContainerNode {
036:            protected FormattedTextWithAnchors _description;
037:            protected String _name;
038:            protected String _title;
039:            protected String _version;
040:            protected String _type;
041:
042:            private String _parentHref;
043:
044:            public Section(Document document) {
045:                this (document, "");
046:            }
047:
048:            public Section(Document document, String parentHref) {
049:                super (document);
050:                _parentHref = parentHref;
051:            }
052:
053:            // 
054:            // XXX: Stubbed
055:            //
056:
057:            public void setOccur(String occur) {
058:            }
059:
060:            public void setLocalTOCIndent(String localTOCIndent) {
061:            }
062:
063:            public void setVersion(String version) {
064:                _version = version;
065:            }
066:
067:            public void setName(String name) {
068:                _name = name;
069:            }
070:
071:            public void setProduct(String product) {
072:            }
073:
074:            public void setIndex(String index) {
075:            }
076:
077:            //
078:            // XXX: End stubbed
079:            //
080:
081:            public void setType(String type) {
082:                _type = type;
083:            }
084:
085:            public void setTitle(String title) {
086:                _title = title;
087:            }
088:
089:            public String getName() {
090:                return _name;
091:            }
092:
093:            public String getTitle() {
094:                return _title;
095:            }
096:
097:            public String getHref() {
098:                if (_name != null)
099:                    return cleanHref(_name);
100:                else
101:                    return cleanHref(_title);
102:            }
103:
104:            public static String cleanHref(String href) {
105:                if (href == null)
106:                    return href;
107:
108:                StringBuilder sb = new StringBuilder();
109:
110:                for (int i = 0; i < href.length(); i++) {
111:                    char ch = href.charAt(i);
112:
113:                    switch (ch) {
114:                    case '<':
115:                    case '>':
116:                    case '(':
117:                    case ')':
118:                    case '?':
119:                        break;
120:
121:                    default:
122:                        sb.append(ch);
123:                        break;
124:                    }
125:                }
126:
127:                return sb.toString();
128:            }
129:
130:            public Defun createDefun() {
131:                Defun defun = new Defun(getDocument());
132:                addItem(defun);
133:                return defun;
134:            }
135:
136:            public DefinitionList createDl() {
137:                DefinitionList list = new DefinitionList(getDocument());
138:                addItem(list);
139:                return list;
140:            }
141:
142:            public FormattedTextWithAnchors createDescription() {
143:                _description = new FormattedTextWithAnchors(getDocument());
144:                return _description;
145:            }
146:
147:            public BlockQuote createBlockquote() {
148:                BlockQuote blockQuote = new BlockQuote(getDocument());
149:                addItem(blockQuote);
150:                return blockQuote;
151:            }
152:
153:            public Center createCenter() {
154:                Center center = new Center(getDocument());
155:                addItem(center);
156:                return center;
157:            }
158:
159:            public Paragraph createP() {
160:                Paragraph paragraph = new Paragraph(getDocument());
161:                addItem(paragraph);
162:                return paragraph;
163:            }
164:
165:            public PreFormattedText createPre() {
166:                PreFormattedText pretext = new PreFormattedText(getDocument());
167:                addItem(pretext);
168:                return pretext;
169:            }
170:
171:            public OrderedList createOl() {
172:                OrderedList orderedList = new OrderedList(getDocument());
173:                addItem(orderedList);
174:                return orderedList;
175:            }
176:
177:            public UnorderedList createUl() {
178:                UnorderedList unorderedList = new UnorderedList(getDocument());
179:                addItem(unorderedList);
180:                return unorderedList;
181:            }
182:
183:            public Figure createFigure() {
184:                Figure figure = new Figure(getDocument());
185:                addItem(figure);
186:                return figure;
187:            }
188:
189:            public Example createExample() {
190:                Example example = new Example(getDocument());
191:                addItem(example);
192:                return example;
193:            }
194:
195:            public Table createTable() {
196:                Table table = new Table(getDocument());
197:                addItem(table);
198:                return table;
199:            }
200:
201:            public DefinitionTable createDeftable() {
202:                DefinitionTable definitionTable = new DefinitionTable(
203:                        getDocument());
204:                addItem(definitionTable);
205:                return definitionTable;
206:            }
207:
208:            public DefinitionTable createDeftableChildtags() {
209:                DefinitionTable definitionTable = new DefinitionTable(
210:                        getDocument());
211:                addItem(definitionTable);
212:                return definitionTable;
213:            }
214:
215:            public DefinitionTable createDeftableParameters() {
216:                DefinitionTable definitionTable = new DefinitionTable(
217:                        getDocument());
218:                addItem(definitionTable);
219:                return definitionTable;
220:            }
221:
222:            public Example createResults() {
223:                Example results = new Example(getDocument());
224:                addItem(results);
225:                return results;
226:            }
227:
228:            public Def createDef() {
229:                Def def = new Def(getDocument());
230:                addItem(def);
231:                return def;
232:            }
233:
234:            public FormattedTextWithAnchors createNote() {
235:                FormattedTextWithAnchors note = new FormattedTextWithAnchors(
236:                        getDocument());
237:                addItem(new NamedText("Note", note));
238:                return note;
239:            }
240:
241:            public FormattedTextWithAnchors createWarn() {
242:                FormattedTextWithAnchors warning = new FormattedTextWithAnchors(
243:                        getDocument());
244:                addItem(new NamedText("Warning", warning));
245:                return warning;
246:            }
247:
248:            public FormattedText createParents() {
249:                FormattedText parents = new FormattedText(getDocument());
250:                addItem(new NamedText("child of", parents));
251:                return parents;
252:            }
253:
254:            public FormattedText createDefault() {
255:                FormattedText def = new FormattedText(getDocument());
256:                addItem(new NamedText("default", def));
257:                return def;
258:            }
259:
260:            public Glossary createGlossary() {
261:                Glossary glossary = new Glossary(getDocument());
262:                addItem(glossary);
263:                return glossary;
264:            }
265:
266:            public void writeLaTeXTop(PrintWriter out) throws IOException {
267:                writeLaTeX(out);
268:            }
269:
270:            public void writeLaTeX(PrintWriter out) throws IOException {
271:                String label = getDocument().getDocumentPath().getUserPath()
272:                        + ":" + _title;
273:
274:                label = label.replace(" ", "-");
275:
276:                out.println("\\label{" + label + "}");
277:                out.println("\\hypertarget{" + label + "}{}");
278:
279:                super .writeLaTeX(out);
280:
281:                if (_type != null && _type.equals("defun"))
282:                    out.println("\\newpage");
283:            }
284:
285:            abstract public void writeLaTeXEnclosed(PrintWriter out)
286:                    throws IOException;
287:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.