Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

Product Family
Current publication
Table of Contents

AFSearchQueryToken Class

AFSearchQueryToken Class
Represents a nested search query.

Inheritance Hierarchy

System.Object
  OSIsoft.AF.Search.AFSearchTokenBase
    OSIsoft.AF.Search.AFSearchFilterToken
      OSIsoft.AF.Search.AFSearchQueryToken

Namespace:  OSIsoft.AF.Search
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.0.1156

Syntax

[SerializableAttribute]
public class AFSearchQueryToken : AFSearchFilterToken
<SerializableAttribute>
Public Class AFSearchQueryToken
	Inherits AFSearchFilterToken

Dim instance As AFSearchQueryToken
[SerializableAttribute]
public ref class AFSearchQueryToken : public AFSearchFilterToken
[<SerializableAttribute>]
type AFSearchQueryToken =  
    class
        inherit AFSearchFilterToken
    end

The AFSearchQueryToken type exposes the following members.

Constructors

  NameDescription
Public method
AFSearchQueryToken
Creates a nested AFSearchQueryToken instance for the Filter. Optionally, the initial TokenCollection may be set.

Properties

  NameDescription
Public property
Filter
The filter to be searched with the current token.
(Inherited from AFSearchTokenBase.)
Public property
Operator
The search operator to perform on the search filter with the specified Value or Values.
(Inherited from AFSearchFilterToken.)
Public property
TokenCollection
The collection of AFSearchTokenBase to be used for a nested query.
Public property
Value
The value to compare the search filter on using the specified Operator.
(Inherited from AFSearchFilterToken.)
Public property
Values
The array of values to compare the search filter on using the specified Operator.
(Inherited from AFSearchFilterToken.)

Methods

  NameDescription
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFSearchFilterToken.)
Public method
Equals(AFSearchFilterToken)
Indicates whether the current object is equal to another object of the same type.
(Overrides AFSearchFilterToken.Equals(AFSearchFilterToken).)
Public method
Equals(AFSearchQueryToken)
Indicates whether the current object is equal to another object of the same type.
Public method
Equals(AFSearchTokenBase)
Indicates whether the current object is equal to another object of the same type.
(Overrides AFSearchFilterToken.Equals(AFSearchTokenBase).)
Public method
GetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides AFSearchFilterToken.GetHashCode().)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
ToString
Returns a String that represents the current object.
(Overrides AFSearchFilterToken.ToString().)

Remarks

This class represents a nested search query.

The AFSearchFilter and AFSearchOperator topics provide more information about the filters and operators that can be used in a search token.

Examples

// The following query string and code will generate the same token collections.
IList<AFSearchTokenBase> tokensParsed = AFSearch.ParseQueryString("Parent:{ Name:Tank* OR Name:Valve* }");
IList<AFSearchTokenBase> tokens = new AFSearchTokenBase[]
{
    new AFSearchQueryToken(AFSearchFilter.Parent, new AFSearchTokenBase[]
    {
        new AFSearchExpressionToken(AFSearchLogicalOperator.Or, new AFSearchTokenBase[]
        {
            new AFSearchFilterToken(AFSearchFilter.Name, "Tank*"),
            new AFSearchFilterToken(AFSearchFilter.Name, "Valve*")
        })
    })
};
' The following query string and code will generate the same token collections.
Dim tokensParsed As IList(Of AFSearchTokenBase) = AFSearch.ParseQueryString("Parent:{ Name:Tank* OR Name:Valve* }")
Dim tokens As IList(Of AFSearchTokenBase) = New AFSearchTokenBase() {
    New AFSearchQueryToken(AFSearchFilter.Parent, New AFSearchTokenBase() {
        New AFSearchExpressionToken(AFSearchLogicalOperator.Or, New AFSearchTokenBase() {
                New AFSearchFilterToken(AFSearchFilter.Name, "Tank*"),
                New AFSearchFilterToken(AFSearchFilter.Name, "Valve*")
            })
        })
    }

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

Version Information

AFSDK

Supported in: 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5

See Also

Was this topic helpful?