public static interface

CoreApi.Properties

com.mapsted.positioning.CoreApi.Properties

Class Overview

Use PropertyManager for property related information and functionalities

Summary

Public Methods
abstract void addUnloadPropertyDataListener(CoreApi.UnloadPropertyDataListener listener)
add listener for change in property data
abstract void delete(int propertyId)
Remove property data.
abstract void deserializePropertyDataAsync(int propertyId, PropertyDataDownloadListener propertyDataDownloadListener)
Download a property's property data based on its property id.
abstract void downloadAndCache(int propertyId, Consumer<PropertyData> callback)
Gets or Download the Property data for given propertyId
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 DownloadStatus getDownloadStatus(int propertyId)
Get the current DownloadStatus of a property.
abstract void getEntity(EntityZone entityZone, Consumer<Entity> callback)
Get entity based on entity zone.
abstract Entity getEntity(int propertyId, int buildingId, int floorId, int entityId)
abstract PropertyInfo getInfo(int propertyId)
Get PropertyInfo corresponding to a specific property id.
abstract Optional<PropertyInfo> getInfoOptional(int propertyId)
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 void 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 propertyDownloadManagerListener)
Download a property map data.
abstract void stopDownload(int propertyId)
Stop download property information.
abstract void unload(int propertyId)
Remove property data.

Public Methods

public abstract void addUnloadPropertyDataListener (CoreApi.UnloadPropertyDataListener listener)

add listener for change in property data

Parameters
listener the listener

public abstract void delete (int propertyId)

Remove property data.

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.

Parameters
propertyId Property id that needs to be deleted.
See Also

public abstract void deserializePropertyDataAsync (int propertyId, PropertyDataDownloadListener propertyDataDownloadListener)

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.

Parameters
propertyId The property id corresponding to a property to be downloaded.
propertyDataDownloadListener A listener that handles downloading property data. See PropertyDataDownloadListener

public abstract void downloadAndCache (int propertyId, Consumer<PropertyData> callback)

Gets or Download the Property data for given propertyId

Parameters
propertyId property id
callback callback with property data

public 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

public abstract List<PropertyInfo> getAll ()

Get the list of PropertyInfo

Returns
  • List List of properties

public abstract Set<Integer> getAllIds ()

Get a Set of property ids that indicates all properties stored.

Returns
  • A set of all stored property id.

public abstract PropertyData getCached (int propertyId)

Get a property's cached PropertyData from core library based on property id.

Parameters
propertyId The stored property's property id.
Returns
  • The stored property data that was requested. See PropertyData

public abstract Entity getCachedEntity (EntityZone entityZone)

Get cached entity based on entity zone. Note that if the Zone (property and/or building) is not cached, it will return null

Parameters
entityZone The entity zone to retreive
Returns
  • Corresponding cached Entity or null if not cached or does not exist

public abstract Set<Integer> getCachedPropertyIds ()

Get a java.util.HashSet of property ids that indicates all properties cached.

Returns
  • A java.util.HashSet set of all stored property id.

public abstract void getCategories (int propertyId, Consumer<CategoriesResult> resultCallback)

Get categories for the property

Parameters
propertyId propertyId
resultCallback callback for result

public abstract DownloadStatus getDownloadStatus (int propertyId)

Get the current DownloadStatus of a property.

Parameters
propertyId Property id to check its downloading status.
Returns
  • The download status for property id. See DownloadStatus

public abstract void getEntity (EntityZone entityZone, Consumer<Entity> callback)

Get entity based on entity zone. Will return a cached entity if found, otherwise will download

Parameters
entityZone The entity zone to retreive
callback with Corresponding cached Entity or prepares by downloading, may still return null.

public abstract Entity getEntity (int propertyId, int buildingId, int floorId, int entityId)

public abstract PropertyInfo getInfo (int propertyId)

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.

Parameters
propertyId Building id corresponding to the BuildingInfo you get.
Returns

public abstract Optional<PropertyInfo> getInfoOptional (int propertyId)

public abstract Map<Integer, PropertyInfo> getInfos ()

Get PropertyInfoMap stored in core library.

Returns
  • All PropertyInfos stored. See PropertyInfoMap

public abstract int getNumCachedProperties ()

Get the number of properties currently cached in memory

Returns
  • number of properties currently cached in memory

public abstract void getSearchEntityListByPropertyId (int propertyId, Consumer<List<SearchEntity>> callback)

Method to retrieve the list of SearchEntity by a propertyID

public abstract int getSelectedProperty ()

public abstract void removeUnloadPropertyDataListener (CoreApi.UnloadPropertyDataListener listener)

remove listener

Parameters
listener the listener

public abstract void searchPoi (int propertyId, PoiFilter poiFilter, Consumer<List<? extends ISearchable>> resultCallback)

searches for points of interest based on given PoiFilter.

Parameters
propertyId propertyId
poiFilter poiFilter to filter the result by. If null, all results will be returned via the callback.
resultCallback callback for results

public abstract void setSelectedPropertyId (int propertyId)

public abstract void startDownload (int propertyId, PropertyDownloadManager.Listener propertyDownloadManagerListener)

Download a property map data. Use the listener to check status of download progress, failure or success.

public abstract void stopDownload (int propertyId)

Stop download property information.

Parameters
propertyId Property id to stop the download.

public abstract void unload (int propertyId)

Remove property data.

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.

Parameters
propertyId Property id that needs to be deleted.
See Also