org.sakaiproject.entitybroker.entityprovider.extension
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)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected String id
prefix
protected String prefix
reference
protected String reference
title
protected String title
url
protected String url
summary
protected transient String summary
summaryReader
protected transient Reader summaryReader
properties
protected Map<String,String> properties
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 using
setSummary(String) or setSummaryReader(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
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)
getProperties
public Map<String,String> getProperties()
Copyright © 2007-2013 Sakai Project. All Rights Reserved.