1 /* Copyright 2005, 2006 Elliotte Rusty Harold 2 3 This library is free software; you can redistribute it and/or modify 4 it under the terms of version 2.1 of the GNU Lesser General Public 5 License as published by the Free Software Foundation. 6 7 This library is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY; without even the implied warranty of 9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 GNU Lesser General Public License for more details. 11 12 You should have received a copy of the GNU Lesser General Public 13 License along with this library; if not, write to the 14 Free Software Foundation, Inc., 59 Temple Place, Suite 330, 15 Boston, MA 02111-1307 USA 16 17 You can contact Elliotte Rusty Harold by sending e-mail to 18 elharo@ibiblio.org. Please include the word "XOM" in the 19 subject line. The XOM home page is located at http://www.xom.nu/ 20 */ 21 22 package nu.xom; 23 24 /** 25 * 26 * <p> 27 * Used in XPath when querying a subtree that is not part of a 28 * document. This class is purely internal. Instances should never 29 * be visible in the public API. 30 * </p> 31 * 32 * @author Elliotte Rusty Harold 33 * @version 1.2d1 34 * 35 */ 36 class DocumentFragment extends ParentNode { 37 insertionAllowed(Node child, int position)38 void insertionAllowed(Node child, int position) { 39 // Everything can be inserted 40 } 41 42 setBaseURI(String URI)43 public void setBaseURI(String URI) { 44 throw new UnsupportedOperationException("XOM bug"); 45 } 46 47 getValue()48 public String getValue() { 49 throw new UnsupportedOperationException("XOM bug"); 50 } 51 52 copy()53 public Node copy() { 54 throw new UnsupportedOperationException("XOM bug"); 55 } 56 57 toXML()58 public String toXML() { 59 throw new UnsupportedOperationException("XOM bug"); 60 } 61 62 isDocumentFragment()63 boolean isDocumentFragment() { 64 return true; 65 } 66 67 } 68