11package javaxt .rss ;
22import org .w3c .dom .*;
33import javaxt .xml .DOM ;
4- import javaxt .geospatial .geometry .Geometry ;
5- import javaxt .geospatial .coordinate .Parser ;
4+ // import javaxt.geospatial.geometry.Geometry;
5+ // import javaxt.geospatial.coordinate.Parser;
66
77//******************************************************************************
88//** RSS Item
@@ -21,7 +21,7 @@ public class Item {
2121 private String creator = null ;
2222 private java .net .URL link = null ;
2323 private java .net .URL origLink = null ; //<--FeedBurner
24- private Geometry geometry = null ;
24+ private Object geometry = null ;
2525 private NodeList nodeList = null ;
2626
2727 private String pubDate = null ;
@@ -81,7 +81,12 @@ protected Item(org.w3c.dom.Node node) {
8181 nodeName .equals ("polygon" ) || nodeName .equals ("georss:polygon" ) ||
8282 nodeName .equals ("box" ) || nodeName .equals ("georss:box" )){
8383 try {
84- geometry = new Parser (nodeValue ).getGeometry ();
84+ //geometry = new Parser(nodeValue).getGeometry();
85+ Class classToLoad = Class .forName ("javaxt.geospatial.coordinate.Parser" );//, true, child);
86+ java .lang .reflect .Constructor constructor = classToLoad .getDeclaredConstructor (new Class [] {String .class });
87+ java .lang .reflect .Method method = classToLoad .getDeclaredMethod ("getGeometry" );
88+ Object instance = constructor .newInstance ();
89+ geometry = method .invoke (instance );
8590 }
8691 catch (Exception e ){}
8792 }
@@ -154,7 +159,7 @@ public Media[] getMedia(){
154159 //**************************************************************************
155160 /** Returns a geometry associated with the current entry.
156161 */
157- public Geometry getLocation (){ return geometry ; }
162+ public Object getLocation (){ return geometry ; }
158163
159164
160165
@@ -175,8 +180,8 @@ public String toString(){
175180
176181 if (geometry !=null ){
177182 out .append ("Location: " + geometry + br );
178- out .append ("Geometry Name: " + geometry .getName () + br );
179- out .append ("Geometry SRS: " + geometry .getSRS () + br );
183+ // out.append("Geometry Name: " + geometry.getName() + br);
184+ // out.append("Geometry SRS: " + geometry.getSRS() + br);
180185 }
181186
182187 for (int i =0 ; i <media .size (); i ++){
0 commit comments