SMILA (incubation) API documentation

org.eclipse.smila.search.lucene.messages.indexstructure
Class DIndexStructure

java.lang.Object
  extended by org.eclipse.smila.search.utils.indexstructure.DIndexStructure
      extended by org.eclipse.smila.search.lucene.messages.indexstructure.DIndexStructure

public class DIndexStructure
extends DIndexStructure


Constructor Summary
DIndexStructure()
           
 
Method Summary
 DIndexField addField(DIndexField dIndexField)
           
 boolean doesFieldTypeMatch(DField field)
           
 boolean equals(java.lang.Object obj)
          Checks equality of two IndexStructure objects, including their names.
 boolean equalsStructure(DIndexStructure indexStructure, boolean throwException)
          Checks structural equality of two IndexStructure objects.
 DAnalyzer getAnalyzer()
           
 DIndexField getField(int fieldNo)
           
 int getFieldCount()
           
 java.util.Iterator<DIndexField> getFields()
           
 boolean hasField(int fieldNo)
           
 void removeField(DIndexField dIndexField)
           
 DIndexField removeField(int fieldNo)
           
 void setAnalyzer(DAnalyzer analyzer)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.smila.search.utils.indexstructure.DIndexStructure
equals, getName, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DIndexStructure

public DIndexStructure()
Method Detail

addField

public DIndexField addField(DIndexField dIndexField)
Specified by:
addField in class DIndexStructure

removeField

public void removeField(DIndexField dIndexField)

removeField

public DIndexField removeField(int fieldNo)
Specified by:
removeField in class DIndexStructure

getFields

public java.util.Iterator<DIndexField> getFields()
Specified by:
getFields in class DIndexStructure

getField

public DIndexField getField(int fieldNo)
Specified by:
getField in class DIndexStructure

getFieldCount

public int getFieldCount()
Specified by:
getFieldCount in class DIndexStructure

getAnalyzer

public DAnalyzer getAnalyzer()

setAnalyzer

public void setAnalyzer(DAnalyzer analyzer)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Checks equality of two IndexStructure objects, including their names. This will return true only if all attributes and child elements are equal, including the name attribute.

WARNING:This method will return false when comparing two indexes with different names, even if they have the same structure. In such cases, use equalsStructure(Object).

Overrides:
equals in class java.lang.Object
Parameters:
obj - -
Returns:
boolean

equalsStructure

public boolean equalsStructure(DIndexStructure indexStructure,
                               boolean throwException)
Checks structural equality of two IndexStructure objects. This will return true if its child elements (Analyzer and IndexFields) are equal. This method does not consider the name attribute. Thus, comparison of two indexes with the same structure will return true, even if their names differ. If exact checking, including index name, is reuired, use equals(Object) instead.

Specified by:
equalsStructure in class DIndexStructure
Parameters:
indexStructure - -
See Also:
DIndexStructure.equalsStructure(org.eclipse.smila.search.utils.indexstructure.DIndexStructure, boolean)

hasField

public boolean hasField(int fieldNo)
Specified by:
hasField in class DIndexStructure

doesFieldTypeMatch

public boolean doesFieldTypeMatch(DField field)
Specified by:
doesFieldTypeMatch in class DIndexStructure

SMILA (incubation) API documentation