org.apache.lucene.queryParser.core.config
Class FieldConfig

java.lang.Object
  extended by org.apache.lucene.util.AttributeSource
      extended by org.apache.lucene.queryParser.core.config.AbstractQueryConfig
          extended by org.apache.lucene.queryParser.core.config.FieldConfig

public class FieldConfig
extends AbstractQueryConfig

This class represents a field configuration. Every configuration should be set using the methods inherited from AttributeSource.

See Also:
QueryConfigHandler, Attribute

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
 
Constructor Summary
FieldConfig(CharSequence fieldName)
          Deprecated. use FieldConfig(String) instead
FieldConfig(String fieldName)
          Constructs a FieldConfig
 
Method Summary
 String getField()
          Returns the field name this configuration represents.
 CharSequence getFieldName()
          Deprecated. use getField() instead
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
addAttribute, get, get, has, set, unset
 
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldConfig

@Deprecated
public FieldConfig(CharSequence fieldName)
Deprecated. use FieldConfig(String) instead

Constructs a FieldConfig

Parameters:
fieldName - the field name, it cannot be null
Throws:
IllegalArgumentException - if the field name is null

FieldConfig

public FieldConfig(String fieldName)
Constructs a FieldConfig

Parameters:
fieldName - the field name, it cannot be null
Throws:
IllegalArgumentException - if the field name is null
Method Detail

getFieldName

@Deprecated
public CharSequence getFieldName()
Deprecated. use getField() instead

Returns the field name this configuration represents.

Returns:
the field name

getField

public String getField()
Returns the field name this configuration represents.

Returns:
the field name

toString

public String toString()
Description copied from class: AttributeSource
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as in Lucene 2.9/3.0. In Lucene 4.0 this default implementation will be removed.

It is recommeneded to use AttributeSource.reflectAsString(boolean) or AttributeSource.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeSource's internals.

Overrides:
toString in class AttributeSource


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.