Package com.yahoo.prelude.query
Class NullItem
- java.lang.Object
-
- com.yahoo.prelude.query.Item
-
- com.yahoo.prelude.query.NullItem
-
- All Implemented Interfaces:
java.lang.Cloneable
public class NullItem extends Item
A place holder for null queries to make searchers easier to write.- Author:
- Steinar Knutsen
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.prelude.query.Item
Item.ItemCreator, Item.ItemType
-
-
Field Summary
-
Fields inherited from class com.yahoo.prelude.query.Item
connectedBacklink, connectedItem, connectivity, DEFAULT_WEIGHT, explicitSignificance, significance, uniqueID
-
-
Constructor Summary
Constructors Constructor Description NullItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendBodyString(java.lang.StringBuilder buffer)
Override to append the item body in the canonical query language of this item.void
appendHeadingString(java.lang.StringBuilder buffer)
Appends the heading of this string.int
encode(java.nio.ByteBuffer buffer)
Item.ItemType
getItemType()
Return the enumerated type of this item.java.lang.String
getName()
Returns the name of this itemint
getTermCount()
void
setIndexName(java.lang.String index)
Does nothing-
Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, clone, disclose, encodeThis, equals, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, hashCode, hasUniqueID, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, shouldParenthize, toString, usePositionData
-
-
-
-
Method Detail
-
setIndexName
public void setIndexName(java.lang.String index)
Does nothing- Specified by:
setIndexName
in classItem
-
getItemType
public Item.ItemType getItemType()
Description copied from class:Item
Return the enumerated type of this item.- Specified by:
getItemType
in classItem
-
appendBodyString
public void appendBodyString(java.lang.StringBuilder buffer)
Description copied from class:Item
Override to append the item body in the canonical query language of this item. An item is usually represented by the string([itemName] [body])
The body must be appended appended by this method.- Specified by:
appendBodyString
in classItem
-
appendHeadingString
public void appendHeadingString(java.lang.StringBuilder buffer)
Description copied from class:Item
Appends the heading of this string. As default getName() followed by a space.- Overrides:
appendHeadingString
in classItem
-
getName
public java.lang.String getName()
Description copied from class:Item
Returns the name of this item
-
getTermCount
public int getTermCount()
- Specified by:
getTermCount
in classItem
-
-