use of org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType in project airavata by apache.
the class JSDLUtils method getSPMDApplication.
public static SPMDApplicationType getSPMDApplication(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(SPMD_APPLICATION)) {
XmlObject result = acursor.getObject();
acursor.dispose();
return (SPMDApplicationType) result;
}
} while (acursor.toNextSibling());
acursor.dispose();
return null;
} else {
acursor.dispose();
return null;
}
} else {
return null;
}
}
use of org.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType 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.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType 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.ogf.schemas.jsdl.x2007.x02.jsdlSpmd.SPMDApplicationType in project airavata by apache.
the class JSDLUtils method getSPMDApplication.
public static SPMDApplicationType getSPMDApplication(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(SPMD_APPLICATION)) {
XmlObject result = acursor.getObject();
acursor.dispose();
return (SPMDApplicationType) result;
}
} while (acursor.toNextSibling());
acursor.dispose();
return null;
} else {
acursor.dispose();
return null;
}
} else {
return null;
}
}
Aggregations