public abstract class CacheObject extends java.lang.Object implements CacheObjectInterface, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.util.Hashtable<java.lang.String,java.lang.String> |
_attributes |
protected KeplerLSID |
_lsid |
protected java.lang.String |
_name |
protected java.util.Vector<java.lang.String> |
_semanticTypes |
Modifier | Constructor and Description |
---|---|
protected |
CacheObject()
default constructor. if you use this constrctor, you'll need to set the
name and lsid through the setLSID and setName methods.
|
|
CacheObject(java.lang.String name,
KeplerLSID lsid)
construct a new CacheObject
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
set a user configured attribute on the CacheObject
|
java.lang.String |
getAttribute(java.lang.String name)
get the attribute with the specified name
|
java.util.Set<java.lang.String> |
getAttributeNames() |
KeplerLSID |
getLSID()
get the lsid for this object
|
java.lang.String |
getName()
get the name of this object
|
abstract java.lang.Object |
getObject()
return the java object associated with this CacheObject
|
java.util.Vector<java.lang.String> |
getSemanticTypes()
this returns the semantic types vector
|
void |
objectAdded()
call back for when this object is added to the cache.
|
void |
objectPurged()
call back for when this object is purged by ObjectCache.
|
void |
objectRemoved()
call back for when this object is removed by the user.
|
void |
removeAttribute(java.lang.String name)
remove the attribute with the given name and return it.
|
void |
setLSID(KeplerLSID lsid)
set the lsid
|
void |
setName(java.lang.String name)
set the name
|
void |
setSemanticTypes(java.util.Vector<java.lang.String> semTypes)
this returns the semantic types vector
|
protected transient java.lang.String _name
protected transient KeplerLSID _lsid
protected java.util.Vector<java.lang.String> _semanticTypes
protected java.util.Hashtable<java.lang.String,java.lang.String> _attributes
protected CacheObject()
public CacheObject(java.lang.String name, KeplerLSID lsid)
public java.lang.String getName()
getName
in interface CacheObjectInterface
public KeplerLSID getLSID()
getLSID
in interface CacheObjectInterface
public void setLSID(KeplerLSID lsid)
setLSID
in interface CacheObjectInterface
public void setName(java.lang.String name)
setName
in interface CacheObjectInterface
public void setSemanticTypes(java.util.Vector<java.lang.String> semTypes)
public java.util.Vector<java.lang.String> getSemanticTypes()
public void addAttribute(java.lang.String name, java.lang.String value)
addAttribute
in interface CacheObjectInterface
public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface CacheObjectInterface
public java.util.Set<java.lang.String> getAttributeNames()
public void removeAttribute(java.lang.String name)
removeAttribute
in interface CacheObjectInterface
public abstract java.lang.Object getObject()
getObject
in interface CacheObjectInterface
public void objectAdded()
objectAdded
in interface CacheObjectInterface
public void objectRemoved()
objectRemoved
in interface CacheObjectInterface
public void objectPurged()
objectPurged
in interface CacheObjectInterface