Package epcglobal.epcis_query.xsd._1

Examples of epcglobal.epcis_query.xsd._1.QueryResults


        {
            ContentType contentType = OVFEnvelopeUtils.getTopLevelVirtualSystemContent(envelope);

            ProductSectionType product =
                OVFEnvelopeUtils.getSection(contentType, ProductSectionType.class);
            OperatingSystemSectionType ossection = null;
            try
            {
                ossection =
                    OVFEnvelopeUtils.getSection(contentType, OperatingSystemSectionType.class);
            }
View Full Code Here


        try
        {
            ContentType contentType = OVFEnvelopeUtils.getTopLevelVirtualSystemContent(envelope);

            ProductSectionType product =
                OVFEnvelopeUtils.getSection(contentType, ProductSectionType.class);
            OperatingSystemSectionType ossection = null;
            try
            {
                ossection =
                    OVFEnvelopeUtils.getSection(contentType, OperatingSystemSectionType.class);
            }
            catch (Exception e) // no such section
            {

            }

            String description = null;
            if (product.getInfo() != null && product.getInfo().getValue() != null)
            {
                description = product.getInfo().getValue();
            }

            String categoryName = null;
            if (product.getOtherAttributes().containsKey(new QName("CategoryName")))
            {
                categoryName = product.getOtherAttributes().get(new QName("CategoryName"));
            }

            String iconPath = getIconPath(product, fileIdToFileType, ovfId);

            diskSectionType = OVFEnvelopeUtils.getSection(envelope, DiskSectionType.class);
View Full Code Here

                    ? vsystem.getName().getValue() : vsystem.getId();

            MsgType prod = new MsgType();
            prod.setValue(vsystemName);

            ProductSectionType product = new ProductSectionType();
            product.setInfo(vsystem.getInfo());
            product.setProduct(prod);

            try
            {
                OVFEnvelopeUtils.addSection(vsystem, product);
            }
View Full Code Here

        product.getCategoryOrProperty().add(createProperty("password", disk.getLoginPassword()));

        final String diskIcon = disk.getIconPath();
        if (diskIcon != null)
        {
            Icon icon = OVFProductUtils.createIcon(50, 50, "jpg", diskIcon); // XXX icon
            // details
            OVFProductUtils.addProductIcon(product, icon);
        }
        // warn
View Full Code Here

        if (icons == null || icons.size() == 0)
        {
            return null;
        }

        final Icon icon = icons.get(0);
        final String iconRef = icon.getFileRef();

        if (iconRef.startsWith("http"))
        {
            return iconRef;
        }
View Full Code Here

        CIMResourceAllocationSettingDataType hd =
            CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData("Hd", "1",
                CIMResourceTypeEnum.Disk_Drive, disk.getHd(), disk.getHdSizeUnit().name());

        RASDType rasdCpu = CIMResourceAllocationSettingDataUtils.createRASDTypeFromCIMRASD(cpu);
        RASDType rasdRam = CIMResourceAllocationSettingDataUtils.createRASDTypeFromCIMRASD(ram);
        RASDType rasdHd = CIMResourceAllocationSettingDataUtils.createRASDTypeFromCIMRASD(hd);

        rasdHd.getHostResource().add(CIMTypesUtils.createString("ovf:/disk/ovfdisk"));

        OVFVirtualHadwareSectionUtils.addRASD(vhsection, rasdCpu);
        OVFVirtualHadwareSectionUtils.addRASD(vhsection, rasdRam);
        OVFVirtualHadwareSectionUtils.addRASD(vhsection, rasdHd);
View Full Code Here

            CIMResourceAllocationSettingDataType ethDriver =
                CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData(
                    "ethernetDriver", "1", CIMResourceTypeEnum.Ethernet_Adapter, 0, null);
            ethDriver.setResourceSubType(CIMTypesUtils.createString(ethDriverType.name()));

            final RASDType rasdEthDriver =
                CIMResourceAllocationSettingDataUtils.createRASDTypeFromCIMRASD(ethDriver);
            OVFVirtualHadwareSectionUtils.addRASD(vhsection, rasdEthDriver);
        }
        return vhsection;
    }
View Full Code Here

     * Use the imageSize
     **/
    public static EnvelopeType createOVFEnvelopeFromTemplate(final TemplateDto template)
    {
        EnvelopeType envelope = new EnvelopeType();
        ReferencesType references = new ReferencesType();

        final String diskPath = template.getDiskFilePath();
        // final String packRelPath = getRelativePackagePath(disk.getOvfUrl(),
        // String.valueOf(disk.getIdEnterprise()));

View Full Code Here

    private static VirtualHardwareSectionType createVirtualHardwareSection(final TemplateDto disk)
        throws RequiredAttributeException
    {
        VirtualHardwareSectionType vhsection = new VirtualHardwareSectionType();

        VSSDType vsystem = new VSSDType();
        vsystem.setVirtualSystemType(CIMTypesUtils.createString(VIRTUAL_SYSTEM_TYPE));
        vhsection.setSystem(vsystem);

        CIMResourceAllocationSettingDataType cpu =
            CIMResourceAllocationSettingDataUtils.createResourceAllocationSettingData("Cpu", "1",
                CIMResourceTypeEnum.Processor, disk.getCpu(), null);
View Full Code Here

        DiskFormat format = DiskFormat.fromName(disk.getDiskFileFormat().name());

        final Long diskSize = disk.getDiskFileSize();

        // TODO getHDUnits
        VirtualDiskDescType diskDesc =
            OVFDiskUtils.createDiskDescription("ovfdisk", "diskFile", format, diskSize, null, null,
                null);

        DiskSectionType diskSection = new DiskSectionType();
        OVFDiskUtils.addDisk(diskSection, diskDesc);
View Full Code Here

TOP

Related Classes of epcglobal.epcis_query.xsd._1.QueryResults

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.