/** Returns the related attributes. */ public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** * Returns the related attributes. * @deprecated this method is unused and will be removed in 7.0 */ @Deprecated public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** {@inheritDoc} */ @Override public TermsEnum getTermsEnumForSuggestions(final Terms terms) throws IOException { if (terms == null) { return TermsEnum.EMPTY; } return getTermsEnum(terms, new AttributeSource()); }
/** {@inheritDoc} */ @Override public TermsEnum getTermsEnumForSuggestions(final Terms terms) throws IOException { if (terms == null) { return TermsEnum.EMPTY; } return super.getTermsEnum(terms, new AttributeSource()); }
/** {@inheritDoc} */ @Override public TermsEnum getTermsEnumForSuggestions(final Terms terms) throws IOException { if (terms == null) { return TermsEnum.EMPTY; } return super.getTermsEnum(terms, new AttributeSource()); }
/** Convenience method, if no attributes are needed: * This simply passes empty attributes and is equal to: * <code>getTermsEnum(terms, new AttributeSource())</code> */ protected final TermsEnum getTermsEnum(Terms terms) throws IOException { return getTermsEnum(terms, new AttributeSource()); }
/** * Performs a clone of all {@link AttributeImpl} instances returned in a new * {@code AttributeSource} instance. This method can be used to e.g. create another TokenStream * with exactly the same attributes (using {@link #AttributeSource(AttributeSource)}). * You can also use it as a (non-performant) replacement for {@link #captureState}, if you need to look * into / modify the captured state. */ public final AttributeSource cloneAttributes() { final AttributeSource clone = new AttributeSource(this.factory); if (hasAttributes()) { // first clone the impls for (State state = getCurrentState(); state != null; state = state.next) { clone.attributeImpls.put(state.attribute.getClass(), state.attribute.clone()); } // now the interfaces for (Entry<Class<? extends Attribute>, AttributeImpl> entry : this.attributes.entrySet()) { clone.attributes.put(entry.getKey(), clone.attributeImpls.get(entry.getValue().getClass())); } } return clone; }
/** Returns the related attributes. */ public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** Returns the related attributes. */ public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** Returns the related attributes. */ public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** Returns the related attributes. */ public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** Returns the related attributes. */ public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** Returns the related attributes. */ public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** * Returns the related attributes. * @deprecated this method is unused and will be removed in 7.0 */ @Deprecated public AttributeSource attributes() { if (atts == null) atts = new AttributeSource(); return atts; }
/** Convenience method, if no attributes are needed: * This simply passes empty attributes and is equal to: * <code>getTermsEnum(terms, new AttributeSource())</code> */ protected final TermsEnum getTermsEnum(Terms terms) throws IOException { return getTermsEnum(terms, new AttributeSource()); }
/** * Convenience method, if no attributes are needed: * This simply passes empty attributes and is equal to: * <code>getTermsEnum(terms, new AttributeSource())</code> */ protected final TermsEnum getTermsEnum(final Terms terms) throws IOException { return this.getTermsEnum(terms, new AttributeSource()); }
/** Convenience method, if no attributes are needed: * This simply passes empty attributes and is equal to: * <code>getTermsEnum(terms, new AttributeSource())</code> */ protected final TermsEnum getTermsEnum(Terms terms) throws IOException { return getTermsEnum(terms, new AttributeSource()); }
/** * Convenience method, if no attributes are needed: * This simply passes empty attributes and is equal to: * <code>getTermsEnum(terms, new AttributeSource())</code> */ protected final TermsEnum getTermsEnum(final Terms terms) throws IOException { return this.getTermsEnum(terms, new AttributeSource()); }
/** Convenience method, if no attributes are needed: * This simply passes empty attributes and is equal to: * <code>getTermsEnum(terms, new AttributeSource())</code> */ protected final TermsEnum getTermsEnum(Terms terms) throws IOException { return getTermsEnum(terms, new AttributeSource()); }
numFillerTokensToInsert = Math.min(posIncrAtt.getPositionIncrement(), maxShingleSize - 1); if (numFillerTokensToInsert > 0) { nextInputStreamToken = new AttributeSource(getAttributeFactory()); nextInputStreamToken.addAttribute(CharTermAttribute.class); OffsetAttribute newOffsetAtt = nextInputStreamToken.addAttribute(OffsetAttribute.class);