|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.location.LandmarkStore
org.placelab.jsr0179.FSLandmarkStore
Filesystem-based implementation of a JSR-179 LandmarkStore. NOTE: The way this store works isn't completely consistent with how you would expect the LandmarkStore to operate in regards to categories. In the spec, a landmark exists in one place but can be associated with one or more categories. In this implementation, a landmark is physically tied to a category, and is stored in a category file. It exists in the store as many times as the categories it belongs to.
| Constructor Summary | |
FSLandmarkStore()
|
|
| Method Summary | |
void |
addCategory(java.lang.String categoryName)
Adds a category to this LandmarkStore. |
void |
addLandmark(javax.microedition.location.Landmark landmark,
java.lang.String category)
Adds a landmark to the specified group in the landmark store. |
void |
deleteCategory(java.lang.String categoryName)
Removes a category from this LandmarkStore. |
void |
deleteLandmark(javax.microedition.location.Landmark landmark)
Deletes a landmark from this LandmarkStore. |
java.util.Enumeration |
getCategories()
Returns the category names that are defined in this LandmarkStore. |
java.util.Enumeration |
getLandmarks()
Lists all landmarks stored in the store. |
java.util.Enumeration |
getLandmarks(java.lang.String category,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
Lists all the landmarks that are within an area defined by bounding minimum and maximum latitude and longitude and belong to the defined category, if specified. |
java.util.Enumeration |
getLandmarks(java.lang.String category,
java.lang.String name)
Gets the Landmarks from the storage where the category and/or name matches the given parameters. |
protected static javax.microedition.location.Landmark |
landmarkFromString(java.lang.String str)
|
protected static java.lang.String |
landmarkToString(javax.microedition.location.Landmark landmark)
|
void |
removeLandmarkFromCategory(javax.microedition.location.Landmark lm,
java.lang.String category)
Removes the named landmark from the specified category. |
| Methods inherited from class javax.microedition.location.LandmarkStore |
createLandmarkStore, deleteLandmarkStore, getInstance, listLandmarkStores, updateLandmark |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FSLandmarkStore()
throws java.lang.Exception
| Method Detail |
public void addCategory(java.lang.String categoryName)
throws java.io.IOException
javax.microedition.location.LandmarkStore
categoryName - name for the category to be added
java.io.IOException - if an I/O error occurs or there are no resources to add a new
category
public void addLandmark(javax.microedition.location.Landmark landmark,
java.lang.String category)
throws java.io.IOException
javax.microedition.location.LandmarkStore
landmark - the landmark to be addedcategory - category where the landmark is added. null can be used to
indicate that the landmark does not belong to a category
java.io.IOException - if an I/O error happened when accessing the landmark store or
if there are no resources available to store this landmark
public void deleteCategory(java.lang.String categoryName)
throws java.io.IOException
javax.microedition.location.LandmarkStore
categoryName - name for the category to be removed
java.io.IOException - if an I/O error occurs
public void deleteLandmark(javax.microedition.location.Landmark landmark)
throws java.io.IOException
javax.microedition.location.LandmarkStore
landmark - the landmark to be deleted
java.io.IOException - if an I/O error happened when accessing the landmark storepublic java.util.Enumeration getCategories()
javax.microedition.location.LandmarkStore
public java.util.Enumeration getLandmarks()
throws java.io.IOException
javax.microedition.location.LandmarkStore
java.io.IOException - if an I/O error happened when accessing the landmark store
public java.util.Enumeration getLandmarks(java.lang.String category,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
throws java.io.IOException
javax.microedition.location.LandmarkStore
category - the category of the landmark. null implies a wildcard that
matches all categoriesminLatitude - minimum latitude of the area. Must be within the range [-90.0,
90.0]maxLatitude - maximum latitude of the area. Must be within the range
[minLatitude, 90.0]minLongitude - minimum longitude of the area. Must be within the range
[-180.0, 180.0)maxLongitude - maximum longitude of the area. Must be within the range
[-180.0, 180.0)
java.io.IOException - if an I/O error happened when accessing the landmark store
public java.util.Enumeration getLandmarks(java.lang.String category,
java.lang.String name)
throws java.io.IOException
javax.microedition.location.LandmarkStore
category - the category of the landmark. null implies a wildcard that
matches all categoriesname - the name of the desired landmark. null implies a wildcard that
matches all the names within
java.io.IOException - if an I/O error happened when accessing the landmark store
public void removeLandmarkFromCategory(javax.microedition.location.Landmark lm,
java.lang.String category)
throws java.io.IOException
javax.microedition.location.LandmarkStore
lm - the landmark to be removedcategory - the category from which it will be removed.
java.io.IOException - if an I/O error happened when accessing the landmark storeprotected static javax.microedition.location.Landmark landmarkFromString(java.lang.String str)
protected static java.lang.String landmarkToString(javax.microedition.location.Landmark landmark)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||