org.compass.core.lucene.support
Class ResourceHelper

java.lang.Object
  extended by org.compass.core.lucene.support.ResourceHelper

public abstract class ResourceHelper
extends Object

A set of helper methods around Resource.

Author:
kimchy

Constructor Summary
ResourceHelper()
           
 
Method Summary
static Query buildResourceLoadQuery(ResourceKey resourceKey)
          Constructs a query that can be used to load the given resource based on the resource key.
static Resource[] hitsToResourceArray(Hits hits, LuceneSearchEngine searchEngine)
          Converts a set of hits into an array of resources.
static Resource[] hitsToResourceArray(TermDocs termDocs, IndexReader indexReader, LuceneSearchEngine searchEngine)
          Converts terms docs into an array of resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceHelper

public ResourceHelper()
Method Detail

buildResourceLoadQuery

public static Query buildResourceLoadQuery(ResourceKey resourceKey)
Constructs a query that can be used to load the given resource based on the resource key.


hitsToResourceArray

public static Resource[] hitsToResourceArray(TermDocs termDocs,
                                             IndexReader indexReader,
                                             LuceneSearchEngine searchEngine)
                                      throws IOException
Converts terms docs into an array of resources.

Throws:
IOException

hitsToResourceArray

public static Resource[] hitsToResourceArray(Hits hits,
                                             LuceneSearchEngine searchEngine)
                                      throws SearchEngineException
Converts a set of hits into an array of resources.

Throws:
SearchEngineException


Copyright (c) 2004-2009 The Compass Project.