Package com.massifmaps.packagemanager
Class PackageInfo
java.lang.Object
com.massifmaps.packagemanager.PackageInfo
Information about map package. This includes id, type, version, name, description and size.
-
Constructor Summary
ConstructorsConstructorDescriptionPackageInfo(String packageId, int packageType, int version, BigInteger size, String serverURL, PackageTileMask tileMask, PackageMetaInfo metaInfo) Constructs a new package info instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.Returns package meta info.getName()Returns the default name (short description) of the package.Returns the names (short description) of the package.Returns the internal package id.intReturns the package type.getSize()Returns the size of the package in bytes.Returns the encoded tile mask of the package.intReturns the package version.inthashCode()Returns the hash value of this object.
-
Constructor Details
-
PackageInfo
public PackageInfo(String packageId, int packageType, int version, BigInteger size, String serverURL, PackageTileMask tileMask, PackageMetaInfo metaInfo) Constructs a new package info instance.- Parameters:
packageId- The unique id of the packagepackageType- The type of the packageversion- The increasing version number of the packagesize- Size of the package in bytesserverURL- Location of the packagetileMask- The tile mask of the packagemetaInfo- Package meta info
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getPackageId
Returns the internal package id. This should not be displayed to the user.- Returns:
- The unique package id
-
getPackageType
public int getPackageType()Returns the package type.- Returns:
- The package type (map, routing, etc)
-
getVersion
public int getVersion()Returns the package version. This should not be displayed to the user.- Returns:
- The increasing package version number
-
getName
Returns the default name (short description) of the package. It is better to use getNames method instead, as each package may contain multiple names.
The name returned is generic name or if that is not available, then English name.- Returns:
- The list of names for the package in the specified language (if not available, generic/English names are returned)
-
getNames
Returns the names (short description) of the package. This can be displayed to the user. Each package may have multiple names, if the package has multiple classifications.
Note: this information is dervied from package meta info, "name_XXX" fields.- Parameters:
lang- The language for the name- Returns:
- The list of names for the package in the specified language (if not available, generic/English names are returned)
-
getSize
Returns the size of the package in bytes. This can be displayed to the user.- Returns:
- The size of the package in bytes
-
getTileMask
Returns the encoded tile mask of the package. This is available for map packages but not for routing packages.
This should not be displayed to the user.- Returns:
- The tile mask of the package
-
getMetaInfo
Returns package meta info. If package contains no meta info, null is returned.- Returns:
- The package meta info.
-