use of org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType in project airavata by apache.
the class JSDLUtils method getHPCProfileApplication.
public static HPCProfileApplicationType getHPCProfileApplication(JobDefinitionType value) {
if (value != null && value.getJobDescription() != null && value.getJobDescription().isSetApplication()) {
XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
if (acursor.toFirstChild()) {
do {
if (acursor.getName().equals(HPC_PROFILE_APPLICATION)) {
XmlObject result = acursor.getObject();
acursor.dispose();
return (HPCProfileApplicationType) result;
}
} while (acursor.toNextSibling());
acursor.dispose();
return null;
} else {
acursor.dispose();
return null;
}
} else {
return null;
}
}
use of org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType 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.x2006.x07.jsdlHpcpa.HPCProfileApplicationType in project airavata by apache.
the class JSDLUtils method getHPCProfileApplication.
public static HPCProfileApplicationType getHPCProfileApplication(JobDefinitionType value) {
if (value != null && value.getJobDescription() != null && value.getJobDescription().isSetApplication()) {
XmlCursor acursor = value.getJobDescription().getApplication().newCursor();
if (acursor.toFirstChild()) {
do {
if (acursor.getName().equals(HPC_PROFILE_APPLICATION)) {
XmlObject result = acursor.getObject();
acursor.dispose();
return (HPCProfileApplicationType) result;
}
} while (acursor.toNextSibling());
acursor.dispose();
return null;
} else {
acursor.dispose();
return null;
}
} else {
return null;
}
}
use of org.ggf.schemas.jsdl.x2006.x07.jsdlHpcpa.HPCProfileApplicationType 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);
}
Aggregations