public class Keyword extends Object implements Serializable, Comparable
Constructor and Description |
---|
Keyword(String taxonomyURI,
String keywordURI)
This constructs a taxonomy keyword with the TCMURI and the Taxonomy it belongs to.
|
Keyword(String taxonomyURI,
String keywordURI,
String keywordName)
This constructs a taxonomy keyword with the TCMURI, it's name and the Taxonomy it belongs to.
|
Keyword(String taxonomyURI,
String keywordURI,
String keywordName,
Keyword parentKeyword)
This constructs a taxonomy keyword with the TCMURI, it's name and it's parent.
|
Modifier and Type | Method and Description |
---|---|
void |
addRelatedKeywordURI(String relatedKeywordURI)
Add a related KeywordURI to the list of related KeywordURIS.
|
List<Keyword> |
clone(int left,
Keyword parentKeyword)
This clones this keyword and all of its children keywords in memory.
|
int |
compareTo(Object o)
When this object is used in a collection it will make sure that
the keyword is sorted by using it's natural order which is based on the
tree pre-ordering mechanism.
|
List<Keyword> |
getKeywordChildren()
Returns a List of all the children of this TaxonomyKeyword.
|
int |
getKeywordDepth()
This returns the depth of this keyword in the whole taxonomy it belongs to.
|
String |
getKeywordDescription()
This returns the description field of the Keyword.
|
String |
getKeywordKey()
This returns a key if one is set or an empty string if none.
|
int |
getKeywordLeft()
This gets the left value of this Keyword in the hierarchy.
|
com.tridion.meta.CustomMeta |
getKeywordMeta()
Returns the custom metadata for this taxonomyKeyword.
|
String |
getKeywordName()
The name representing this TaxonomyKeyword.
|
int |
getKeywordRight()
This gets the right value of this Keyword in the hierarchy.
|
String |
getKeywordTitle()
This returns a title if one is set or an empty string if none.
|
String |
getKeywordURI()
Returns the TCMURI of the keyword.
|
Keyword |
getParentKeyword()
Returns the parent TaxonomyKeyword.
|
List<Keyword> |
getParentKeywords()
Returns the full list of all the parent keywords of this Keyword.
|
int |
getReferencedContentCount()
This returns the reference count for a specific taxonomyKeyword.
|
String[] |
getRelatedKeywordURIS()
Returns an array of KeywordURIS related to the current Keyword.
|
String |
getTaxonomyURI()
This returns the URI of the taxonomy for this taxonomyKeyword.
|
boolean |
hasKeywordChildren()
This returns if this TaxonomyKeyword has children.
|
boolean |
isKeywordAbstract()
This returns if this TaxonomyKeyword is abstract.
|
boolean |
isKeywordNavigable()
This returns if the TaxonomyKeyword should be navigable.
|
boolean |
isUsedForIdentification()
This returns if this TaxonomyKeyword is used for identification.
|
void |
setHasKeywordChildren(boolean hasKeywordChildren)
This sets if this TaxonomyKeyword should act if it has children or not.
|
void |
setKeywordAbstract(boolean keywordAbstract)
This sets if the TaxonomyKeyword should behave like an abstract.
|
void |
setKeywordDepth(int keywordDepth)
This sets the depth of the keyword in the whole taxonomy it is belongs to.
|
void |
setKeywordDescription(String keywordDescription)
This sets the description field of the Keyword.
|
void |
setKeywordKey(String keywordKey)
Sets the key attribute of this Keyword.
|
void |
setKeywordLeft(int keywordLeft)
This sets the left value of this Keyword.
|
void |
setKeywordMeta(com.tridion.meta.CustomMeta keywordMeta) |
protected void |
setKeywordName(String keywordName)
This sets the name field of the Keyword.
|
void |
setKeywordNavigable(boolean keywordNavigable)
This sets if the TaxonomyKeyword should be navigable.
|
void |
setKeywordRight(int keywordRight)
This sets the right value of this Keyword.
|
void |
setKeywordTitle(String keywordTitle)
Sets the key attribute of this Keyword.
|
void |
setParentKeyword(Keyword parentKeyword)
This sets the parent of this TaxonomyKeyword, this methods also
sets the primary Parent Keyword of this Keyword in which this keyword will
be present in its children.
|
void |
setParentKeyword(Keyword parentKeyword,
boolean thePrimaryParentKeyword)
This sets the parent of this TaxonomyKeyword, this methods also
puts it in the children list of the parentKeyword.
|
void |
setReferencedContentCount(int referencedContentCount)
This sets the number of referenced items for this taxonomyKeyword.
|
void |
setUsedForIdentification(boolean usedForIdentification)
This sets if the TaxonomyKeyword should be used for identification.
|
String |
toString()
This displays the actual value of the Taxonomy.
|
public Keyword(String taxonomyURI, String keywordURI, String keywordName, Keyword parentKeyword)
taxonomyURI
- The Taxonomy URI of the taxonomy that contains the keyword.keywordURI
- The URI of the keyword in the taxonomy.keywordName
- The name of the keyword in the taxonomy.parentKeyword
- The parent of this keyword in the taxonomy.public Keyword(String taxonomyURI, String keywordURI, String keywordName)
taxonomyURI
- The URI of the Taxonomy the facet is inkeywordURI
- The TCMURI of the element in the taxonomykeywordName
- The name of the element in the taxonomypublic String getKeywordURI()
public List<Keyword> getParentKeywords()
public Keyword getParentKeyword()
public void setParentKeyword(Keyword parentKeyword, boolean thePrimaryParentKeyword)
parentKeyword
- The parent of this taxonomyKeywordthePrimaryParentKeyword
- True if the parent is the primary parentpublic void setParentKeyword(Keyword parentKeyword)
parentKeyword
- The parent of this taxonomyKeywordpublic List<Keyword> getKeywordChildren()
public String getKeywordName()
public String getTaxonomyURI()
public boolean hasKeywordChildren()
public void setHasKeywordChildren(boolean hasKeywordChildren)
hasKeywordChildren
- true if this Keyword has children, false if notpublic boolean isKeywordAbstract()
public void setKeywordAbstract(boolean keywordAbstract)
keywordAbstract
- true if it should behave like an abstract, false if notpublic boolean isUsedForIdentification()
public void setUsedForIdentification(boolean usedForIdentification)
usedForIdentification
- true if it should be used for identification, false if notpublic boolean isKeywordNavigable()
public void setKeywordNavigable(boolean keywordNavigable)
keywordNavigable
- Set to true if TaxonomyKeyword must be navigable, false if notpublic int getReferencedContentCount()
public void setReferencedContentCount(int referencedContentCount)
referencedContentCount
- The number of referenced items for this taxonomyKeywordpublic String getKeywordKey()
public void setKeywordKey(String keywordKey)
public String getKeywordTitle()
public void setKeywordTitle(String keywordTitle)
public com.tridion.meta.CustomMeta getKeywordMeta()
public void setKeywordMeta(com.tridion.meta.CustomMeta keywordMeta)
public void addRelatedKeywordURI(String relatedKeywordURI)
relatedKeywordURI
- the related KeywordsURI to add to the related Keywordspublic String[] getRelatedKeywordURIS()
public String toString()
public int getKeywordLeft()
public void setKeywordLeft(int keywordLeft)
keywordLeft
- This sets the left value of this Keyword in the hierarchypublic int getKeywordRight()
public void setKeywordRight(int keywordRight)
keywordRight
- This sets the right value of this Keyword in the hierarchypublic int getKeywordDepth()
public void setKeywordDepth(int keywordDepth)
keywordDepth
- The depth of the keyword in the taxonomypublic String getKeywordDescription()
public void setKeywordDescription(String keywordDescription)
keywordDescription
- The description field of the keywordprotected void setKeywordName(String keywordName)
keywordName
- The name field of the keywordpublic int compareTo(Object o)
compareTo
in interface Comparable
public List<Keyword> clone(int left, Keyword parentKeyword)
left
- The left start of the keyword to cloneparentKeyword
- The parent keyword of the keywordCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries