org.eaglei.search.provider.lucene
Class ResourceChangeEvent

java.lang.Object
  extended by org.eaglei.search.provider.lucene.ResourceChangeEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ResourceChangeEvent>

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

Holds information about change of a single resource. NOT thread safe.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
ResourceChangeEvent(java.lang.String changeId, org.eaglei.model.EIEntity entity, org.eaglei.model.EIEntity type, org.eaglei.model.EIURI 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(ResourceChangeEvent o)
           
 boolean deepEquals(java.lang.Object obj)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getChangeId()
          Identifies the type of change.
 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.
 org.eaglei.model.EIEntity getInstitution()
          Retrieves the EIEntity representing the resource institution.
 org.eaglei.model.EIURI getLab()
          Retrieves the EIURI 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.
 org.eaglei.model.EIEntity getType()
          Retrieves the EIEntity representing the resource type.
 int hashCode()
           
 void setEntity(org.eaglei.model.EIEntity entity)
          Sets the EIEntity representing the resource instance
 void setInstitution(org.eaglei.model.EIEntity institution)
          Sets the EIEntity representing the resource institution.
 void setLab(org.eaglei.model.EIURI lab)
          Sets the lab where the resource is located.
 void setType(org.eaglei.model.EIEntity type)
          Sets the EIEntity representing the resource type.
 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

ResourceChangeEvent

public ResourceChangeEvent(java.lang.String changeId,
                           org.eaglei.model.EIEntity entity,
                           org.eaglei.model.EIEntity type,
                           org.eaglei.model.EIURI lab,
                           org.eaglei.model.EIEntity institution)
Creates a new SearchResult.

Method Detail

getChangeId

public java.lang.String getChangeId()
Identifies the type of change. Currently EIOntConstants.IS_DELETED for delete event. Null for any other change event.


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.EIURI getLab()
Retrieves the EIURI 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.EIURI lab)
Sets the lab where the resource is located.

Parameters:
lab - EIURI 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.

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(ResourceChangeEvent o)
Specified by:
compareTo in interface java.lang.Comparable<ResourceChangeEvent>

deepEquals

public boolean deepEquals(java.lang.Object obj)


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