Search in sources :

Example 1 with OsnConverter

use of com.revolsys.record.io.format.saif.util.OsnConverter in project com.revolsys.open by revolsys.

the class OsnReader method getRecord.

private Object getRecord() {
    final String typePath = this.osnIterator.getPathValue();
    final OsnConverter converter = this.converters.getConverter(typePath);
    if (converter != null) {
        return converter.read(this.osnIterator);
    } else {
        final RecordDefinition type = this.recordDefinitionFactory.getRecordDefinition(typePath);
        final Record record = this.factory.newRecord(type);
        while (this.osnIterator.next() != OsnIterator.END_OBJECT) {
            addField(record);
        }
        return record;
    }
}
Also used : OsnConverter(com.revolsys.record.io.format.saif.util.OsnConverter) Record(com.revolsys.record.Record) RecordDefinition(com.revolsys.record.schema.RecordDefinition)

Aggregations

Record (com.revolsys.record.Record)1 OsnConverter (com.revolsys.record.io.format.saif.util.OsnConverter)1 RecordDefinition (com.revolsys.record.schema.RecordDefinition)1