|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlumis.search.SearchContent
@StableMinor(version="6.1", sinceVersion="4.0") public class SearchContent
Unit of searchable information, containing one or more SearchContentField
objects.
This object is used to index searchable information by a search engine.
This object contains a collection of SearchContentField
objects, which can contain
more than one SearchContentField
object with the same name value.
Constructor Summary | |
---|---|
SearchContent()
Constructs an empty instance of SearchContent . |
|
SearchContent(SearchContent searchContent)
Constructs an instance of SearchContent cloning the SearchContentField s
of another SearchContent object. |
Method Summary | |
---|---|
void |
addAttachment(SearchContentAttachment attachment)
Adds an attachment to this search content. |
void |
addField(SearchContentField field)
Adds a SearchContentField to the field collection. |
void |
clear()
Removes all fields. |
SearchContent |
clone()
|
java.util.List<SearchContentField> |
getAllFields()
Returns a collection of all fields. |
java.util.Collection<SearchContentAttachment> |
getAttachments()
Returns the attachments in this search content. |
java.util.List<java.lang.String> |
getAttributeValues(java.lang.String attributeName)
Returns all the values related to the attribute named as specified. |
java.util.List<SearchContentField> |
getFields(java.lang.String fieldName)
Returns a collection of fields with the given name. |
java.util.List<java.lang.String> |
getFieldValues(java.lang.String fieldName)
Returns the values of all fields with the given name. |
java.lang.String |
getIdFieldValue()
Returns the value of the identifier field. |
java.lang.String |
getSubtitleFieldValue()
Returns the value of the subtitle field. |
java.lang.String |
getTextFieldValue()
Returns the value of the text field. |
java.lang.String |
getTitleFieldValue()
Returns the value of the title field. |
java.lang.String |
getUrlFieldValue()
Returns the value of the URL field. |
boolean |
hasAttribute(java.lang.String attributeName)
Checks if the attribute set contains at least one attribute with the specified name. |
boolean |
hasField(java.lang.String fieldName)
Checks if there is at least one SearchContentField object in the field collection
with the provided name. |
boolean |
hasIdField()
Checks if there is, in the field collection, at least one identifier field . |
boolean |
hasSubtitleField()
Checks if there is, in the field collection, at least one subtitle field . |
boolean |
hasTextField()
Checks if there is, in the field collection, at least one text field . |
boolean |
hasTitleField()
Checks if there is, in the field collection, at least one title field . |
boolean |
hasUrlField()
Checks if there is, in the field collection, at least one URL field . |
boolean |
isValid()
Checks if the object has all the required fields: identifier , title , subtitle and URL . |
void |
removeAttachment(SearchContentAttachment attachment)
Removes an attachment from this search content. |
void |
removeFields(java.lang.String fieldName)
Removes all fields with the given name. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchContent()
SearchContent
.
public SearchContent(SearchContent searchContent)
SearchContent
cloning the SearchContentField
s
of another SearchContent
object.
searchContent
- Method Detail |
---|
public void addField(SearchContentField field)
SearchContentField
to the field collection.
field
- public boolean hasField(java.lang.String fieldName)
SearchContentField
object in the field collection
with the provided name.
fieldName
- field name to be checked
public boolean hasIdField()
identifier field
.
public boolean hasTitleField()
title field
.
public boolean hasSubtitleField()
subtitle field
.
public boolean hasUrlField()
URL field
.
public boolean hasTextField()
text field
.
public void removeFields(java.lang.String fieldName)
fieldName
- name of the fields to be removed.public void clear()
public java.util.List<SearchContentField> getFields(java.lang.String fieldName)
fieldName
- field name
public java.util.List<SearchContentField> getAllFields()
public java.util.List<java.lang.String> getFieldValues(java.lang.String fieldName)
fieldName
- field name
List
, if there no value to return.public java.lang.String getIdFieldValue()
SearchContentField
,
SearchContentField.FIELDNAME_ID
public java.lang.String getTitleFieldValue()
SearchContentField
,
SearchContentField.FIELDNAME_TITLE
public java.lang.String getSubtitleFieldValue()
SearchContentField
,
SearchContentField.FIELDNAME_SUBTITLE
public java.lang.String getUrlFieldValue()
SearchContentField
,
SearchContentField.FIELDNAME_URL
public java.lang.String getTextFieldValue()
SearchContentField
,
SearchContentField.FIELDNAME_TEXT
public boolean isValid()
identifier
, title
, subtitle
and URL
.
public java.util.List<java.lang.String> getAttributeValues(java.lang.String attributeName)
IAttributeSetReader
getAttributeValues
in interface IAttributeSetReader
attributeName
- name of the attribute.
List
if there is no value to return.public boolean hasAttribute(java.lang.String attributeName)
IAttributeSetReader
hasAttribute
in interface IAttributeSetReader
attributeName
- name of the attribute.
public SearchContent clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.util.Collection<SearchContentAttachment> getAttachments()
public void addAttachment(SearchContentAttachment attachment)
attachment
- the attachment.public void removeAttachment(SearchContentAttachment attachment)
attachment
- the attachment to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |