|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.autonomy.aci.businessobjects.AciBusinessObject
com.autonomy.aci.businessobjects.BaseAgent
com.autonomy.aci.businessobjects.Agent
Class to represent a user agent as created on and managed by IDOL server. The agent's ID, to be used when identifying the agent to IDOL using the 'aid' parameter in agent type actions, is obtained using:
String sID = agent.getAgentID()
Under most circumstances, an Agent
should be read from IDOL using the AgentFunctionality
interface:
IDOLService idolService = new IDOLService(); ... AgentFunctionality agentFun = idolService.useAgentFunctionality(); Agent agent = agentFun.getAgent(sAgentID)
Modifying the agent's training and details using the public access methods only changes the values for these agent parameters on the local object:
agent.setTraining("document management");
agent.addDatabase("Archive");
To update the agent details on the IDOL service you then need to send the modified agent object using
the AgentFunctionality
interface:
agentFun.updateAgent(agent)
IDOLService
,
AgentFunctionality
,
Serialized FormField Summary | |
static java.lang.String |
CREATIONDATE_FIELD_NAME
|
static int |
DEFAULT_NUM_RESULTS
|
static int |
DEFAULT_THRESHOLD
|
Constructor Summary | |
Agent()
Construct an agent with no name, ID or information. |
|
Agent(java.lang.String sAID)
Construct an agent with a given ID but with no name or retrieval information. |
Method Summary | |
void |
addDatabase(java.lang.String sDatabasename)
Add a database to those which will be queried when performing an e.g. |
void |
addTrainingDoc(Document doc)
Add a document to the agent's training. |
void |
clearAgentFields()
Deletes all existing agent fields and their values. |
void |
clearDatabases()
Remove all database names from those which will be queried when performing an e.g. |
void |
clearTrainingDocs()
Remove all documents from the agent's training. |
java.util.Set |
getAgentFieldNames()
Read the names of all the fields that have been set on this agent. |
java.util.HashMap |
getAgentFields()
Read all the fields that have been set on this agent. |
java.lang.String |
getAgentFieldValue(java.lang.String sFieldname)
Read the value of an agent field. |
java.lang.String |
getAgentFieldValue(java.lang.String sFieldname,
java.lang.String sDefaultValue)
Read the value of an agent field. |
java.lang.String |
getAgentID()
Read the unique ID of the agent. |
java.lang.String |
getAgentname()
Read the name of the agent. |
java.util.ArrayList |
getDatabases()
Obtains the list of databases that this agent is set to retrieve documents from. |
int |
getMaxAgeOfResults()
Read the maximum age documents can have to be retrieved as part of this agent's result set. |
int |
getNumResults()
Read the maximum number of results that will be returned within a agent's result set. |
int |
getThreshold()
Read the minimum relevence to the agent's training that documents must have to be retrieved as part of this agent's result set. |
java.lang.String |
getTraining()
Read the textual training for this agent. |
java.util.ArrayList |
getTrainingDocs()
Obtains the list of documents that this agent is trained on. |
boolean |
isAlerting()
Read whether or not the agent emails matching results on an alerting basis. |
boolean |
isEmailing()
Read whether or not the agent emails matching results on a scheduled basis. |
boolean |
isRetrained()
Read whether or not the agent has been retrained. |
boolean |
isSharedCopy()
Read whether or not the agent is a copy of another shared agent. |
boolean |
isShownInCommunity()
Read whether or not the agent appears in the IDOL community. |
boolean |
isTrainedFromDoc()
Read whether or not the agent's training contains documents. |
void |
removeAgentField(java.lang.String sFieldname)
Deletes the agent field entry for the specified field, if it exists. |
void |
removeDatabase(java.lang.String sDatabasename)
Remove a database from those which will be queried when performing an e.g. |
void |
removeTrainingDoc(Document doc)
Remove a document to the agent's training. |
void |
setAgentField(java.lang.String sFieldname,
java.lang.String sFieldValue)
Set the value of an agent field. |
void |
setAgentFields(java.util.Map fieldMap)
Replaces any existing agent fields with those provided. |
void |
setAgentID(java.lang.String sAID)
Set the unique ID of an agent. |
void |
setAgentname(java.lang.String sAgentname)
Set the name of an agent. |
void |
setAlerting(boolean bAlerting)
Specify whether this agent sends documents that match its training on an alerting basis (as they are indexed into the IDOL server). |
void |
setDatabases(java.util.ArrayList databaseList)
Specify which databases the agent will query when performing an e.g. |
void |
setEmailing(boolean bEmailing)
Specify whether this agent sends documents that match its training on a scheluded basis. |
void |
setMaxAgeOfResults(int nDays)
Specify the maximum age of results that will be retrieved by this agent. |
void |
setNumResults(int nNumResults)
Specify the number of documents that as retrieved in the agent's result set. |
void |
setRetrained(boolean bRetrained)
Specify whether the original training of this agent has been modified by retraining this agent on other documents. |
void |
setSharedCopy(boolean bShared)
Specify whether this agent has been copied from another, shared, agent in the community. |
void |
setShownInCommunity(boolean bShown)
Specify whether this agent belongs to and can be seen in the IDOL community. |
void |
setThreshold(int nThreshold)
Specify the minimum relevence to the agent training that documents must have to be retrieved when generating agent results. |
void |
setTrainedFromDoc(boolean bTrainedFromDoc)
Specify whether at least part of this agent's training is documental or not. |
void |
setTraining(java.lang.String sTrainingText)
Set the textual training of the agent. |
void |
setTrainingDocs(java.util.ArrayList trainingDocsList)
Set the document training of the agent. |
java.lang.String |
toString()
|
Methods inherited from class com.autonomy.aci.businessobjects.BaseAgent |
getName, getOwnerID, getOwnername, setName, setOwnerID, setOwnername |
Methods inherited from class com.autonomy.aci.businessobjects.AciBusinessObject |
getUID, setUID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String CREATIONDATE_FIELD_NAME
public static final int DEFAULT_THRESHOLD
public static final int DEFAULT_NUM_RESULTS
Constructor Detail |
public Agent()
public Agent(java.lang.String sAID)
sAID
- the unique ID of the agent, usually as read from the NoreConstants.AGENT_ID_TAG
("autn:aid") entry of an AgentRead, UserReadAgentList, ... action.Method Detail |
public void setAgentID(java.lang.String sAID)
sAID
- the unique ID of the agent, usually as read from the NoreConstants.AGENT_ID_TAG
("autn:aid") entry of an AgentRead, UserReadAgentList, ... action.public void setAgentname(java.lang.String sAgentname)
sAgentname
- the name of the agent, usually as read from the NoreConstants.AGENT_NAME_TAG
("autn:agentname") entry of an AgentRead, UserReadAgentList, ... action.public void setTraining(java.lang.String sTrainingText)
sTrainingText
- the textual training of the agent.public void setAgentFields(java.util.Map fieldMap)
Map
must be String
s.
fieldMap
- a Map
assosciating String
pairs representing the field names and values.public void setAgentField(java.lang.String sFieldname, java.lang.String sFieldValue)
sFieldname
- the name of the user field to set.sFieldValue
- the value to give the field.public void removeAgentField(java.lang.String sFieldname)
sFieldname
- the name of the field to delete.public void clearAgentFields()
public void setTrainingDocs(java.util.ArrayList trainingDocsList)
trainingDocsList
- an ArrayList
of Document
s specifying which documents
the agent should be trained on. The Document
s must have at least a reference set on them.public void addTrainingDoc(Document doc)
doc
- the document which should be added to the agent's training. The Document
must
have at least a reference set on it.public void removeTrainingDoc(Document doc)
doc
- the document which should be removed from the agent's training. The Document
must
have at least a reference set on it.public void clearTrainingDocs()
public void setDatabases(java.util.ArrayList databaseList)
databaseList
- an ArrayList
of String
s giving the names of the databases
that the agent can retrieve results from.public void addDatabase(java.lang.String sDatabasename)
sDatabasename
- the name of the databases to add to those that the agent can retrieve results from.public void removeDatabase(java.lang.String sDatabasename)
sDatabasename
- the name of the databases to remove from those that the agent can retrieve results from.public void clearDatabases()
public void setMaxAgeOfResults(int nDays)
nDays
- the maximum age of results in days.public void setThreshold(int nThreshold)
nThreshold
- the minimum document relevence to retrieve.public void setNumResults(int nNumResults)
nNumResults
- the number of documents to retrieve.public void setSharedCopy(boolean bShared)
bShared
- whether this agent is a copy.public void setRetrained(boolean bRetrained)
bRetrained
- whether this agent has been retrained.public void setTrainedFromDoc(boolean bTrainedFromDoc)
bTrainedFromDoc
- whether this agent has been trained with documents or not.public void setShownInCommunity(boolean bShown)
bShown
- whether this agent belongs to the community.public void setEmailing(boolean bEmailing)
bEmailing
- whether this agent emails results.public void setAlerting(boolean bAlerting)
bAlerting
- whether this agent alerts for results.public java.lang.String getAgentname()
public java.lang.String getAgentID()
public java.lang.String getTraining()
public java.util.HashMap getAgentFields()
HashMap
of all the field names and values. The field names act as the keys for
the hashmap entries.public java.util.Set getAgentFieldNames()
Set
over all the field names (stored as String
s).public java.lang.String getAgentFieldValue(java.lang.String sFieldname, java.lang.String sDefaultValue)
sFieldname
- the name of the agent fieldsDefaultValue
- the value to return of no field with this name is found or if it does not have
a value. Can be null
.
public java.lang.String getAgentFieldValue(java.lang.String sFieldname)
sFieldname
- the name of the agent field
null
is the field does not exist or does not have a value.public java.util.ArrayList getTrainingDocs()
ArrayList
of Document
s representing the training documents.public java.util.ArrayList getDatabases()
ArrayList
of String
s giving the database names.public int getMaxAgeOfResults()
public int getThreshold()
public int getNumResults()
public boolean isSharedCopy()
public boolean isRetrained()
public boolean isTrainedFromDoc()
public boolean isShownInCommunity()
public boolean isEmailing()
public boolean isAlerting()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |