001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.xml;
016    
017    import java.util.Iterator;
018    import java.util.List;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public interface Branch extends Node {
024    
025            public void add(Comment comment);
026    
027            public void add(Element element);
028    
029            public void add(Node node);
030    
031            public void add(ProcessingInstruction processingInstruction);
032    
033            public Element addElement(QName qName);
034    
035            public Element addElement(String name);
036    
037            public Element addElement(String qualifiedName, String namespaceURI);
038    
039            public void appendContent(Branch branch);
040    
041            public void clearContent();
042    
043            public List<Node> content();
044    
045            public Element elementByID(String elementID);
046    
047            public int indexOf(Node node);
048    
049            public Node node(int index);
050    
051            public int nodeCount();
052    
053            public Iterator<Node> nodeIterator();
054    
055            public void normalize();
056    
057            public ProcessingInstruction processingInstruction(String target);
058    
059            public List<ProcessingInstruction> processingInstructions();
060    
061            public List<ProcessingInstruction> processingInstructions(String target);
062    
063            public boolean remove(Comment comment);
064    
065            public boolean remove(Element element);
066    
067            public boolean remove(Node node);
068    
069            public boolean remove(ProcessingInstruction processingInstruction);
070    
071            public boolean removeProcessingInstruction(String target);
072    
073            public void setContent(List<Node> content);
074    
075            public void setProcessingInstructions(
076                    List<ProcessingInstruction> processingInstructions);
077    
078    }