fipaos.ont.fipa.fipaman
Class AMSAgentDescription

java.lang.Object
  |
  +--fipaos.ont.fipa.fipaman.AMSAgentDescription
All Implemented Interfaces:
DatabaseObject, java.io.Serializable

public class AMSAgentDescription
extends java.lang.Object
implements DatabaseObject, java.io.Serializable

FIPA defined AMS Agent Description class for the FIPA agent management ontology. See FIPA 2000 6.1.5. e.g. a parseable string into the object is:
(ams-agent-description :name (agent-identifier :name CameraProxy@foo.com :addresses (sequence iiop://foo.com/acc)) :ownership Ann :state active)

See Also:
Serialized Form

Constructor Summary
AMSAgentDescription()
          Empty constructor which can either be populated using the parse() method or the set methods.
AMSAgentDescription(Content content)
          This constructor takes a Content Object as the parameter and parses it into an AMSAgentDescription object.
AMSAgentDescription(java.lang.String ams_string)
          This constructor takes an AMSAgentDescription String as a parameter and uses the SL Parser to parse it into a Content Object.
 
Method Summary
 boolean canDeregister()
          Indicates whether this AMS Agent Description is suitable for use in the deregister action.
 boolean canModify()
          Indicates whether this AMS Agent description is suitable for use in the modify action.
 boolean canRegister()
          Indicates whether this AMS Agent Description is suitable for use in the register action.
 AgentID getAgentID()
          This method returns the agent ID
 java.lang.String getAgentName()
          This method returns the name of the agent ID
 java.lang.String getObjectID()
          This method is required for the DatabaseObject interface for storage.
 java.lang.String getOwnership()
          This method returns the ownership
 java.lang.String getState()
          This method returns the state of the agent
 boolean hasAgentID()
          Indicates whether the agent name was present in the AMS Agent Description
 boolean hasState()
          Indicates whether the agent state was present in the AMS Agent Description
static void main(java.lang.String[] args)
          This method is for testing only.
 void setAgentID(AgentID agent_id)
          This method sets the agent ID.
 void setOwnership(java.lang.String ownership)
          This method sets the ownership
 void setState(java.lang.String state)
          This method sets the state of the agent
 java.lang.String toString()
          This method returns an AMS-Agent Description as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AMSAgentDescription

public AMSAgentDescription(java.lang.String ams_string)
                    throws ParserException
This constructor takes an AMSAgentDescription String as a parameter and uses the SL Parser to parse it into a Content Object.
Parameters:
ams_string - the AMS-Agent Description component of an ACL string
Throws:
ParserException - if the SL parser fails to parse the String

AMSAgentDescription

public AMSAgentDescription(Content content)
                    throws ParserException
This constructor takes a Content Object as the parameter and parses it into an AMSAgentDescription object.
Parameters:
content - the content object representing the AMSAgentDescription
Throws:
ParserException - if the String is not valid

AMSAgentDescription

public AMSAgentDescription()
Empty constructor which can either be populated using the parse() method or the set methods.
Method Detail

toString

public java.lang.String toString()
This method returns an AMS-Agent Description as a string
Overrides:
toString in class java.lang.Object
Returns:
String AMS Agent Description

getObjectID

public java.lang.String getObjectID()
This method is required for the DatabaseObject interface for storage.
Specified by:
getObjectID in interface DatabaseObject
Returns:
id the key for the database

getAgentID

public AgentID getAgentID()
This method returns the agent ID
Returns:
AgentID AgentID stored in the Description

setAgentID

public void setAgentID(AgentID agent_id)
This method sets the agent ID.
Parameters:
agent_id - the AgentID of the Description

getAgentName

public java.lang.String getAgentName()
This method returns the name of the agent ID
Returns:
String name part of the AgentID

getState

public java.lang.String getState()
This method returns the state of the agent
Returns:
String state of the AMS Agent Description

setState

public void setState(java.lang.String state)
This method sets the state of the agent
Parameters:
state - state of the agent

getOwnership

public java.lang.String getOwnership()
This method returns the ownership
Returns:
ownership of the description

setOwnership

public void setOwnership(java.lang.String ownership)
This method sets the ownership
Parameters:
ownership - Ownership stored in the description

canRegister

public boolean canRegister()
Indicates whether this AMS Agent Description is suitable for use in the register action.
Returns:
True if the mandatory fields are present for a register action, false otherwise

canModify

public boolean canModify()
Indicates whether this AMS Agent description is suitable for use in the modify action.
Returns:
True if the mandatory fields are present for a modify action, false otherwise

canDeregister

public boolean canDeregister()
Indicates whether this AMS Agent Description is suitable for use in the deregister action.
Returns:
True if the mandatory fields are present for a deregister action, false otherwise

hasAgentID

public boolean hasAgentID()
Indicates whether the agent name was present in the AMS Agent Description
Returns:
True if the field is present, false otherwise

hasState

public boolean hasState()
Indicates whether the agent state was present in the AMS Agent Description
Returns:
True if the field is present, false otherwise

main

public static void main(java.lang.String[] args)
This method is for testing only.
Parameters:
args - Arguments array