Package org.apache.airavata.schemas.gfac

Examples of org.apache.airavata.schemas.gfac.FileParameterType


                for (Iterator<String> iterator = outputContext.getNames(); iterator.hasNext();) {
                    String key = iterator.next();

                    if (outputContext.getValue(key).hasType(DataType.FILE)) {
                        FileParameterType fileParameter = (FileParameterType) outputContext.getValue(key).getType();

                        /*
                         * Determine scheme
                         */
                        URI uri = URI.create(fileParameter.getValue());
                        if (uri.getScheme().equalsIgnoreCase(GridFtp.GSIFTP_SCHEME)) {

                            /*
                             * src complete URI
                             */
 
View Full Code Here


            if (inputContext != null) {

                for (Iterator<String> iterator = inputContext.getNames(); iterator.hasNext();) {
                    String key = iterator.next();
                    if (inputContext.getValue(key).hasType(DataType.FILE)) {
                        FileParameterType fileParameter = (FileParameterType) inputContext.getValue(key).getType();

                        /*
                         * Determine scheme
                         */
                        URI uri = URI.create(fileParameter.getValue());
                        if (uri.getScheme().equalsIgnoreCase("http")) {
                            /*
                             * Desctination complete URI
                             */
                            File file = new File(uri.getPath());
                            String destFilePath = file.getName();

                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
                            destFilePath = app.getInputDataDirectory() + File.separator + destFilePath;

                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
                            if (hostDescription instanceof GlobusHostType) {
                                uploadToGridFTPFromHttp(context, uri, destFilePath);
                            } else {
                                downloadFile(context, uri, destFilePath);
                            }

                            /*
                             * Replace parameter
                             */
                            fileParameter.setValue(destFilePath);
                        }
                    }
                }
            } else {
                log.debug("Input Context is null");
View Full Code Here

            if (inputContext != null) {

                for (Iterator<String> iterator = inputContext.getNames(); iterator.hasNext();) {
                    String key = iterator.next();
                    if (inputContext.getValue(key).hasType(DataType.FILE)) {
                        FileParameterType fileParameter = (FileParameterType) inputContext.getValue(key).getType();

                        /*
                         * Determine scheme
                         */
                        URI uri = URI.create(fileParameter.getValue());
                        if (uri.getScheme().equalsIgnoreCase(GridFtp.GSIFTP_SCHEME)) {
                         
                            /*
                             * Destination complete URI
                             */
                            File file = new File(uri.getPath());
                            String destFilePath = file.getName();

                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
                            destFilePath = app.getInputDataDirectory() + File.separator + destFilePath;

                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
                            if (hostDescription instanceof GlobusHostType) {
                                gridFTPTransfer(context, uri, destFilePath);
                            } else if (GfacUtils.isLocalHost(hostDescription.getHostAddress())) {
                                downloadFile(context, uri, destFilePath);
                            }

                            /*
                             * Replace parameter
                             */
                            fileParameter.setValue(destFilePath);
                        }
                    }
                }
            } else {
                log.debug("Input Context is null");
View Full Code Here

                for (Iterator<String> iterator = outputContext.getNames(); iterator.hasNext();) {
                    String key = iterator.next();

                    if (outputContext.getValue(key).hasType(DataType.FILE)) {
                        FileParameterType fileParameter = (FileParameterType) outputContext.getValue(key).getType();

                        /*
                         * Determine scheme
                         */
                        URI uri = URI.create(fileParameter.getValue());
                        if (uri.getScheme().equalsIgnoreCase(GridFtp.GSIFTP_SCHEME)) {

                            /*
                             * src complete URI
                             */
 
View Full Code Here

            if (inputContext != null) {

                for (Iterator<String> iterator = inputContext.getNames(); iterator.hasNext();) {
                    String key = iterator.next();
                    if (inputContext.getValue(key).hasType(DataType.FILE)) {
                        FileParameterType fileParameter = (FileParameterType) inputContext.getValue(key).getType();

                        /*
                         * Determine scheme
                         */
                        URI uri = URI.create(fileParameter.getValue());
                        if (uri.getScheme().equalsIgnoreCase("http")) {                           
                            /*
                             * Desctination complete URI
                             */
                            File file = new File(uri.getPath());
                            String destFilePath = file.getName();

                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
                            destFilePath = app.getInputDataDirectory() + File.separator + destFilePath;

                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
                            if (hostDescription instanceof GlobusHostType) {
                                uploadToGridFTPFromHttp(context, uri, destFilePath);
                            } else {
                                downloadFile(context, uri, destFilePath);
                            }

                            /*
                             * Replace parameter
                             */
                            fileParameter.setValue(destFilePath);
                        }
                    }
                }
            } else {
                log.debug("Input Context is null");
View Full Code Here

            if (inputContext != null) {

                for (Iterator<String> iterator = inputContext.getNames(); iterator.hasNext();) {
                    String key = iterator.next();
                    if (inputContext.getValue(key).hasType(DataType.FILE)) {
                        FileParameterType fileParameter = (FileParameterType) inputContext.getValue(key).getType();

                        /*
                         * Determine scheme
                         */
                        URI uri = URI.create(fileParameter.getValue());
                        if (uri.getScheme().equalsIgnoreCase(GridFtp.GSIFTP_SCHEME)) {
                         
                            /*
                             * Desctination complete URI
                             */
                            File file = new File(uri.getPath());
                            String destFilePath = file.getName();

                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
                            destFilePath = app.getInputDataDirectory() + File.separator + destFilePath;

                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
                            if (hostDescription instanceof GlobusHostType) {
                                gridFTPTransfer(context, uri, destFilePath);
                            } else if (GfacUtils.isLocalHost(hostDescription.getHostAddress())) {
                                downloadFile(context, uri, destFilePath);
                            }

                            /*
                             * Replace parameter
                             */
                            fileParameter.setValue(destFilePath);
                        }
                    }
                }
            } else {
                log.debug("Input Context is null");
View Full Code Here

TOP

Related Classes of org.apache.airavata.schemas.gfac.FileParameterType

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.