Exemplo n.º 1
0
  private void readVMdata(NamedNodeMap attr, VMForm vmdata, boolean readMore) {
    VM_Bean vm = vmdata.getVMBean();
    VM_Bean selvm = vmdata.getSelectVM();
    // validate the old vm first before reading the next vm data
    if (vm != null && !vm.getVM_LONG_NAME().equals("")) {
      // do the search;
      VMAction vmact = new VMAction();
      vmact.validateVMData(vmdata); // doChangeVM(vmdata);
    }
    if (readMore) {
      // reset the vm
      vm = new VM_Bean();
      selvm = new VM_Bean();
      // get teh next vm data
      for (int i = 0; i < attr.getLength(); i++) {
        String attName = attr.item(i).getNodeName();
        String attValue = attr.item(i).getNodeValue();

        if (attName != null && !attName.equals("")) {
          if (attName.equals("editvmname"))
            // vm.setVM_SHORT_MEANING(attValue);
            vm.setVM_LONG_NAME(attValue);
          else if (attName.equals("editvmlongname")) vm.setVM_LONG_NAME(attValue);
          else if (attName.equals("editvmdesc")) vm.setVM_PREFERRED_DEFINITION(attValue);
          else if (attName.equals("selvmname"))
            // selvm.setVM_SHORT_MEANING(attValue);
            selvm.setVM_LONG_NAME(attValue);
          else if (attName.equals("selvmlongname")) selvm.setVM_LONG_NAME(attValue);
          else if (attName.equals("selvmdesc")) selvm.setVM_PREFERRED_DEFINITION(attValue);
          else if (attName.equals("selvmidseq")) selvm.setVM_IDSEQ(attValue);
          else if (attName.equals("selvmcondr")) selvm.setVM_CONDR_IDSEQ(attValue);
        }
        // add the beans to data object
        vmdata.setVMBean(vm);
        vmdata.setSelectVM(selvm);
        //  logger.info(i + " Validating VM for " + vm.getVM_SHORT_MEANING() + " : desc : " +
        // vm.getVM_DESCRIPTION() + " conlist " + vm.getVM_CONCEPT_LIST().size());
      }
    }
  }
Exemplo n.º 2
0
  private void readConData(NamedNodeMap attr, VMForm data) {
    VM_Bean vm = data.getVMBean();
    EVS_Bean vmCon = new EVS_Bean();
    Vector<EVS_Bean> conList = vm.getVM_CONCEPT_LIST();
    for (int i = 0; i < attr.getLength(); i++) {
      // System.out.println(i + " ConAttr : " + attr.item(i).getNodeName() + " value " +
      // attr.item(i).getNodeValue());

      String attName = attr.item(i).getNodeName();
      String attValue = attr.item(i).getNodeValue();

      if (attName != null && !attName.equals("")) {
        if (attName.equals("conname")) vmCon.setLONG_NAME(attValue);
        else if (attName.equals("conid")) vmCon.setCONCEPT_IDENTIFIER(attValue);
        else if (attName.equals("condefn")) vmCon.setPREFERRED_DEFINITION(attValue);
        else if (attName.equals("condefnsrc")) vmCon.setEVS_DEF_SOURCE(attValue);
        else if (attName.equals("conorigin")) vmCon.setEVS_ORIGIN(attValue);
        else if (attName.equals("consrc")) vmCon.setEVS_CONCEPT_SOURCE(attValue);
        else if (attName.equals("conidseq")) vmCon.setIDSEQ(attValue);
      }
    }
    conList.addElement(vmCon);
    vm.setVM_CONCEPT_LIST(conList);
  }