Package com.here.hrn

Class HRN

java.lang.Object
com.here.hrn.HRN
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product, scala.Serializable

public final class HRN extends Object implements scala.Serializable, scala.Product
An HRN (HERE Resource Name) is a resource descriptor that provides a globally unique handle for a resource. The HRN is generated by the HERE platform when the resource is created. Its structure can vary, so you should not try to parse HRNs or infer any meaning from them. Once a resource is created you cannot change the resource's HRN.

The string presentation of an HRN consists of the prefix "hrn:" followed by 5 colon (":") delimited fields: hrn:{partition}:{service}:{region}:{account}:{resource}

The resource field must be non-empty, but the other fields can be empty if they aren't relevant to the resource being identified.

For example, HERE Map Content catalog has the following HRN: "hrn:here:data::olp-here:rib-2".

In this case:

  • partition - here
  • service - data
  • region - (empty)
  • account - olp-here
  • resource - rib-2

param: partition the federated environment in which the resource resides param: service the well-known service name to request this resource from param: region the region of the partition the service resides in if it is not global param: account the customer/account this resource is associated with param: resource a string identifier that uniquely identifies the resource in question

See Also:
  • Constructor Details

  • Method Details

    • apply

      public static HRN apply(String hrn)
      Creates an HRN using fromString method.

      Parameters:
      hrn - string presentation of an HRN (HERE Resource Name).
      Returns:
      HRN
    • fromString

      public static HRN fromString(String hrn)
      Convert to an HRN.

      Parameters:
      hrn - string presentation of an HRN (HERE Resource Name).
      Returns:
      HRN
    • partition

      public String partition()
    • service

      public String service()
    • region

      public String region()
    • account

      public String account()
    • resource

      public String resource()
    • toString

      public String toString()
      Overrides:
      toString in class Object