@ GET @ Path ( "search/frequency" ) @ Produces ( "application/xml" ) public FrequencyTable frequency ( @ QueryParam ( "q" ) String query , @ QueryParam ( "corpora" ) String rawCorpusNames , @ QueryParam ( "fields" ) String rawFields ) { requiredParameter ( query , "q" , "AnnisQL query" ) ; requiredParameter ( rawCorpusNames , "corpora" , "comma separated list of corpus names" ) ; requiredParameter ( rawFields , "fields" , "Comma seperated list of result vector elements." ) ; Subject user = SecurityUtils . getSubject ( ) ; List < String > corpusNames = splitCorpusNamesFromRaw ( rawCorpusNames ) ; for ( String c : corpusNames ) { user . checkPermission ( "query:matrix:" + c ) ; } QueryData data = queryDataFromParameters ( query , rawCorpusNames ) ; FrequencyTableQuery ext = FrequencyTableQuery . parse ( rawFields ) ; data . addExtension ( ext ) ; long start = new Date ( ) . getTime ( ) ; FrequencyTable freqTable = queryDao . frequency ( data ) ; long end = new Date ( ) . getTime ( ) ; logQuery ( "FREQUENCY" , query , splitCorpusNamesFromRaw ( rawCorpusNames ) , end - start ) ; return freqTable ; }
Frequency analysis .