Beispiel #1
0
  public XMLBinding() throws XMLBindingException {
    try {
      TerminologyService termServ = SimpleTerminologyService.getInstance();
      MeasurementService measureServ = SimpleMeasurementService.getInstance();

      Map<SystemValue, Object> values = new HashMap<SystemValue, Object>();
      values.put(SystemValue.TERMINOLOGY_SERVICE, termServ);
      values.put(SystemValue.MEASUREMENT_SERVICE, measureServ);
      builder = new RMObjectBuilder(values);

    } catch (Exception e) {
      e.printStackTrace();
      throw new RuntimeException("failed to start DADLBinding..");
    }
  }
  /**
   * Default constructor starting the XML-binding using the following system values
   *
   * <ul>
   *   <li>TERMINOLOGY_SERVICE = an instance of SimpleTerminologyService
   *   <li>MEASUREMENT_SERVICE = an instance of SimpleMeasurementService
   *   <li>TERMINOLOGY_SERVICE = an instance of CodePhrase("IANA_character-sets", "UTF-8");
   * </ul>
   */
  public XMLBinding() throws XMLBindingException {
    try {
      TerminologyService termServ = SimpleTerminologyService.getInstance();
      MeasurementService measureServ = SimpleMeasurementService.getInstance();
      CodePhrase charset = new CodePhrase("IANA_character-sets", "UTF-8");

      Map<SystemValue, Object> values = new HashMap<SystemValue, Object>();
      values.put(SystemValue.TERMINOLOGY_SERVICE, termServ);
      values.put(SystemValue.MEASUREMENT_SERVICE, measureServ);
      values.put(SystemValue.CHARSET, charset);
      init(values);

    } catch (Exception e) {
      e.printStackTrace();
      throw new RuntimeException("failed to start XMLBinding..");
    }
  }