public class Resource extends Object
CloudNode and a KnowledgeChunk, the latter represented
by it's id (due to the separation of the knowledge chunk database and the cloud database).KnowledgeChunk| Modifier | Constructor and Description |
|---|---|
protected |
Resource(CloudNode node,
String resId,
Double relevance)
Direct use of this constructor is discouraged.
|
| Modifier and Type | Method and Description |
|---|---|
CloudNode |
getNode()
Get the owner
CloudNode. |
Double |
getRelevance()
Get the relevance of this resource for this node.
|
String |
getResourceId()
Get the id of the connected resource represented by this class.
|
protected void |
setNode(CloudNode node)
Set the identifier of the owner node.
|
void |
setRelevance(Double relevance)
Set the relevance of this resource for this node.
|
protected void |
setResourceId(String resourceId)
Set the id of the connected resource represented by this class.
|
String |
toString()
Returns a string representation of this resource as the id of the referred
KnowledgeChunk
with additional information about it's relevance in this node. |
protected Resource(CloudNode node, String resId, Double relevance)
CloudNode.addResource method instead.node - the owner cluster of this resource.resId - the identifier of the corresponding KC database resource(a Resource is actually an association between a KnowledgeChunk and
a CloudNode).relevance - the relevance value associated with this resource.CloudNode.addResource(String, Double),
Typepublic String toString()
KnowledgeChunk
with additional information about it's relevance in this node.public CloudNode getNode()
Get the owner CloudNode.
CloudNode.protected void setNode(CloudNode node)
Set the identifier of the owner node.
public String getResourceId()
KnowledgeChunkKnowledgeChunkprotected void setResourceId(String resourceId)
resourceId - the id of the resource (id of the associated KnowledgeChunkKnowledgeChunkpublic Double getRelevance()
public void setRelevance(Double relevance)
relevance - the relevance of this resource.