org.gcube.data.streams.publishers
Interface RecordFactory<E>

Type Parameters:
E - the type of the elements
All Known Implementing Classes:
RsStringRecordFactory

public interface RecordFactory<E>

Generates Records from the elements of a Stream.

Author:
Fabio Simeoni

Method Summary
 gr.uoa.di.madgik.grs.record.RecordDefinition[] definitions()
          Returns the definitions of the records.
 gr.uoa.di.madgik.grs.record.Record newRecord(E element)
          Generates a Record from a Stream element.
 

Method Detail

definitions

gr.uoa.di.madgik.grs.record.RecordDefinition[] definitions()
Returns the definitions of the records.

Returns:
the definitions

newRecord

gr.uoa.di.madgik.grs.record.Record newRecord(E element)
                                             throws StreamContingencyException,
                                                    RuntimeException
Generates a Record from a Stream element.

Parameters:
element - the element
Returns:
the record
Throws:
StreamContingencyException - if no record can be generated, because the input element violates pre-conditions
RuntimeException - if no record can be generated, because of an unrecoverable condition


Copyright © 2012. All Rights Reserved.