Class BaseSearchResultDocument
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.searchengine.base.BaseSearchResultDocument
-
- All Implemented Interfaces:
SearchResultDocument
public class BaseSearchResultDocument extends Object implements SearchResultDocument
A foundation class for implementing SearchResultDocument.
-
-
Constructor Summary
Constructors Constructor Description BaseSearchResultDocument(String uniqueId, Map<String,Collection<Object>> fieldValuesMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>getFieldNames()May return an empty collection, but never null.Collection<Object>getFieldValues(String name)Get the values for the named field.Map<String,Collection<Object>>getFieldValuesMap()May return an empty map, but never null.ObjectgetFirstValue(String name)May return null.StringgetStringValue(String name)Gets the first value for the named field, and converts it to a String.StringgetUniqueId()A document identifier that can be used in SearchEngine.deleteById(); Never null.StringtoString()
-
-
-
Constructor Detail
-
BaseSearchResultDocument
public BaseSearchResultDocument(String uniqueId, Map<String,Collection<Object>> fieldValuesMap)
-
-
Method Detail
-
getUniqueId
public String getUniqueId()
Description copied from interface:SearchResultDocumentA document identifier that can be used in SearchEngine.deleteById(); Never null.- Specified by:
getUniqueIdin interfaceSearchResultDocument
-
getFieldNames
public Collection<String> getFieldNames()
Description copied from interface:SearchResultDocumentMay return an empty collection, but never null.- Specified by:
getFieldNamesin interfaceSearchResultDocument
-
getFirstValue
public Object getFirstValue(String name)
Description copied from interface:SearchResultDocumentMay return null.- Specified by:
getFirstValuein interfaceSearchResultDocument
-
getStringValue
public String getStringValue(String name)
Description copied from interface:SearchResultDocumentGets the first value for the named field, and converts it to a String. May return null.- Specified by:
getStringValuein interfaceSearchResultDocument
-
getFieldValues
public Collection<Object> getFieldValues(String name)
Description copied from interface:SearchResultDocumentGet the values for the named field. May return an empty collection, but never null.- Specified by:
getFieldValuesin interfaceSearchResultDocument
-
getFieldValuesMap
public Map<String,Collection<Object>> getFieldValuesMap()
Description copied from interface:SearchResultDocumentMay return an empty map, but never null. The values collection for any key may be empty, but never null.- Specified by:
getFieldValuesMapin interfaceSearchResultDocument
-
-