jade.content.abs
Class AbsHelper

java.lang.Object
  |
  +--jade.content.abs.AbsHelper

public class AbsHelper
extends java.lang.Object

Author:
Federico Bergenti - Universita` di Parma, Giovanni Caire - TILAB

Constructor Summary
AbsHelper()
           
 
Method Summary
static AbsAgentAction externaliseACLMessage(ACLMessage obj, Ontology onto)
          Converts an ACLMessage into an AbsAgentAction using the specified ontology.
static AbsConcept externaliseAID(AID obj)
          Converts an AID into an AbsConcept representing an AID
static AbsContentElementList externaliseContentElementList(ContentElementList obj, Ontology onto)
          Converts a ContentElementList into an AbsContentElementList using the specified ontology.
static AbsAggregate externaliseIterator(Iterator obj, Ontology onto, java.lang.String AggregateType)
          Converts an Iterator into a AbsAggregate using the specified ontology.
static AbsAggregate externaliseList(List obj, Ontology onto, java.lang.String AggregateType)
          Converts a List into a AbsAggregate using the specified ontology.
static OntoACLMessage internaliseACLMessage(AbsAgentAction absMsg, Ontology onto)
          Converts to an AbsAgentAction representing an ACLMessage into an OntoACLMessage using the specified ontology.
static OntoAID internaliseAID(AbsConcept aid)
          Converts an AbsConcept representing an AID into an OntoAID
static ContentElementList internaliseContentElementList(AbsContentElementList l, Ontology onto)
          Converts to an AbsContentElementList into a ContentElementList using the specified ontology.
static List internaliseList(AbsAggregate aggregate, Ontology onto)
          Converts an AbsAggregate into a List using the specified ontology.
static void setAttribute(AbsObject abs, java.lang.String attrName, AbsObject attrValue)
          Set an attribute in an abstract descriptor performing all necessary type checks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsHelper

public AbsHelper()
Method Detail

externaliseList

public static AbsAggregate externaliseList(List obj,
                                           Ontology onto,
                                           java.lang.String AggregateType)
                                    throws OntologyException
Converts a List into a AbsAggregate using the specified ontology.
Parameters:
obj - the List
onto - the ontology.
Returns:
the abstract descriptor.
Throws:
OntologyException -  

externaliseIterator

public static AbsAggregate externaliseIterator(Iterator obj,
                                               Ontology onto,
                                               java.lang.String AggregateType)
                                        throws OntologyException
Converts an Iterator into a AbsAggregate using the specified ontology.
Parameters:
obj - the Iterator
onto - the ontology.
Returns:
the abstract descriptor.
Throws:
OntologyException -  

externaliseAID

public static AbsConcept externaliseAID(AID obj)
Converts an AID into an AbsConcept representing an AID
Parameters:
obj - the AID
Returns:
the abstract descriptor.

externaliseContentElementList

public static AbsContentElementList externaliseContentElementList(ContentElementList obj,
                                                                  Ontology onto)
                                                           throws OntologyException
Converts a ContentElementList into an AbsContentElementList using the specified ontology.
Parameters:
obj - the ContentElementList
onto - the ontology.
Returns:
the abstract descriptor.
Throws:
OntologyException -  

externaliseACLMessage

public static AbsAgentAction externaliseACLMessage(ACLMessage obj,
                                                   Ontology onto)
                                            throws OntologyException
Converts an ACLMessage into an AbsAgentAction using the specified ontology.
Parameters:
obj - the ACLMessage
onto - the ontology.
Returns:
the abstract descriptor.
Throws:
OntologyException -  

internaliseList

public static List internaliseList(AbsAggregate aggregate,
                                   Ontology onto)
                            throws OntologyException
Converts an AbsAggregate into a List using the specified ontology.
Parameters:
onto - the ontology
Returns:
the List
Throws:
OntologyException -  

internaliseAID

public static OntoAID internaliseAID(AbsConcept aid)
                              throws OntologyException
Converts an AbsConcept representing an AID into an OntoAID
Returns:
the OntoAID
Throws:
OntologyException - if aid does not represent a valid AID

internaliseContentElementList

public static ContentElementList internaliseContentElementList(AbsContentElementList l,
                                                               Ontology onto)
                                                        throws OntologyException
Converts to an AbsContentElementList into a ContentElementList using the specified ontology.
Parameters:
onto - the ontology
Returns:
the ContentElementList
Throws:
OntologyException -  

internaliseACLMessage

public static OntoACLMessage internaliseACLMessage(AbsAgentAction absMsg,
                                                   Ontology onto)
                                            throws OntologyException
Converts to an AbsAgentAction representing an ACLMessage into an OntoACLMessage using the specified ontology.
Parameters:
onto - the ontology
Returns:
the OntoACLMessage
Throws:
OntologyException -  

setAttribute

public static void setAttribute(AbsObject abs,
                                java.lang.String attrName,
                                AbsObject attrValue)
                         throws OntologyException
Set an attribute in an abstract descriptor performing all necessary type checks.
Throws:
OntologyException - if a type mismatch is detected