KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > text > IDocumentNode


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.text;
12
13 import java.io.Serializable JavaDoc;
14
15 import org.eclipse.pde.core.plugin.ISharedPluginModel;
16 import org.eclipse.pde.internal.core.ischema.ISchema;
17
18 public interface IDocumentNode extends Serializable JavaDoc, IDocumentRange {
19         
20     IDocumentNode getParentNode();
21     void setParentNode(IDocumentNode node);
22     
23     void addChildNode(IDocumentNode child);
24     void addChildNode(IDocumentNode child, int position);
25     IDocumentNode removeChildNode(IDocumentNode child);
26     IDocumentNode[] getChildNodes();
27     
28     void addTextNode(IDocumentTextNode textNode);
29     IDocumentTextNode getTextNode();
30     void removeTextNode();
31     
32     int indexOf(IDocumentNode child);
33     IDocumentNode getChildAt(int index);
34     
35     IDocumentNode getPreviousSibling();
36     void setPreviousSibling(IDocumentNode sibling);
37     
38     void swap(IDocumentNode child1, IDocumentNode child2);
39     
40     void setXMLTagName(String JavaDoc tag);
41     String JavaDoc getXMLTagName();
42     
43     void setXMLAttribute(IDocumentAttribute attribute);
44     void setXMLAttribute(String JavaDoc name, String JavaDoc value);
45     String JavaDoc getXMLAttributeValue(String JavaDoc name);
46     
47     IDocumentAttribute getDocumentAttribute(String JavaDoc name);
48     IDocumentAttribute[] getNodeAttributes();
49     void removeDocumentAttribute(IDocumentAttribute attr);
50     
51     boolean isErrorNode();
52     void setIsErrorNode(boolean isErrorNode);
53     
54     boolean isRoot();
55     
56     void setOffset(int offset);
57     void setLength(int length);
58         
59     void setLineIndent(int indent);
60     int getLineIndent();
61     
62     String JavaDoc write(boolean indent);
63     String JavaDoc writeShallow(boolean terminate);
64     
65     public int getChildCount();
66     
67     public void reconnect(ISharedPluginModel model, ISchema schema, IDocumentNode parent);
68     
69 }
70
Popular Tags