com.mapsted.positioning.CoreApi.Properties |
Use PropertyManager for property related information and functionalities
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
addPropertyDownloadListener(PropertyDownloadManager.Listener listener)
add listener which will be notified anytime a property is downloaded
| ||||||||||
abstract boolean |
addUnloadPropertyDataListener(CoreApi.UnloadPropertyDataListener listener)
add listener for change in property data
| ||||||||||
abstract void |
delete(int propertyId, Consumer<Boolean> onComplete)
Delete property data from persistent storage.
| ||||||||||
abstract void |
deserializePropertyDataAsync(int propertyId, PropertyDataDownloadListener propertyDataDownloadListener)
Download a property's property data based on its property id.
| ||||||||||
abstract void |
findEntityByName(String name, int propertyId, Consumer<List<SearchEntity>> callback)
Method to retrieve the list of SearchEntity by a propertyID that matches the nameSubString
| ||||||||||
abstract List<PropertyInfo> |
getAll()
Get the list of
PropertyInfo | ||||||||||
abstract Set<Integer> |
getAllIds()
Get a Set of property ids that indicates all properties stored.
| ||||||||||
abstract PropertyData |
getCached(int propertyId)
Get a property's cached
PropertyData from core library based on property id. | ||||||||||
abstract Entity |
getCachedEntity(EntityZone entityZone)
Get cached entity based on entity zone.
| ||||||||||
abstract Set<Integer> |
getCachedPropertyIds()
Get a java.util.HashSet of property ids that indicates all properties cached.
| ||||||||||
abstract void |
getCategories(int propertyId, Consumer<CategoriesResult> resultCallback)
Get categories for the property
| ||||||||||
abstract void |
getData(int propertyId, Consumer<PropertyData> callback)
Gets cached PropertyData or triggers download, if necessary
| ||||||||||
abstract DownloadStatus |
getDownloadStatus(int propertyId)
Get the current DownloadStatus of a property.
| ||||||||||
abstract Entity | getEntity(int propertyId, int buildingId, int entityId) | ||||||||||
abstract void |
getEntity(EntityZone entityZone, Consumer<Entity> callback)
Get entity based on entity zone.
| ||||||||||
abstract PropertyInfo |
getInfo(int propertyId)
Get
PropertyInfo corresponding to a specific property id. | ||||||||||
abstract Optional<PropertyInfo> | getInfoOptional(int propertyId) | ||||||||||
abstract void |
getInfos(Consumer<Map<Integer, PropertyInfo>> consumer)
Async fetch the property Infos
| ||||||||||
abstract Map<Integer, PropertyInfo> |
getInfos()
Get PropertyInfoMap stored in core library.
| ||||||||||
abstract int |
getNumCachedProperties()
Get the number of properties currently cached in memory
| ||||||||||
abstract void |
getSearchEntityListByPropertyId(int propertyId, Consumer<List<SearchEntity>> callback)
Method to retrieve the list of SearchEntity by a propertyID
| ||||||||||
abstract int | getSelectedProperty() | ||||||||||
abstract boolean |
isCached(int propertyId)
Checks whether a given property is cached in memory
| ||||||||||
abstract boolean |
removePropertyDownloadListener(PropertyDownloadManager.Listener listener)
remove listener
| ||||||||||
abstract boolean |
removeUnloadPropertyDataListener(CoreApi.UnloadPropertyDataListener listener)
remove listener
| ||||||||||
abstract void |
searchPoi(int propertyId, PoiFilter poiFilter, Consumer<List<? extends ISearchable>> resultCallback)
searches for points of interest based on given
PoiFilter . | ||||||||||
abstract void | setSelectedPropertyId(int propertyId) | ||||||||||
abstract void |
startDownload(int propertyId, PropertyDownloadManager.Listener listener)
Download a property map data.
| ||||||||||
abstract void |
stopDownload(int propertyId)
Stop download property information.
| ||||||||||
abstract void |
unload(int propertyId, Consumer<Boolean> onComplete)
Unload property data from memory.
|
add listener which will be notified anytime a property is downloaded
listener | the listener |
---|
add listener for change in property data
listener | the listener |
---|
Delete property data from persistent storage.
This will remove property data from database and from core library.
Note: If you are using map module as well, please call remove property data in MapstedMapApi.
propertyId | Property id that needs to be deleted. |
---|---|
onComplete | Notified when unload is complete, returns success or failure |
Download a property's property data based on its property id.
This function is an asynchronous function with a final callback which is called once the function is completed.
propertyId | The property id corresponding to a property to be downloaded. |
---|---|
propertyDataDownloadListener | A listener that handles downloading property data. See PropertyDataDownloadListener
|
Method to retrieve the list of SearchEntity by a propertyID that matches the nameSubString
Get the list of PropertyInfo
Get a Set of property ids that indicates all properties stored.
Get a property's cached PropertyData
from core library based on property id.
propertyId | The stored property's property id. |
---|
PropertyData
Get cached entity based on entity zone. Note that if the Zone (property and/or building) is not cached, it will return null
entityZone | The entity zone to retrieve |
---|
Get a java.util.HashSet of property ids that indicates all properties cached.
Get categories for the property
propertyId | propertyId |
---|---|
resultCallback | callback for result |
Gets cached PropertyData or triggers download, if necessary
propertyId | property id |
---|---|
callback | callback with property data |
Get the current DownloadStatus of a property.
propertyId | Property id to check its downloading status. |
---|
Get entity based on entity zone. Will return a cached entity if found, otherwise will download
entityZone | The entity zone to retrieve |
---|---|
callback | with Corresponding cached Entity or prepares by downloading, may still return null. |
Get PropertyInfo
corresponding to a specific property id.
Property consists of all property information such as the property's id, the name of the property, X and Y coordinates etc.
propertyId | Building id corresponding to the BuildingInfo you get. |
---|
PropertyInfo
Async fetch the property Infos
consumer | Callback with the PropertyInfo map |
---|
Get PropertyInfoMap stored in core library. Note that the first call to this method may be UI-blocking if a download is required
Get the number of properties currently cached in memory
Method to retrieve the list of SearchEntity by a propertyID
Checks whether a given property is cached in memory
propertyId | the property to test |
---|
remove listener
listener | the listener |
---|
remove listener
listener | the listener |
---|
searches for points of interest based on given PoiFilter
.
propertyId | propertyId |
---|---|
poiFilter | poiFilter to filter the result by. If null, all results will be returned via the callback. |
resultCallback | callback for results |
Download a property map data. Use the listener to check status of download progress, failure or success.
propertyId | Property id to stop the download. |
---|---|
listener | listener |
Stop download property information.
propertyId | Property id to stop the download. |
---|
Unload property data from memory.
This will remove property data from database and from core library.
Note: If you are using map module as well, please call remove property data in MapstedMapApi.
propertyId | Property id that needs to be deleted. |
---|---|
onComplete | Notified when unload is complete, returns success or failure |