Package com.thingworx.types
Class TagLink
java.lang.Object
com.thingworx.types.TagLink
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class TagLink
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
static TagLink
fromString
(String tag) void
setVocabulary
(String vocabulary) void
setVocabularyTerm
(String vocabularyTerm) toString()
static TagLink
Creates a new TagLink based on the provided vocabulary name and term.
-
Constructor Details
-
TagLink
public TagLink()
-
-
Method Details
-
getVocabulary
-
setVocabulary
-
getVocabularyTerm
-
setVocabularyTerm
-
equals
-
equals
@ThingworxExtensionApiMethod(since={6,6}) public boolean equals(String vocabularyName, String vocabularyTermName) -
toValueCollection
-
toString
-
fromString
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:
IllegalArgumentException
- if the argument does not conform to the expected tag name format
-
valueOf
@ThingworxExtensionApiMethod(since={6,6}) public static TagLink valueOf(String vocabulary, 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 termterm
- the term this TagLink represents- Returns:
- a representative object of the vocabulary/term pairing
- Throws:
IllegalArgumentException
- if the vocabulary name is empty
-