Example usage for org.apache.lucene.util AttributeReflector reflect

List of usage examples for org.apache.lucene.util AttributeReflector reflect

Introduction

In this page you can find the example usage for org.apache.lucene.util AttributeReflector reflect.

Prototype

public void reflect(Class<? extends Attribute> attClass, String key, Object value);

Source Link

Document

This method gets called for every property in an AttributeImpl / AttributeSource passing the class name of the Attribute , a key and the actual value.

Usage

From source file:com.github.bibreen.mecab_ko_lucene_analyzer.tokenattributes.SemanticClassAttributeImpl.java

License:Apache License

@Override
public void reflectWith(AttributeReflector reflector) {
    reflector.reflect(SemanticClassAttribute.class, "semanticClass", semanticClass());
}

From source file:com.github.cstoku.neologd.unidic.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl.java

License:Apache License

@Override
public void reflectWith(AttributeReflector reflector) {
    reflector.reflect(BaseFormAttribute.class, "baseForm", getBaseForm());
}

From source file:com.github.cstoku.neologd.unidic.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl.java

License:Apache License

@Override
public void reflectWith(AttributeReflector reflector) {
    String type = getInflectionType();
    String typeEN = type == null ? null : ToStringUtil.getInflectionTypeTranslation(type);
    reflector.reflect(InflectionAttribute.class, "inflectionType", type);
    reflector.reflect(InflectionAttribute.class, "inflectionType (en)", typeEN);
    String form = getInflectionForm();
    String formEN = form == null ? null : ToStringUtil.getInflectedFormTranslation(form);
    reflector.reflect(InflectionAttribute.class, "inflectionForm", form);
    reflector.reflect(InflectionAttribute.class, "inflectionForm (en)", formEN);
}

From source file:com.github.cstoku.neologd.unidic.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl.java

License:Apache License

@Override
public void reflectWith(AttributeReflector reflector) {
    String partOfSpeech = getPartOfSpeech();
    String partOfSpeechEN = partOfSpeech == null ? null : ToStringUtil.getPOSTranslation(partOfSpeech);
    reflector.reflect(PartOfSpeechAttribute.class, "partOfSpeech", partOfSpeech);
    reflector.reflect(PartOfSpeechAttribute.class, "partOfSpeech (en)", partOfSpeechEN);
}

From source file:com.github.cstoku.neologd.unidic.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl.java

License:Apache License

@Override
public void reflectWith(AttributeReflector reflector) {
    String reading = getReading();
    String readingEN = reading == null ? null : ToStringUtil.getRomanization(reading);
    String pronunciation = getPronunciation();
    String pronunciationEN = pronunciation == null ? null : ToStringUtil.getRomanization(pronunciation);
    reflector.reflect(ReadingAttribute.class, "reading", reading);
    reflector.reflect(ReadingAttribute.class, "reading (en)", readingEN);
    reflector.reflect(ReadingAttribute.class, "pronunciation", pronunciation);
    reflector.reflect(ReadingAttribute.class, "pronunciation (en)", pronunciationEN);
}

From source file:org.apache.solr.spelling.Token.java

License:Apache License

@Override
public void reflectWith(AttributeReflector reflector) {
    super.reflectWith(reflector);
    reflector.reflect(FlagsAttribute.class, "flags", flags);
    reflector.reflect(PayloadAttribute.class, "payload", payload);
}

From source file:org.opensextant.solrtexttagger.TaggingAttributeImpl.java

License:Open Source License

@Override
public void reflectWith(AttributeReflector reflector) {
    reflector.reflect(TaggingAttribute.class, "taggable", isTaggable());
}