Magentix2
2.1.1
|
Public Member Functions | |
boolean | suspendIntention () |
boolean | canBeUsedInContext () |
String | getAtomAsString (Term term) |
String | getTermAsString (Term term) |
int | getTermAsInt (Term term) |
long | getTermAslong (Term term) |
double | getTermAsdouble (Term term) |
List< String > | getTermAsStringList (Term term) |
List< Integer > | getTermAsintList (Term term) |
List< Double > | getTermAsdoubleList (Term term) |
Literal | getTermAsLiteral (Term term) |
Public Attributes | |
HashMap< String, Conversation > | conversationsList = new HashMap<String, Conversation>() |
Protected Member Functions | |
String | getFactoryName (String convId, String protocolstr, boolean initiator) |
Protected Attributes | |
String | protocolSteep |
ConvCFactory | Protocol_Factory |
Hashtable< String, ConvCFactory > | CFactories = new Hashtable<String, ConvCFactory>() |
int | timeOut = 3000 |
int | joinTimeOut = 4000 |
long | conversationTime |
String | agName |
String | agentConversationID |
This class represents an abstract internal action with the main elements of this type of action to be inherited when using conversations in Jason agents
Definition at line 18 of file protocolInternalAction.java.
Definition at line 35 of file protocolInternalAction.java.
{ return false; }
String es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getAtomAsString | ( | Term | term | ) |
Definition at line 37 of file protocolInternalAction.java.
{
return ((Atom)term).toString();
}
String es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getFactoryName | ( | String | convId, |
String | protocolstr, | ||
boolean | initiator | ||
) | [protected] |
convId,: | Conversation Jason identifier |
protocolstr,: | A small string for identifying the protocol |
initiator,: | true if it is the initiator agent or false if it isn't |
Definition at line 121 of file protocolInternalAction.java.
{ String rol="INI"; if (!initiator) rol="PART"; String facName = convId; facName = facName.replaceAll("[\\W]|^_", ""); facName = facName +"_"+rol+"_"+protocolstr+"FACTORY" ; return facName; }
double es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getTermAsdouble | ( | Term | term | ) |
Definition at line 71 of file protocolInternalAction.java.
{ return (double) ((NumberTerm)term).solve(); }
List<Double> es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getTermAsdoubleList | ( | Term | term | ) |
Definition at line 101 of file protocolInternalAction.java.
{ double selem; List<Double> result = new ArrayList<Double>(); for (Term t: (ListTerm)term) { selem = (double) ((NumberTerm)t).solve(); result.add(selem); } return result; }
Definition at line 63 of file protocolInternalAction.java.
{ return (int) ((NumberTerm)term).solve(); }
List<Integer> es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getTermAsintList | ( | Term | term | ) |
Definition at line 91 of file protocolInternalAction.java.
{ int selem; List<Integer> result = new ArrayList<Integer>(); for (Term t: (ListTerm)term) { selem = (int) ((NumberTerm)t).solve(); result.add(selem); } return result; }
Literal es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getTermAsLiteral | ( | Term | term | ) |
Definition at line 111 of file protocolInternalAction.java.
{
return LiteralImpl.parseLiteral( (term).toString() );
}
long es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getTermAslong | ( | Term | term | ) |
Definition at line 67 of file protocolInternalAction.java.
{ return (long) ((NumberTerm)term).solve(); }
String es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getTermAsString | ( | Term | term | ) |
Definition at line 41 of file protocolInternalAction.java.
{ String result = ""; if (term.isAtom()){ result = ((Atom)term).toString(); }else if (term.isString()){ result = ((StringTerm)term).getString(); //result = ((StringTerm)term).toString(); }else if (term.isNumeric()){ double tmp = ((NumberTerm)term).solve(); result = Double.toString(tmp); }else if (term.isLiteral()){ result = ((LiteralImpl)term).toString(); }else { result = term.toString(); } return result; }
List<String> es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.getTermAsStringList | ( | Term | term | ) |
Definition at line 75 of file protocolInternalAction.java.
{ String selem = "" ; List<String> result = new ArrayList<String>(); for (Term t: (ListTerm)term) { if (t.isAtom()) {selem = ((Atom)t).toString();} else if (t.isLiteral()) {selem = t.toString();} else if (t.isString()) {selem = ((StringTermImpl)t).getString();} result.add(selem); } return result; }
Definition at line 34 of file protocolInternalAction.java.
{ return false; }
String es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.agentConversationID [protected] |
Definition at line 32 of file protocolInternalAction.java.
String es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.agName [protected] |
Definition at line 31 of file protocolInternalAction.java.
Hashtable<String, ConvCFactory> es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.CFactories = new Hashtable<String, ConvCFactory>() [protected] |
Definition at line 27 of file protocolInternalAction.java.
HashMap<String, Conversation> es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.conversationsList = new HashMap<String, Conversation>() |
Definition at line 22 of file protocolInternalAction.java.
long es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.conversationTime [protected] |
Definition at line 30 of file protocolInternalAction.java.
int es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.joinTimeOut = 4000 [protected] |
Definition at line 29 of file protocolInternalAction.java.
ConvCFactory es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.Protocol_Factory [protected] |
Definition at line 26 of file protocolInternalAction.java.
String es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.protocolSteep [protected] |
Definition at line 25 of file protocolInternalAction.java.
int es.upv.dsic.gti_ia.jason.conversationsFactory.protocolInternalAction.timeOut = 3000 [protected] |
Definition at line 28 of file protocolInternalAction.java.