|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.ae.lucene.DefaultFieldBuilder
public class DefaultFieldBuilder
Default implementation of a FieldBuilder.
Field Summary | |
---|---|
private float |
boost
|
private java.util.List<org.apache.uima.cas.Feature> |
features
|
private java.lang.String |
fieldName
|
private java.lang.String |
keywordType
|
private org.apache.uima.cas.Type |
type
|
Constructor Summary | |
---|---|
DefaultFieldBuilder(java.lang.String fieldName,
org.apache.uima.cas.Type type,
org.apache.uima.cas.Feature feature)
Constructs a DefaultFieldBuilder. |
|
DefaultFieldBuilder(java.lang.String fieldName,
org.apache.uima.cas.Type type,
org.apache.uima.cas.Feature feature,
float boost)
Constructs a DefaultFieldBuilder. |
Method Summary | |
---|---|
void |
addFeature(org.apache.uima.cas.Feature feature)
Adds a feature. |
org.apache.lucene.document.Field |
build(org.apache.uima.cas.CAS cas,
org.apache.lucene.document.Document doc,
Keywords keywords)
Builds a Field in the specified Document using values from the specified CAS. |
java.lang.String |
getFieldName()
Gets the name of the field this builder will create. |
java.lang.String |
getKeywordType()
If this field holds keywords, then this gets the keyword type (e.g. |
(package private) boolean |
isValid()
|
void |
setKeywordType(java.lang.String type)
Sets the keyword type for this field builder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String fieldName
private java.util.List<org.apache.uima.cas.Feature> features
private org.apache.uima.cas.Type type
private float boost
private java.lang.String keywordType
Constructor Detail |
---|
public DefaultFieldBuilder(java.lang.String fieldName, org.apache.uima.cas.Type type, org.apache.uima.cas.Feature feature)
fieldName
- the name of the field to buildtype
- the annotation type that contains the features that
become the content of the fieldfeature
- the feature whose values become the content of the fieldpublic DefaultFieldBuilder(java.lang.String fieldName, org.apache.uima.cas.Type type, org.apache.uima.cas.Feature feature, float boost)
fieldName
- the name of the field to buildtype
- the annotation type that contains the features that
become the content of the fieldfeature
- the feature whose values become the content of the fieldboost
- the lucene boost value for the created fieldMethod Detail |
---|
public java.lang.String getKeywordType()
getKeywordType
in interface FieldBuilder
public void setKeywordType(java.lang.String type)
type
- the keyword typepublic java.lang.String getFieldName()
FieldBuilder
getFieldName
in interface FieldBuilder
public void addFeature(org.apache.uima.cas.Feature feature)
feature
- the feature to addboolean isValid()
public org.apache.lucene.document.Field build(org.apache.uima.cas.CAS cas, org.apache.lucene.document.Document doc, Keywords keywords) throws AIDAException
build
in interface FieldBuilder
cas
- the CAS to use to build the fielddoc
- the doc to add the fields to
AIDAException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |