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