ActionItem, AppItem, CommonItem, ContactItem, DocumentItem, EmailItem, EventItem, MessageItem, MusicItem, NotepadItem, NoticeItem, PhotoItem, PlaceItem, VideoItempublic abstract class Schema<T> extends IndexData
The index schema supports the following index fields: identifier, title,
subtitle, name, alternateName, category, dateCreate,
keywords, description, thumbnailUrl, url, potentialAction,
reserved1, and reserved2.
All other schemas will inherit this class, for example, ContactItem, MessageItem,
DocumentItem, EmailItem, and ContactItem.
SystemCapability.Data#DATA_SEARCH| 构造器 | 说明 |
|---|---|
Schema() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getAlternateName() |
Obtains the value of the
alternateName index field. |
String |
getCategory() |
Obtains the value of the
category index field. |
Long |
getDateCreate() |
Obtains the value of the
dateCreate index field. |
String |
getDescription() |
Obtains the value of the
description index field. |
String |
getIdentifier() |
Obtains the value of the
identifier index field. |
String |
getKeywords() |
Obtains the value of the
keywords index field. |
String |
getName() |
Obtains the value of the
name index field. |
String |
getPotentialAction() |
Obtains the value of the
potentialAction index field. |
String |
getReserved1() |
Obtains the value of the
reserved1 index field. |
String |
getReserved2() |
Obtains the value of the
reserved2 index field. |
String |
getSubtitle() |
Obtains the value of the
subtitle index field. |
String |
getThumbnailUrl() |
Obtains the value of the
thumbnailUrl index field. |
String |
getTitle() |
Obtains the value of the
title index field. |
String |
getUrl() |
Obtains the value of the
url index field. |
T |
setAlternateName(String alternateName) |
Sets the
alternateName index field. |
T |
setCategory(String category) |
Sets the
category index field. |
T |
setDateCreate(Long dateCreate) |
Sets the
dateCreate index field. |
T |
setDescription(String description) |
Sets the
description index field. |
T |
setIdentifier(String identifier) |
Sets the
identifier index field. |
T |
setKeywords(String keywords) |
Sets the
keywords index field. |
T |
setName(String name) |
Sets the
name index field. |
T |
setPotentialAction(String potentialAction) |
Sets the
potentialAction index field, which describes the available action in an
application, such as opening or downloading an application item. |
T |
setReserved1(String reserved1) |
Sets the
reserved1 index field, which is used to store custom attributes. |
T |
setReserved2(String reserved2) |
Sets the
reserved2 index field, which is used to store custom attributes. |
T |
setSubtitle(String subtitle) |
Sets the
subtitle index field. |
T |
setThumbnailUrl(String thumbnailUrl) |
Sets the
thumbnailUrl index field, which is used for displaying the thumbnail. |
T |
setTitle(String title) |
Sets the
title index field. |
T |
setUrl(String url) |
Sets the
url index field, which is used for redirecting the access. |
clear, get, getAsDouble, getAsFloat, getAsInteger, getAsLong, getAsString, getValues, isEmpty, put, put, put, put, put, remove, setValues, sizepublic Long getDateCreate()
dateCreate index field.dateCreate index field.public String getAlternateName()
alternateName index field.alternateName index field.public String getCategory()
category index field.category index field.public String getDescription()
description index field.description index field.public String getIdentifier()
identifier index field.identifier index field.public String getKeywords()
keywords index field.keywords index field.public String getName()
name index field.name index field.public String getPotentialAction()
potentialAction index field.potentialAction index field.public String getReserved1()
reserved1 index field.reserved1 index field.public String getReserved2()
reserved2 index field.reserved2 index field.public String getSubtitle()
subtitle index field.subtitle index field.public String getThumbnailUrl()
thumbnailUrl index field.thumbnailUrl index field.public String getTitle()
title index field.title index field.public String getUrl()
url index field.url index field.public T setAlternateName(String alternateName)
alternateName index field.
Attributes of this index field:
IndexForm.indexFieldName = "alternateName";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
alternateName - Indicates the alternate name to set.DocumentItem object.public T setCategory(String category)
category index field.
Attributes of this index field:
IndexForm.indexFieldName = "category";
IndexForm.indexType = IndexType.SORTED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
category - Indicates the data category to set.DocumentItem object.public T setDateCreate(Long dateCreate)
dateCreate index field.
Attributes of this index field:
IndexForm.indexFieldName = "dateCreate";
IndexForm.indexType = IndexType.LONG;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
dateCreate - Indicates the creation date to set.DocumentItem object.public T setDescription(String description)
description index field.
Attributes of this index field:
IndexForm.indexFieldName = "description";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
description - Indicates the description to set.DocumentItem object.public T setIdentifier(String identifier)
identifier index field.
Attributes of this index field:
IndexForm.indexFieldName = "identifier";
IndexForm.indexType = IndexType.NO_ANALYZED;
IndexForm.isPrimaryKey = true;
IndexForm.isStore = true;
IndexForm.isSearch = false;
identifier - Indicates the identifier to set.DocumentItem object.public T setKeywords(String keywords)
keywords index field.
Attributes of this index field:
IndexForm.indexFieldName = "keywords";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
keywords - Indicates the keywords to set.DocumentItem object.public T setName(String name)
name index field.
Attributes of this index field:
IndexForm.indexFieldName = "name";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
name - Indicates the name to set.DocumentItem object.public T setPotentialAction(String potentialAction)
potentialAction index field, which describes the available action in an
application, such as opening or downloading an application item.
Attributes of this index field:
IndexForm.indexFieldName = "potentialAction";
IndexForm.indexType = IndexType.NO;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
potentialAction - Indicates the potential action to set.DocumentItem object.public T setReserved1(String reserved1)
reserved1 index field, which is used to store custom attributes.
Attributes of this index field:
IndexForm.indexFieldName = "reserved1";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
reserved1 - Indicates the reserved field to set.DocumentItem object.public T setReserved2(String reserved2)
reserved2 index field, which is used to store custom attributes.
Attributes of this index field:
IndexForm.indexFieldName = "reserved2";
IndexForm.indexType = IndexType.NO_ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
reserved2 - Indicates the reserved field to set.DocumentItem object.public T setSubtitle(String subtitle)
subtitle index field.
Attributes of this index field:
IndexForm.indexFieldName = "subtitle";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
subtitle - Indicates the subtitle to set.DocumentItem object.public T setThumbnailUrl(String thumbnailUrl)
thumbnailUrl index field, which is used for displaying the thumbnail.
Attributes of this index field:
IndexForm.indexFieldName = "thumbnailUrl";
IndexForm.indexType = IndexType.NO;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
thumbnailUrl - Indicates the thumbnail URL to set.DocumentItem object.public T setTitle(String title)
title index field.
Attributes of this index field:
IndexForm.indexFieldName = "title";
IndexForm.indexType = IndexType.ANALYZED;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = true;
title - Indicates the title to set.DocumentItem object.public T setUrl(String url)
url index field, which is used for redirecting the access.
Attributes of this index field:
IndexForm.indexFieldName = "url";
IndexForm.indexType = IndexType.NO;
IndexForm.isPrimaryKey = false;
IndexForm.isStore = true;
IndexForm.isSearch = false;
url - Indicates the URL to set.DocumentItem object.