Package org.apache.lucene.util

Examples of org.apache.lucene.util.AttributeImpl


    getAttributes().add( attr );
  }

  @Override
  public void addPayloadAttribute(byte[] payloads) {
    AttributeImpl attr = AttributeSource.AttributeFactory
        .DEFAULT_ATTRIBUTE_FACTORY
        .createAttributeInstance( PayloadAttribute.class );
    ( (PayloadAttribute) attr ).setPayload( new BytesRef( payloads ) );
    getAttributes().add( attr );
  }
View Full Code Here


    getAttributes().add( attr );
  }

  @Override
  public void addKeywordAttribute(boolean isKeyword) {
    AttributeImpl attr = AttributeSource.AttributeFactory
        .DEFAULT_ATTRIBUTE_FACTORY
        .createAttributeInstance( KeywordAttribute.class );
    ( (KeywordAttribute) attr ).setKeyword( isKeyword );
    getAttributes().add( attr );
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.util.AttributeImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.