private void writeResourceExtendedAttributes ( Project . Resources . Resource xml , Resource mpx ) { Project . Resources . Resource . ExtendedAttribute attrib ; List < Project . Resources . Resource . ExtendedAttribute > extendedAttributes = xml . getExtendedAttribute ( ) ; for ( ResourceField mpxFieldID : getAllResourceExtendedAttributes ( ) ) { Object value = mpx . getCachedValue ( mpxFieldID ) ; if ( FieldTypeHelper . valueIsNotDefault ( mpxFieldID , value ) ) { m_extendedAttributesInUse . add ( mpxFieldID ) ; Integer xmlFieldID = Integer . valueOf ( MPPResourceField . getID ( mpxFieldID ) | MPPResourceField . RESOURCE_FIELD_BASE ) ; attrib = m_factory . createProjectResourcesResourceExtendedAttribute ( ) ; extendedAttributes . add ( attrib ) ; attrib . setFieldID ( xmlFieldID . toString ( ) ) ; attrib . setValue ( DatatypeConverter . printExtendedAttribute ( this , value , mpxFieldID . getDataType ( ) ) ) ; attrib . setDurationFormat ( printExtendedAttributeDurationFormat ( value ) ) ; } } }
This method writes extended attribute data for a resource .