Search in sources :

Example 6 with POSIXApplicationType

use of org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.POSIXApplicationType 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)6 XmlCursor (org.apache.xmlbeans.XmlCursor)4 XmlObject (org.apache.xmlbeans.XmlObject)2 EnvironmentType (org.ggf.schemas.jsdl.x2005.x11.jsdlPosix.EnvironmentType)2 HPCProfileApplicationType (org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType)2 SPMDApplicationType (org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType)2 ApplicationType (org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType)1