org.imemex.resourceviewmanager
Class AbstractIdentifiableResourceView

java.lang.Object
  extended by org.imemex.idm.AbstractResourceView
      extended by org.imemex.componentmappings.AbstractOIDResourceView
          extended by org.imemex.resourceviewmanager.AbstractIdentifiableResourceView
All Implemented Interfaces:
java.lang.Comparable, OID, OIDResourceView, ResourceView, IdentifiableResourceView
Direct Known Subclasses:
AdaptedIdentifiableResourceView, DefaultIdentifiableResourceView, LazyIdentifiableResourceView, LineageResourceView

public abstract class AbstractIdentifiableResourceView
extends AbstractOIDResourceView
implements IdentifiableResourceView

Base abstract implementation for an identifiable resource view, i.e., a resource view which is known to the system either by OID (warehousing) or by dataSourceId+pluginAssignedId (mediation).

Author:
marcos

Constructor Summary
AbstractIdentifiableResourceView()
          Instantiates a new AbstractIdentifiableResourceView
 
Method Summary
static PullOperator<IdentifiableResourceView>[] EMPTY_ARRAY_IRV()
           
static PullOperator<PluginIdentifiableResourceView>[] EMPTY_ARRAY_PIRV()
           
 boolean equals(java.lang.Object obj)
           
 long getDataSourceId()
          Obtains the data source identifier for this resource view.
 java.lang.String getPluginAssignedId()
          Get the plugin assigned id of this resource view.
 double getScore()
           
 ScoreAttributes getScoreAttributes()
          Gets scoring information for this resource view.
 int hashCode()
           
 void mergeScoreAttributes(ScoreAttributes sa)
          Merges the current scoring information for this resource view with the given scoring information.
 void setDataSourceId(long dataSourceId)
          Sets the data source identifier for this resource view.
 void setPluginAssignedId(java.lang.String pluginAssignedId)
          Returns the plugin assigned id of this RV.
 void setScore(double score)
           
 void setScoreAttributes(ScoreAttributes sa)
          Sets the score attributes for this resource view.
 java.lang.String toString()
           
 
Methods inherited from class org.imemex.componentmappings.AbstractOIDResourceView
compareTo, getOID, setOID
 
Methods inherited from class org.imemex.idm.AbstractResourceView
getName, setName
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.imemex.componentmappings.OIDResourceView
setOID
 
Methods inherited from interface org.imemex.componentmappings.OID
getOID
 
Methods inherited from interface org.imemex.idm.ResourceView
getContent, getGroup, getName, getTuple
 

Constructor Detail

AbstractIdentifiableResourceView

public AbstractIdentifiableResourceView()
Instantiates a new AbstractIdentifiableResourceView

Method Detail

getDataSourceId

public long getDataSourceId()
Description copied from interface: IdentifiableResourceView
Obtains the data source identifier for this resource view.

Specified by:
getDataSourceId in interface IdentifiableResourceView
Returns:
the data source identifier for this resource view.

setDataSourceId

public void setDataSourceId(long dataSourceId)
Description copied from interface: IdentifiableResourceView
Sets the data source identifier for this resource view.

Specified by:
setDataSourceId in interface IdentifiableResourceView
Parameters:
dataSourceId - - the new data source id to be set.

setPluginAssignedId

public void setPluginAssignedId(java.lang.String pluginAssignedId)
Description copied from interface: IdentifiableResourceView
Returns the plugin assigned id of this RV. It should be assigned by the data source plugin developer. Plugin assigned ids should be unique for each plugin.

Specified by:
setPluginAssignedId in interface IdentifiableResourceView

getPluginAssignedId

public java.lang.String getPluginAssignedId()
Description copied from interface: IdentifiableResourceView
Get the plugin assigned id of this resource view.

Specified by:
getPluginAssignedId in interface IdentifiableResourceView
Returns:
the plugin assigned id of this resource view

getScore

public final double getScore()
Specified by:
getScore in interface IdentifiableResourceView

setScore

public void setScore(double score)
Specified by:
setScore in interface IdentifiableResourceView

getScoreAttributes

public ScoreAttributes getScoreAttributes()
Description copied from interface: IdentifiableResourceView
Gets scoring information for this resource view.

Specified by:
getScoreAttributes in interface IdentifiableResourceView
Returns:
scoring attributes for the resource view in its associated query.

setScoreAttributes

public void setScoreAttributes(ScoreAttributes sa)
Description copied from interface: IdentifiableResourceView
Sets the score attributes for this resource view.

Specified by:
setScoreAttributes in interface IdentifiableResourceView
Parameters:
sa - - the score attributes to be set.

mergeScoreAttributes

public void mergeScoreAttributes(ScoreAttributes sa)
Description copied from interface: IdentifiableResourceView
Merges the current scoring information for this resource view with the given scoring information.

Specified by:
mergeScoreAttributes in interface IdentifiableResourceView
Parameters:
sa - - the score attributes to be merged.

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractOIDResourceView

equals

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

toString

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

EMPTY_ARRAY_IRV

public static PullOperator<IdentifiableResourceView>[] EMPTY_ARRAY_IRV()

EMPTY_ARRAY_PIRV

public static PullOperator<PluginIdentifiableResourceView>[] EMPTY_ARRAY_PIRV()