Class UIDtoStringConverter

java.lang.Object
org.openhab.core.model.thing.valueconverter.UIDtoStringConverter
All Implemented Interfaces:
org.eclipse.xtext.conversion.IValueConverter<String>

public class UIDtoStringConverter extends Object implements org.eclipse.xtext.conversion.IValueConverter<String>
A UIDtoStringConverter is used to create UID string representations from an input string and vice versa. If a segment of the parsed UID string doesn't match the ID rule, it will be escaped.
Author:
Alex Tugarev - Initial contribution
  • Constructor Details

    • UIDtoStringConverter

      public UIDtoStringConverter()
  • Method Details

    • toValue

      public String toValue(String string, org.eclipse.xtext.nodemodel.INode node) throws org.eclipse.xtext.conversion.ValueConverterException
      Specified by:
      toValue in interface org.eclipse.xtext.conversion.IValueConverter<String>
      Throws:
      org.eclipse.xtext.conversion.ValueConverterException
    • toString

      public String toString(String value) throws org.eclipse.xtext.conversion.ValueConverterException
      Specified by:
      toString in interface org.eclipse.xtext.conversion.IValueConverter<String>
      Throws:
      org.eclipse.xtext.conversion.ValueConverterException
    • toEscapedString

      protected String toEscapedString(String value)