Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.XmlTree


    Document doc = MonadUtils.newSourceDocument();
    Element source = doc.getDocumentElement();
    Element processElement = toXml(doc);
    source.appendChild(processElement);
    processElement.appendChild(getBatch().toXml(doc,
        new XmlTree("contract", new XmlTree("party"))));
    inv.sendOk(doc);
  }
View Full Code Here


      Element successfulElement = doc.createElement("successful-bills");
      importElement.appendChild(successfulElement);
      for (Map<RawBill, String> billMap : failedBills) {
        for (Entry<RawBill, String> entry : billMap.entrySet()) {
          Element billRawElement = (Element) entry.getKey().toXml(
              doc, new XmlTree("registerReads").put("type"));
          failedElement.appendChild(billRawElement);
          billRawElement.appendChild(new MonadMessage(entry
              .getValue()).toXml(doc));
        }
      }
      for (RawBill billRaw : successfulBills) {
        successfulElement.appendChild(billRaw.toXml(doc, new XmlTree(
            "registerReads").put("type")));
      }
    }
    for (String message : messages) {
      importElement.appendChild(new MonadMessage(message).toXml(doc));
View Full Code Here

  @SuppressWarnings("unchecked")
  private Document document() throws HttpException {
    Document doc = MonadUtils.newSourceDocument();
    Element source = doc.getDocumentElement();
    source.appendChild((Element) toXml(doc, new XmlTree("party",
        new XmlTree("participant"))));
    for (Provider provider : (List<Provider>) Hiber
        .session()
        .createQuery(
            "from Provider provider where provider.role.code = :roleCode order by provider.name")
        .setCharacter("roleCode", MarketRole.SUPPLIER).list()) {
      source.appendChild(provider.toXml(doc, new XmlTree("participant")));
    }
    source.appendChild(new MonadDate().toXml(doc));
    source.appendChild(MonadDate.getMonthsXml(doc));
    source.appendChild(MonadDate.getDaysXml(doc));
    return doc;
View Full Code Here

    for (NonCoreContract contract : (List<NonCoreContract>) Hiber
        .session()
        .createQuery(
            "from NonCoreContract contract order by contract.finishRateScript.finishDate.date desc, contract.party.participant.code")
        .list()) {
      contractsElement.appendChild(contract.toXml(doc, new XmlTree(
          "party")));
    }
    for (Provider provider : (List<Provider>) Hiber
        .session()
        .createQuery(
            "from Provider provider where provider.role.code = 'Z' order by provider.participant.code, provider.name")
        .list()) {
      source.appendChild(provider.toXml(doc, new XmlTree("participant")));
    }
    source.appendChild(MonadDate.getMonthsXml(doc));
    source.appendChild(MonadDate.getDaysXml(doc));
    source.appendChild(MonadDate.getHoursXml(doc));
    source.appendChild(HhStartDate.getHhMinutesXml(doc));
View Full Code Here

  private Document document() throws HttpException {
    Document doc = MonadUtils.newSourceDocument();
    Element source = doc.getDocumentElement();
    Element scriptsElement = toXml(doc);
    source.appendChild(scriptsElement);
    scriptsElement.appendChild(contract.toXml(doc, new XmlTree("party")));
    for (RateScript script : (List<RateScript>) Hiber
        .session()
        .createQuery(
            "from RateScript script where script.contract = :contract order by script.startDate.date")
        .setEntity("contract", contract).list()) {
View Full Code Here

  @SuppressWarnings("unchecked")
  private Document document() throws HttpException {
    Document doc = MonadUtils.newSourceDocument();
    Element source = doc.getDocumentElement();
    source.appendChild(toXml(doc, new XmlTree("party", new XmlTree(
        "participant"))));
    for (Provider provider : (List<Provider>) Hiber
        .session()
        .createQuery(
            "from Provider provider where provider.role.code = :roleCode order by provider.name")
        .setCharacter("roleCode", MarketRole.NON_CORE_ROLE).list()) {
      source.appendChild(provider.toXml(doc, new XmlTree("participant")));
    }
    source.appendChild(MonadDate.getMonthsXml(doc));
    source.appendChild(MonadDate.getDaysXml(doc));
    source.appendChild(new MonadDate().toXml(doc));
    return doc;
View Full Code Here

    for (Provider provider : (List<Provider>) Hiber
        .session()
        .createQuery(
            "from Provider provider order by provider.participant.code, provider.role.code")
        .list()) {
      providersElement.appendChild(provider.toXml(doc, new XmlTree(
          "participant").put("role")));
    }
    inv.sendOk(doc);
  }
View Full Code Here

  }

  public void httpGet(Invocation inv) throws HttpException {
    Document doc = MonadUtils.newSourceDocument();
    Element source = doc.getDocumentElement();
    source.appendChild(toXml(doc, new XmlTree("tpr")));
    inv.sendOk(doc);
  }
View Full Code Here

    for (Llfc llfc : (List<Llfc>) Hiber
        .session()
        .createQuery(
            "from Llfc llfc where llfc.dno = :dno order by llfc.code")
        .setEntity("dno", dno).list()) {
      llfsElement.appendChild(llfc.toXml(doc, new XmlTree("voltageLevel")));
    }
    source.appendChild(MonadDate.getMonthsXml(doc));
    source.appendChild(MonadDate.getDaysXml(doc));
    source.appendChild(new MonadDate().toXml(doc));
    inv.sendOk(doc);
View Full Code Here

  }

  private Document document() throws HttpException {
    Document doc = MonadUtils.newSourceDocument();
    Element sourceElement = doc.getDocumentElement();
    sourceElement.appendChild(toXml(doc, new XmlTree("contract",
        new XmlTree("party"))));
    sourceElement.appendChild(MonadDate.getMonthsXml(doc));
    sourceElement.appendChild(MonadDate.getDaysXml(doc));
    sourceElement.appendChild(MonadDate.getHoursXml(doc));
    sourceElement.appendChild(HhStartDate.getHhMinutesXml(doc));
    sourceElement.appendChild(new MonadDate().toXml(doc));
View Full Code Here

TOP

Related Classes of net.sf.chellow.monad.XmlTree

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.