/** * 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(); }
/** @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 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; }
/** * 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); }
/** @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 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; }