public void transferItem() {
    Metadata metadata = metadatas.get(index);
    List<?> values = (List<?>) ((List<?>) context.get("items")).get(index);
    getWriter().writeTitle(metadata.dataName, metadata.titles);
    Object[] propValues = new Object[metadata.attrs.length];
    for (Object item : values) {
      for (int i = 0; i < propValues.length; i++) {
        try {
          propValues[i] = propertyExtractor.getPropertyValue(item, metadata.attrs[i]);
        } catch (Exception e) {
          transferResult.addFailure(TransferMessage.ERROR_ATTRS_EXPORT,
              "occur in get property :" + metadata.attrs[i] + " and exception:" + e.getMessage());
        }
      }
      writer.write(propValues);
    }
  }
public void transferItem ( ) { Metadata metadata = metadatas . get ( index ) ; List < ? > values = ( List < ? > ) ( ( List < ? > ) context . get ( "items" ) ) . get ( index ) ; getWriter ( ) . writeTitle ( metadata . dataName , metadata . titles ) ; Object [ ] propValues = new Object [ metadata . attrs . length ] ; for ( Object item : values ) { for ( int i = 0 ; i < propValues . length ; i ++ ) { try { propValues [ i ] = propertyExtractor . getPropertyValue ( item , metadata . attrs [ i ] ) ; } catch ( Exception e ) { transferResult . addFailure ( TransferMessage . ERROR_ATTRS_EXPORT , "occur in get property :" + metadata . attrs [ i ] + " and exception:" + e . getMessage ( ) ) ; } } writer . write ( propValues ) ; } }
<p>
transferItem.
</p>