Esempio n. 1
0
  public ElementVerification verifyMessage(Profile p, Profile baseP, String id, String type) {
    ElementVerification evm = new ElementVerification(id, type);
    Message m = p.getMessages().findOne(id);

    for (SegmentRefOrGroup srog : m.getChildren()) {
      evm.addChildrenVerification(verifySegmentOrGroup(p, baseP, srog.getId(), srog.getType()));
    }
    return evm;
  }
Esempio n. 2
0
  private ElementVerification verifySegmentRef(SegmentRefOrGroup srog) {
    String result = "";
    ElementVerification evsrog = new ElementVerification(srog.getId(), srog.getType());
    ElementVerificationResult evsrogRst =
        new ElementVerificationResult("usage", srog.getUsage().value(), result);
    evsrog.addElementVerifications(evsrogRst);

    result =
        this.validateChangeCardinality(
            String.valueOf(srog.getMin()), srog.getMax(), srog.getUsage());
    evsrogRst = new ElementVerificationResult("min", String.valueOf(srog.getMin()), result);
    evsrog.addElementVerifications(evsrogRst);

    result =
        this.validateChangeCardinality(
            String.valueOf(srog.getMin()), srog.getMax(), srog.getUsage());
    evsrogRst = new ElementVerificationResult("max", String.valueOf(srog.getMax()), result);
    evsrog.addElementVerifications(evsrogRst);

    return evsrog;
  }