Source:
protected void readGeneralData ( ) { org.ovirt.engine.core.compat.backendcompat.XmlNode content = _document.SelectSingleNode ( "//*/Content" ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node ; vmBase.setOvfVersion ( getVersion ( ) ) ; node = content.SelectSingleNode ( "Description" ) ; if ( node != null ) { vmBase.setDescription ( node.InnerText ) ; } node = content.SelectSingleNode ( "Domain" ) ; if ( node != null ) { vmBase.setDomain ( node.InnerText ) ; } node = content.SelectSingleNode ( "CreationDate" ) ; 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 ( "ExportDate" ) ; 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 ( "TimeZone" ) ; if ( node != null ) { vmBase.setTimeZone ( node.InnerText ) ; } node = content.SelectSingleNode ( "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 ( "initrd_url" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.InnerText ) ) ) { vmBase.setInitrdUrl ( node.InnerText ) ; } } node = content.SelectSingleNode ( "kernel_url" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.InnerText ) ) ) { vmBase.setKernelUrl ( node.InnerText ) ; } } node = content.SelectSingleNode ( "kernel_params" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.InnerText ) ) ) { vmBase.setKernelParams ( node.InnerText ) ; } } node = content.SelectSingleNode ( "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.compat.backendcompat.XmlNodeList list = content.SelectNodes ( "Section" ) ; for ( org.ovirt.engine.core.compat.backendcompat.XmlNode section : list ) { java.lang.String value = section.Attributes.get ( "xsi:type" ) . getValue ( ) ; if ( "ovf:OperatingSystemSection_Type" . equals ( value ) ) { readOsSection ( section ) ; } else if ( "ovf:VirtualHardwareSection_Type" . equals ( value ) ) { readHardwareSection ( section ) ; } else if ( "ovf:SnapshotsSection_Type" . equals ( value ) ) { readSnapshotsSection ( section ) ; } } node = content.SelectSingleNode ( "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 ( "VmType" ) ; 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 ( "IsSmartcardEnabled" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.InnerText ) ) ) { vmBase.setSmartcardEnabled ( java.lang.Boolean.parseBoolean ( node.InnerText ) ) ; } } node = content.SelectSingleNode ( "DeleteProtected" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.InnerText ) ) ) { vmBase.setDeleteProtected ( java.lang.Boolean.parseBoolean ( node.InnerText ) ) ; } } node = content.SelectSingleNode ( "TunnelMigration" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.InnerText ) ) ) { vmBase.setTunnelMigration ( java.lang.Boolean.parseBoolean ( node.InnerText ) ) ; } } node = content.SelectSingleNode ( "VncKeyboardLayout" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.InnerText ) ) ) { vmBase.setVncKeyboardLayout ( node.InnerText ) ; } } node = content.SelectSingleNode ( "MinAllocatedMem" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.InnerText ) ) { vmBase.setMinAllocatedMem ( java.lang.Integer.parseInt ( node.InnerText ) ) ; } } node = content.SelectSingleNode ( "IsStateless" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.InnerText ) ) { vmBase.setStateless ( java.lang.Boolean.parseBoolean ( node.InnerText ) ) ; } } node = content.SelectSingleNode ( "IsRunAndPause" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.InnerText ) ) { vmBase.setRunAndPause ( java.lang.Boolean.parseBoolean ( node.InnerText ) ) ; } } node = content.SelectSingleNode ( "CreatedByUserId" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.InnerText ) ) { vmBase.setCreatedByUserId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( node.InnerText ) ) ; } } readGeneralData ( content ) ; }

Target:
protected void readGeneralData ( ) { org.ovirt.engine.core.compat.backendcompat.XmlNode content = _document.SelectSingleNode ( "//*/Content" ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node ; vmBase.setOvfVersion ( getVersion ( ) ) ; node = content.SelectSingleNode ( "Description" ) ; if ( node != null ) { vmBase.setDescription ( node.innerText ) ; } node = content.SelectSingleNode ( "Domain" ) ; if ( node != null ) { vmBase.setDomain ( node.innerText ) ; } node = content.SelectSingleNode ( "CreationDate" ) ; 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 ( "ExportDate" ) ; 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 ( "TimeZone" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setTimeZone ( node.innerText ) ; } } node = content.SelectSingleNode ( "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 ( "initrd_url" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setInitrdUrl ( node.innerText ) ; } } node = content.SelectSingleNode ( "kernel_url" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setKernelUrl ( node.innerText ) ; } } node = content.SelectSingleNode ( "kernel_params" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setKernelParams ( node.innerText ) ; } } node = content.SelectSingleNode ( "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.compat.backendcompat.XmlNodeList list = content.SelectNodes ( "Section" ) ; 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 ( new org.ovirt.engine.core.compat.Version ( getVersion ( ) ) ) ) ) ) { 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 ( "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 ( "VmType" ) ; 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 ( "IsSmartcardEnabled" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setSmartcardEnabled ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( "DeleteProtected" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setDeleteProtected ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( "SsoMethod" ) ; 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 ( "TunnelMigration" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setTunnelMigration ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( "VncKeyboardLayout" ) ; if ( node != null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.innerText ) ) ) { vmBase.setVncKeyboardLayout ( node.innerText ) ; } } node = content.SelectSingleNode ( "MinAllocatedMem" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setMinAllocatedMem ( java.lang.Integer.parseInt ( node.innerText ) ) ; } } node = content.SelectSingleNode ( "IsStateless" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setStateless ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( "IsRunAndPause" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setRunAndPause ( java.lang.Boolean.parseBoolean ( node.innerText ) ) ; } } node = content.SelectSingleNode ( "CreatedByUserId" ) ; if ( node != null ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( node.innerText ) ) { vmBase.setCreatedByUserId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( node.innerText ) ) ; } } readGeneralData ( content ) ; }