public class Field extends AbstractSdxObject implements org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Configurable, java.io.Serializable
SdxObject.ConfigurationNode| Modifier and Type | Field and Description |
|---|---|
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".
|
_configuration, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitializedDEFAULT_ENCODING| Constructor and Description |
|---|
Field()
Constructor to satisfy needs of RMI and Serializable implementation
|
| Modifier and Type | Method and Description |
|---|---|
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
|
configureDescription, getBaseAttributes, getConfiguration, getDescription, getEncoding, getId, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResourcespublic 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
public Field()
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()
AbstractSdxObjectgetClassNameSuffix in class AbstractSdxObjectpublic void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging in interface org.apache.avalon.framework.logger.LogEnabledenableLogging in class AbstractSdxObjectlogger - 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.Contextualizablecontextualize in class AbstractSdxObjectorg.apache.avalon.framework.context.ContextExceptionprotected org.apache.avalon.framework.context.DefaultContext getContext()
getContext in class AbstractSdxObjectpublic void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractSdxObjectconfiguration - org.apache.avalon.framework.configuration.ConfigurationExceptionpublic 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.SDXExceptionpublic boolean isDefault()
public int getFieldType()
public java.lang.String getTypeName()
public java.util.Locale getLocale()
getLocale in interface LocalizablegetLocale in class AbstractSdxObjectpublic 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()
AbstractSdxObjectinitToSax in class AbstractSdxObjectprotected void initVolatileObjectsToSax()
initVolatileObjectsToSax in class AbstractSdxObjectCopyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.