fipaos.ont.fipa.fipaman
Class APDescription

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

public class APDescription
extends java.lang.Object
implements java.io.Serializable

This class represents the Agent Platform Description object and contains a APTDescription which represents the Agent Platform Transport Description object TODO: there is at present to checking to see if the characters in the fields are valid as per the BNF definitions

See Also:
Serialized Form

Constructor Summary
APDescription()
          This constructor creates an empty Agent Platform Descriptioon.
APDescription(Content ap_content)
          This constructor takes a Content object as a parameter.
APDescription(java.lang.String description)
          This constructor creates an APDescriptoin from a string.
 
Method Summary
 boolean addMTPD(MTPDescription mtpd)
          Adds a MTPDescription to the list of MTPDs
 java.lang.Boolean getDynamic()
          Get the dynamic registration capability of the platform
 java.lang.Boolean getMobility()
          Get the mobility capability of the platform
 java.util.Set getMTPDs()
          Get the Agent Transport Description
 java.lang.String getName()
          Get the name of the AP
 APTDescription getTransportDescription()
          This method returns the transport profile of the Agent Platform.
static void main(java.lang.String[] args)
          This main method is used for testing.
 boolean removeMTPD(MTPDescription mtpd)
          remove a Message Transport Protocol Description from the list
 void setDynamic(java.lang.Boolean dynamic)
          Set whether the platform supports dynamic registration of Agents
 void setMobility(java.lang.Boolean mobility)
          Set whether the platform supports mobility of the AP
 void setMTPDs(java.util.Set transport_description)
          Set the description MTPDescription capabilities of the AP
 void setName(java.lang.String name)
          This method sets the name of the Agent Platform Description.
 void setTransportDescription(APTDescription transport_description)
          This method sets the transport profile of the Agent Platform
 java.lang.String toString()
          A string representation of this APDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

APDescription

public APDescription()
This constructor creates an empty Agent Platform Descriptioon.

APDescription

public APDescription(java.lang.String description)
              throws ParserException
This constructor creates an APDescriptoin from a string.
Parameters:
description - string representation of an APDescription
Throws:
ParserException - if it does not parse correctly

APDescription

public APDescription(Content ap_content)
              throws ParserException
This constructor takes a Content object as a parameter.
Parameters:
ap_content - Content object created by the fipao.parser.sl.SLParser
Throws:
ParserException - if the String is invalid
Method Detail

setName

public void setName(java.lang.String name)
This method sets the name of the Agent Platform Description.
Parameters:
name - The name of the AP

setDynamic

public void setDynamic(java.lang.Boolean dynamic)
Set whether the platform supports dynamic registration of Agents
Parameters:
dynamic - true if the platform supports dynamic registration

setMobility

public void setMobility(java.lang.Boolean mobility)
Set whether the platform supports mobility of the AP
Parameters:
mobility - set to true if the agent platform supports mobility

setMTPDs

public void setMTPDs(java.util.Set transport_description)
Set the description MTPDescription capabilities of the AP
Parameters:
transport_description - the agent transport description object

setTransportDescription

public void setTransportDescription(APTDescription transport_description)
This method sets the transport profile of the Agent Platform
Parameters:
transport_description - Transport Profile

getName

public java.lang.String getName()
Get the name of the AP
Returns:
the name of the AP

getDynamic

public java.lang.Boolean getDynamic()
Get the dynamic registration capability of the platform
Returns:
true if the platform supports dynamic registration capability - false if not

getMobility

public java.lang.Boolean getMobility()
Get the mobility capability of the platform
Returns:
true if the platform supports mobility

getMTPDs

public java.util.Set getMTPDs()
Get the Agent Transport Description
Returns:
the Agent Transport Description

getTransportDescription

public APTDescription getTransportDescription()
This method returns the transport profile of the Agent Platform.
Returns:
transport profile of the AP

addMTPD

public boolean addMTPD(MTPDescription mtpd)
Adds a MTPDescription to the list of MTPDs
Parameters:
mtpd - The MTPD to be added to the list
Returns:
as per MTPDescription.addMTPD

removeMTPD

public boolean removeMTPD(MTPDescription mtpd)
remove a Message Transport Protocol Description from the list
Parameters:
mtpd - the MTPD that needs to be removed
Returns:
as per the MTPDescription.removeMTPD()

toString

public java.lang.String toString()
A string representation of this APDescription
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this APDescription

main

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