public WMTSService(ServiceIdentificationType serviceType) { serviceType.getTitle().isEmpty() ? "N/A" : ((LanguageStringType) serviceType.getTitle().get(0)).getValue(); setTitle(title); setName(serviceType.getServiceType().getValue()); for (Object line : serviceType.getAbstract()) { if (line instanceof LanguageStringType) { sb.append(((LanguageStringType) line).getValue()); for (Object okti : serviceType.getKeywords()) { KeywordsTypeImpl kti = (KeywordsTypeImpl) okti; for (Object olsti : kti.getKeyword()) {
si.getTitle().add(Ows11Util.languageString(wps.getTitle())); si.getAbstract().add(Ows11Util.languageString(wps.getAbstract())); si.getKeywords().add(kw); si.setServiceType(Ows11Util.code("WPS")); si.getServiceTypeVersion().add("1.0.0"); si.setFees(wps.getFees()); si.getAccessConstraints().add(wps.getAccessConstraints());
public WMTSService(ServiceIdentificationType serviceType) { String title = serviceType.getTitle().isEmpty() ? "N/A" : ((LanguageStringType) serviceType.getTitle().get(0)).getValue(); setTitle(title); setName(serviceType.getServiceType().getValue()); List<String> retList = new ArrayList<>(); for (Object okti : serviceType.getKeywords()) { KeywordsTypeImpl kti = (KeywordsTypeImpl) okti; for (Object olsti : kti.getKeyword()) { LanguageStringTypeImpl lsti = (LanguageStringTypeImpl) olsti; retList.add(lsti.getValue()); } } setKeywordList(retList.toArray(new String[retList.size()])); } }
/** @see ServiceInfo#getTitle() */ public String getTitle() { ServiceIdentificationType serviceIdentification = capabilities.getServiceIdentification(); if (serviceIdentification == null || serviceIdentification.getTitle() == null || serviceIdentification.getTitle().isEmpty()) { return null; } return ((LanguageStringType) serviceIdentification.getTitle().get(0)).getValue(); }
/** * Maps to the capabilities' service identification abstract * * @see ServiceInfo#getDescription() */ public String getDescription() { ServiceIdentificationType serviceIdentification = capabilities.getServiceIdentification(); if (serviceIdentification == null) { return null; } // The Abstract is of Type LanguageStringType, not String. StringBuilder sb = new StringBuilder(); for (Object line : serviceIdentification.getAbstract()) { if (line instanceof LanguageStringType) { sb.append(((LanguageStringType) line).getValue()); } else { sb.append(line); } } // end of for return sb.toString(); }
/** * Maps to the capabilities' service identification keywords list * * @see ServiceInfo#getDescription() */ public Set<String> getKeywords() { Set<String> kws = new HashSet<String>(); ServiceIdentificationType serviceIdentification = capabilities.getServiceIdentification(); if (serviceIdentification != null) { @SuppressWarnings("unchecked") List<KeywordsType> keywords = serviceIdentification.getKeywords(); if (keywords != null) { for (KeywordsType k : keywords) { for (LanguageStringType s : (List<LanguageStringType>) k.getKeyword()) { kws.add(s.getValue()); } } kws.remove(null); } } return kws; }
caps = capabilities; setService(new WMTSService(caps.getServiceIdentification())); setVersion(caps.getServiceIdentification().getServiceTypeVersion().toString()); ContentsType contents = caps.getContents();
caps.setServiceIdentification(si); si.getTitle().add(Ows11Util.languageString(wps.getTitle())); si.getAbstract().add(Ows11Util.languageString(wps.getAbstract())); si.getKeywords().add(kw); si.setServiceType(Ows11Util.code("WPS")); si.getServiceTypeVersion().add("1.0.0"); si.setFees(wps.getFees()); si.getAccessConstraints().add(wps.getAccessConstraints());
/** @see ServiceInfo#getTitle() */ public String getTitle() { ServiceIdentificationType serviceIdentification = capabilities.getServiceIdentification(); if (serviceIdentification == null || serviceIdentification.getTitle() == null || serviceIdentification.getTitle().isEmpty()) { return null; } return String.valueOf(serviceIdentification.getTitle().get(0)); }
/** * Maps to the capabilities' service identification abstract * * @see ServiceInfo#getDescription() */ public String getDescription() { ServiceIdentificationType serviceIdentification = capabilities.getServiceIdentification(); if (serviceIdentification == null) { return null; } @SuppressWarnings("unchecked") List<String> abs = serviceIdentification.getAbstract(); return abs == null || abs.isEmpty() ? null : abs.get(0); }
/** * Maps to the capabilities' service identification keywords list * * @see ServiceInfo#getDescription() */ public Set<String> getKeywords() { Set<String> kws = new HashSet<String>(); ServiceIdentificationType serviceIdentification = capabilities.getServiceIdentification(); if (serviceIdentification != null) { @SuppressWarnings("unchecked") List<KeywordsType> keywords = serviceIdentification.getKeywords(); if (keywords != null) { for (KeywordsType k : keywords) { for (LanguageStringType s : (List<LanguageStringType>) k.getKeyword()) { kws.add(s.getValue()); } } kws.remove(null); } } return kws; }
caps = capabilities; setService(new WMTSService(caps.getServiceIdentification())); setVersion(caps.getServiceIdentification().getServiceTypeVersion().get(0).toString()); ContentsType contents = caps.getContents();