Search in sources :

Example 21 with JobDefinitionType

use of org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType in project airavata by apache.

the class JSDLUtils method getOrCreateSPMDApplication.

public static SPMDApplicationType getOrCreateSPMDApplication(JobDefinitionType value) {
    ApplicationType application = getOrCreateApplication(value);
    if (getSPMDApplication(value) == null) {
        XmlCursor acursor = application.newCursor();
        acursor.toEndToken();
        acursor.insertElement(SPMD_APPLICATION);
        acursor.dispose();
    }
    return getSPMDApplication(value);
}
Also used : HPCProfileApplicationType(org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType) POSIXApplicationType(org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.POSIXApplicationType) ApplicationType(org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType) SPMDApplicationType(org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType) XmlCursor(org.apache.xmlbeans.XmlCursor)

Example 22 with JobDefinitionType

use of org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType in project airavata by apache.

the class JSDLUtils method setCPUArchitectureRequirements.

public static void setCPUArchitectureRequirements(JobDefinitionType value, ProcessorRequirement cpuArchitecture) {
    if (cpuArchitecture == null || cpuArchitecture.getValue() == null)
        return;
    CPUArchitectureType cpuArch = getOrCreateCPUArchitecture(value);
    cpuArch.setCPUArchitectureName(ProcessorArchitectureEnumeration.Enum.forString(cpuArchitecture.getValue()));
}
Also used : CPUArchitectureType(org.ggf.schemas.jsdl.x2005.x11.jsdl.CPUArchitectureType)

Example 23 with JobDefinitionType

use of org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType in project airavata by apache.

the class JSDLUtils method setOperatingSystemRequirements.

public static void setOperatingSystemRequirements(JobDefinitionType value, OSRequirement osType) {
    if (osType == null || osType.getOSType() == null)
        return;
    OperatingSystemType os_Type = getOrCreateOperatingSystem(value);
    OperatingSystemTypeType ostt = os_Type.addNewOperatingSystemType();
    ostt.setOperatingSystemName(OperatingSystemTypeEnumeration.Enum.forString(osType.getOSType().getValue()));
    if (osType.getOSVersion() != null) {
        os_Type.setOperatingSystemVersion(osType.getOSVersion());
    }
}
Also used : OperatingSystemTypeType(org.ggf.schemas.jsdl.x2005.x11.jsdl.OperatingSystemTypeType) OperatingSystemType(org.ggf.schemas.jsdl.x2005.x11.jsdl.OperatingSystemType)

Example 24 with JobDefinitionType

use of org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType in project airavata by apache.

the class JSDLUtils method getOrCreateHPCProfileApplication.

public static HPCProfileApplicationType getOrCreateHPCProfileApplication(JobDefinitionType value) {
    ApplicationType application = getOrCreateApplication(value);
    if (getPOSIXApplication(value) != null) {
        // TODO handle: creating HPC element if POSIX already exists
        return getHPCProfileApplication(value);
    }
    if (getHPCProfileApplication(value) == null) {
        XmlCursor acursor = application.newCursor();
        acursor.toEndToken();
        acursor.insertElement(HPC_PROFILE_APPLICATION);
        acursor.dispose();
    }
    return getHPCProfileApplication(value);
}
Also used : HPCProfileApplicationType(org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType) POSIXApplicationType(org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.POSIXApplicationType) ApplicationType(org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType) SPMDApplicationType(org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType) XmlCursor(org.apache.xmlbeans.XmlCursor)

Example 25 with JobDefinitionType

use of org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType in project airavata by apache.

the class JSDLUtils method getOrCreatePOSIXApplication.

public static POSIXApplicationType getOrCreatePOSIXApplication(JobDefinitionType value) {
    ApplicationType application = getOrCreateApplication(value);
    if (getHPCProfileApplication(value) != null) {
        // TODO handle: not creating POSIX element if HPCProfile already exists
        return getPOSIXApplication(value);
    }
    if (getPOSIXApplication(value) == null) {
        XmlCursor acursor = application.newCursor();
        acursor.toEndToken();
        acursor.insertElement(POSIX_APPLICATION);
        acursor.dispose();
    }
    return getPOSIXApplication(value);
}
Also used : HPCProfileApplicationType(org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType) POSIXApplicationType(org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.POSIXApplicationType) ApplicationType(org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType) SPMDApplicationType(org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType) XmlCursor(org.apache.xmlbeans.XmlCursor)

Aggregations

POSIXApplicationType (org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.POSIXApplicationType)10 XmlCursor (org.apache.xmlbeans.XmlCursor)8 ApplicationType (org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType)7 JobDefinitionType (org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionType)7 JobDefinitionDocument (org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDefinitionDocument)6 HPCProfileApplicationType (org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType)5 SPMDApplicationType (org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType)5 ApplicationDeploymentDescription (org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription)2 URIException (org.apache.commons.httpclient.URIException)2 XmlObject (org.apache.xmlbeans.XmlObject)2 CreationFlagEnumeration (org.ggf.schemas.jsdl.x2005.x11.jsdl.CreationFlagEnumeration)2 DataStagingType (org.ggf.schemas.jsdl.x2005.x11.jsdl.DataStagingType)2 JobDescriptionType (org.ggf.schemas.jsdl.x2005.x11.jsdl.JobDescriptionType)2 JSchException (com.jcraft.jsch.JSchException)1 ActivityClient (de.fzj.unicore.bes.client.ActivityClient)1 FactoryClient (de.fzj.unicore.bes.client.FactoryClient)1 StorageClient (de.fzj.unicore.uas.client.StorageClient)1 ResourceRequestDocument (eu.unicore.jsdl.extensions.ResourceRequestDocument)1 ResourceRequestType (eu.unicore.jsdl.extensions.ResourceRequestType)1 IOException (java.io.IOException)1