com.endeca.edf.adapter
Class Record

java.lang.Object
  extended by com.endeca.edf.adapter.Record
All Implemented Interfaces:
java.lang.Iterable<PVal>

public class Record
extends java.lang.Object
implements java.lang.Iterable<PVal>

A collection of data in the form of pvals, name-value pairs.


Constructor Summary
Record()
          Constructs a new Record containing no data.
 
Method Summary
 void add(PVal pVal)
          Adds a pval to this record.
 void add(PVal[] addPVals)
          Adds pvals to this record.
 PVal get(int i)
          Returns the pval at the specified position in this record.
 java.util.Iterator<PVal> iterator()
          Returns an iterator of the pvals in this record (in proper sequence).
 void serialize(BinaryFormatOutputStream out)
           
 void serialize(org.dom4j.io.XMLWriter writer)
           
 int size()
          Returns the number of pvals contained in this record.
 PVal[] toArray()
          Returns an array containing all of the pvals in this record, in proper sequence.
 java.lang.String toString()
          Provides a user-readable string representation of this record.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Record

public Record()
Constructs a new Record containing no data.

Method Detail

add

public void add(PVal pVal)
Adds a pval to this record.

Parameters:
pVal - the pval to add to this record.

add

public void add(PVal[] addPVals)
Adds pvals to this record.

Parameters:
addPVals - the pvals to add to this record.

size

public int size()
Returns the number of pvals contained in this record.

Returns:
the size of this record's pval collection.

get

public PVal get(int i)
Returns the pval at the specified position in this record.

Parameters:
i - position of pval to return
Returns:
the pval at the specified location in this record
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of the range (index < 0 || index >= size()).

toArray

public PVal[] toArray()
Returns an array containing all of the pvals in this record, in proper sequence.

Returns:
an array containing all of the pvals in this record, in proper sequence.

iterator

public java.util.Iterator<PVal> iterator()
Returns an iterator of the pvals in this record (in proper sequence).

Specified by:
iterator in interface java.lang.Iterable<PVal>
Returns:
an iterator of the pvals in this record (in proper sequence).

toString

public java.lang.String toString()
Provides a user-readable string representation of this record. The string returned is of the form:

[name1=value1, name2=value2, ..., nameN=valueN]

Overrides:
toString in class java.lang.Object
Returns:
a user-readable representation of this record.

serialize

public void serialize(BinaryFormatOutputStream out)
               throws java.io.IOException
Throws:
java.io.IOException

serialize

public void serialize(org.dom4j.io.XMLWriter writer)
               throws java.io.IOException,
                      org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException


© 2003, 2013 Oracle and/or its affiliates. All rights reserved.
Oracle and/or its affiliates Confidential