Loading...
Searching...
No Matches
com.navigine.idl.java.Location Class Referenceabstract

Class is used for storing location parameters: identifier, version, name, a list of sublocations, etc. More...

Public Member Functions

abstract ElevationGraph getElevationGraph (String tag)
 Method returns location elevation graph ElevationGraph for specified tag.
 
abstract ArrayList< String > getGraphTags ()
 Method returns list of available graph tags.
 
abstract Sublocation getSublocationById (int id)
 Method is used for obtaining a sublocation with the specified identifier from the current location.
 
abstract Category getCategoryById (int id)
 Method is used for obtaining a category with the specified identifier from the current location.
 
abstract int getId ()
 location's identifier.
 
abstract int getVersion ()
 location's version.
 
abstract String getName ()
 location name.
 
abstract String getDescript ()
 location's description.
 
abstract ArrayList< CategorygetCategories ()
 List of venue categories defined for the location Category.
 
abstract ArrayList< SublocationgetSublocations ()
 List of sublocations Sublocation.
 
abstract boolean getModified ()
 Flag indicates if location has been modified by user or not.
 

Detailed Description

Class is used for storing location parameters: identifier, version, name, a list of sublocations, etc.

Location instance can be obtained from LocationManager using LocationListener callback, when the location is loaded.

Referenced from LocationManager LocationListener.

Definition at line 20 of file Location.java.

Member Function Documentation

◆ getCategories()

abstract ArrayList< Category > com.navigine.idl.java.Location.getCategories ( )
abstract

List of venue categories defined for the location Category.

Returns

Java code snippet:

// Get all categories
java.util.ArrayList<Category> categories = location.getCategories();
System.out.println("Number of categories: " + categories.size());

Kotlin code snippet:

// Get all categories
val categories = location.categories
println("Number of categories: ${categories.size}")

◆ getCategoryById()

abstract Category com.navigine.idl.java.Location.getCategoryById ( int id)
abstract

Method is used for obtaining a category with the specified identifier from the current location.

Parameters
idcategory identifier.
Returns
Category of the current location with the specified identifier, if it exists. If category with the specified identifier doesn't exist, function returns null.

Java code snippet:

// Get category by ID
if (!categories.isEmpty()) {
Category category = location.getCategoryById(categories.get(0).getId());
if (category != null) {
}
}

Kotlin code snippet:

// Get category by ID
categories.firstOrNull()?.let { category ->
val foundCategory = location.getCategoryById(category.id)
foundCategory?.let { demonstrateCategoryUsage(it) }
}

◆ getDescript()

abstract String com.navigine.idl.java.Location.getDescript ( )
abstract

location's description.

Returns

Java code snippet:

// Get location description
String description = location.getDescript();
System.out.println("Location description: " + description);

Kotlin code snippet:

// Get location description
val description = location.descript
println("Location description: $description")

◆ getElevationGraph()

abstract ElevationGraph com.navigine.idl.java.Location.getElevationGraph ( String tag)
abstract

Method returns location elevation graph ElevationGraph for specified tag.

Parameters
tagGraph tag in CMS
Returns
Elevation graph instance or null.
ElevationGraph of the current location with the specified tag, if it exists. If elevation graph with the specified tag doesn't exist, function returns null.

Java code snippet:

// Get elevation graph by tag
if (!graphTags.isEmpty()) {
ElevationGraph elevationGraph = location.getElevationGraph(graphTags.get(0));
if (elevationGraph != null) {
}
}

Kotlin code snippet:

// Get elevation graph by tag
graphTags.firstOrNull()?.let { tag ->
val elevationGraph = location.getElevationGraph(tag)
elevationGraph?.let { demonstrateElevationGraphUsage(it) }
}

◆ getGraphTags()

abstract ArrayList< String > com.navigine.idl.java.Location.getGraphTags ( )
abstract

Method returns list of available graph tags.

Returns
Array of existing tags

Java code snippet:

// Get available graph tags
java.util.ArrayList<String> graphTags = location.getGraphTags();
System.out.println("Available graph tags: " + graphTags);

Kotlin code snippet:

// Get available graph tags
val graphTags = location.graphTags
println("Available graph tags: $graphTags")

◆ getId()

abstract int com.navigine.idl.java.Location.getId ( )
abstract

location's identifier.

Returns

Java code snippet:

// Get location ID
int locationId = location.getId();
System.out.println("Location ID: " + locationId);

Kotlin code snippet:

// Get location ID
val locationId = location.id
println("Location ID: $locationId")

◆ getModified()

abstract boolean com.navigine.idl.java.Location.getModified ( )
abstract

Flag indicates if location has been modified by user or not.

Returns

Java code snippet:

// Check if location is modified
boolean isModified = location.getModified();
System.out.println("Location modified: " + isModified);

Kotlin code snippet:

// Check if location is modified
val isModified = location.modified
println("Location modified: $isModified")

◆ getName()

abstract String com.navigine.idl.java.Location.getName ( )
abstract

location name.

Returns

Java code snippet:

// Get location name
String name = location.getName();
System.out.println("Location name: " + name);

Kotlin code snippet:

// Get location name
val name = location.name
println("Location name: $name")

◆ getSublocationById()

abstract Sublocation com.navigine.idl.java.Location.getSublocationById ( int id)
abstract

Method is used for obtaining a sublocation with the specified identifier from the current location.

Parameters
idsublocation identifier.
Returns
The Sublocation of the current location with the specified identifier, if it exists. If sublocation with the specified identifier doesn't exist, function returns null.

Java code snippet:

// Get sublocation by ID
if (!sublocations.isEmpty()) {
Sublocation sublocation = location.getSublocationById(sublocations.get(0).getId());
if (sublocation != null) {
}
}

Kotlin code snippet:

// Get sublocation by ID
sublocations.firstOrNull()?.let { sublocation ->
val foundSublocation = location.getSublocationById(sublocation.id)
foundSublocation?.let { demonstrateSublocationUsage(it) }
}

◆ getSublocations()

abstract ArrayList< Sublocation > com.navigine.idl.java.Location.getSublocations ( )
abstract

List of sublocations Sublocation.

Returns

Java code snippet:

// Get all sublocations
java.util.ArrayList<Sublocation> sublocations = location.getSublocations();
System.out.println("Number of sublocations: " + sublocations.size());

Kotlin code snippet:

// Get all sublocations
val sublocations = location.sublocations
println("Number of sublocations: ${sublocations.size}")

◆ getVersion()

abstract int com.navigine.idl.java.Location.getVersion ( )
abstract

location's version.

Returns

Java code snippet:

// Get location version
int version = location.getVersion();
System.out.println("Location version: " + version);

Kotlin code snippet:

// Get location version
val version = location.version
println("Location version: $version")

The documentation for this class was generated from the following file: