public class GeoRSSData extends Object implements QuadTreeData
Constructor and Description |
---|
GeoRSSData(String filename,
DirectPosition2D latLon)
Creates a GeoRSSData object that stores the name of the file that the
entry's information is written to and the geo location of the entry.
|
Modifier and Type | Method and Description |
---|---|
String |
getFileName()
Returns the name of the file where the entry's info is saved.
|
DirectPosition2D |
getLatLon()
Returns the latitude/longitude pair.
|
double |
getX()
Returns the Java 2D x-coordinate for the longitude.
|
double |
getY()
Returns the Java 2D y-coordinate for the latitude.
|
static HashMap<String,String> |
loadFromFile(String fullFileName)
Reads the file that contains the GeoRSS entry's information and returns a
HashMap of key, value pairs where the key is the name of the element e.g.
|
void |
saveToFile(Item item,
GeoRSSModule geoRSSModule,
String directory)
Saves the GeoRSS entry to file.
|
public GeoRSSData(String filename, DirectPosition2D latLon)
filename
- filename where rss entry's info is storedlatLon
- geo location of the entrypublic double getX()
getX
in interface QuadTreeData
public double getY()
getY
in interface QuadTreeData
public DirectPosition2D getLatLon()
QuadTreeData
getLatLon
in interface QuadTreeData
public String getFileName()
getFileName
in interface QuadTreeData
public void saveToFile(Item item, GeoRSSModule geoRSSModule, String directory)
item
- the Item object from Java ROME API containing the GeoRSS entrygeoRSSModule
- the Java ROME API GeoRSSModule to parse geo locationdirectory
- the path of the directory in which to save the filepublic static HashMap<String,String> loadFromFile(String fullFileName)
fullFileName
- the full path to the fileCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.