TermStore.GetTermSets Method

Definition

Overloads

GetTermSets(String[])

Gets a collection of all TermSet objects in this Microsoft.SharePoint.TaxonomyTermStore object that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings.

GetTermSets(String, Int32)

This method retrieves a collection of all TermSets in this TermStore that the current user has permissions to read that have a matching TermSet name in the provided LCID

GetTermSets(String[], Int32)

This method retrieves a collection of all TermSets in this TermStore that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings for a specified LCID.

GetTermSets(String[])

Gets a collection of all TermSet objects in this Microsoft.SharePoint.TaxonomyTermStore object that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings.

public:
 Microsoft::SharePoint::Taxonomy::TermSetCollection ^ GetTermSets(cli::array <System::String ^> ^ requiredTermLabels);
public Microsoft.SharePoint.Taxonomy.TermSetCollection GetTermSets (string[] requiredTermLabels);
member this.GetTermSets : string[] -> Microsoft.SharePoint.Taxonomy.TermSetCollection
Public Function GetTermSets (requiredTermLabels As String()) As TermSetCollection

Parameters

requiredTermLabels
String[]

A set of labels to match against the Term.Labels of each TermSet

Returns

TermSetCollection

A collection of all TermSets in this TermStore that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings.

Exceptions

The labels in requiredTermLabels cannot be null or empty.

The value of one or more labels in requiredTermLabels is invalid. It probably contains invalid characters or is too long.

Remarks

The value of the labels in requiredTermLabels cannot be null or empty, and must not exceed 255 characters in length. They also cannot contain any of the following illegal characters ; " < > | & tab The search is case-insensitive. A TermSet will be included in the returned collection if, for each label value in requiredTermLabels, the TermSet contains a Term with a label that matches or starts with the value. There is no requirement for a single Term to contain all of the specified labels.To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() prior to executing this search.

Applies to

GetTermSets(String, Int32)

This method retrieves a collection of all TermSets in this TermStore that the current user has permissions to read that have a matching TermSet name in the provided LCID

public:
 Microsoft::SharePoint::Taxonomy::TermSetCollection ^ GetTermSets(System::String ^ termSetName, int lcid);
[Microsoft.SharePoint.Client.ClientCallable(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, Name="GetTermSetsByName")]
public Microsoft.SharePoint.Taxonomy.TermSetCollection GetTermSets (string termSetName, int lcid);
member this.GetTermSets : string * int -> Microsoft.SharePoint.Taxonomy.TermSetCollection
Public Function GetTermSets (termSetName As String, lcid As Integer) As TermSetCollection

Parameters

termSetName
String

The Name of the TermSet to be retrieved

lcid
Int32

The local identifier for the language the TermSet name is in

Returns

TermSetCollection

A collection of all TermSets in this TermStore that the current user has permissions to read that have a matching TermSet name in the provided LCID

Attributes
ClientCallableAttribute

Exceptions

The termSetName cannot be null or empty.

The value of termSetName is invalid. It probably contains invalid characters or is too long.

Remarks

The termSetName cannot be null or empty, and must not exceed 255 characters in length. It also cannot contain any of the following illegal characters ; " < > | & tab The search is case-insensitive. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() prior to executing this search.

Applies to

GetTermSets(String[], Int32)

This method retrieves a collection of all TermSets in this TermStore that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings for a specified LCID.

public:
 Microsoft::SharePoint::Taxonomy::TermSetCollection ^ GetTermSets(cli::array <System::String ^> ^ requiredTermLabels, int lcid);
[Microsoft.SharePoint.Client.ClientCallable(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, Name="GetTermSetsByTermLabel")]
public Microsoft.SharePoint.Taxonomy.TermSetCollection GetTermSets (string[] requiredTermLabels, int lcid);
member this.GetTermSets : string[] * int -> Microsoft.SharePoint.Taxonomy.TermSetCollection
Public Function GetTermSets (requiredTermLabels As String(), lcid As Integer) As TermSetCollection

Parameters

requiredTermLabels
String[]

A set of labels to match against the Term.Labels of each TermSet

lcid
Int32

The locale identifier for the language of the Term.Labels to perform that matching upon

Returns

TermSetCollection

A collection of all TermSets in this TermStore that the current user has permissions to read that contain terms with labels matching or starting with each of the specified strings for a specified LCID

Attributes
ClientCallableAttribute

Exceptions

The labels in requiredTermLabels cannot be null or empty.

The value of one or more labels in requiredTermLabels is invalid. It probably contains invalid characters or is too long.

The lcid value must be one of the working languages in the current term store.

Remarks

The value of the labels in requiredTermLabels cannot be null or empty, and must not exceed 255 characters in length. They also cannot contain any of the following illegal characters ; " < > | & tab The lcid value must be one of the working languages of the term store, specified by TermStore.Languages. The search is case-insensitive. A TermSet will be included in the returned collection if, for each label value in requiredTermLabels, the TermSet contains a Term with a label that matches or starts with the value for the specified lcid. There is no requirement for a single Term to contain all of the specified labels. To get the most accurate results it is recommended that any pending changes be committed to the database using CommitAll() prior to executing this search.

Applies to