fipaos.ont.fipa.fipaman
Class AgentID

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

public class AgentID
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class represents an AID, as described in the FIPA99 specification

See Also:
Serialized Form

Constructor Summary
AgentID()
          Constructs a blank AgentID.
AgentID(AgentID aid)
          Deprecated. Please use clone() instead
AgentID(java.lang.String aid)
          Constructs an AgentID from the given String, which is expected to conform to the FIPA99 representation for an AID
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object other)
          Compare this with another object
 java.util.List getAddresses()
          Gets a List of addresses (URL's) associated with this AgentID
static java.util.List getAgentIDs(java.lang.String aids)
          Converts a list of stringified AgentID's into a List of AgentID objects
static DynamicClass.PropertyHint getDynamicClassHints(java.lang.String prop)
          Method to provide property hints to DynamicClass
 java.lang.String getName()
          Gets the name associated with this AgentID
 java.util.List getResolvers()
          Gets a List of resolvers for the Agent represented by this
 int hashCode()
           
static void main(java.lang.String[] args)
           
 void setAddresses(java.util.List addresses)
          Sets the addresses (URL's) through which the Agent can be contacted
 void setAddresses(java.lang.String addresses)
          Sets the addresses associated with this AgentID
 void setName(java.lang.String name)
          Sets the name of the Agent represented by this AgentID
 void setResolvers(java.util.List resolvers)
          Sets tbe resolvers of this Agent
 void setResolvers(java.lang.String resolvers)
          Sets the list of resolvers for this Agent
 java.lang.String toString()
          Converts this into the FIPA99 AgentID format
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgentID

public AgentID()
Constructs a blank AgentID.

AgentID

public AgentID(java.lang.String aid)
        throws ParserException
Constructs an AgentID from the given String, which is expected to conform to the FIPA99 representation for an AID
Parameters:
aid - The stringified AID to parse
Throws:
ParserException - Thrown if the AID specified is malformed

AgentID

public AgentID(AgentID aid)
Deprecated. Please use clone() instead

Constructs a new AgentID from the given AgentID.
Parameters:
aid - The AID to copy
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

setName

public void setName(java.lang.String name)
Sets the name of the Agent represented by this AgentID
Parameters:
name - The name to set

setAddresses

public void setAddresses(java.lang.String addresses)
Sets the addresses associated with this AgentID
Parameters:
addresses - String containing the addresses of the Agent in stringified form

setAddresses

public void setAddresses(java.util.List addresses)
Sets the addresses (URL's) through which the Agent can be contacted
Parameters:
addresses - List of fipaos.util.URL objects

setResolvers

public void setResolvers(java.lang.String resolvers)
Sets the list of resolvers for this Agent
Parameters:
resolvers - Stringified version of the list of resolvers

setResolvers

public void setResolvers(java.util.List resolvers)
Sets tbe resolvers of this Agent
Parameters:
resolvers - A List of AgentID's, which can resolve the Agent

getName

public java.lang.String getName()
Gets the name associated with this AgentID
Returns:
A String containing the Agent name

getAddresses

public java.util.List getAddresses()
Gets a List of addresses (URL's) associated with this AgentID
Returns:
A List of addresses (URL's) in stringified form

getResolvers

public java.util.List getResolvers()
Gets a List of resolvers for the Agent represented by this
Returns:
A List containing AgentID's of resolvers for this

toString

public java.lang.String toString()
Converts this into the FIPA99 AgentID format
Overrides:
toString in class java.lang.Object
Returns:
A String representation of this

getAgentIDs

public static java.util.List getAgentIDs(java.lang.String aids)
Converts a list of stringified AgentID's into a List of AgentID objects

equals

public boolean equals(java.lang.Object other)
Compare this with another object
Overrides:
equals in class java.lang.Object

getDynamicClassHints

public static DynamicClass.PropertyHint getDynamicClassHints(java.lang.String prop)
Method to provide property hints to DynamicClass

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception