1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.kernel.xml;
21  
22  import java.util.Iterator;
23  import java.util.List;
24  
25  /**
26   * <a href="Branch.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface Branch extends Node {
32  
33      public void add(Comment comment);
34  
35      public void add(Element element);
36  
37      public void add(Node node);
38  
39      public void add(ProcessingInstruction processingInstruction);
40  
41      public Element addElement(QName qName);
42  
43      public Element addElement(String name);
44  
45      public Element addElement(String qualifiedName, String namespaceURI);
46  
47      public void appendContent(Branch branch);
48  
49      public void clearContent();
50  
51      public List<Node> content();
52  
53      public Element elementByID(String elementID);
54  
55      public int indexOf(Node node);
56  
57      public Node node(int index);
58  
59      public int nodeCount();
60  
61      public Iterator<Node> nodeIterator();
62  
63      public void normalize();
64  
65      public ProcessingInstruction processingInstruction(String target);
66  
67      public List<ProcessingInstruction> processingInstructions();
68  
69      public List<ProcessingInstruction> processingInstructions(String target);
70  
71      public boolean remove(Comment comment);
72  
73      public boolean remove(Element element);
74  
75      public boolean remove(Node node);
76  
77      public boolean remove(ProcessingInstruction processingInstruction);
78  
79      public boolean removeProcessingInstruction(String target);
80  
81      public void setContent(List<Node> content);
82  
83      public void setProcessingInstructions(
84          List<ProcessingInstruction> processingInstructions);
85  
86  }