private void readAttributesFromDBaseFile ( E created_element ) throws IOException { // Read the DBF entry if ( this . dbfReader != null ) { final List < DBaseFileField > dbfColumns = this . dbfReader . getDBFFields ( ) ; // Read the record even if the shape element was not inserted into // the database. It is necessary to not have inconsistancy between // the shape entries and the dbase entries. final DBaseFileRecord record = this . dbfReader . readNextDBFRecord ( ) ; if ( record != null ) { // Add the dBase values for ( final DBaseFileField dbfColumn : dbfColumns ) { // Test if the column was marked as selected. // A column was selected if the user want to import the column // values into the database. if ( this . dbfReader . isColumnSelectable ( dbfColumn ) ) { final Object fieldValue = record . getFieldValue ( dbfColumn . getColumnIndex ( ) ) ; final AttributeValueImpl attr = new AttributeValueImpl ( ) ; attr . castAndSet ( dbfColumn . getAttributeType ( ) , fieldValue ) ; putAttributeIn ( created_element , dbfColumn . getName ( ) , attr ) ; } } } } }
Create the attribute values that correspond to the dBase content .