3

I would like to retrieve the Keyword description using the Broker API for Java. I know the Taxonomy ID and the the Keyword key value. Which would be the best option to do that? We are using SDL Tridion 2013.

I imagine that our criteria is as follows, and I want to retrieve only one Keyword.

TaxonomyKeywordKeyCriteria criteria = new TaxonomyKeywordKeyCriteria("tcmTaxonomy",
                                                                     "keywordKey", 
                                                                     true);

Any help? Thank you!

4

If I understand your question correctly. You need to retrieve description for a keyword. To achieve that you can use the getTaxonomyKeyword method on a instance of TaxonomyFactory class to return a Keyword object. And on the Keyword object you can call the getDescription method to retrive the description of the keyword.

TaxonomyFactory tax = new TaxonomyFactory();
Keyword keyword = tax.getTaxonomyKeyword("tcm:65-123-1024");
string description = keyword.getDescription();

If you don't have the keyword-uri value with you, you will need to invoke getTaxonomyKeywords method on the TaxonomyFactory and enumerate through the list to find the keyword you need, get it's URI and retrieve its description.

Hope this helps resolve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.