Class APService

  • All Implemented Interfaces:
    Concept, Term, Serializable, Serializable

    public class APService
    extends Object
    implements Concept
    This class implements the concept of the fipa-agent-management ontology representing the description of a platform service.
    Version:
    $Date$ $Revision$
    Author:
    Fabio Bellifemine - CSELT
    See Also:
    Serialized Form
    • Constructor Detail

      • APService

        public APService()
        Default constructor. Necessary for ontological classes.
      • APService

        public APService​(String type,
                         String[] addresses)
        Constructor. Create a new APService where name and type get the same value (i.e. the passed type parameter).
    • Method Detail

      • setName

        public void setName​(String n)
        Set the name slot of this object.
        Parameters:
        n - The string for the platform service name.
      • getName

        public String getName()
        Retrieve the name slot of this object.
        Returns:
        The value of the name slot of this platform service description, or null if no value was set.
      • setType

        public void setType​(String t)
        Set the type slot of this object.
        Parameters:
        t - The string for the platform service type.
      • getType

        public String getType()
        Retrieve the type slot of this object.
        Returns:
        The value of the type slot of this platform service description, or null if no value was set.
      • addAddresses

        public void addAddresses​(String address)
        Add a service to the addresses slot collection of this object.
        Parameters:
        a - The address to add to the collection.
      • removeAddresses

        public boolean removeAddresses​(String address)
        Remove a service from the addresses slot collection of this object.
        Parameters:
        a - The address to remove from the collection.
        Returns:
        A boolean, telling whether the element was present in the collection or not.
      • clearAllAddresses

        public void clearAllAddresses()
        Remove all addresses from the addresses slot collection of this object.
      • getAllAddresses

        public Iterator getAllAddresses()
        Access all addresses from the addresses slot collection of this object.
        Returns:
        An iterator over the addresses collection.
      • toString

        public String toString()
        Retrieve a string representation for this platform service description.
        Overrides:
        toString in class Object
        Returns:
        an SL0-like String representation of this object