protected Metadata parseMetadata(Element root) { Metadata meta = new Metadata(); meta.setIdinfo(parseIdInfo(root.getChild("idinfo"))); return meta; }
protected IdInfo parseIdInfo(Element element) { IdInfo idInfo = new IdInfo(); Element bounding = element.getChild("spdom").getChild("bounding"); idInfo.setBounding(parseBounding(bounding)); Element lbounding = element.getChild("spdom").getChild("lbounding"); idInfo.setLbounding(parseBounding(lbounding)); return idInfo; }
public Metadata parse() { return parseMetadata(dom.getRootElement()); }
/** * Latch onto xmlURL if it is there, we may be able to get out of * calculating the bounding box! * * <p> * This method is called by the createTypeEntry anonymous inner class * DefaultTypeEntry. * </p> * * @param typeName DOCUMENT ME! * * @return Map with xmlURL parsed, or an EMPTY_MAP. */ protected Map createMetadata(String typeName) { if (xmlURL == null) { return Collections.EMPTY_MAP; } try { //System.out.println("found metadata = " + xmlURL); ShpXmlFileReader reader = new ShpXmlFileReader(xmlURL); Map map = new HashMap(); map.put("shp.xml", reader.parse()); //System.out.println("parsed ..." + xmlURL); return map; } catch (Throwable t) { LOGGER.warning("Could not parse " + xmlURL + ":" + t.getLocalizedMessage()); return Collections.EMPTY_MAP; } }
protected IdInfo parseIdInfo(Element element) { IdInfo idInfo = new IdInfo(); Element bounding = element.getChild("spdom").getChild("bounding"); idInfo.setBounding(parseBounding(bounding)); Element lbounding = element.getChild("spdom").getChild("lbounding"); idInfo.setLbounding(parseBounding(lbounding)); return idInfo; }
protected Metadata parseMetadata(Element root) { Metadata meta = new Metadata(); meta.setIdinfo(parseIdInfo(root.getChild("idinfo"))); return meta; }
ShpXmlFileReader reader = new ShpXmlFileReader(shpFiles); map.put("shp.xml", reader.parse());
public Metadata parse() { return parseMetadata( dom.getRootElement() ); }
protected IdInfo parseIdInfo(Element element ) { IdInfo idInfo = new IdInfo(); Element bounding = element.getChild("spdom").getChild("bounding"); idInfo.setBounding( parseBounding( bounding ) ); Element lbounding = element.getChild("spdom").getChild("lbounding"); idInfo.setLbounding( parseBounding( lbounding ) ); return idInfo; } protected Envelope parseBounding( Element bounding ) {
protected Metadata parseMetadata(Element root) { Metadata meta = new Metadata(); meta.setIdinfo(parseIdInfo(root.getChild("idinfo"))); return meta; }
ShpXmlFileReader reader = new ShpXmlFileReader(shpFiles); map.put("shp.xml", reader.parse());
public Metadata parse() { return parseMetadata(dom.getRootElement()); }
protected IdInfo parseIdInfo(Element element) { IdInfo idInfo = new IdInfo(); Element bounding = element.getChild("spdom").getChild("bounding"); idInfo.setBounding(parseBounding(bounding)); Element lbounding = element.getChild("spdom").getChild("lbounding"); idInfo.setLbounding(parseBounding(lbounding)); return idInfo; }
protected Metadata parseMetadata(Element root) { Metadata meta = new Metadata(); meta.setIdinfo( parseIdInfo( root.getChild("idinfo")) ); return meta; } protected IdInfo parseIdInfo(Element element ) {
public Metadata parse() { return parseMetadata(dom.getRootElement()); }