Esempio n. 1
0
  /**
   * Transforms a {@link EbXMLClassification} to a {@link Code} instance.
   *
   * @param classification {@link EbXMLClassification}. Can be <code>null</code>.
   * @return the code instance. <code>null</code> if the input was <code>null</code>.
   */
  public Code fromEbXML(EbXMLClassification classification) {
    if (classification == null) {
      return null;
    }

    Code code = new Code();
    code.setCode(classification.getNodeRepresentation());
    code.setDisplayName(classification.getName());

    List<String> slotValues = classification.getSlotValues(SLOT_NAME_CODING_SCHEME);
    if (slotValues.size() > 0) {
      code.setSchemeName(slotValues.get(0));
    }

    return code;
  }