gpt4 book ai didi

com.ja.yuml.render.remote.YumlRemoteRenderer类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 15:24:31 28 4
gpt4 key购买 nike

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

YumlRemoteRenderer介绍

暂无

代码示例

代码示例来源:origin: com.java-adventures.yuml/yuml-remote-renderer

public String createUrl(String model, Style style, Direction direction) {
  return createUrl(model, DiagramType.detect(model), style, direction);
}

代码示例来源:origin: com.java-adventures.smarkdown/smarkdown-yuml

String url = null;
if (diagramType == null) {
  url = new YumlRemoteRenderer().createUrl(yumlDsl.toString(),
      style, direction);
} else {
  url = new YumlRemoteRenderer().createUrl(yumlDsl.toString(),
      diagramType, style, direction);

代码示例来源:origin: com.java-adventures.yuml/yuml-remote-renderer

public YumlImage render(String model, Style style, Direction direction) {
  try {
    String url = String.format("%s/diagram/%s;dir:%s/class/", baseUrl,
        style.toYuml(), direction.toYuml());
    HttpClient client = new HttpClient();
    String proxyHost = System.getProperty("http.proxyHost");
    String proxyPort = System.getProperty("http.proxyPort");
    if (StringUtils.isNotBlank(proxyHost)
        && StringUtils.isNotBlank(proxyPort)) {
      client.getHostConfiguration().setProxy(proxyHost,
          Integer.parseInt(proxyPort));
    }
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put("dls_text", prepareDsl(model));
    Map<String, String> config = new HashMap<>();
    YumlAccessor connector = getConnector(config);
    log.info("posting to url={}", url);
    String imgName = connector.post(url, parameters);
    log.info("created img name={}", imgName);
    String imgUrl = String.format("%s/%s", baseUrl, imgName);
    log.debug("imgUrl={}", imgUrl);
    InputStream imgData = connector.getData(imgUrl);
    return new YumlImage(imgUrl, imgData);
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: com.java-adventures.yuml/yuml-remote-renderer

public String createUrl(String model, DiagramType diagramType,  Style style, Direction direction) {
  String dsl = prepareDsl(model);
  return String.format("%s/diagram/%s;dir:%s/%s/%s", baseUrl,
      style.toYuml(), direction.toYuml(), diagramType.toYumlName(), dsl);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com