Examples of EnvelopeType


Examples of net.opengis.gml.EnvelopeType

        SpatialSubsetType spatialSubset = Wcs10Factory.eINSTANCE.createSpatialSubsetType();
       
        List<Node> envelopes = node.getChildren("Envelope");
        for (Node envelopeNode : envelopes) {
            ReferencedEnvelope envelope = (ReferencedEnvelope) envelopeNode.getValue();
            EnvelopeType env = Gml4wcsFactory.eINSTANCE.createEnvelopeType();
           
            env.setSrsName(CRS.lookupIdentifier(envelope.getCoordinateReferenceSystem(), true));
           
            DirectPositionType pos1 = Gml4wcsFactory.eINSTANCE.createDirectPositionType();
            DirectPositionType pos2 = Gml4wcsFactory.eINSTANCE.createDirectPositionType();
           
            pos1.setDimension(BigInteger.valueOf(2));
            pos2.setDimension(BigInteger.valueOf(2));
           
            pos1.setValue(Arrays.asList(envelope.getMinX(), envelope.getMinY()));
            pos2.setValue(Arrays.asList(envelope.getMaxX(), envelope.getMaxY()));

            env.getPos().add(pos1);
            env.getPos().add(pos2);
           
            spatialSubset.getEnvelope().add(envelope);
        }
       
        List<Node> gridsNode = node.getChildren("Grid");
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.EnvelopeType

    /**
     * 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()));

        final Long diskSize = template.getDiskFileSize();

        // final String completPath = packRelPath +'/'+diskPath;
        // System.err.println(packRelPath);

        try
        {
            FileType fileRef =
                OVFReferenceUtils.createFileType("diskFile", diskPath,
                    BigInteger.valueOf(diskSize), null, null);
            OVFReferenceUtils.addFile(references, fileRef);

            DiskSectionType diskSection = createDiskSection(template);
            VirtualSystemType vsystem = createVirtualSystem(template);
            ProductSectionType product = createProductSection(template);
            OperatingSystemSectionType ossection = createOperatingSystemSection(template);

            OVFEnvelopeUtils.addSection(vsystem, product);           
            OVFEnvelopeUtils.addSection(vsystem, ossection);
            OVFEnvelopeUtils.addSection(envelope, diskSection);
            OVFEnvelopeUtils.addVirtualSystem(envelope, vsystem);
            envelope.setReferences(references);
        }
        catch (Exception e)
        {
            throw new AMException(AMError.TEMPLATE_INSTALL,
                "Can not create the OVF from the DiskInfo", e);
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.EnvelopeType

    /**
     * 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()));

        final Long diskSize = template.getDiskFileSize();

        // final String completPath = packRelPath +'/'+diskPath;
        // System.err.println(packRelPath);

        try
        {
            FileType fileRef =
                OVFReferenceUtils.createFileType("diskFile", diskPath,
                    BigInteger.valueOf(diskSize), null, null);
            OVFReferenceUtils.addFile(references, fileRef);

            DiskSectionType diskSection = createDiskSection(template);
            VirtualSystemType vsystem = createVirtualSystem(template);
            ProductSectionType product = createProductSection(template);
            OperatingSystemSectionType ossection = createOperatingSystemSection(template);

            OVFEnvelopeUtils.addSection(vsystem, product);
            OVFEnvelopeUtils.addSection(vsystem, ossection);
            OVFEnvelopeUtils.addSection(envelope, diskSection);
            OVFEnvelopeUtils.addVirtualSystem(envelope, vsystem);
            envelope.setReferences(references);
        }
        catch (Exception e)
        {
            throw new AMException(AMError.TEMPLATE_INSTALL,
                "Can not create the OVF from the DiskInfo",
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.EnvelopeType

    /**
     * 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()));

        final Long diskSize = template.getDiskFileSize();

        // final String completPath = packRelPath +'/'+diskPath;
        // System.err.println(packRelPath);

        try
        {
            FileType fileRef =
                OVFReferenceUtils.createFileType("diskFile", diskPath,
                    BigInteger.valueOf(diskSize), null, null);
            OVFReferenceUtils.addFile(references, fileRef);

            DiskSectionType diskSection = createDiskSection(template);
            VirtualSystemType vsystem = createVirtualSystem(template);
            ProductSectionType product = createProductSection(template);
            OperatingSystemSectionType ossection = createOperatingSystemSection(template);

            OVFEnvelopeUtils.addSection(vsystem, product);
            OVFEnvelopeUtils.addSection(vsystem, ossection);
            OVFEnvelopeUtils.addSection(envelope, diskSection);
            OVFEnvelopeUtils.addVirtualSystem(envelope, vsystem);
            envelope.setReferences(references);
        }
        catch (Exception e)
        {
            throw new AMException(AMError.TEMPLATE_INSTALL,
                "Can not create the OVF from the DiskInfo",
View Full Code Here

Examples of org.dmtf.schemas.ovf.envelope._1.EnvelopeType

    /**
     * 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()));

        final Long diskSize = template.getDiskFileSize();

        // final String completPath = packRelPath +'/'+diskPath;
        // System.err.println(packRelPath);

        try
        {
            FileType fileRef =
                OVFReferenceUtils.createFileType("diskFile", diskPath,
                    BigInteger.valueOf(diskSize), null, null);
            OVFReferenceUtils.addFile(references, fileRef);

            DiskSectionType diskSection = createDiskSection(template);
            VirtualSystemType vsystem = createVirtualSystem(template);
            ProductSectionType product = createProductSection(template);
            OperatingSystemSectionType ossection = createOperatingSystemSection(template);

            OVFEnvelopeUtils.addSection(vsystem, product);
            OVFEnvelopeUtils.addSection(vsystem, ossection);
            OVFEnvelopeUtils.addSection(envelope, diskSection);
            OVFEnvelopeUtils.addVirtualSystem(envelope, vsystem);
            envelope.setReferences(references);
        }
        catch (Exception e)
        {
            throw new AMException(AMError.TEMPLATE_INSTALL,
                "Can not create the OVF from the DiskInfo",
View Full Code Here

Examples of org.xmlsoap.schemas.soap.envelope.EnvelopeType

    }

    private EnvelopeDocument createEmptyRequest(final String user)
    {
        EnvelopeDocument request = EnvelopeDocument.Factory.newInstance();
        EnvelopeType envelope = request.addNewEnvelope();
        envelope.addNewHeader().addNewExchangeImpersonation().addNewConnectingSID().setPrincipalName(user);
        return request;
    }
View Full Code Here

Examples of org.xmlsoap.schemas.soap.envelope.EnvelopeType

    }

    EnvelopeDocument createEmptyRequest(final String targetUser)
    {
        EnvelopeDocument request = EnvelopeDocument.Factory.newInstance();
        EnvelopeType envelope = request.addNewEnvelope();
        envelope.addNewHeader().addNewExchangeImpersonation().addNewConnectingSID().setPrincipalName(targetUser);
        return request;
    }
View Full Code Here

Examples of org.xmlsoap.schemas.soap.envelope.EnvelopeType

    public SyncFolderItemsResponseType syncFolderItems(final SyncFolderItemsType syncFolderItems,
                                                       final String targetUser)
            throws ServiceCallException, HttpErrorException
    {
        EnvelopeDocument request = createEmptyRequest(targetUser);
        EnvelopeType envelope = request.getEnvelope();
        envelope.addNewBody().setSyncFolderItems(syncFolderItems);

        return sendRequest(request).getSyncFolderItemsResponse();
    }
View Full Code Here

Examples of org.xmlsoap.schemas.soap.envelope.EnvelopeType

     */
    public GetItemResponseType getItem(final GetItemType getItem, final String targetUser)
        throws ServiceCallException, HttpErrorException
    {
        EnvelopeDocument request = createEmptyRequest(targetUser);
        EnvelopeType envelope = request.getEnvelope();
        envelope.addNewBody().setGetItem(getItem);

        return sendRequest(request).getGetItemResponse();
    }
View Full Code Here

Examples of org.xmlsoap.schemas.soap.envelope.EnvelopeType

     */
    public FindFolderResponseType findFolder(final FindFolderType findFolder, final String targetUser)
        throws ServiceCallException, HttpErrorException
    {
        EnvelopeDocument request = createEmptyRequest(targetUser);
        EnvelopeType envelope = request.getEnvelope();
        envelope.addNewBody().setFindFolder(findFolder);

        return sendRequest(request).getFindFolderResponse();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.