org.apache.stanbol.entityhub.servicesapi.query
Class TextConstraint

java.lang.Object
  extended by org.apache.stanbol.entityhub.servicesapi.query.Constraint
      extended by org.apache.stanbol.entityhub.servicesapi.query.TextConstraint

public class TextConstraint
extends Constraint


Nested Class Summary
static class TextConstraint.PatternType
           
 
Nested classes/interfaces inherited from class org.apache.stanbol.entityhub.servicesapi.query.Constraint
Constraint.ConstraintType
 
Constructor Summary
TextConstraint(List<String> text, boolean caseSensitive, String... languages)
           
TextConstraint(List<String> text, String... languages)
          Creates a TextConstraint for multiple texts and languages.
TextConstraint(List<String> text, TextConstraint.PatternType wildcardType, boolean caseSensitive, String... languages)
           
TextConstraint(String text, boolean caseSensitive, String... languages)
           
TextConstraint(String text, String... languages)
          Creates a TextConstraint for a text and languages.
TextConstraint(String text, TextConstraint.PatternType wildcardType, boolean caseSensitive, String... languages)
           
 
Method Summary
 Set<String> getLanguages()
          The set of languages for this query.
 TextConstraint.PatternType getPatternType()
          The pattern type to be used for this query.
 String getText()
          Deprecated.  
 List<String> getTexts()
          Getter for the text constraints.
 boolean isCaseSensitive()
          If the query is case sensitive
 String toString()
           
 
Methods inherited from class org.apache.stanbol.entityhub.servicesapi.query.Constraint
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextConstraint

public TextConstraint(List<String> text,
                      String... languages)
Creates a TextConstraint for multiple texts and languages. Parsed texts are connected using OR and may appear in any of the parsed languages.

Parameters:
text - the texts or null to search for any text in active languages
languages - the set of active languages

TextConstraint

public TextConstraint(String text,
                      String... languages)
Creates a TextConstraint for a text and languages.

Parameters:
text - the text or null to search for any text in active languages
languages - the set of active languages.

TextConstraint

public TextConstraint(List<String> text,
                      boolean caseSensitive,
                      String... languages)

TextConstraint

public TextConstraint(String text,
                      boolean caseSensitive,
                      String... languages)

TextConstraint

public TextConstraint(String text,
                      TextConstraint.PatternType wildcardType,
                      boolean caseSensitive,
                      String... languages)

TextConstraint

public TextConstraint(List<String> text,
                      TextConstraint.PatternType wildcardType,
                      boolean caseSensitive,
                      String... languages)
Method Detail

getPatternType

public final TextConstraint.PatternType getPatternType()
The pattern type to be used for this query.

Returns:
the wildcardType

getLanguages

public final Set<String> getLanguages()
The set of languages for this query.

Returns:
the languages

isCaseSensitive

public final boolean isCaseSensitive()
If the query is case sensitive

Returns:
the caseSensitive state

getTexts

public final List<String> getTexts()
Getter for the text constraints. Multiple constraints need to be connected with OR. For AND simple post all required words in a single String.

Returns:
the text constraints

getText

@Deprecated
public final String getText()
Deprecated. 

Getter for the first text constraint. If multiple constrains are set only the first one will be returned.

Returns:
the fist text constraint (of possible multiple text constraints)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.