org.opengis.coverage.grid.Format.getDescription()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(184)

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

Format.getDescription介绍

[英]Description of the file format. If no description, the value will be null.
[中]文件格式的说明。如果没有说明,则该值将为空。

代码示例

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

@Override
  public String getDescription() {
    return delegateFormat.getDescription();
  }
};

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

/**
 * Returns the descriptions for the available DataFormats.
 *
 * <p>Arrrg! Put these in the select box.
 *
 * @return Descriptions for user to choose from
 */
public static List listDataFormatsDescriptions() {
  List list = new ArrayList();
  Format[] formats = GridFormatFinder.getFormatArray();
  final int length = formats.length;
  for (int i = 0; i < length; i++) {
    if (!list.contains(formats[i].getDescription())) {
      list.add(formats[i].getDescription());
    }
  }
  return Collections.synchronizedList(list);
}

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

/**
 * After user has selected Description can aquire Format based on description.
 *
 * @param description
 */
public static Format aquireFactory(String description) {
  Format[] formats = GridFormatFinder.getFormatArray();
  Format format = null;
  final int length = formats.length;
  for (int i = 0; i < length; i++) {
    format = formats[i];
    if (format.getDescription().equals(description)) {
      return format;
    }
  }
  return null;
}

代码示例来源:origin: org.geoserver.web/web-core

@Override
  protected void populateItem(ListItem item) {
    final String coverageFactoryName = item.getDefaultModelObjectAsString();
    final Map<String, Format> coverages = getAvailableCoverageStores();
    Format format = coverages.get(coverageFactoryName);
    final String description = format.getDescription();
    SubmitLink link;
    link = new SubmitLink("resourcelink") {
      @Override
      public void onSubmit() {
        setResponsePage(new CoverageStoreNewPage(coverageFactoryName));
      }
    };
    link.setEnabled(thereAreWorkspaces);
    link.add(new Label("resourcelabel", coverageFactoryName));
    item.add(link);
    item.add(new Label("resourceDescription", description));
    Image icon = new Image("storeIcon", icons.getStoreIcon(format.getClass()));
    // TODO: icons could provide a description too to be used in alt=...
    icon.add(new AttributeModifier("alt", true, new Model("")));
    item.add(icon);
  }
};

代码示例来源:origin: org.geoserver.web/gs-web-core

@Override
  protected void populateItem(ListItem item) {
    final String coverageFactoryName = item.getDefaultModelObjectAsString();
    final Map<String, Format> coverages = getAvailableCoverageStores();
    Format format = coverages.get(coverageFactoryName);
    final String description = format.getDescription();
    SubmitLink link;
    link =
        new SubmitLink("resourcelink") {
          @Override
          public void onSubmit() {
            setResponsePage(
                new CoverageStoreNewPage(coverageFactoryName));
          }
        };
    link.setEnabled(thereAreWorkspaces);
    link.add(new Label("resourcelabel", coverageFactoryName));
    item.add(link);
    item.add(new Label("resourceDescription", description));
    Image icon = new Image("storeIcon", icons.getStoreIcon(format.getClass()));
    // TODO: icons could provide a description too to be used in alt=...
    icon.add(new AttributeModifier("alt", new Model("")));
    item.add(icon);
  }
};

相关文章