identifier property

String identifier

Determines the id of this ThingDescription.

As the id field of a ThingDescription is not mandatory, the base and the title are used as fallbacks.

This can lead to unintended behavior if two Things should use the same title or if two ThingDescriptions are using the same base address. However, there seems to be no better solution at the moment.

Implementation

// TODO(JKRhb): Revisit ID determination
String get identifier {
  return id ?? base?.toString() ?? title;
}