Package com.yahoo.prelude.query
Class UriItem
- All Implemented Interfaces:
HasIndexItem,IndexedItem,TaggableItem,Cloneable
An item matching a uri field.
This is syntactic sugar for a phrase with anchor items.
- Author:
- bratseth
-
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, documentFrequency, explicitSignificance, significance, uniqueID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an end anchor as the *current* last item.voidAdds a start anchor as the *current* first item.booleanReturns whether this item is of the same class and contains the same state as the given item.Returns the canonical form of the tokens of this: Either the source string, or if none each token except the start and end anchor separated by spacebooleanReturns whether the last item of this is an end anchorinthashCode()booleanReturns whether the first item of this is a start anchorbooleanbooleanvoidsetEndAnchorDefault(boolean endAnchorDefault) voidsetSourceString(String sourceString) voidsetStartAnchorDefault(boolean startAnchorDefault) Methods inherited from class com.yahoo.prelude.query.PhraseItem
acceptsItemsOfType, addItem, addItem, appendBodyString, appendHeadingString, disclose, encode, encodeThis, encodingArity, extractSingleChild, getBlockItem, getIndexedString, getItemType, getName, getNumWords, getWordItem, isExplicit, setExplicit, setIndexName, setItem, setWeight, shouldParenthesizeMethods inherited from class com.yahoo.prelude.query.CompositeIndexedItem
appendIndexString, getIndexNameMethods inherited from class com.yahoo.prelude.query.CompositeTaggableItem
getConnectedItem, getConnectivity, getDocumentFrequency, getSignificance, getUniqueID, hasExplicitSignificance, hasUniqueID, setConnectivity, setDocumentFrequency, setExplicitSignificance, setSignificance, setUniqueIDMethods inherited from class com.yahoo.prelude.query.CompositeItem
adding, clone, ensureNotInSubtree, getItem, getItemCount, getItemIndex, getItemIterator, getTermCount, isLocked, items, lock, removeItem, removeItemMethods inherited from class com.yahoo.prelude.query.Item
addAnnotation, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, hasPrefixMatchSemantics, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, toString, usePositionData
-
Constructor Details
-
UriItem
public UriItem() -
UriItem
-
-
Method Details
-
addStartAnchorItem
public void addStartAnchorItem()Adds a start anchor as the *current* first item. This does not enforce that the items stays at the start if further items are added. -
addEndAnchorItem
public void addEndAnchorItem()Adds an end anchor as the *current* last item. This does not enforce that the items stays at the end if further items are added. -
hasStartAnchor
public boolean hasStartAnchor()Returns whether the first item of this is a start anchor -
hasEndAnchor
public boolean hasEndAnchor()Returns whether the last item of this is an end anchor -
isStartAnchorDefault
public boolean isStartAnchorDefault() -
setStartAnchorDefault
public void setStartAnchorDefault(boolean startAnchorDefault) -
isEndAnchorDefault
public boolean isEndAnchorDefault() -
setEndAnchorDefault
public void setEndAnchorDefault(boolean endAnchorDefault) -
setSourceString
-
getArgumentString
Returns the canonical form of the tokens of this: Either the source string, or if none each token except the start and end anchor separated by space -
equals
Description copied from class:CompositeItemReturns whether this item is of the same class and contains the same state as the given item.- Overrides:
equalsin classPhraseItem
-
hashCode
public int hashCode()- Overrides:
hashCodein classPhraseItem
-