com.languagecomputer.api.query
Class MergedQuery

java.lang.Object
  extended by com.languagecomputer.api.query.MergedQuery
All Implemented Interfaces:
Query

public class MergedQuery
extends Object
implements Query

A Query implementation that acts as a merger of more than one Query objects. Queries are given in a preferential order which is used when multiple Query objects possess the same elements.

Since:
1.0
Author:
Kirk Roberts

Constructor Summary
MergedQuery(List<Query> queries)
          Creates a new MergedQuery with the given Querys.
 
Method Summary
 Set<Keyword> getKeywords()
          Returns the keywords for this Query.
 String getNaturalLanguage()
          Returns the natural language representation for this Query.
 Set<String> getRequiredEntityTypes()
          Returns the required entity types for this Query.
 String getStructuredQuery()
          Returns the structured data query for this Query.
 List<Query> getSubQueries()
          Returns the Query subobjects that compose this MergedQuery.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergedQuery

public MergedQuery(List<Query> queries)
Creates a new MergedQuery with the given Querys.

Method Detail

getNaturalLanguage

public String getNaturalLanguage()
Returns the natural language representation for this Query. This could be a question, a command, or just traditional keywords.

Specified by:
getNaturalLanguage in interface Query
Returns:
A String representation of this Query, or null if it has no natural language representation.

getKeywords

public Set<Keyword> getKeywords()
Returns the keywords for this Query.

Specified by:
getKeywords in interface Query
Returns:
A Set of Keywords representing this Query, or null if it has no keyword representation.

getRequiredEntityTypes

public Set<String> getRequiredEntityTypes()
Returns the required entity types for this Query.

Specified by:
getRequiredEntityTypes in interface Query
Returns:
A Set of mandatory entity types representing this Query, or null if it has no required entity types representation.

getStructuredQuery

public String getStructuredQuery()
Returns the structured data query for this Query.

Specified by:
getStructuredQuery in interface Query
Returns:
A String-based structured query representing this Query, or null if it has no structured query representation.

getSubQueries

public List<Query> getSubQueries()
Returns the Query subobjects that compose this MergedQuery.



Copyright © 2009. All Rights Reserved.