本文整理了Java中org.geoserver.config.util.XStreamServiceLoader.initialize()
方法的一些代码示例,展示了XStreamServiceLoader.initialize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XStreamServiceLoader.initialize()
方法的具体详情如下:
包路径:org.geoserver.config.util.XStreamServiceLoader
类名称:XStreamServiceLoader
方法名:initialize
[英]Fills in the blanks of the service object loaded by XStream. This implementation makes sure all collections in ServiceInfoImpl are initialized, subclasses should override to add more specific initializations (such as the actual supported versions and so on)
[中]填充XStream加载的服务对象的空格。此实现确保ServiceInfoImpl中的所有集合都已初始化,子类应重写以添加更具体的初始化(例如实际支持的版本等)
代码示例来源:origin: geoserver/geoserver
/**
* Fills in all the bits that are normally not loaded automatically by XStream, such as empty
* collections
*
* @param info
*/
public void initializeService(ServiceInfo info) {
initialize((T) info);
}
代码示例来源:origin: geoserver/geoserver
@Override
protected WCSInfo initialize(WCSInfo service) {
super.initialize(service);
if (service.getExceptionFormats() == null) {
((WCSInfoImpl) service).setExceptionFormats(new ArrayList<String>());
}
if (service.getVersions().isEmpty()) {
service.getVersions().add(new Version("1.0.0"));
service.getVersions().add(new Version("1.1.1"));
}
Version v201 = new Version("2.0.1");
if (!service.getVersions().contains(v201)) {
service.getVersions().add(v201);
}
if (service.getSRS() == null) {
((WCSInfoImpl) service).setSRS(new ArrayList<String>());
}
return service;
}
}
代码示例来源:origin: geoserver/geoserver
public final T load(GeoServer gs, Resource directory) throws Exception {
// look for file matching classname
Resource file;
if (Resources.exists(file = directory.get(getFilename()))) {
// xstream it in
try (BufferedInputStream in = new BufferedInputStream(file.in())) {
XStreamPersister xp = xpf.createXMLPersister();
initXStreamPersister(xp, gs);
return initialize(xp.load(in, getServiceClass()));
}
} else {
// create an 'empty' object
ServiceInfo service = createServiceFromScratch(gs);
return initialize((T) service);
}
}
代码示例来源:origin: org.geoserver.community/gs-oseo-core
@Override
protected OSEOInfo initialize(OSEOInfo service) {
super.initialize(service);
if (!service.getVersions().contains(OSEOInfo.VERSION_1_0_0)) {
service.getVersions().add(OSEOInfo.VERSION_1_0_0);
}
return service;
}
}
代码示例来源:origin: org.geoserver/gs-wms
@Override
protected WMSInfo initialize(WMSInfo service) {
super.initialize(service);
final Version version_1_1_1 = WMS.VERSION_1_1_1;
final Version version_1_3_0 = WMS.VERSION_1_3_0;
if (!service.getVersions().contains(version_1_1_1)) {
service.getVersions().add(version_1_1_1);
}
if (!service.getVersions().contains(version_1_3_0)) {
service.getVersions().add(version_1_3_0);
}
if (service.getSRS() == null) {
((WMSInfoImpl) service).setSRS(new ArrayList<String>());
}
if (service.getGetFeatureInfoMimeTypes() == null) {
((WMSInfoImpl) service).setGetFeatureInfoMimeTypes(new HashSet<String>());
}
if (service.getGetMapMimeTypes() == null) {
((WMSInfoImpl) service).setGetMapMimeTypes(new HashSet<String>());
}
if (service.getInterpolation() == null) {
service.setInterpolation(WMSInterpolation.Nearest);
}
return service;
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected WFSInfo initialize(WFSInfo service) {
super.initialize(service);
if (service.getVersions().isEmpty()) {
service.getVersions().add(WFSInfo.Version.V_10.getVersion());
代码示例来源:origin: org.geoserver/gs-gwc
@Override
protected WMTSInfo initialize(WMTSInfo service) {
service = super.initialize(service);
if (service.getMaintainer() == null) {
service.setMaintainer("http://geoserver.org/com");
}
if (service.getOnlineResource() == null) {
service.setOnlineResource("http://geoserver.org");
}
if (service.getTitle() == null) {
service.setTitle("GeoServer Web Map Tile Service");
}
if (service.getAbstract() == null) {
service.setAbstract("A compliant implementation of WMTS service.");
}
if (service.getFees() == null) {
service.setFees("NONE");
}
if (service.getAccessConstraints() == null) {
service.setAccessConstraints("NONE");
}
if (service.getVersions() == null || service.getVersions().isEmpty()) {
service.getVersions().add(new Version("1.0.0"));
}
return service;
}
}
内容来源于网络,如有侵权,请联系作者删除!