uk.ac.ic.doc.rodex.qproc
Class QualityIndicator
java.lang.Object
uk.ac.ic.doc.rodex.qproc.QualityIndicator
- All Implemented Interfaces:
- PersistentObject
public class QualityIndicator
- extends java.lang.Object
- implements PersistentObject
Constructor Summary |
QualityIndicator()
|
QualityIndicator(boolean useCache)
|
QualityIndicator(boolean useCache,
float qltyPw,
float cost,
float qltyDs)
|
QualityIndicator(float qltyPw,
float cost,
float qltyDs,
float freshness,
int cacheMode,
int qltyInfo,
float resultTTL,
boolean isCacheResultExpiredOK,
boolean preferCache)
Creates a new instance of QualityIndicator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTRIB_QLTY_PW
public static final java.lang.String ATTRIB_QLTY_PW
- See Also:
- Constant Field Values
ATTRIB_COST
public static final java.lang.String ATTRIB_COST
- See Also:
- Constant Field Values
ATTRIB_QLTY_DS
public static final java.lang.String ATTRIB_QLTY_DS
- See Also:
- Constant Field Values
ATTRIB_QLTY_INFO
public static final java.lang.String ATTRIB_QLTY_INFO
- See Also:
- Constant Field Values
ATTRIB_FRESHNESS
public static final java.lang.String ATTRIB_FRESHNESS
- See Also:
- Constant Field Values
ATTRIB_CACHE_MODE
public static final java.lang.String ATTRIB_CACHE_MODE
- See Also:
- Constant Field Values
ATTRIB_RESULT_TTL
public static final java.lang.String ATTRIB_RESULT_TTL
- See Also:
- Constant Field Values
ATTRIB_CACHE_RESULT_EXPIRED_OK
public static final java.lang.String ATTRIB_CACHE_RESULT_EXPIRED_OK
- See Also:
- Constant Field Values
ATTRIB_PREFER_CACHE
public static final java.lang.String ATTRIB_PREFER_CACHE
- See Also:
- Constant Field Values
NULL_VALUE
public static final float NULL_VALUE
- See Also:
- Constant Field Values
CACHE_MODE_NONE
public static final int CACHE_MODE_NONE
- See Also:
- Constant Field Values
CACHE_MODE_ALWAYS
public static final int CACHE_MODE_ALWAYS
- See Also:
- Constant Field Values
CACHE_MODE_ADAPTIVE
public static final int CACHE_MODE_ADAPTIVE
- See Also:
- Constant Field Values
INF_QLTY_PARTIAL
public static final int INF_QLTY_PARTIAL
- partial answer
- See Also:
- Constant Field Values
INF_QLTY_COMPLETE
public static final int INF_QLTY_COMPLETE
- complete answer
- See Also:
- Constant Field Values
DEF_CACHE_MODE
public static final int DEF_CACHE_MODE
- See Also:
- Constant Field Values
DEF_FRESHNESS
public static final float DEF_FRESHNESS
- See Also:
- Constant Field Values
DEF_QLT_INF
public static final int DEF_QLT_INF
- See Also:
- Constant Field Values
DEF_RESULT_TTL
public static final float DEF_RESULT_TTL
- See Also:
- Constant Field Values
DEF_QLT_PW
public static final float DEF_QLT_PW
- See Also:
- Constant Field Values
DEF_COST
public static final float DEF_COST
- See Also:
- Constant Field Values
DEF_QLTDS
public static final float DEF_QLTDS
- See Also:
- Constant Field Values
QualityIndicator
public QualityIndicator()
QualityIndicator
public QualityIndicator(boolean useCache)
QualityIndicator
public QualityIndicator(boolean useCache,
float qltyPw,
float cost,
float qltyDs)
QualityIndicator
public QualityIndicator(float qltyPw,
float cost,
float qltyDs,
float freshness,
int cacheMode,
int qltyInfo,
float resultTTL,
boolean isCacheResultExpiredOK,
boolean preferCache)
- Creates a new instance of QualityIndicator
getPwQuality
public float getPwQuality()
getCost
public float getCost()
getDsQuality
public float getDsQuality()
getInfoQuality
public int getInfoQuality()
getFreshness
public float getFreshness()
getCacheMode
public int getCacheMode()
getCacheStatus
public boolean getCacheStatus()
getResultTTL
public float getResultTTL()
setCacheResultExpiredOK
public void setCacheResultExpiredOK(boolean state)
getCacheResultExpiredOK
public boolean getCacheResultExpiredOK()
getPreferCache
public boolean getPreferCache()
getKey
public PersistentKey getKey()
- Specified by:
getKey
in interface PersistentObject
getPersistentAttributes
public java.util.Map getPersistentAttributes()
- Specified by:
getPersistentAttributes
in interface PersistentObject
deserialise
public static QualityIndicator deserialise(java.util.Map pa)
throws java.lang.IllegalArgumentException
- This method guarantees that a PersistentObject can be deserialised properly from its own
set of persistent attributes. It is a reverse of
getPersistentAttributes()
- Parameters:
pa
- a HashMap
of persistent attributes (created by {@link #getPersistentAttributes())
- Throws:
java.lang.IllegalArgumentException