1   /**
2    * Copyright (c) 2000-2010 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   *
12   * 
13   */
14  
15  package com.liferay.portal.kernel.xml;
16  
17  import java.io.IOException;
18  import java.io.Writer;
19  
20  import java.util.List;
21  
22  /**
23   * <a href="Node.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   */
27  public interface Node {
28  
29      public String asXML();
30  
31      public Node asXPathResult(Element parent);
32  
33      public Node detach();
34  
35      public Document getDocument();
36  
37      public String getName();
38  
39      public Element getParent();
40  
41      public String getPath();
42  
43      public String getPath(Element context);
44  
45      public String getStringValue();
46  
47      public String getText();
48  
49      public String getUniquePath();
50  
51      public String getUniquePath(Element context);
52  
53      public boolean hasContent();
54  
55      public boolean isReadOnly();
56  
57      public boolean matches(String xpathExpression);
58  
59      public Number numberValueOf(String xpathExpression);
60  
61      public List<Node> selectNodes(String xpathExpression);
62  
63      public List<Node> selectNodes(
64          String xpathExpression, String comparisonXPathExpression);
65  
66      public List<Node> selectNodes(
67          String xpathExpression, String comparisonXPathExpression,
68          boolean removeDuplicates);
69  
70      public Object selectObject(String xpathExpression);
71  
72      public Node selectSingleNode(String xpathExpression);
73  
74      public void setName(String name);
75  
76      public void setText(String text);
77  
78      public boolean supportsParent();
79  
80      public String valueOf(String xpathExpression);
81  
82      public void write(Writer writer) throws IOException;
83  
84  }