org.carewebframework.common.StrUtil.fromList()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.9k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.carewebframework.common.StrUtil.fromList()方法的一些代码示例,展示了StrUtil.fromList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StrUtil.fromList()方法的具体详情如下:
包路径:org.carewebframework.common.StrUtil
类名称:StrUtil
方法名:fromList

StrUtil.fromList介绍

[英]Builds a newline-delimited string from a list.
[中]从列表中生成以换行符分隔的字符串。

代码示例

代码示例来源:origin: org.carewebframework/org.carewebframework.common

/**
 * Builds a delimited string from a list.
 * 
 * @param list The list of strings to concatenate.
 * @param delimiter The delimiter to use to separate elements.
 * @return A string contains the list of elements separated by the specified delimiter.
 */
public static String fromList(Iterable<?> list, String delimiter) {
  return fromList(list, delimiter, "");
}

代码示例来源:origin: org.carewebframework/org.carewebframework.common

/**
 * Builds a newline-delimited string from a list.
 * 
 * @param list The list of strings to concatenate.
 * @return A string contains the list of elements separated by the newline character.
 */
public static String fromList(Iterable<?> list) {
  return fromList(list, "\n");
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.core

@Override
public String getValue(String propertyName, String instanceName) {
  List<String> result = getValues(propertyName, instanceName);
  return result == null ? null : StrUtil.fromList(result);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.common

/**
 * Parses XML from a list of strings.
 *
 * @param xml String iterable containing valid XML.
 * @return XML document.
 * @throws Exception Unspecified exception.
 */
public static Document parseXMLFromList(Iterable<String> xml) throws Exception {
  return parseXMLFromString(StrUtil.fromList(xml));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.api

@Override
public void saveValues(String propertyName, String instanceName, boolean asGlobal, List<String> value) {
  saveValue(propertyName, instanceName, asGlobal, StrUtil.fromList(value));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.core

public String getValue() {
  fetch();
  return StrUtil.fromList(values);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.smart

@Override
  public Object handleAPI(Map<String, String> params) {
    List<String> data = VistAUtil.getBrokerSession().callRPCList("RGCWSMRT GET", null, params.get("record_id"), ztyp,
      "rdf");
    
    if (data.isEmpty()) {
      data.add("<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"/>");
    }
    
    return StrUtil.fromList(data);
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.core

@Override
public boolean execute() {
  List<String> greeting = VistAUtil.getBrokerSession().getPostLoginMessage();
  
  if (!greeting.isEmpty()) {
    CareWebUtil.showMessage(StrUtil.fromList(greeting));
  }
  
  return true;
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.core

/**
 * Logic to return detail information for specified item.
 *
 * @param data Source for detail information.
 * @return The detail information.
 */
protected String getDetail(T data) {
  String ien = getLogicalId(data);
  return detailRPC == null || ien == null || ien.isEmpty() ? null : fromList(getBroker().callRPCList(detailRPC, null,
    patient.getId().getIdPart(), ien));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.laborders

/**
 * Logic to return detail information for specified item.
 * 
 * @param data The item data.
 * @return The detail information.
 */
@Override
protected String getDetail(String data) {
  data = piece(data, U);
  return data.isEmpty() ? null : fromList(getBroker().callRPCList(detailRPC, null, patient.getId().getIdPart(), data,
    data));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.crises

/**
 * Logic to return detail information for specified item.
 * 
 * @param data The item data.
 * @return The detail information.
 */
@Override
protected String getDetail(String data) {
  String pcs[] = split(data, U, 2);
  char type = pcs[1].isEmpty() ? 0 : pcs[1].charAt(0);
  List<String> result = new ArrayList<String>();
  
  switch (type) {
    case 'A':
      getBroker().callRPCList("RGCWCACV DETAIL", result, patient.getId().getIdPart());
      break;
    
    case 'F':
      getBroker().callRPCList("RGCWCACV PRF", result, patient.getId().getIdPart(), pcs[0]);
      break;
    
    default:
      getBroker().callRPCList("TIU GET RECORD TEXT", result, pcs[0]);
      break;
  }
  
  return result.isEmpty() ? null : fromList(result);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.notification

/**
   * Creates a schedule notification. If the notification is replacing an existing one, the
   * existing one will be first deleted and a new one created in its place.
   * 
   * @param notification Notification to be scheduled.
   * @param message The associated message, if any.
   * @param recipients The target recipients.
   * @return True if the notification was successfully scheduled.
   */
  public boolean scheduleNotification(ScheduledNotification notification, List<String> message,
                    Collection<Recipient> recipients) {
    if (notification.getIen() > 0) {
      deleteScheduledNotification(notification);
    }
    
    String extraInfo = StrUtil.fromList(Arrays.asList(notification.getExtraInfo()), StrUtil.U);
    return broker.callRPCBool("RGCWXQ SCHALR", notification.getDeliveryDate(), scheduledPrefix,
      notification.getSubject(), extraInfo, message, prepareRecipients(recipients));
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.api.documents

if (doc.getBody() == null) {
  List<String> body = broker.callRPCList("TIU GET RECORD TEXT", null, doc.getId().getIdPart());
  doc.setBody(StrUtil.fromList(body));

代码示例来源:origin: org.carewebframework/org.carewebframework.common

String str = StrUtil.fromList(strList, ",");
assertEquals(original, str);
str = StrUtil.fromList(intList, ",");
assertEquals(original, str);
str = StrUtil.fromList(intList, ",");
assertEquals("1,2,,4,5", str);
str = StrUtil.fromList(intList, ",", null);
assertEquals("1,2,4,5", str);
str = StrUtil.fromList(intList, ",", "3");
assertEquals(original, str);
List<Object> iterList = new ArrayList<>();

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.security.impl

setFooterText(StrUtil.fromList(brokerSession.getPreLoginMessage()));
institutionChanged();

代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.core

@Override
protected void renderItem(Treeitem item, TreeNode<Object> treeNode) {
  Object data = treeNode.getData();
  Treerow treeRow = new Treerow();
  item.appendChild(treeRow);
  item.setOpen(false);
  item.addForward(Events.ON_DOUBLE_CLICK, item.getTree(), Events.ON_OK);
  
  if (data == null) {
    createCell(treeRow, "No matches found.").setSpan(3);
    item.setDisabled(true);
  } else if (data instanceof TermMatch) {
    TermMatch match = (TermMatch) data;
    createCell(treeRow, match.getTerm(TermType.PROBLEM).getTermText());
    createCell(treeRow, formatParentTerms(match.getParentTerms()));
    createCell(treeRow, StrUtil.fromList(Arrays.asList(match.getMappedICDs()), "\n"));
  } else if (data instanceof Term) {
    Term term = (Term) data;
    createCell(treeRow, term.getTermText()).setSpan(2);
    createCell(treeRow, WordUtils.capitalizeFully(term.getTermType().name()));
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification

/**
 * Process a single notification.
 * 
 * @param notification Notification to display.
 * @param message Optional message text to display. If null, the message text associated with
 *            the notification is displayed.
 */
public void process(Notification notification, String message) {
  if (notification != null) {
    this.notification = notification;
    lblHeader.setValue(notification.getSubject());
    txtMessage.setText(message != null ? message : StrUtil.fromList(service.getNotificationMessage(notification)));
    txtMessage.setVisible(!txtMessage.getText().isEmpty());
    btnDelete.setDisabled(!notification.canDelete());
    btnDeleteAll.setDisabled(notification.isActionable() || btnDelete.isDisabled());
    btnSkipAll.setDisabled(notification.isActionable());
    btnView.setDisabled(!notification.hasPatient());
    caption.setLabel(notification.hasPatient() ? notification.getPatientName() : defaultTitle);
    txtMessage.invalidate();
    root.setVisible(true);
  } else {
    onAction(null);
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification

txtMessage.setValue(StrUtil.fromList(service.getScheduledNotificationMessage(notification)));

相关文章