Source:
protected void readGeneralData ( ) { org.ovirt.engine.core.utils.ovf.xml.XmlNode content = _document.SelectSingleNode ( "//*/Content" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNode node ; vmBase.setVmInit ( new org.ovirt.engine.core.common.businessentities.VmInit ( ) ) ; vmBase.setOvfVersion ( getVersion ( ) ) ; node = content.SelectSingleNode ( OvfProperties.DESCRIPTION ) ; if ( node != null ) { vmBase.setDescription ( node.innerText ) ; } node = content.SelectSingleNode ( OvfProperties.COMMENT ) ; if ( node != null ) { vmBase.setComment ( node.innerText ) ; } node = content.SelectSingleNode ( OvfProperties.DOMAIN ) ; if ( node != null ) { vmBase.getVmInit ( ) . setDomain ( node.innerText ) ; } node = content.SelectSingleNode ( OvfProperties.CREATION_DATE ) ; if ( node != null ) { java.util.Date creationDate = org.ovirt.engine.core.utils.ovf.OvfParser.utcDateStringToLocaDate ( node.innerText ) ; if ( creationDate != null ) { vmBase.setCreationDate ( creationDate ) ; } } node = content.SelectSingleNode ( OvfProperties.EXPORT_DATE ) ; if ( node != null ) { java.util.Date exportDate = org.ovirt.engine.core.utils.ovf.OvfParser.utcDateStringToLocaDate ( node.innerText ) ; if ( exportDate != null ) { vmBase.setExportDate ( exportDate ) ; } } node = content.SelectSingleNode ( OvfProperties.DEFAULT_BOOT_SEQUENCE ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setDefaultBootSequence ( org.ovirt.engine.core.common.businessentities.BootSequence.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = content.SelectSingleNode ( OvfProperties.INITRD_URL ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setInitrdUrl ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.KERNEL_URL ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setKernelUrl ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.KERNEL_PARAMS ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setKernelParams ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.GENERATION ) ; if ( node != null ) { vmBase.setDbGeneration ( java.lang.Long.parseLong ( node.innerText ) ) ; } else { vmBase.setDbGeneration ( 1L ) ; } node = content.SelectSingleNode ( getDefaultDisplayTypeStringRepresentation ( ) ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { defaultDisplayType = org.ovirt.engine.core.common.businessentities.DisplayType.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ; vmBase.setDefaultDisplayType ( defaultDisplayType ) ; } } org.ovirt.engine.core.utils.ovf.xml.XmlNodeList list = content.SelectNodes ( "Section" ) ; org.ovirt.engine.core.compat.Version version = new org.ovirt.engine.core.compat.Version ( getVersion ( ) ) ; if ( list != null ) { node = getNode ( list , "xsi:type" , "ovf:OperatingSystemSection_Type" ) ; if ( node != null ) { readOsSection ( node ) ; if ( ( ( ! ( osRepository.isLinux ( vmBase.getOsId ( ) ) ) ) || ( ! ( org.ovirt.engine.core.common.FeatureSupported.singleQxlPci ( version ) ) ) ) || ( ( vmBase.getDefaultDisplayType ( ) ) != ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) ) { vmBase.setSingleQxlPci ( false ) ; } } node = getNode ( list , "xsi:type" , "ovf:VirtualHardwareSection_Type" ) ; if ( node != null ) { readHardwareSection ( node ) ; } node = getNode ( list , "xsi:type" , "ovf:SnapshotsSection_Type" ) ; if ( node != null ) { readSnapshotsSection ( node ) ; } } node = content.SelectSingleNode ( OvfProperties.TIMEZONE ) ; if ( ( node != null ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) ) { vmBase.setTimeZone ( node.innerText ) ; } else { if ( osRepository.isWindows ( vmBase.getOsId ( ) ) ) { vmBase.setTimeZone ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DefaultWindowsTimeZone ) ) ; } else { vmBase.setTimeZone ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DefaultGeneralTimeZone ) ) ; } } node = content.SelectSingleNode ( OvfProperties.ORIGIN ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setOrigin ( org.ovirt.engine.core.common.businessentities.OriginType.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = content.SelectSingleNode ( OvfProperties.VM_TYPE ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setVmType ( org.ovirt.engine.core.common.businessentities.VmType.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = content.SelectSingleNode ( OvfProperties.IS_SMARTCARD_ENABLED ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setSmartcardEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.NUM_OF_IOTHREADS ) ; if ( node != null ) { if ( ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) && ( ! ( org.ovirt.engine.core.common.FeatureSupported.isIoThreadsSupported ( version ) ) ) ) { vmBase.setNumOfIoThreads ( java.lang.Integer.parseInt ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.DELETE_PROTECTED ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setDeleteProtected ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.SSO_METHOD ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setSsoMethod ( org.ovirt.engine.core.common.businessentities.SsoMethod.fromString ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.TUNNEL_MIGRATION ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setTunnelMigration ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.VNC_KEYBOARD_LAYOUT ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setVncKeyboardLayout ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.MIN_ALLOCATED_MEMORY ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setMinAllocatedMem ( java.lang.Integer.parseInt ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.IS_STATELESS ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setStateless ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.IS_RUN_AND_PAUSE ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setRunAndPause ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.CREATED_BY_USER_ID ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCreatedByUserId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.MIGRATION_DOWNTIME ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setMigrationDowntime ( java.lang.Integer.parseInt ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.MIGRATION_SUPPORT ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { org.ovirt.engine.core.common.businessentities.MigrationSupport migrationSupport = org.ovirt.engine.core.common.businessentities.MigrationSupport.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ; vmBase.setMigrationSupport ( migrationSupport ) ; } } readDedicatedHostsList ( ) ; node = content.SelectSingleNode ( OvfProperties.SERIAL_NUMBER_POLICY ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setSerialNumberPolicy ( org.ovirt.engine.core.common.businessentities.SerialNumberPolicy.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = content.SelectSingleNode ( OvfProperties.CUSTOM_SERIAL_NUMBER ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCustomSerialNumber ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.AUTO_STARTUP ) ; if ( node != null ) { vmBase.setAutoStartup ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = content.SelectSingleNode ( OvfProperties.PRIORITY ) ; if ( node != null ) { vmBase.setPriority ( java.lang.Integer.parseInt ( node.innerText ) ) ; } node = content.SelectSingleNode ( OvfProperties.IS_BOOT_MENU_ENABLED ) ; if ( node != null ) { vmBase.setBootMenuEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = content.SelectSingleNode ( OvfProperties.IS_SPICE_FILE_TRANSFER_ENABLED ) ; if ( node != null ) { vmBase.setSpiceFileTransferEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = content.SelectSingleNode ( OvfProperties.IS_SPICE_COPY_PASTE_ENABLED ) ; if ( node != null ) { vmBase.setSpiceCopyPasteEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = content.SelectSingleNode ( OvfProperties.IS_AUTO_CONVERGE ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setAutoConverge ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.IS_MIGRATE_COMPRESSED ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setMigrateCompressed ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( OvfProperties.CUSTOM_EMULATED_MACHINE ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCustomEmulatedMachine ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.CUSTOM_CPU_NAME ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCustomCpuName ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.PREDEFINED_PROPERTIES ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setPredefinedProperties ( node.innerText ) ; } } node = content.SelectSingleNode ( OvfProperties.USER_DEFINED_PROPERTIES ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setUserDefinedProperties ( node.innerText ) ; } } vmBase.setCustomProperties ( org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.getInstance ( ) . customProperties ( vmBase.getPredefinedProperties ( ) , vmBase.getUserDefinedProperties ( ) ) ) ; readGeneralData ( content ) ; readVmInit ( content ) ; }

Target:
protected void readGeneralData ( ) { org.ovirt.engine.core.utils.ovf.xml.XmlNode content = selectSingleNode ( _document , "//*/Content" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNode node ; vmBase.setVmInit ( new org.ovirt.engine.core.common.businessentities.VmInit ( ) ) ; vmBase.setOvfVersion ( getVersion ( ) ) ; node = selectSingleNode ( content , OvfProperties.DESCRIPTION ) ; if ( node != null ) { vmBase.setDescription ( node.innerText ) ; } node = selectSingleNode ( content , OvfProperties.COMMENT ) ; if ( node != null ) { vmBase.setComment ( node.innerText ) ; } node = selectSingleNode ( content , OvfProperties.DOMAIN ) ; if ( node != null ) { vmBase.getVmInit ( ) . setDomain ( node.innerText ) ; } node = selectSingleNode ( content , OvfProperties.CREATION_DATE ) ; if ( node != null ) { java.util.Date creationDate = org.ovirt.engine.core.utils.ovf.OvfParser.utcDateStringToLocaDate ( node.innerText ) ; if ( creationDate != null ) { vmBase.setCreationDate ( creationDate ) ; } } node = selectSingleNode ( content , OvfProperties.EXPORT_DATE ) ; if ( node != null ) { java.util.Date exportDate = org.ovirt.engine.core.utils.ovf.OvfParser.utcDateStringToLocaDate ( node.innerText ) ; if ( exportDate != null ) { vmBase.setExportDate ( exportDate ) ; } } node = selectSingleNode ( content , OvfProperties.DEFAULT_BOOT_SEQUENCE ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setDefaultBootSequence ( org.ovirt.engine.core.common.businessentities.BootSequence.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = selectSingleNode ( content , OvfProperties.INITRD_URL ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setInitrdUrl ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.KERNEL_URL ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setKernelUrl ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.KERNEL_PARAMS ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setKernelParams ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.GENERATION ) ; if ( node != null ) { vmBase.setDbGeneration ( java.lang.Long.parseLong ( node.innerText ) ) ; } else { vmBase.setDbGeneration ( 1L ) ; } node = selectSingleNode ( content , getDefaultDisplayTypeStringRepresentation ( ) ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { defaultDisplayType = org.ovirt.engine.core.common.businessentities.DisplayType.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ; vmBase.setDefaultDisplayType ( defaultDisplayType ) ; } } org.ovirt.engine.core.utils.ovf.xml.XmlNodeList list = selectNodes ( content , "Section" ) ; org.ovirt.engine.core.compat.Version version = new org.ovirt.engine.core.compat.Version ( getVersion ( ) ) ; if ( list != null ) { node = getNode ( list , "xsi:type" , "ovf:OperatingSystemSection_Type" ) ; if ( node != null ) { readOsSection ( node ) ; if ( ( ( ! ( osRepository.isLinux ( vmBase.getOsId ( ) ) ) ) || ( ! ( org.ovirt.engine.core.common.FeatureSupported.singleQxlPci ( version ) ) ) ) || ( ( vmBase.getDefaultDisplayType ( ) ) != ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) ) { vmBase.setSingleQxlPci ( false ) ; } } node = getNode ( list , "xsi:type" , "ovf:VirtualHardwareSection_Type" ) ; if ( node != null ) { readHardwareSection ( node ) ; } node = getNode ( list , "xsi:type" , "ovf:SnapshotsSection_Type" ) ; if ( node != null ) { readSnapshotsSection ( node ) ; } } node = selectSingleNode ( content , OvfProperties.TIMEZONE ) ; if ( ( node != null ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) ) { vmBase.setTimeZone ( node.innerText ) ; } else { if ( osRepository.isWindows ( vmBase.getOsId ( ) ) ) { vmBase.setTimeZone ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DefaultWindowsTimeZone ) ) ; } else { vmBase.setTimeZone ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DefaultGeneralTimeZone ) ) ; } } node = selectSingleNode ( content , OvfProperties.ORIGIN ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setOrigin ( org.ovirt.engine.core.common.businessentities.OriginType.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = selectSingleNode ( content , OvfProperties.VM_TYPE ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setVmType ( org.ovirt.engine.core.common.businessentities.VmType.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = selectSingleNode ( content , OvfProperties.IS_SMARTCARD_ENABLED ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setSmartcardEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.NUM_OF_IOTHREADS ) ; if ( node != null ) { if ( ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) && ( ! ( org.ovirt.engine.core.common.FeatureSupported.isIoThreadsSupported ( version ) ) ) ) { vmBase.setNumOfIoThreads ( java.lang.Integer.parseInt ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.DELETE_PROTECTED ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setDeleteProtected ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.SSO_METHOD ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setSsoMethod ( org.ovirt.engine.core.common.businessentities.SsoMethod.fromString ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.TUNNEL_MIGRATION ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setTunnelMigration ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.VNC_KEYBOARD_LAYOUT ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setVncKeyboardLayout ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.MIN_ALLOCATED_MEMORY ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setMinAllocatedMem ( java.lang.Integer.parseInt ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.IS_STATELESS ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setStateless ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.IS_RUN_AND_PAUSE ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setRunAndPause ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.CREATED_BY_USER_ID ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCreatedByUserId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.MIGRATION_DOWNTIME ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setMigrationDowntime ( java.lang.Integer.parseInt ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.MIGRATION_SUPPORT ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { org.ovirt.engine.core.common.businessentities.MigrationSupport migrationSupport = org.ovirt.engine.core.common.businessentities.MigrationSupport.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ; vmBase.setMigrationSupport ( migrationSupport ) ; } } readDedicatedHostsList ( ) ; node = selectSingleNode ( content , OvfProperties.SERIAL_NUMBER_POLICY ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setSerialNumberPolicy ( org.ovirt.engine.core.common.businessentities.SerialNumberPolicy.forValue ( java.lang.Integer.parseInt ( node.innerText ) ) ) ; } } node = selectSingleNode ( content , OvfProperties.CUSTOM_SERIAL_NUMBER ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCustomSerialNumber ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.AUTO_STARTUP ) ; if ( node != null ) { vmBase.setAutoStartup ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = selectSingleNode ( content , OvfProperties.PRIORITY ) ; if ( node != null ) { vmBase.setPriority ( java.lang.Integer.parseInt ( node.innerText ) ) ; } node = selectSingleNode ( content , OvfProperties.IS_BOOT_MENU_ENABLED ) ; if ( node != null ) { vmBase.setBootMenuEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = selectSingleNode ( content , OvfProperties.IS_SPICE_FILE_TRANSFER_ENABLED ) ; if ( node != null ) { vmBase.setSpiceFileTransferEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = selectSingleNode ( content , OvfProperties.IS_SPICE_COPY_PASTE_ENABLED ) ; if ( node != null ) { vmBase.setSpiceCopyPasteEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } node = selectSingleNode ( content , OvfProperties.IS_AUTO_CONVERGE ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setAutoConverge ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.IS_MIGRATE_COMPRESSED ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setMigrateCompressed ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = selectSingleNode ( content , OvfProperties.CUSTOM_EMULATED_MACHINE ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCustomEmulatedMachine ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.CUSTOM_CPU_NAME ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCustomCpuName ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.PREDEFINED_PROPERTIES ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setPredefinedProperties ( node.innerText ) ; } } node = selectSingleNode ( content , OvfProperties.USER_DEFINED_PROPERTIES ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setUserDefinedProperties ( node.innerText ) ; } } vmBase.setCustomProperties ( org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils.getInstance ( ) . customProperties ( vmBase.getPredefinedProperties ( ) , vmBase.getUserDefinedProperties ( ) ) ) ; readGeneralData ( content ) ; readVmInit ( content ) ; }