org.geotools.util.factory.GeoTools.getBuildRevision()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(186)

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

GeoTools.getBuildRevision介绍

[英]Reports back the vcs revision at which the version of GeoTools was built.
[中]报告生成GeoTools版本时的vcs版本。

代码示例

代码示例来源:origin: geotools/geotools

  1. public String newRequestHandle(WFSOperationType operation) {
  2. StringBuilder handle =
  3. new StringBuilder("GeoTools ")
  4. .append(GeoTools.getVersion())
  5. .append("(")
  6. .append(GeoTools.getBuildRevision())
  7. .append(") WFS ")
  8. .append(getVersion())
  9. .append(" DataStore @");
  10. try {
  11. handle.append(InetAddress.getLocalHost().getHostName());
  12. } catch (Exception ignore) {
  13. handle.append("<uknown host>");
  14. }
  15. AtomicLong reqHandleSeq = requestHandleSequences.get(operation);
  16. handle.append('#').append(reqHandleSeq.incrementAndGet());
  17. return handle.toString();
  18. }

代码示例来源:origin: geotools/geotools

  1. /**
  2. * Returns summary information about the GeoTools version and the host environment.
  3. *
  4. * @return information as a String
  5. */
  6. public static String getEnvironmentInfo() {
  7. final String newline = String.format("%n");
  8. final StringBuilder sb = new StringBuilder();
  9. sb.append("GeoTools version ").append(getVersion().toString());
  10. if (sb.toString().endsWith("SNAPSHOT")) {
  11. sb.append(" (built from r").append(getBuildRevision().toString()).append(")");
  12. }
  13. sb.append(newline).append("Java version: ");
  14. sb.append(System.getProperty("java.version"));
  15. sb.append(newline).append("Operating system: ");
  16. sb.append(System.getProperty("os.name"))
  17. .append(' ')
  18. .append(System.getProperty("os.version"));
  19. return sb.toString();
  20. }

相关文章