Class SearchContent
- java.lang.Object
-
- org.sakaiproject.entitybroker.entityprovider.extension.SearchContent
-
- Direct Known Subclasses:
SearchResult
public class SearchContent extends Object
Represents a set of data to put into the search index, this should represent the data of a single entity which should be indexed into the search engine NOTE: summary is the major piece of content which is being indexed, this may be an entire HTML page or just a bit of text, it is the part that will be searched when normal searches are executed- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSearchContent()SearchContent(String id, String prefix, String reference, String title, String url)Create a set of content for indexing, NOTE: make sure you also set the summary usingsetSummary(String)orsetSummaryReader(Reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()StringgetPrefix()Map<String,String>getProperties()StringgetProperty(String name)Get any property from this search contentStringgetReference()ReadergetSummaryReader()StringgetTitle()StringgetUrl()voidsetId(String id)voidsetPrefix(String prefix)voidsetProperty(String name, String value)Set any property on this search contentvoidsetReference(String reference)voidsetSummary(String summary)voidsetSummaryReader(Reader summaryReader)voidsetTitle(String title)voidsetUrl(String url)
-
-
-
Constructor Detail
-
SearchContent
protected SearchContent()
-
SearchContent
public SearchContent(String id, String prefix, String reference, String title, String url)
Create a set of content for indexing, NOTE: make sure you also set the summary usingsetSummary(String)orsetSummaryReader(Reader)- Parameters:
id- the entity id (e.g. "1234")prefix- the entity prefix (e.g. "user")reference- the entity reference (e.g. /prefix/id)title- the display title for this contenturl- the URL to this content
-
-
Method Detail
-
setProperty
public void setProperty(String name, String value)
Set any property on this search content- Parameters:
name- the key for the propertyvalue- the value
-
getProperty
public String getProperty(String name)
Get any property from this search content- Parameters:
name- the name of the property- Returns:
- the value OR null if it is not set
-
setSummary
public void setSummary(String summary)
-
getSummaryReader
public Reader getSummaryReader()
-
setSummaryReader
public void setSummaryReader(Reader summaryReader)
-
getId
public String getId()
-
setId
public void setId(String id)
-
getPrefix
public String getPrefix()
-
setPrefix
public void setPrefix(String prefix)
-
getReference
public String getReference()
-
setReference
public void setReference(String reference)
-
getTitle
public String getTitle()
-
setTitle
public void setTitle(String title)
-
getUrl
public String getUrl()
-
setUrl
public void setUrl(String url)
-
-