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);
}
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()));
}
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());
}
}
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);
}
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);
}
Aggregations