本文整理了Java中com.ja.yuml.render.remote.YumlRemoteRenderer
类的一些代码示例,展示了YumlRemoteRenderer
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YumlRemoteRenderer
类的具体详情如下:
包路径:com.ja.yuml.render.remote.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);
}
内容来源于网络,如有侵权,请联系作者删除!