BeanIO 1.2.3

org.beanio.parser
Class RecordNode

java.lang.Object
  extended by org.beanio.parser.Node
      extended by org.beanio.parser.RecordNode

public class RecordNode
extends Node

Holds state information for records being read from a input stream.

Since:
1.0
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.parser.Node
groupCount
 
Constructor Summary
RecordNode(RecordDefinition definition)
          Constructs a new RecordNode.
 
Method Summary
 Node close()
          Checks for missing records.
 List<Node> getChildren()
          Returns a list of child nodes.
protected  NodeDefinition getNodeDefinition()
          Returns this nodes's definition.
 int getRecordCount()
          Returns the number of records matched by this node.
 RecordDefinition getRecordDefinition()
          Returns the record definition of this node.
 boolean isRecord()
          Returns true if this node is a leaf node / record.
 Node matchAny(Record record)
          Finds the child node that matches a record, ignoring the current state of each node.
 Node matchNext(Record record)
          Finds the child node that matches a record, based on the current state of each node.
 
Methods inherited from class org.beanio.parser.Node
getGroupCount, getMaxOccurs, getMinOccurs, getName, getOrder, isMaxOccursReached, reset, setGroupCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecordNode

public RecordNode(RecordDefinition definition)
Constructs a new RecordNode.

Parameters:
definition - the record definition
Method Detail

getRecordDefinition

public RecordDefinition getRecordDefinition()
Returns the record definition of this node.

Returns:
the record definition

getNodeDefinition

protected NodeDefinition getNodeDefinition()
Description copied from class: Node
Returns this nodes's definition.

Specified by:
getNodeDefinition in class Node
Returns:
the node definition

getChildren

public List<Node> getChildren()
Description copied from class: Node
Returns a list of child nodes.

Specified by:
getChildren in class Node
Returns:
the list of child nodes

close

public Node close()
Description copied from class: Node
Checks for missing records. This method is called when the end of the stream has been reached.

Specified by:
close in class Node

matchAny

public Node matchAny(Record record)
Description copied from class: Node
Finds the child node that matches a record, ignoring the current state of each node.

Specified by:
matchAny in class Node
Parameters:
record - the record to match
Returns:
the matching leaf node, or null if the record could not be matched

matchNext

public Node matchNext(Record record)
Description copied from class: Node
Finds the child node that matches a record, based on the current state of each node.

Specified by:
matchNext in class Node
Parameters:
record - the record to match
Returns:
the matched node, or null if no match was found

isRecord

public boolean isRecord()
Description copied from class: Node
Returns true if this node is a leaf node / record.

Overrides:
isRecord in class Node
Returns:
true if this node is a record

getRecordCount

public int getRecordCount()
Returns the number of records matched by this node.

Returns:
the number of records matched by this node

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim