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" ) ; 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 ) ; if ( ! ( OsRepositoryImpl.INSTANCE.isLinux ( vmBase.getOsId ( ) ) ) ) { vmBase.setSingleQxlPci ( false ) ; } } 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 ) ; }