Пример #1
0
 /**
  * Convert jobs to names.
  *
  * @param jobs the jobs
  * @return the list
  */
 private List<String> convertJobsToNames(List<Job> jobs) {
   List<String> names = new ArrayList<String>();
   for (Job j : jobs) {
     names.add(j.getName());
   }
   return names;
 }
Пример #2
0
 private String getTableJobId(Job j) {
   String id = j.getName().replace(".", "-");
   Job job = j;
   while ((job = job.getDependency()) != null) {
     id = job.getName().replace(".", "-") + "." + id;
   }
   return id;
 }
Пример #3
0
 /**
  * Find top level jobs.
  *
  * @param unittype the unittype
  * @return the list
  */
 private List<Job> findTopLevelJobs(Unittype unittype) {
   Job[] jobs = unittype.getJobs().getJobs();
   List<Job> topLevel = new ArrayList<Job>();
   for (Job j : jobs) {
     if (j.getDependency() == null) topLevel.add(j);
   }
   return topLevel;
 }
Пример #4
0
 /**
  * Gets the children.
  *
  * @param j the j
  * @return the children
  */
 private List<Job> getChildren(Job j) {
   List<Job> jobs = j.getChildren();
   return jobs;
 }