@Override public Set<String> getKeywords() { @SuppressWarnings("unchecked") List<KeywordsType> keywords = eType.getKeywords(); Set<String> ret; if (keywords == null) { ret = Collections.emptySet(); } else { ret = new HashSet<String>(); for (KeywordsType k : keywords) { @SuppressWarnings("unchecked") List<LanguageStringType> keyword = k.getKeyword(); for (LanguageStringType ls : keyword) { ret.add(ls.getValue()); } } ret.remove(null); } return ret; }
@Override public List<String> getOtherSRS() { return eType.getOtherCRS(); }
@Override public Set<String> getOutputFormats() { final OutputFormatListType outputFormats = eType.getOutputFormats(); if (null == outputFormats) { return Collections.emptySet(); } List<String> ftypeDeclaredFormats = outputFormats.getFormat(); if (null == ftypeDeclaredFormats || ftypeDeclaredFormats.isEmpty()) { return Collections.emptySet(); } return new HashSet<String>(ftypeDeclaredFormats); }
((FeatureTypeType) object).getOtherCRS().add(stringValue); return; kwd.getKeyword().add(kw); ((FeatureTypeType) object).getKeywords().add(kwd); return; OutputFormatListType oflt = ((FeatureTypeType) object).getOutputFormats(); ((FeatureTypeType) object).setOutputFormats(oflt); return;
public QName getQName() { return eType.getName(); }
@Override public String getDescription() { return eType.getAbstract() == null || eType.getAbstract().isEmpty() ? null : eType.getAbstract().get(0).getValue(); }
@Override public String getDefaultSRS() { return eType.getDefaultCRS(); }
@Override public ReferencedEnvelope getWGS84BoundingBox() { List<WGS84BoundingBoxType> bboxList = eType.getWGS84BoundingBox(); if (bboxList != null && bboxList.size() > 0) { WGS84BoundingBoxType bboxType = bboxList.get(0); @SuppressWarnings("unchecked") List<Double> lowerCorner = bboxType.getLowerCorner(); @SuppressWarnings("unchecked") List<Double> upperCorner = bboxType.getUpperCorner(); double minLon = (Double) lowerCorner.get(0); double minLat = (Double) lowerCorner.get(1); double maxLon = (Double) upperCorner.get(0); double maxLat = (Double) upperCorner.get(1); ReferencedEnvelope latLonBounds = new ReferencedEnvelope( minLon, maxLon, minLat, maxLat, DefaultGeographicCRS.WGS84); return latLonBounds; } return null; }
@Override public URI getSchema() { String namespaceURI = eType.getName().getNamespaceURI(); try { return XMLConstants.NULL_NS_URI.equals(namespaceURI) ? null : new URI(namespaceURI); } catch (URISyntaxException e) { return null; } }
@Override public String getAbstract() { StringBuffer sb = new StringBuffer(); for (Object a : eType.getAbstract()) { sb.append(a); sb.append(" "); } if (sb.length() > 0) { sb.setLength(sb.length() - 1); } return sb.toString(); } }
@Override public CoordinateReferenceSystem getCRS() { CoordinateReferenceSystem crs = null; String defaultSRS = eType.getDefaultCRS(); if (null != defaultSRS) { try { crs = CRS.decode(defaultSRS); } catch (Exception e) { java.util.logging.Logger.getGlobal().log(java.util.logging.Level.INFO, "", e); } } return crs; }
@Override public ReferencedEnvelope getWGS84BoundingBox() { List<WGS84BoundingBoxType> bboxList = eType.getWGS84BoundingBox(); if (bboxList != null && bboxList.size() > 0) { WGS84BoundingBoxType bboxType = bboxList.get(0); @SuppressWarnings("unchecked") List<Double> lowerCorner = bboxType.getLowerCorner(); @SuppressWarnings("unchecked") List<Double> upperCorner = bboxType.getUpperCorner(); double minLon = (Double) lowerCorner.get(0); double minLat = (Double) lowerCorner.get(1); double maxLon = (Double) upperCorner.get(0); double maxLat = (Double) upperCorner.get(1); ReferencedEnvelope latLonBounds = new ReferencedEnvelope( minLon, maxLon, minLat, maxLat, DefaultGeographicCRS.WGS84); return latLonBounds; } return null; }
@Override public Set<String> getOutputFormats() { final OutputFormatListType outputFormats = eType.getOutputFormats(); if (null == outputFormats) { return Collections.emptySet(); } List<String> ftypeDeclaredFormats = outputFormats.getFormat(); if (null == ftypeDeclaredFormats || ftypeDeclaredFormats.isEmpty()) { return Collections.emptySet(); } return new HashSet<String>(ftypeDeclaredFormats); }
@Override public String getName() { return config.localTypeName(eType.getName()); }
@Override public List<String> getOtherSRS() { return eType.getOtherCRS(); }
@Override public Set<String> getKeywords() { @SuppressWarnings("unchecked") List<KeywordsType> keywords = eType.getKeywords(); Set<String> ret; if (keywords == null) { ret = Collections.emptySet(); } else { ret = new HashSet<String>(); for (KeywordsType k : keywords) { @SuppressWarnings("unchecked") List<LanguageStringType> keyword = k.getKeyword(); for (LanguageStringType ls : keyword) { ret.add(ls.getValue()); } } ret.remove(null); } return ret; }
@Override public String getDescription() { return eType.getAbstract() == null || eType.getAbstract().isEmpty() ? null : eType.getAbstract().get(0).getValue(); }
@Override public String getDefaultSRS() { return eType.getDefaultCRS(); }