org.sakaiproject.entitybroker.entityprovider.extension
Class SearchContent

java.lang.Object
  extended by 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)

Field Summary
protected  String id
           
protected  String prefix
           
protected  Map<String,String> properties
           
protected  String reference
           
protected  String summary
           
protected  Reader summaryReader
           
protected  String title
           
protected  String url
           
 
Constructor Summary
protected SearchContent()
           
  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)
 
Method Summary
 String getId()
           
 String getPrefix()
           
 Map<String,String> getProperties()
           
 String getProperty(String name)
          Get any property from this search content
 String getReference()
           
 Reader getSummaryReader()
           
 String getTitle()
           
 String getUrl()
           
 void setId(String id)
           
 void setPrefix(String prefix)
           
 void setProperty(String name, String value)
          Set any property on this search content
 void setReference(String reference)
           
 void setSummary(String summary)
           
 void setSummaryReader(Reader summaryReader)
           
 void setTitle(String title)
           
 void setUrl(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
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 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 content
url - 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 property
value - 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-2012 Sakai Project. All Rights Reserved.