public String name() { return ReaderUtils.getChildText(featureType, "name"); }
public String title() { return ReaderUtils.getChildText(featureType, "title"); }
public String name() { return ReaderUtils.getChildText(coverage, "name"); }
public String description() { return ReaderUtils.getChildText(coverage, "description"); }
public String alias() { return ReaderUtils.getChildText(featureType, "alias"); }
public String abstrct() { return ReaderUtils.getChildText(featureType, "abstract"); }
public String wmsPath() { return ReaderUtils.getChildText(featureType, "wmspath"); }
public String label() { return ReaderUtils.getChildText(coverage, "label"); }
public String wmsPath() { return ReaderUtils.getChildText(coverage, "wmspath"); }
public String srs() throws Exception { return ReaderUtils.getChildText(featureType, "SRS"); }
/** * getChildText purpose. * * <p>Used to help with XML manipulations. Returns the first child text value of the specified * element name. * * @param root The root element to look for children in. * @param childName The name of the attribute to look for. * @return The value if the child was found, the null otherwise. */ public static String getChildText(Element root, String childName) { try { return getChildText(root, childName, false); } catch (Exception ex) { return null; } }
public int srsHandling() { String s = ReaderUtils.getChildText(featureType, "SRSHandling"); if (s == null || "".equals(s)) { return -1; } return Integer.parseInt(s); }
public List<String> keywords() { String raw = ReaderUtils.getChildText(coverage, "keywords"); StringTokenizer st = new StringTokenizer(raw, ", "); ArrayList keywords = new ArrayList(); while (st.hasMoreTokens()) { keywords.add(st.nextToken()); } return keywords; }
public List<String> keywords() { String raw = ReaderUtils.getChildText(featureType, "keywords"); if (raw == null || "".equals(raw)) { return new ArrayList<String>(); } StringTokenizer st = new StringTokenizer(raw, ", "); ArrayList keywords = new ArrayList(); while (st.hasMoreTokens()) { keywords.add(st.nextToken()); } return keywords; }
public List<String> supportedFormats() throws Exception { Element supportedFormats = ReaderUtils.getChildElement(coverage, "supportedFormats"); String[] formats = ReaderUtils.getChildText(supportedFormats, "formats").split(","); return Arrays.asList(formats); }
public List<String> requestCRSs() throws Exception { Element supportedCRS = ReaderUtils.getChildElement(coverage, "supportedCRSs"); String[] requestCRS = ReaderUtils.getChildText(supportedCRS, "requestCRSs").trim().split(","); return Arrays.asList(requestCRS); }
public List<Map> coverageDimensions() throws Exception { Element[] cdElements = ReaderUtils.getChildElements(coverage, "CoverageDimension"); List<Map> cds = new ArrayList<Map>(); for (int i = 0; i < cdElements.length; i++) { HashMap cd = new HashMap(); cd.put("name", ReaderUtils.getChildText(cdElements[i], "name")); cd.put("description", ReaderUtils.getChildText(cdElements[i], "description")); Element intervalElement = ReaderUtils.getChildElement(cdElements[i], "interval"); double min = Double.parseDouble(ReaderUtils.getChildText(intervalElement, "min")); double max = Double.parseDouble(ReaderUtils.getChildText(intervalElement, "max")); cd.put("min", min); cd.put("max", max); cds.add(cd); } return cds; }
public List<String> responseCRSs() throws Exception { Element supportedCRS = ReaderUtils.getChildElement(coverage, "supportedCRSs"); String[] responseCRS = ReaderUtils.getChildText(supportedCRS, "responseCRSs").trim().split(","); return Arrays.asList(responseCRS); }
public List<String> supportedInterpolations() throws Exception { Element supportedFormats = ReaderUtils.getChildElement(coverage, "supportedInterpolations"); String[] interpolations = ReaderUtils.getChildText(supportedFormats, "interpolationMethods").split(","); return Arrays.asList(interpolations); }
public Map<String, Object> legendURL() throws Exception { Element legendURL = ReaderUtils.getChildElement(featureType, "LegendURL"); if (legendURL != null) { HashMap map = new HashMap(); map.put("width", Integer.parseInt(ReaderUtils.getAttribute(legendURL, "width", true))); map.put( "height", Integer.parseInt(ReaderUtils.getAttribute(legendURL, "height", true))); map.put("format", ReaderUtils.getChildText(legendURL, "Format", true)); map.put( "onlineResource", ReaderUtils.getAttribute( ReaderUtils.getChildElement(legendURL, "OnlineResource", true), "xlink:href", true)); return map; } return null; }