org.compass.core.lucene
Class LuceneResourceFactory

java.lang.Object
  extended by org.compass.core.lucene.LuceneResourceFactory
All Implemented Interfaces:
ResourceFactory

public class LuceneResourceFactory
extends Object
implements ResourceFactory

Author:
kimchy

Constructor Summary
LuceneResourceFactory(LuceneSearchEngineFactory searchEngineFactory)
           
 
Method Summary
 Property createProperty(String name, byte[] value, Property.Store store)
          Creates a binary property.
 Property createProperty(String name, Reader value)
          Creates a property (TEXT type) for the specified reader.
 Property createProperty(String name, Reader value, Property.TermVector termVector)
          Creates a property (indexed, and not stored) for the specified reader.
 Property createProperty(String value, ResourcePropertyMapping mapping)
          Creates a Property that is used with the actual Search Engine
 Property createProperty(String value, ResourcePropertyMapping mapping, Property.Store store, Property.Index index)
           
 Property createProperty(String name, String value, Property.Store store, Property.Index index)
          Creates a Property that is used with the actual Search Engine
 Property createProperty(String name, String value, Property.Store store, Property.Index index, Property.TermVector termVector)
          Creates a Property that is used with the actual Search Engine.
 Property createProperty(String name, String value, ResourcePropertyMapping mapping)
          Creates a Property that is used with the actual Search Engine
 Property createProperty(String name, String value, ResourcePropertyMapping mapping, Property.Store store, Property.Index index)
           
 Property createProperty(String name, TokenStream tokenStream, Property.TermVector termVector)
           
 Resource createResource(String alias)
          Creates a resource, that is used with the actual Search Engine implementation.
 String getNullValue()
          Returns a null value that represents no entry in the search engine.
 boolean isNullValue(String value)
          Returns true if the value is marked as a null value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneResourceFactory

public LuceneResourceFactory(LuceneSearchEngineFactory searchEngineFactory)
Method Detail

getNullValue

public String getNullValue()
Description copied from interface: ResourceFactory
Returns a null value that represents no entry in the search engine. Usefull when the system needs to store an actual data entry, but for it to represent a business null value.

Specified by:
getNullValue in interface ResourceFactory

isNullValue

public boolean isNullValue(String value)
Description copied from interface: ResourceFactory
Returns true if the value is marked as a null value.

Specified by:
isNullValue in interface ResourceFactory

createResource

public Resource createResource(String alias)
                        throws SearchEngineException
Description copied from interface: ResourceFactory
Creates a resource, that is used with the actual Search Engine implementation.

Specified by:
createResource in interface ResourceFactory
Throws:
SearchEngineException

createProperty

public Property createProperty(String value,
                               ResourcePropertyMapping mapping)
                        throws SearchEngineException
Description copied from interface: ResourceFactory
Creates a Property that is used with the actual Search Engine

Specified by:
createProperty in interface ResourceFactory
Throws:
SearchEngineException

createProperty

public Property createProperty(String value,
                               ResourcePropertyMapping mapping,
                               Property.Store store,
                               Property.Index index)
                        throws SearchEngineException
Specified by:
createProperty in interface ResourceFactory
Throws:
SearchEngineException

createProperty

public Property createProperty(String name,
                               String value,
                               ResourcePropertyMapping mapping)
                        throws SearchEngineException
Description copied from interface: ResourceFactory
Creates a Property that is used with the actual Search Engine

Specified by:
createProperty in interface ResourceFactory
Throws:
SearchEngineException

createProperty

public Property createProperty(String name,
                               String value,
                               ResourcePropertyMapping mapping,
                               Property.Store store,
                               Property.Index index)
                        throws SearchEngineException
Throws:
SearchEngineException

createProperty

public Property createProperty(String name,
                               String value,
                               Property.Store store,
                               Property.Index index)
                        throws SearchEngineException
Description copied from interface: ResourceFactory
Creates a Property that is used with the actual Search Engine

Specified by:
createProperty in interface ResourceFactory
Throws:
SearchEngineException

createProperty

public Property createProperty(String name,
                               String value,
                               Property.Store store,
                               Property.Index index,
                               Property.TermVector termVector)
                        throws SearchEngineException
Description copied from interface: ResourceFactory
Creates a Property that is used with the actual Search Engine. The available values for the store and index parameters are provided in the Property interface (Property.Store, Property.Index, Property.TermVector).

Specified by:
createProperty in interface ResourceFactory
Throws:
SearchEngineException

createProperty

public Property createProperty(String name,
                               TokenStream tokenStream,
                               Property.TermVector termVector)

createProperty

public Property createProperty(String name,
                               Reader value)
Description copied from interface: ResourceFactory
Creates a property (TEXT type) for the specified reader.

Specified by:
createProperty in interface ResourceFactory

createProperty

public Property createProperty(String name,
                               byte[] value,
                               Property.Store store)
                        throws SearchEngineException
Description copied from interface: ResourceFactory
Creates a binary property.

Specified by:
createProperty in interface ResourceFactory
Throws:
SearchEngineException

createProperty

public Property createProperty(String name,
                               Reader value,
                               Property.TermVector termVector)
Description copied from interface: ResourceFactory
Creates a property (indexed, and not stored) for the specified reader.

Specified by:
createProperty in interface ResourceFactory


Copyright (c) 2004-2008 The Compass Project.