TaxonomySession.GetTerms TaxonomySession.GetTerms TaxonomySession.GetTerms Method

Definition

Overloads

GetTerms(Guid[]) GetTerms(Guid[]) GetTerms(Guid[])

Gets a set of Term objects based on Term IDs. If a Term is part of more than one TermSet object, it will arbitrarily return the Term object from one of the TermSet objects.

GetTerms(String, Boolean) GetTerms(String, Boolean) GetTerms(String, Boolean)

Gets from all TermStore objects with a Label object that matches the provided string, the Term objects from all TermSet objects that are not scoped to an SPSite object.

GetTerms(String, Int32, Boolean) GetTerms(String, Int32, Boolean) GetTerms(String, Int32, Boolean)

Gets Term objects from all of the TermSet objects, which are not scoped to an SPSite object, from all TermStore objects with a Label object in the provided lcid matching the string provided.

GetTerms(String, Boolean, StringMatchOption, Int32, Boolean) GetTerms(String, Boolean, StringMatchOption, Int32, Boolean)

Searches Label objects in all working languages, and returns Term objects from all TermSet objects, which are not scoped to an SPSite object, from all TermStore objects with a Label object matching the provided string.

GetTerms(String, Int32, Boolean, StringMatchOption, Int32, Boolean, Boolean) GetTerms(String, Int32, Boolean, StringMatchOption, Int32, Boolean, Boolean)

Searches labels in the provided lcid, and returns Term objects from all TermSet objects, which are not scoped to an SPSite object, from all TermStore objects with a Label matching the provided string.

GetTerms(Guid[]) GetTerms(Guid[]) GetTerms(Guid[])

Gets a set of Term objects based on Term IDs. If a Term is part of more than one TermSet object, it will arbitrarily return the Term object from one of the TermSet objects.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTerms(cli::array <Guid> ^ termIds);
[Microsoft.SharePoint.Client.ClientCallable(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, Name="GetTermsById")]
public Microsoft.SharePoint.Taxonomy.TermCollection GetTerms (Guid[] termIds);
Public Function GetTerms (termIds As Guid()) As TermCollection
Parameters
termIds
Guid[]

A list of Term IDs.

Returns

GetTerms(String, Boolean) GetTerms(String, Boolean) GetTerms(String, Boolean)

Gets from all TermStore objects with a Label object that matches the provided string, the Term objects from all TermSet objects that are not scoped to an SPSite object.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTerms(System::String ^ termLabel, bool trimUnavailable);
public Microsoft.SharePoint.Taxonomy.TermCollection GetTerms (string termLabel, bool trimUnavailable);
Public Function GetTerms (termLabel As String, trimUnavailable As Boolean) As TermCollection
Parameters
termLabel
String String String

String to search.

trimUnavailable
Boolean Boolean Boolean

yes if it trims the unavailable Term objects from the result collection; no if it includes the unavailable Term objects in the result collection.

Returns

A sorted collection of Term objects.

Remarks

The method searches all Label objects in all working languages and returns the top 100 Term objects from each TermStore object and combines the results into one sorted collection. The search results are returned directly from the TermStore. The TermStore object may not be synchronized with changes that have been made but that have not yet been committed. For the best results, call the CommitAll() method or call the RollbackAll() method before you call this method.

GetTerms(String, Int32, Boolean) GetTerms(String, Int32, Boolean) GetTerms(String, Int32, Boolean)

Gets Term objects from all of the TermSet objects, which are not scoped to an SPSite object, from all TermStore objects with a Label object in the provided lcid matching the string provided.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTerms(System::String ^ termLabel, int lcid, bool trimUnavailable);
public Microsoft.SharePoint.Taxonomy.TermCollection GetTerms (string termLabel, int lcid, bool trimUnavailable);
Public Function GetTerms (termLabel As String, lcid As Integer, trimUnavailable As Boolean) As TermCollection
Parameters
termLabel
String String String

String to search.

lcid
Int32 Int32 Int32

Language to search.

trimUnavailable
Boolean Boolean Boolean

yes if it trims the unavailable Term objects from the result collection; no if it includes the unavailable Term objects in the result collection.

Returns

A sorted collection of Term objects.

Remarks

The method searches all Label objects in the provided LCID, returns the top 100 Term objects from each TermStore, and combines the results into one sorted collection.

The search results are returned directly from TermStore. The TermStore object may not be synchronized with changes that have been made but not committed. For best results, call the CommitAll() method or call the RollbackAll() method before calling this method.

GetTerms(String, Boolean, StringMatchOption, Int32, Boolean) GetTerms(String, Boolean, StringMatchOption, Int32, Boolean)

Searches Label objects in all working languages, and returns Term objects from all TermSet objects, which are not scoped to an SPSite object, from all TermStore objects with a Label object matching the provided string.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTerms(System::String ^ termLabel, bool defaultLabelOnly, Microsoft::SharePoint::Taxonomy::StringMatchOption stringMatchOption, int resultCollectionSize, bool trimUnavailable);
public Microsoft.SharePoint.Taxonomy.TermCollection GetTerms (string termLabel, bool defaultLabelOnly, Microsoft.SharePoint.Taxonomy.StringMatchOption stringMatchOption, int resultCollectionSize, bool trimUnavailable);
Parameters
termLabel
String String String

String to search.

defaultLabelOnly
Boolean Boolean Boolean

yes if it only searches default Label objects; no if it searches all Label objects.

stringMatchOption
StringMatchOption StringMatchOption StringMatchOption

How the string is matched.

resultCollectionSize
Int32 Int32 Int32

The maximum number of Term objects to return from each TermStore object.

trimUnavailable
Boolean Boolean Boolean

yes if it trims the unavailable Term objects from the result collection; no if it includes the unavailable Term objects in the result collection.

Returns

A sorted collection of Term objects.

Remarks

The search results are returned directly from the TermStore object. The TermStore object may not be synchronized with changes that have been made but not committed. For best results, call the CommitAll() method or call the RollbackAll() method before calling this method.

GetTerms(String, Int32, Boolean, StringMatchOption, Int32, Boolean, Boolean) GetTerms(String, Int32, Boolean, StringMatchOption, Int32, Boolean, Boolean)

Searches labels in the provided lcid, and returns Term objects from all TermSet objects, which are not scoped to an SPSite object, from all TermStore objects with a Label matching the provided string.

public:
 Microsoft::SharePoint::Taxonomy::TermCollection ^ GetTerms(System::String ^ termLabel, int lcid, bool defaultLabelOnly, Microsoft::SharePoint::Taxonomy::StringMatchOption stringMatchOption, int resultCollectionSize, bool trimUnavailable, bool trimDeprecated);
public Microsoft.SharePoint.Taxonomy.TermCollection GetTerms (string termLabel, int lcid, bool defaultLabelOnly, Microsoft.SharePoint.Taxonomy.StringMatchOption stringMatchOption, int resultCollectionSize, bool trimUnavailable, bool trimDeprecated);
Parameters
termLabel
String String String

String to search.

lcid
Int32 Int32 Int32

Language to search.

defaultLabelOnly
Boolean Boolean Boolean

yes if it only searches default Label objects; no if it searches all Label objects.

stringMatchOption
StringMatchOption StringMatchOption StringMatchOption

How the string is matched.

resultCollectionSize
Int32 Int32 Int32

The maximum number of Term objects to return from each TermStore object.

trimUnavailable
Boolean Boolean Boolean

yes if it trims the unavailable Term objects from the result collection; no if it includes the unavailable Term objects in the result collection.

trimDeprecated
Boolean Boolean Boolean

yes if it trims the deprecated Term objects from the result collection; no if it includes the deprecated Term objects in the result collection.

Returns

A sorted collection of Term objects.

Remarks

The search results are returned directly from the TermStore object. The TermStore object may not be synchronized with changes that have been made but not committed. For best results, call the CommitAll() method or call the RollbackAll() method before calling this method.

Applies to