org.modeshape.jcr.query.model

## Class FullTextSearch

- java.lang.Object
- - org.modeshape.jcr.query.model.FullTextSearch

- All Implemented Interfaces:
    Serializable, Constraint, FullTextSearch, LanguageObject, Visitable

      @Immutable
      public class FullTextSearch
      extends Object
      implements Constraint, FullTextSearch

  A constraint that evaluates to true only when a full-text search applied to the search scope results in positive findings. If a property name is supplied, then the search is limited to the value(s) of the named property on the node(s) in the search scope.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FullTextSearch.CompoundTerm` A list of `FullTextSearch.Term`s.
    `static class` | `FullTextSearch.Conjunction` A set of `FullTextSearch.Term`s that are ANDed together.
    `static class` | `FullTextSearch.Disjunction` A set of `FullTextSearch.Term`s that are ORed together.
    `static class` | `FullTextSearch.NegationTerm` A `FullTextSearch.Term` that represents a search term that requires another term to not appear.
    `static class` | `FullTextSearch.SimpleTerm` A `FullTextSearch.Term` that represents a single search term.
    `static interface` | `FullTextSearch.Term` The general notion of a term that makes up a full-text search.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FullTextSearch(SelectorName selectorName, String fullTextSearchExpression)` Create a constraint defining a full-text search against the node within the search scope.
    `FullTextSearch(SelectorName selectorName, String propertyName, StaticOperand fullTextSearchExpression, FullTextSearch.Term term)` Create a constraint defining a full-text search against the property values on node within the search scope.
    `FullTextSearch(SelectorName selectorName, String propertyName, String fullTextSearchExpression)` Create a constraint defining a full-text search against the property values on node within the search scope.
    `FullTextSearch(SelectorName selectorName, String propertyName, String fullTextSearchExpression, FullTextSearch.Term term)` Create a constraint defining a full-text search against the property values on node within the search scope.
    `FullTextSearch(SelectorName selectorName, String propertyName, String expressionString, StaticOperand fullTextSearchExpression)` Create a constraint defining a full-text search against the property values on node within the search scope.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(Visitor visitor)` Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
    `boolean` | `equals(Object obj)`
    `String` | `fullTextSearchExpression()` Get the full-text search expression, as a string.
    `StaticOperand` | `getFullTextSearchExpression()`
    `String` | `getPropertyName()`
    `String` | `getSelectorName()`
    `FullTextSearch.Term` | `getTerm()` Get the formal `FullTextSearch.Term` representation of the expression.
    `int` | `hashCode()`
    `SelectorName` | `selectorName()` Get the name of the selector that is to be searched
    `String` | `toString()`
    `protected static String` | `toString(StaticOperand operand)`
    `FullTextSearch` | `withFullTextExpression(String expression)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FullTextSearch

          public FullTextSearch(SelectorName selectorName,
                        String propertyName,
                        StaticOperand fullTextSearchExpression,
                        FullTextSearch.Term term)
                         throws RepositoryException

      Create a constraint defining a full-text search against the property values on node within the search scope.
      Parameters:
        `selectorName` - the name of the node selector defining the search scope
        `propertyName` - the name of the property to be searched; may be null if all property values are to be searched
        `fullTextSearchExpression` - the search expression
        `term` - the term representation, if it is known; may be null
      Throws:
        `RepositoryException` - if there is an error converting the full text search expression to a string

    - #### FullTextSearch

          public FullTextSearch(SelectorName selectorName,
                        String propertyName,
                        String expressionString,
                        StaticOperand fullTextSearchExpression)

      Create a constraint defining a full-text search against the property values on node within the search scope.
      Parameters:
        `selectorName` - the name of the node selector defining the search scope
        `propertyName` - the name of the property to be searched; may be null if all property values are to be searched
        `expressionString` - the string form of the full text search expression; may not be null or empty
        `fullTextSearchExpression` - the search expression

    - #### FullTextSearch

          public FullTextSearch(SelectorName selectorName,
                        String propertyName,
                        String fullTextSearchExpression,
                        FullTextSearch.Term term)

      Create a constraint defining a full-text search against the property values on node within the search scope.
      Parameters:
        `selectorName` - the name of the node selector defining the search scope
        `propertyName` - the name of the property to be searched; may be null if all property values are to be searched
        `fullTextSearchExpression` - the search expression
        `term` - the term representation, if it is known; may be null

    - #### FullTextSearch

          public FullTextSearch(SelectorName selectorName,
                        String propertyName,
                        String fullTextSearchExpression)

      Create a constraint defining a full-text search against the property values on node within the search scope.
      Parameters:
        `selectorName` - the name of the node selector defining the search scope
        `propertyName` - the name of the property to be searched; may be null if all property values are to be searched
        `fullTextSearchExpression` - the search expression

    - #### FullTextSearch

          public FullTextSearch(SelectorName selectorName,
                        String fullTextSearchExpression)

      Create a constraint defining a full-text search against the node within the search scope.
      Parameters:
        `selectorName` - the name of the node selector defining the search scope
        `fullTextSearchExpression` - the search expression

  - ### Method Detail

    - #### toString

          protected static String toString(StaticOperand operand)
                                    throws RepositoryException

      Throws:
        `RepositoryException`

    - #### selectorName

          public final SelectorName selectorName()

      Get the name of the selector that is to be searched
      Returns:
        the selector name; never null

    - #### getSelectorName

          public String getSelectorName()

      Specified by:
        `getSelectorName` in interface `FullTextSearch`

    - #### getPropertyName

          public final String getPropertyName()

      Specified by:
        `getPropertyName` in interface `FullTextSearch`

    - #### fullTextSearchExpression

          public final String fullTextSearchExpression()

      Get the full-text search expression, as a string.
      Returns:
        the search expression; never null

    - #### getFullTextSearchExpression

          public StaticOperand getFullTextSearchExpression()

      Specified by:
        `getFullTextSearchExpression` in interface `FullTextSearch`

    - #### getTerm

          public FullTextSearch.Term getTerm()

      Get the formal `FullTextSearch.Term` representation of the expression.
      Returns:
        the term representing this search; never null
      Throws:
        `ParsingException` - if there is an error producing the term representation

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### withFullTextExpression

          public FullTextSearch withFullTextExpression(String expression)

    - #### accept

          public void accept(Visitor visitor)

      Description copied from interface: `Visitable`
      Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
      Specified by:
        `accept` in interface `Visitable`
      Parameters:
        `visitor` - the visitor; never null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.