address[ Contact.ADDR_POSTALCODE ] = "";
address[ Contact.ADDR_COUNTRY ] = "";
address[ Contact.ADDR_EXTRA ] = "";
setAddress( _contact, Contact.ATTR_HOME, address );
} else if( o instanceof AddressObject ) {
AddressObject addressScriptable = (AddressObject) o;
String[] addressHome = new String[ addressArraySize ];
addressHome[ Contact.ADDR_STREET ] = addressScriptable.getItem( AddressObject.FIELD_ADDRESS1 ).getStringValue();
addressHome[ Contact.ADDR_LOCALITY ] = addressScriptable.getItem( AddressObject.FIELD_CITY ).getStringValue();
addressHome[ Contact.ADDR_REGION ] = addressScriptable.getItem( AddressObject.FIELD_STATE ).getStringValue();
addressHome[ Contact.ADDR_POSTALCODE ] = addressScriptable.getItem( AddressObject.FIELD_ZIP ).getStringValue();
addressHome[ Contact.ADDR_COUNTRY ] = addressScriptable.getItem( AddressObject.FIELD_COUNTRY ).getStringValue();
addressHome[ Contact.ADDR_EXTRA ] = addressScriptable.getItem( AddressObject.FIELD_ADDRESS2 ).getStringValue();
setAddress( _contact, Contact.ATTR_HOME, addressHome );
}
o = _outer.getItem( ContactObject.FIELD_WORKADDRESS ).getValue();
if( o == null ) {
String[] address = new String[ addressArraySize ];
address[ Contact.ADDR_STREET ] = "";
address[ Contact.ADDR_LOCALITY ] = "";
address[ Contact.ADDR_REGION ] = "";
address[ Contact.ADDR_POSTALCODE ] = "";
address[ Contact.ADDR_COUNTRY ] = "";
address[ Contact.ADDR_EXTRA ] = "";
setAddress( _contact, Contact.ATTR_WORK, address );
} else if( o instanceof AddressObject ) {
AddressObject addressScriptable = (AddressObject) o;
String[] addressWork = new String[ addressArraySize ];
addressWork[ Contact.ADDR_STREET ] = addressScriptable.getItem( AddressObject.FIELD_ADDRESS1 ).getStringValue();
addressWork[ Contact.ADDR_LOCALITY ] = addressScriptable.getItem( AddressObject.FIELD_CITY ).getStringValue();
addressWork[ Contact.ADDR_REGION ] = addressScriptable.getItem( AddressObject.FIELD_STATE ).getStringValue();
addressWork[ Contact.ADDR_POSTALCODE ] = addressScriptable.getItem( AddressObject.FIELD_ZIP ).getStringValue();
addressWork[ Contact.ADDR_COUNTRY ] = addressScriptable.getItem( AddressObject.FIELD_COUNTRY ).getStringValue();
addressWork[ Contact.ADDR_EXTRA ] = addressScriptable.getItem( AddressObject.FIELD_ADDRESS2 ).getStringValue();
setAddress( _contact, Contact.ATTR_WORK, addressWork );
}
// email
int countEmail = _contact.countValues( Contact.EMAIL );