Coverage Report - org.simpleframework.xml.stream.Node
 
Classes in this File Line Coverage Branch Coverage Complexity
Node
N/A
N/A
1
 
 1  
 /*
 2  
  * Node.java July 2006
 3  
  *
 4  
  * Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net>
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 15  
  * implied. See the License for the specific language governing 
 16  
  * permissions and limitations under the License.
 17  
  */
 18  
 
 19  
 package org.simpleframework.xml.stream;
 20  
 
 21  
 /**
 22  
  * The <code>Node</code> is used to represent a name value pair and
 23  
  * acts as the base form of data used within the framework. Each of
 24  
  * the attributes and elements are represented as nodes.  
 25  
  * 
 26  
  * @author Niall Gallagher
 27  
  */
 28  
 public interface Node {
 29  
 
 30  
    /**
 31  
     * Returns the name of the node that this represents. This is
 32  
     * an immutable property and should not change for any node.  
 33  
     *  
 34  
     * @return returns the name of the node that this represents
 35  
     */
 36  
    String getName();
 37  
 
 38  
    /**
 39  
     * Returns the value for the node that this represents. This 
 40  
     * is a modifiable property for the node and can be changed.
 41  
     * 
 42  
     * @return the name of the value for this node instance
 43  
     * 
 44  
     * @throws Exception if there is a problem getting the value
 45  
     */
 46  
    String getValue() throws Exception;  
 47  
    
 48  
    /**
 49  
     * This is used to acquire the <code>Node</code> that is the
 50  
     * parent of this node. This will return the node that is
 51  
     * the direct parent of this node and allows for siblings to
 52  
     * make use of nodes with their parents if required.  
 53  
     *   
 54  
     * @return this returns the parent node for this node
 55  
     */
 56  
    Node getParent();
 57  
 }