Package uk.ac.bbsrc.tgac.miso.core.data.impl

Examples of uk.ac.bbsrc.tgac.miso.core.data.impl.StatusImpl


@DiscriminatorValue("Solid")
public class SolidRun extends RunImpl {

  public SolidRun() {
    setPlatformType(PlatformType.SOLID);
    setStatus(new StatusImpl());
    setSecurityProfile(new SecurityProfile());
  }
View Full Code Here


    setSecurityProfile(new SecurityProfile());
  }

  public SolidRun(User user) {
    setPlatformType(PlatformType.SOLID);
    setStatus(new StatusImpl());
    setSecurityProfile(new SecurityProfile(user));
  }
View Full Code Here

@DiscriminatorValue("LS454")
public class LS454Run extends RunImpl {

  public LS454Run() {
    setPlatformType(PlatformType.LS454);
    setStatus(new StatusImpl());
  }
View Full Code Here

    setStatus(new StatusImpl());
  }

  public LS454Run(User user) {
    setPlatformType(PlatformType.LS454);
    setStatus(new StatusImpl());
    setSecurityProfile(new SecurityProfile(user));
  }
View Full Code Here

@DiscriminatorValue("Illumina")
public class IlluminaRun extends RunImpl {

  public IlluminaRun() {
    setPlatformType(PlatformType.ILLUMINA);
    setStatus(new StatusImpl());
    setSecurityProfile(new SecurityProfile());
  }
View Full Code Here

    }
  }

  public IlluminaRun(User user) {
    setPlatformType(PlatformType.ILLUMINA);
    setStatus(new StatusImpl());
    setSecurityProfile(new SecurityProfile(user));
  }
View Full Code Here

    foo.setResponderServices(responders);
    r.addListener(foo);

    log.info("Attempting to set status from "+r.getStatus().getHealth().getKey()+" to Unknown");
    Status s = new StatusImpl();
    s.setHealth(HealthType.Unknown);
    r.setStatus(s);

    log.info("Attempting to set status from "+r.getStatus().getHealth().getKey()+" to Started");
    s = new StatusImpl();
    s.setHealth(HealthType.Started);
    r.setStatus(s);

    log.info("Attempting to set status from "+r.getStatus().getHealth().getKey()+" to Stopped");
    s = new StatusImpl();
    s.setHealth(HealthType.Stopped);
    r.setStatus(s);

    log.info("Attempting to set status from "+r.getStatus().getHealth().getKey()+" to Failed");
    s = new StatusImpl();
    s.setHealth(HealthType.Failed);
    r.setStatus(s);

    log.info("Attempting to set status from "+r.getStatus().getHealth().getKey()+" to Completed");
    s = new StatusImpl();
    s.setHealth(HealthType.Completed);
    r.setStatus(s);

    log.info("Unregistering listeners");
    r.removeListener(foo);
  }
View Full Code Here

    if (response != null && response.has("response")) {
      JSONArray a = response.getJSONArray("response");
      for (JSONObject j : (Iterable<JSONObject>) a) {
        if (j.has("file") && j.has("xml")) {
          try {
            StatusImpl status = new StatusImpl();
            if (j.has("complete") && j.getString("complete").equals("true")) {
              status.setHealth(HealthType.Completed);
            }
            else {
              status.setHealth(HealthType.Running);
            }

            Document statusDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
            SubmissionUtils.transform(new UnicodeReader(j.getString("xml")), statusDoc);
            String runStarted = statusDoc.getElementsByTagName("RunStarted").item(0).getTextContent();
            status.setStartDate(new SimpleDateFormat("EEEE, MMMMM dd, yyyy h:mm aaa").parse(runStarted));
            status.setInstrumentName(statusDoc.getElementsByTagName("InstrumentName").item(0).getTextContent());
            status.setRunName(statusDoc.getElementsByTagName("RunName").item(0).getTextContent());
            s.add(status);
          }
          catch (ParserConfigurationException e) {
            e.printStackTrace();
            throw new InterrogationException(e.getMessage());
View Full Code Here

      if (response != null && response.has("response")) {
        JSONArray a = response.getJSONArray("response");
        if (a.iterator().hasNext()) {
          JSONObject j = (JSONObject) a.iterator().next();
          if (j.has("file") && j.has("xml")) {
            StatusImpl status = new StatusImpl();
            if (j.has("complete") && j.getString("complete").equals("true")) {
              status.setHealth(HealthType.Completed);
            }
            else {
              status.setHealth(HealthType.Running);
            }

            Document statusDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
            SubmissionUtils.transform(new UnicodeReader(j.getString("xml")), statusDoc);
            String runStarted = statusDoc.getElementsByTagName("RunStarted").item(0).getTextContent();
            status.setStartDate(new SimpleDateFormat("EEEE, MMMMM dd, yyyy h:mm aaa").parse(runStarted));
            status.setInstrumentName(statusDoc.getElementsByTagName("InstrumentName").item(0).getTextContent());
            status.setRunName(runName);
            return status;
          }
        }
      }
    }
View Full Code Here

    if (response != null && response.has("response")) {
      JSONArray a = response.getJSONArray("response");
      for (JSONObject j : (Iterable<JSONObject>) a) {
        if (j.has("file") && j.has("xml")) {
          try {
            StatusImpl status = new StatusImpl();
            if (j.has("complete") && j.getString("complete").equals("true")) {
              status.setHealth(HealthType.Completed);
            }
            else {
              status.setHealth(HealthType.Running);
            }

            Document statusDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
            SubmissionUtils.transform(new UnicodeReader(j.getString("xml")), statusDoc);
            String runStarted = statusDoc.getElementsByTagName("date").item(0).getTextContent();
            status.setStartDate(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(runStarted));
            status.setInstrumentName(statusDoc.getElementsByTagName("serialNumber").item(0).getTextContent());
            Node n = statusDoc.getElementsByTagName("run").item(0);
            for (int i = 0; i < n.getChildNodes().getLength(); i++) {
              Node child = n.getChildNodes().item(i);
              if(child instanceof Element && ((Element) child).getTagName().equals("id")) {
                status.setRunName(child.getTextContent());
              }
            }
            s.add(status);
          }
          catch (ParserConfigurationException e) {
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.data.impl.StatusImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.