public class PredicateQueryItem extends SimpleTaggableItem
Modifier and Type | Class and Description |
---|---|
static class |
PredicateQueryItem.Entry |
static class |
PredicateQueryItem.EntryBase |
static class |
PredicateQueryItem.RangeEntry |
Item.ItemCreator, Item.ItemType
Modifier and Type | Field and Description |
---|---|
static long |
ALL_SUB_QUERIES |
connectedBacklink, connectedItem, connectivity, DEFAULT_WEIGHT, explicitSignificance, significance, uniqueID
Constructor and Description |
---|
PredicateQueryItem() |
Modifier and Type | Method and Description |
---|---|
void |
addFeature(PredicateQueryItem.Entry entry)
Adds a feature/value-pair to the predicate query.
|
void |
addFeature(String key,
String value)
Adds a feature/value-pair to the predicate query.
|
void |
addFeature(String key,
String value,
long subQueryBitmap)
Adds a feature/value-pair to the predicate query.
|
void |
addRangeFeature(PredicateQueryItem.RangeEntry entry)
Adds a range feature with a given value to the predicate query.
|
void |
addRangeFeature(String key,
long value)
Adds a range feature with a given value to the predicate query.
|
void |
addRangeFeature(String key,
long value,
long subQueryBitmap)
Adds a range feature with a given value to the predicate query.
|
protected void |
appendBodyString(StringBuilder buffer)
Override to append the item body in the canonical query language of this item.
|
PredicateQueryItem |
clone()
Returns a deep copy of this item
|
int |
encode(ByteBuffer buffer) |
Collection<PredicateQueryItem.Entry> |
getFeatures() |
String |
getIndexName() |
Item.ItemType |
getItemType()
Return the enumerated type of this item.
|
String |
getName()
Returns the name of this item
|
Collection<PredicateQueryItem.RangeEntry> |
getRangeFeatures() |
int |
getTermCount() |
void |
setIndexName(String index)
Sets the field name to be used for the predicates.
|
getConnectedItem, getConnectivity, getSignificance, getUniqueID, hasExplicitSignificance, hasUniqueID, setConnectivity, setExplicitSignificance, setSignificance, setUniqueID
addAnnotation, appendHeadingString, disclose, encodeThis, equals, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, hashCode, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, shouldParenthize, toString, usePositionData
public static final long ALL_SUB_QUERIES
public void setIndexName(String index)
setIndexName
in class Item
index
- name of the field.public String getIndexName()
public void addFeature(String key, String value)
key
- name of the feature to be set in this query.value
- value of the feature.public void addFeature(String key, String value, long subQueryBitmap)
key
- name of the feature to be set in this query.value
- value of the feature.subQueryBitmap
- bitmap specifying which sub queries this feature applies to.public void addFeature(PredicateQueryItem.Entry entry)
entry
- the feature to add.public void addRangeFeature(String key, long value)
key
- name of the feature to be set in this query.value
- value of the feature.public void addRangeFeature(String key, long value, long subQueryBitmap)
key
- name of the feature to be set in this query.value
- value of the feature.subQueryBitmap
- bitmap specifying which sub queries this feature applies to.public void addRangeFeature(PredicateQueryItem.RangeEntry entry)
entry
- the feature to add.public Collection<PredicateQueryItem.Entry> getFeatures()
public Collection<PredicateQueryItem.RangeEntry> getRangeFeatures()
public Item.ItemType getItemType()
Item
getItemType
in class Item
public int encode(ByteBuffer buffer)
public int getTermCount()
getTermCount
in class Item
protected void appendBodyString(StringBuilder buffer)
Item
([itemName] [body])The body must be appended appended by this method.
appendBodyString
in class Item
public PredicateQueryItem clone()
Item
Copyright © 2018. All rights reserved.