org.activemath.omdocjdom.index.queries
Class OmobjAMIndexQuery

java.lang.Object
  extended by org.activemath.omdocjdom.index.queries.AbstractAMIndexQuery
      extended by org.activemath.omdocjdom.index.queries.PhraseAMIndexQuery
          extended by org.activemath.omdocjdom.index.queries.OmobjAMIndexQuery
All Implemented Interfaces:
IndexConstants

public class OmobjAMIndexQuery
extends PhraseAMIndexQuery

A query to match analysis-token-sequences of openmath objects.


Field Summary
 
Fields inherited from class org.activemath.omdocjdom.index.queries.AbstractAMIndexQuery
DEBUG, log
 
Fields inherited from interface org.activemath.omdocjdom.index.IndexConstants
FIELDNAME_id, FIELDNAME_metadata, FIELDNAME_type, LANG_ALL, LANG_UNIVERSAL, SUBFIELDNAME_field, SUBFIELDNAME_learningContext
 
Constructor Summary
OmobjAMIndexQuery(OJElement omobj, List languages, AuthorExtendedMBaseRef mbaseRef)
           
 
Method Summary
protected  org.apache.lucene.search.Query createQueryForVariation(String field, String lang)
          Creates a query for this field and language.
protected  org.apache.lucene.analysis.TokenStream createTokenStream(String fieldName, String language)
          Can be subclassed for more elaborate content than a plain string.
protected  void makeSureOmobjIsClean(OJElement omobj)
          Corrects the namespace of omobj for now.
 String toString()
           
 
Methods inherited from class org.activemath.omdocjdom.index.queries.PhraseAMIndexQuery
createAnalyzer, superToString
 
Methods inherited from class org.activemath.omdocjdom.index.queries.AbstractAMIndexQuery
asLuceneQuery, feedVariationAlongLanguages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OmobjAMIndexQuery

public OmobjAMIndexQuery(OJElement omobj,
                         List languages,
                         AuthorExtendedMBaseRef mbaseRef)
Method Detail

createQueryForVariation

protected org.apache.lucene.search.Query createQueryForVariation(String field,
                                                                 String lang)
Description copied from class: AbstractAMIndexQuery
Creates a query for this field and language.

Overrides:
createQueryForVariation in class PhraseAMIndexQuery
Parameters:
field - the field name this should apply to
lang - the language (added to the field name if non-null)
Returns:
the query that will be composed with others with varying fields and languages

createTokenStream

protected org.apache.lucene.analysis.TokenStream createTokenStream(String fieldName,
                                                                   String language)
Description copied from class: PhraseAMIndexQuery
Can be subclassed for more elaborate content than a plain string.

Overrides:
createTokenStream in class PhraseAMIndexQuery
Returns:
the normal token stream of the analyzer with field "text-" + field....

makeSureOmobjIsClean

protected void makeSureOmobjIsClean(OJElement omobj)
Corrects the namespace of omobj for now.

Parameters:
omobj -

toString

public String toString()
Overrides:
toString in class PhraseAMIndexQuery