org.apache.sis.index.tree

## Class GeoRSSData

- Object
- - GeoRSSData

- All Implemented Interfaces:
    QuadTreeData

      public class GeoRSSData
      extends Object
      implements QuadTreeData

  Implements QuadTreeData to store GeoRSS items into quad tree. Provides methods to save and load GeoRSS items to and from file.

- - ### Constructor Summary

    Constructors
    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.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GeoRSSData

          public 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.
      Parameters:
        `filename` - filename where rss entry's info is stored
        `latLon` - geo location of the entry

  - ### Method Detail

    - #### getX

          public double getX()

      Returns the Java 2D x-coordinate for the longitude.
      Specified by:
        `getX` in interface `QuadTreeData`
      Returns:
        the Java 2D x-coordinate

    - #### getY

          public double getY()

      Returns the Java 2D y-coordinate for the latitude.
      Specified by:
        `getY` in interface `QuadTreeData`
      Returns:
        the Java 2D y-coordinate

    - #### getLatLon

          public DirectPosition2D getLatLon()

      Description copied from interface: `QuadTreeData`
      Returns the latitude/longitude pair.
      Specified by:
        `getLatLon` in interface `QuadTreeData`
      Returns:
        the latitude/longitude pair.

    - #### getFileName

          public String getFileName()

      Returns the name of the file where the entry's info is saved.
      Specified by:
        `getFileName` in interface `QuadTreeData`
      Returns:
        the name of the file where the entry's info is saved

    - #### saveToFile

          public void saveToFile(Item item,
                                 GeoRSSModule geoRSSModule,
                                 String directory)

      Saves the GeoRSS entry to file.
      Parameters:
        `item` - the Item object from Java ROME API containing the GeoRSS entry
        `geoRSSModule` - the Java ROME API GeoRSSModule to parse geo location
        `directory` - the path of the directory in which to save the file

    - #### loadFromFile

          public 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. title, author.
      Parameters:
        `fullFileName` - the full path to the file
      Returns:
        HashMap where the key is the name of the element and the value is the data inside the element's tag

Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.