| 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(List<Integer> propertyIds, Consumer<CategoriesResult> resultCallback)
Get all categories associated with multiple properties
| ||||||||||
| 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 void |
getEntity(int propertyId, int buildingId, int entityId, Consumer<Entity> callback)
Get entity based on property, building and entity Ids.
| ||||||||||
| abstract void |
getIds(Consumer<Set<Integer>> consumer)
Async fetch the list of propertyIds
| ||||||||||
| abstract PropertyInfo |
getInfo(int propertyId)
Get
PropertyInfo corresponding to a specific property id. | ||||||||||
| abstract void |
getInfoList(Consumer<List<PropertyInfo>> consumer)
Async fetch the list of
PropertyInfo
| ||||||||||
| 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 all categories associated with multiple properties
| propertyIds | set of properties |
|---|---|
| resultCallback | callback for result |
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 | Callback with the corresponding Entity (nullable) |
Get entity based on property, building and entity Ids. Will return a cached entity if found, otherwise will download
| propertyId | The property |
|---|---|
| buildingId | The building |
| entityId | The entity |
| callback | Callback with the corresponding Entity (nullable) |
Async fetch the list of propertyIds
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 list of 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 |