KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > schema > DocumentSection


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.core.schema;
12
13 import java.io.PrintWriter JavaDoc;
14
15 import org.eclipse.pde.internal.core.ischema.IDocumentSection;
16 import org.eclipse.pde.internal.core.ischema.ISchemaObject;
17
18 public class DocumentSection extends SchemaObject implements IDocumentSection {
19
20     private static final long serialVersionUID = 1L;
21     private String JavaDoc sectionId;
22
23     public DocumentSection(ISchemaObject parent, String JavaDoc sectionId, String JavaDoc name) {
24         super(parent, name);
25         this.sectionId = sectionId;
26     }
27
28     public String JavaDoc getSectionId() {
29         return sectionId;
30     }
31
32     public void write(String JavaDoc indent, PrintWriter JavaDoc writer) {
33         String JavaDoc indent2 = indent + Schema.INDENT;
34         String JavaDoc indent3 = indent2 + Schema.INDENT;
35         writer.println(indent + "<annotation>"); //$NON-NLS-1$
36
writer.println(indent2 + "<appInfo>"); //$NON-NLS-1$
37
writer.println(indent3 + "<meta.section type=\"" + sectionId + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
38
writer.println(indent2 + "</appInfo>"); //$NON-NLS-1$
39
writer.println(indent2 + "<documentation>"); //$NON-NLS-1$
40
writer.println(indent3 + getWritableDescription());
41         writer.println(indent2 + "</documentation>"); //$NON-NLS-1$
42
writer.println(indent + "</annotation>"); //$NON-NLS-1$
43
}
44 }
45
Popular Tags