本文整理了Java中org.geoserver.catalog.Keyword.setLanguage()
方法的一些代码示例,展示了Keyword.setLanguage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Keyword.setLanguage()
方法的具体详情如下:
包路径:org.geoserver.catalog.Keyword
类名称:Keyword
方法名:setLanguage
暂无
代码示例来源:origin: geoserver/geoserver
/**
* Helper method that adds some tests keywords to a layer group. The provided layer group name
* should not be NULL, if the layer group cannot be found an exception will be throw.
*/
protected void addKeywordsToLayerGroup(String layerGroupName) {
// create a list of keywords
List<KeywordInfo> keywords = new ArrayList<>();
Keyword keyword1 = new Keyword("keyword1");
keyword1.setLanguage("en");
keyword1.setVocabulary("vocabulary1");
keywords.add(keyword1);
Keyword keyword2 = new Keyword("keyword2");
keyword2.setLanguage("pt");
keyword2.setVocabulary("vocabulary2");
keywords.add(keyword2);
// add keywords to a layer group
LayerGroupInfo layerGroup = getCatalog().getLayerGroupByName(layerGroupName);
if (layerGroup == null) {
// targeted layer group doesn't exists
throw new RuntimeException(
String.format("Layer group '%s' doesn't exists.", layerGroupName));
}
layerGroup.getKeywords().addAll(keywords);
getCatalog().save(layerGroup);
}
代码示例来源:origin: org.geoserver/gs-restconfig
keyword1.setLanguage("en");
keyword1.setVocabulary("vocabulary1");
Keyword keyword2 = new Keyword("keyword2");
keyword2.setLanguage("pt");
keyword2.setVocabulary("vocabulary2");
代码示例来源:origin: org.geoserver/gs-restconfig
keyword1.setLanguage("en");
keyword1.setVocabulary("vocabulary1");
Keyword keyword2 = new Keyword("keyword2");
keyword2.setLanguage("pt");
keyword2.setVocabulary("vocabulary2");
内容来源于网络,如有侵权,请联系作者删除!