Class TagLink

  • java.lang.Object
    • com.thingworx.types.TagLink
    • Constructor Detail

      • TagLink

        public TagLink()
    • Method Detail

      • fromString

        @ThingworxExtensionApiMethod(since={6,6})
        public static TagLink fromString​(java.lang.String tag)


        Constructs a new TagLink from its standard string representation format. This is typically of the form "vocabularyName:termName". If the term name is omitted but the name/value delimiter included, then the term will be represented using the unknown value string (???). If the name/value delimiter is not included, the method will throw an IllegalArgumentException.

        This method is guaranteed at minimum to return a unique TagLink for each unique vocabulary/term pair.

        Parameters:
        tag - the string representation of the TagLink to construct
        Returns:
        the resultant TagLink
        Throws:
        java.lang.IllegalArgumentException - if the argument does not conform to the expected tag name format
      • valueOf

        @ThingworxExtensionApiMethod(since={6,6})
        public static TagLink valueOf​(java.lang.String vocabulary,
                                      java.lang.String term)


        Creates a new TagLink based on the provided vocabulary name and term. TagLinks are ephemeral and do not contain any strict enforcement that the vocabularies or terms exist at any point of their lifetime.
        Parameters:
        vocabulary - the name of the vocabulary containing the term
        term - the term this TagLink represents
        Returns:
        a representative object of the vocabulary/term pairing
        Throws:
        java.lang.IllegalArgumentException - if the vocabulary name is empty