|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.gouv.culture.sdx.utils.AbstractSdxObject fr.gouv.culture.sdx.search.lucene.Field
public class Field
A field for indexing.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface fr.gouv.culture.sdx.utils.SdxObject |
---|
SdxObject.ConfigurationNode |
Field Summary | |
---|---|
static java.lang.String |
CLASS_NAME_SUFFIX
String representation of the pipeline class name suffix. |
static int |
DATE
Field type "date". |
static int |
FIELD
Field type "field" |
static int |
UNINDEXED
Field type "unindexed". |
static int |
WORD
Field type "word". |
static int |
XML
Field type "xml". |
Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
---|
_configuration, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized |
Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable |
---|
DEFAULT_ENCODING |
Constructor Summary | |
---|---|
Field()
Constructor to satisfy needs of RMI and Serializable implementation |
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Configures the field |
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
Set's the super.getLog() for the field. |
Analyzer |
getAnalyzer()
Provides access to the analyzer for this field. |
protected java.lang.String |
getClassNameSuffix()
Sub classes should element this method to return their class name suffix for SAX output |
java.lang.String |
getCode()
Returns the field's code (name) |
java.text.Collator |
getCollator()
Returns a collator for sorting this field. |
protected org.apache.avalon.framework.context.DefaultContext |
getContext()
|
int |
getFieldType()
Returns the type of the field. |
java.util.Locale |
getLocale()
Provides access to the locale for this field. |
org.apache.lucene.document.Field |
getLuceneField(java.lang.String content)
Returns the Lucene field for the search field. |
boolean |
getStoreTermVector()
|
java.lang.String |
getTypeName()
Returns the type Name of the field. |
protected boolean |
initToSax()
Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML |
protected void |
initVolatileObjectsToSax()
Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called |
boolean |
isDefault()
Indicates if this field is defined as a default field. |
boolean |
isInBrief()
|
void |
setAnalyzer(Analyzer analyzer)
|
void |
setFieldType(java.lang.String type)
Sets the type for this field |
void |
setUp(java.util.Locale locale,
Analyzer analyzer,
java.lang.String analyzerClass,
java.lang.String analyzerConfFile)
Builds a field object with params |
Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
---|
configureDescription, getBaseAttributes, getConfiguration, getDescription, getEncoding, getId, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_NAME_SUFFIX
public static final int WORD
public static final int FIELD
public static final int DATE
public static final int UNINDEXED
public static final int XML
Constructor Detail |
---|
public Field()
Method Detail |
---|
public void setUp(java.util.Locale locale, Analyzer analyzer, java.lang.String analyzerClass, java.lang.String analyzerConfFile)
locale
- The locale to use as a default if none specified in the configurationanalyzer
- The default analyzer to use if none specified in the configurationanalyzerClass
- The fully qualified class name to use as a defaultanalyzerConfFile
- The anlayzer configuration file path to use as a defaultprotected java.lang.String getClassNameSuffix()
AbstractSdxObject
getClassNameSuffix
in class AbstractSdxObject
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging
in interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
in class AbstractSdxObject
logger
- The super.getLog() to usepublic void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException
contextualize
in interface org.apache.avalon.framework.context.Contextualizable
contextualize
in class AbstractSdxObject
org.apache.avalon.framework.context.ContextException
protected org.apache.avalon.framework.context.DefaultContext getContext()
getContext
in class AbstractSdxObject
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configure
in class AbstractSdxObject
configuration
-
org.apache.avalon.framework.configuration.ConfigurationException
public Analyzer getAnalyzer()
public void setAnalyzer(Analyzer analyzer)
public java.lang.String getCode()
public org.apache.lucene.document.Field getLuceneField(java.lang.String content) throws SDXException
content
- The field's content.
SDXException
public boolean isDefault()
public int getFieldType()
public java.lang.String getTypeName()
public java.util.Locale getLocale()
getLocale
in interface Localizable
getLocale
in class AbstractSdxObject
public java.text.Collator getCollator()
public void setFieldType(java.lang.String type)
type
- The field type as a string from our configuration object (element in app.xconf)public boolean isInBrief()
public boolean getStoreTermVector()
protected boolean initToSax()
AbstractSdxObject
initToSax
in class AbstractSdxObject
protected void initVolatileObjectsToSax()
initVolatileObjectsToSax
in class AbstractSdxObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |