Package com.thingworx.types
Class TagLink
- java.lang.Object
-
- com.thingworx.types.TagLink
-
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class TagLink extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TagLink()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
boolean
equals(java.lang.String vocabularyName, java.lang.String vocabularyTermName)
static TagLink
fromString(java.lang.String tag)
java.lang.String
getVocabulary()
java.lang.String
getVocabularyTerm()
void
setVocabulary(java.lang.String vocabulary)
void
setVocabularyTerm(java.lang.String vocabularyTerm)
java.lang.String
toString()
ValueCollection
toValueCollection()
static TagLink
valueOf(java.lang.String vocabulary, java.lang.String term)
Creates a new TagLink based on the provided vocabulary name and term.
-
-
-
Method Detail
-
getVocabulary
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getVocabulary()
-
setVocabulary
@ThingworxExtensionApiMethod(since={6,6}) public void setVocabulary(java.lang.String vocabulary)
-
getVocabularyTerm
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getVocabularyTerm()
-
setVocabularyTerm
@ThingworxExtensionApiMethod(since={6,6}) public void setVocabularyTerm(java.lang.String vocabularyTerm)
-
equals
@ThingworxExtensionApiMethod(since={6,6}) public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
equals
@ThingworxExtensionApiMethod(since={6,6}) public boolean equals(java.lang.String vocabularyName, java.lang.String vocabularyTermName)
-
toValueCollection
@ThingworxExtensionApiMethod(since={6,6}) public ValueCollection toValueCollection()
-
toString
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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 termterm
- the term this TagLink represents- Returns:
- a representative object of the vocabulary/term pairing
- Throws:
java.lang.IllegalArgumentException
- if the vocabulary name is empty
-
-