Class CompositeIndexedItem

  • All Implemented Interfaces:
    HasIndexItem, IndexedItem, TaggableItem, java.lang.Cloneable
    Direct Known Subclasses:
    PhraseItem

    public abstract class CompositeIndexedItem
    extends CompositeTaggableItem
    implements IndexedItem
    Common implementation for Item classes implementing the IndexedItem interface. Note that this file exist in 3 copies that should be kept in sync: CompositeIndexedItem.java SimpleIndexedItem.java IndexedSegmentItem.java These should only have trivial differences. (multiple inheritance or mixins would have been nice).
    Author:
    arnej27959
    • Constructor Detail

      • CompositeIndexedItem

        public CompositeIndexedItem()
    • Method Detail

      • getIndexName

        public java.lang.String getIndexName()
        The name of the index this belongs to, or "" (never null) if not specified
        Specified by:
        getIndexName in interface HasIndexItem
      • encodeThis

        protected void encodeThis​(java.nio.ByteBuffer buffer)
        Description copied from class: CompositeItem
        Encodes just this item, not it's usual subitems, to the given buffer.
        Overrides:
        encodeThis in class CompositeItem
      • appendIndexString

        protected void appendIndexString​(java.lang.StringBuilder buffer)
        Appends the index prefix if necessary
      • equals

        public boolean equals​(java.lang.Object object)
        Description copied from class: CompositeItem
        Returns whether this item is of the same class and contains the same state as the given item
        Overrides:
        equals in class CompositeItem
      • getIndexedString

        public abstract java.lang.String getIndexedString()
        Description copied from interface: IndexedItem
        Return the searchable term contents of this item.
        Specified by:
        getIndexedString in interface IndexedItem
        Returns:
        a string representation of what is presumably stored in an index which will match this item
      • disclose

        public void disclose​(com.yahoo.prelude.query.textualrepresentation.Discloser discloser)
        Overrides:
        disclose in class CompositeItem