anl.aida.ae.lucene
Class FieldBuilderFactory
java.lang.Object
anl.aida.ae.lucene.FieldBuilderFactory
public class FieldBuilderFactory
- extends java.lang.Object
Creates FieldBuilders from an xml description. A sample file looks like:
anl.aida.types.Lookup:majorType
...
anl.aida.types.Lookup:majorType"
...
The values of the specified annotation features will become the indexed content of that
lucene field.
Constructor Summary |
FieldBuilderFactory(java.lang.String file)
Creates a FieldBuilderFactory using the specified file. |
Method Summary |
private void |
createBuilder(org.apache.uima.cas.TypeSystem system,
java.lang.String featureName)
|
java.util.List<FieldBuilder> |
createBuilders(org.apache.uima.cas.TypeSystem system)
Creates a list of FieldBuilders using the specified TypeSystem. |
float |
getTitleBoost()
Gets the boost value for the title field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mappingFile
private java.lang.String mappingFile
name
private java.lang.String name
keywordType
private java.lang.String keywordType
builder
private DefaultFieldBuilder builder
boost
private java.lang.Float boost
titleBoost
private float titleBoost
FieldBuilderFactory
public FieldBuilderFactory(java.lang.String file)
- Creates a FieldBuilderFactory using the specified file. The file
describes the
- Parameters:
file
- the xml field builder description file
createBuilders
public java.util.List<FieldBuilder> createBuilders(org.apache.uima.cas.TypeSystem system)
throws javax.xml.stream.XMLStreamException,
java.io.FileNotFoundException
- Creates a list of FieldBuilders using the specified TypeSystem.
- Parameters:
system
- the TypeSystem to use to create the fields
- Returns:
- the created list
- Throws:
javax.xml.stream.XMLStreamException
- if there is an error parsing the field builder description file
java.io.FileNotFoundException
- if the field builder description file cannot be found
getTitleBoost
public float getTitleBoost()
- Gets the boost value for the title field.
- Returns:
- the boost value for the title field.
createBuilder
private void createBuilder(org.apache.uima.cas.TypeSystem system,
java.lang.String featureName)