001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.xml;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import java.util.Iterator;
020    import java.util.List;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     */
025    @ProviderType
026    public interface Branch extends Node {
027    
028            public void add(Comment comment);
029    
030            public void add(Element element);
031    
032            public void add(Node node);
033    
034            public void add(ProcessingInstruction processingInstruction);
035    
036            public Element addElement(QName qName);
037    
038            public Element addElement(String name);
039    
040            public Element addElement(String qualifiedName, String namespaceURI);
041    
042            public void appendContent(Branch branch);
043    
044            public void clearContent();
045    
046            public List<Node> content();
047    
048            public Element elementByID(String elementID);
049    
050            public int indexOf(Node node);
051    
052            public Node node(int index);
053    
054            public int nodeCount();
055    
056            public Iterator<Node> nodeIterator();
057    
058            public void normalize();
059    
060            public ProcessingInstruction processingInstruction(String target);
061    
062            public List<ProcessingInstruction> processingInstructions();
063    
064            public List<ProcessingInstruction> processingInstructions(String target);
065    
066            public boolean remove(Comment comment);
067    
068            public boolean remove(Element element);
069    
070            public boolean remove(Node node);
071    
072            public boolean remove(ProcessingInstruction processingInstruction);
073    
074            public boolean removeProcessingInstruction(String target);
075    
076            public void setContent(List<Node> content);
077    
078            public void setProcessingInstructions(
079                    List<ProcessingInstruction> processingInstructions);
080    
081    }