org.eaglei.search.provider
Class SearchResult

java.lang.Object
  extended by org.eaglei.search.provider.SearchResult
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SearchResult>
Direct Known Subclasses:
AuthSearchResult

public class SearchResult
extends java.lang.Object
implements java.lang.Comparable<SearchResult>, java.io.Serializable

Holds the one of the results from a search. NOT thread safe.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
SearchResult(org.eaglei.model.EIEntity entity, org.eaglei.model.EIEntity type, org.eaglei.model.EIEntity lab, org.eaglei.model.EIEntity institution)
          Creates a new SearchResult.
 
Method Summary
 void addDataTypeProperty(org.eaglei.model.EIURI property, java.lang.String value)
          Adds a property binding for a data type property.
 void addObjectProperty(org.eaglei.model.EIURI property, org.eaglei.model.EIURI value)
          Adds a property binding for an object property.
 int compareTo(SearchResult o)
           
 boolean deepEquals(java.lang.Object obj)
           
 boolean equals(java.lang.Object o)
           
 java.util.Set<org.eaglei.model.EIURI> getDataTypeProperties()
          Returns the URIs (as EIURI instances) for the result data type properties.
 java.util.Set<java.lang.String> getDataTypeProperty(org.eaglei.model.EIURI property)
          Retrieves the values of the specified data type property.
 org.eaglei.model.EIEntity getEntity()
          Retrieves the EIEntity representing the resource instance.
 java.lang.String getHighlight()
          Retrieves the search highlight (for full text searches).
 org.eaglei.model.EIEntity getInstitution()
          Retrieves the EIEntity representing the resource institution.
 org.eaglei.model.EIEntity getLab()
          Retrieves the EIEntity representing the lab at which the resource is located.
 java.util.Set<org.eaglei.model.EIURI> getObjectProperties()
          Returns the URIs (as EIURI instances) for the result object properties.
 java.util.Set<org.eaglei.model.EIURI> getObjectProperty(org.eaglei.model.EIURI property)
          Retrieves the values of the specified object property.
 float getRank()
          Gets the search result rank as a float.
 org.eaglei.model.EIEntity getType()
          Retrieves the EIEntity representing the resource type.
 java.lang.String getURL()
          Retrieves the HTTP URL for the result.
 int hashCode()
           
 void setEntity(org.eaglei.model.EIEntity entity)
          Sets the EIEntity representing the resource instance
 void setHighlight(java.lang.String highlight)
          Sets the highlight.
 void setInstitution(org.eaglei.model.EIEntity institution)
          Sets the EIEntity representing the resource institution.
 void setLab(org.eaglei.model.EIEntity lab)
          Sets the lab where the resource is located.
 void setRank(float rank)
          Sets the result rank.
 void setType(org.eaglei.model.EIEntity type)
          Sets the EIEntity representing the resource type.
 void setURL(java.lang.String url)
          Sets the HTTP URL
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

SearchResult

public SearchResult(org.eaglei.model.EIEntity entity,
                    org.eaglei.model.EIEntity type,
                    org.eaglei.model.EIEntity lab,
                    org.eaglei.model.EIEntity institution)
Creates a new SearchResult.

Method Detail

getEntity

public org.eaglei.model.EIEntity getEntity()
Retrieves the EIEntity representing the resource instance.

Returns:
The EIEntity.

setEntity

public void setEntity(org.eaglei.model.EIEntity entity)
Sets the EIEntity representing the resource instance

Parameters:
entity - The EIEntity. Cannot be null.

getType

public org.eaglei.model.EIEntity getType()
Retrieves the EIEntity representing the resource type.

Returns:
The type entity. Corresponds to a class in the eagle-i ontology.

setType

public void setType(org.eaglei.model.EIEntity type)
Sets the EIEntity representing the resource type.

Parameters:
type - The type entity. Corresponds to a class in the eagle-i ontology.

getLab

public org.eaglei.model.EIEntity getLab()
Retrieves the EIEntity representing the lab at which the resource is located.

Returns:
The lab entity. May be null if this resource is not associated with a specific lab.

setLab

public void setLab(org.eaglei.model.EIEntity lab)
Sets the lab where the resource is located.

Parameters:
lab - EIEntity representing the resource lab. May be null.

getInstitution

public org.eaglei.model.EIEntity getInstitution()
Retrieves the EIEntity representing the resource institution.

Returns:
The institution entity.

setInstitution

public void setInstitution(org.eaglei.model.EIEntity institution)
Sets the EIEntity representing the resource institution.

Parameters:
institution - The institution entity.

getDataTypeProperties

public java.util.Set<org.eaglei.model.EIURI> getDataTypeProperties()
Returns the URIs (as EIURI instances) for the result data type properties.

Returns:
Set of EIURIs representing a eagle-i ontology data type properties for the result.

addDataTypeProperty

public void addDataTypeProperty(org.eaglei.model.EIURI property,
                                java.lang.String value)
Adds a property binding for a data type property.

Parameters:
property - Property URI as an EIURI. Cannot be null.
value - Property value.

getDataTypeProperty

public java.util.Set<java.lang.String> getDataTypeProperty(org.eaglei.model.EIURI property)
Retrieves the values of the specified data type property.

Parameters:
property - Property URI as an EIURI.
Returns:
Values of the property if it has been set or null.

getObjectProperties

public java.util.Set<org.eaglei.model.EIURI> getObjectProperties()
Returns the URIs (as EIURI instances) for the result object properties.

Returns:
Set of EIURIs representing a eagle-i ontology properties for the result.

addObjectProperty

public void addObjectProperty(org.eaglei.model.EIURI property,
                              org.eaglei.model.EIURI value)
Adds a property binding for an object property.

Parameters:
property - Property URI as an EIURI. Cannot be null.
value - Property value.

getObjectProperty

public java.util.Set<org.eaglei.model.EIURI> getObjectProperty(org.eaglei.model.EIURI property)
Retrieves the values of the specified object property.

Parameters:
property - Property URI as an EIURI.
Returns:
Values of the property if it has been set or null.

getURL

public java.lang.String getURL()
Retrieves the HTTP URL for the result.

Returns:
HTTP URL string. May be null.

setURL

public void setURL(java.lang.String url)
Sets the HTTP URL

Parameters:
url - HTTP URL string

getHighlight

public java.lang.String getHighlight()
Retrieves the search highlight (for full text searches).

Returns:
Highlight. May be null.

setHighlight

public void setHighlight(java.lang.String highlight)
Sets the highlight.

Parameters:
highlight - The full-text highlight.

getRank

public float getRank()
Gets the search result rank as a float.

Returns:
The result rank.

setRank

public void setRank(float rank)
Sets the result rank.

Parameters:
rank - The result rank.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(SearchResult o)
Specified by:
compareTo in interface java.lang.Comparable<SearchResult>

deepEquals

public boolean deepEquals(java.lang.Object obj)


Copyright © 2009-2011 Eagle-I. All Rights Reserved.