From: <jom...@us...> - 2008-08-29 09:22:32
|
Revision: 1358 http://jason.svn.sourceforge.net/jason/?rev=1358&view=rev Author: jomifred Date: 2008-08-29 09:22:29 +0000 (Fri, 29 Aug 2008) Log Message: ----------- fix some html related issues in the documentation Modified Paths: -------------- trunk/src/jason/asSemantics/Agent.java trunk/src/jason/asSemantics/SuspendInternalAction.java trunk/src/jason/asSyntax/Literal.java trunk/src/jason/asSyntax/Pred.java trunk/src/jason/asSyntax/directives/Directive.java trunk/src/jason/bb/JDBCPersistentBB.java Modified: trunk/src/jason/asSemantics/Agent.java =================================================================== --- trunk/src/jason/asSemantics/Agent.java 2008-08-29 08:46:07 UTC (rev 1357) +++ trunk/src/jason/asSemantics/Agent.java 2008-08-29 09:22:29 UTC (rev 1358) @@ -534,7 +534,7 @@ } /** - * Returns true if BB contains the literal <i>bel</bel> (using unification to test). + * Returns true if BB contains the literal <i>bel</i> (using unification to test). * The unifier <i>un</i> is updated by the method. */ public boolean believes(LogicalFormula bel, Unifier un) { Modified: trunk/src/jason/asSemantics/SuspendInternalAction.java =================================================================== --- trunk/src/jason/asSemantics/SuspendInternalAction.java 2008-08-29 08:46:07 UTC (rev 1357) +++ trunk/src/jason/asSemantics/SuspendInternalAction.java 2008-08-29 09:22:29 UTC (rev 1358) @@ -39,6 +39,7 @@ /** * Suspend the current intention, put it in the PendingIntention (PI) structure and assigns it to a key. * + * @param ts the "engine" of the agent * @param basekey the base key to form final key used to get the intention back from PI (e.g. "moise", "cartago", ...) * @param timeout the max time the intention will be in PI, the value 0 means until "resume" * @return the final key used to store the intention in PI Modified: trunk/src/jason/asSyntax/Literal.java =================================================================== --- trunk/src/jason/asSyntax/Literal.java 2008-08-29 08:46:07 UTC (rev 1357) +++ trunk/src/jason/asSyntax/Literal.java 2008-08-29 09:22:29 UTC (rev 1358) @@ -272,7 +272,7 @@ return predicateIndicatorCache; } - /** returns this literal as a list [<functor>, <list of terms>, <list of annots>] */ + /** returns this literal as a list with three elements: [functor, list of terms, list of annots] */ public ListTerm getAsListOfTerms() { ListTerm l = new ListTermImpl(); l.add(new Literal(type, getFunctor())); @@ -287,7 +287,7 @@ return l; } - /** creates a literal from a list [<functor>, <list of terms>, <list of annots>] */ + /** creates a literal from a list with three elements: [functor, list of terms, list of annots] */ public static Literal newFromListOfTerms(ListTerm lt) throws JasonException { try { Iterator<Term> i = lt.iterator(); Modified: trunk/src/jason/asSyntax/Pred.java =================================================================== --- trunk/src/jason/asSyntax/Pred.java 2008-08-29 08:46:07 UTC (rev 1357) +++ trunk/src/jason/asSyntax/Pred.java 2008-08-29 09:22:29 UTC (rev 1358) @@ -414,7 +414,7 @@ /** * Replaces all variables of the term for unnamed variables (_). * - * @param changes is the map of replacements + * @param un is the unifier that containt the map of replacements */ @Override public void makeVarsAnnon(Unifier un) { Modified: trunk/src/jason/asSyntax/directives/Directive.java =================================================================== --- trunk/src/jason/asSyntax/directives/Directive.java 2008-08-29 08:46:07 UTC (rev 1357) +++ trunk/src/jason/asSyntax/directives/Directive.java 2008-08-29 09:22:29 UTC (rev 1358) @@ -9,39 +9,39 @@ * <p>There are two kinds of directives: single directive and begin/end directive. * The single directive does not have inner plans, as, for instance, the * include: - * <blockquote><code> + * <br/><code> * ...<br> * { include("a.asl") } <br> * ...<br> - * </code></blockquote> + * </code><br/> * * <p>begin/end directives have inner plans, as used in goal patterns: - * <blockquote><code> + * <br/><code> * ...<br> * { begin ebdg(g) } <br> * +!g : bel <- action1. <br> * +!g <- action2. <br> * { end } <br> * ...<br> - * </code></blockquote> + * </code><br/> * This pattern will change these two plans to: - * <blockquote><code> + * <br/><code> * +!g : g. <br> * +!g : not (p__1(g)) & bel <- +p__1(g); action1; ?g. <br> * +!g : not (p__2(g)) <- +p__2(g); action2; ?g. <br> * -!g <- !g. <br> * +g <- -p__1(g); -p__2(g); .dropGoal(g,true). <br> - * </code></blockquote> + * </code><br/> * * Goal patterns are proposed in the paper: <br> - * <blockquote> + * <br/> * Jomi Fred Hubner, Rafael H. Bordini, and Michael Wooldridge. <br> * Programming declarative goals using plan patterns. <br> In Matteo * Baldoni and Ulle Endriss, editors, <i>Proceedings of the Fourth * International Workshop on Declarative Agent Languages and * Technologies</i> (DALT 2006), held with AAMAS 2006, 8th May, Hakodate, * Japan, pages 65-81. Springer, 2006. <br> - * </blockquote> + * <br/> * * @author jomi */ Modified: trunk/src/jason/bb/JDBCPersistentBB.java =================================================================== --- trunk/src/jason/bb/JDBCPersistentBB.java 2008-08-29 08:46:07 UTC (rev 1357) +++ trunk/src/jason/bb/JDBCPersistentBB.java 2008-08-29 09:22:29 UTC (rev 1358) @@ -29,49 +29,53 @@ import java.util.logging.Logger; /** - * Implementation of BB that stores some beliefs in a relational data base. - * - * <p>The parameters for this customisation are: - * <ul> - * <li>args[0] is the Database Engine JDBC drive - * <li>args[1] is the JDBC URL connection string <br/> - * The url can use the agent name as parameter as in "jdbc:mysql://localhost/%s". - * In this case, %s will be replaced by the agent's name. - * <li>args[2] is the username - * <li>args[3] is the password - * <li>args[4] is an AS list with all beliefs that are mapped to DB. - * Each element of the list is in the form - * <blockquote> - * <code>predicate(arity [, table_name [, columns]])</code> - * </blockquote> - * and columns is in the form - * <blockquote> - * <code>columns( col_name(col_type), col_name(col_type), ....)</code> - * </blockquote> - * </ul> - * - * <p>Example in .mas2j project:<br> - * <blockquote> - * <pre> + Implementation of BB that stores some beliefs in a relational data base. + + <p>The parameters for this customisation are: + <ul> + <li>args[0] is the Database Engine JDBC drive + <li>args[1] is the JDBC URL connection string <br/> + The url can use the agent name as parameter as in "jdbc:mysql://localhost/%s". + In this case, %s will be replaced by the agent's name. + <li>args[2] is the username + <li>args[3] is the password + <li>args[4] is an AS list with all beliefs that are mapped to DB. + Each element of the list is in the form + <br/><br/> + <code>predicate(arity [, table_name [, columns]])</code> + <br/><br/> + and columns is in the form + <br/><br/> + <code>columns( col_name(col_type), col_name(col_type), ....)</code> + <br/><br/> + </ul> + + <p>Example in .mas2j project, the agent c uses a JDBC belief base:<br> + <br/> + <pre> agents: c beliefBaseClass jason.bb.JDBCPersistentBB( "org.hsqldb.jdbcDriver", // driver for HSQLDB "jdbc:hsqldb:bookstore", // URL connection "sa", // user "", // password - "[a(1,tablea,columns(runs(integer))),book(5),book_author(2),author(2,author,columns(id(integer),name(varchar(30)))),publisher(2)]"); - // predicate a/1 is mapped to a table called "tablea" with an integer column called runs; - // the name and type of the columns is used only if the table does not exits and - // have to be created; - // if no column name/type is provided, an arbitrary name is used with type varchar(256) - // predicate book (with arity 5) is mapped to a table called "book" - // if no table name is provided the predicate name is used for the table name - // the columns for author are "id" (an integer) and "name" (char); - // and so on... + "[a(1,tablea,columns(runs(integer))), + book(5), + book_author(2), + author(2,author,columns(id(integer),name(varchar(30)))), + publisher(2)]"); </pre> - * </blockquote> - * - * @author Jomi + + <p>The predicate <code>a/1</code> is mapped to a table called "tablea" with an integer column called runs; + predicate <code>book</code> (with arity 5) is mapped to a table called "book"; and so on. + + + <p>The name and type of the columns are used only if the table does not exits and have to be created. + If no column name/type is provided, an arbitrary name is used with type varchar(256). + If no table name is provided, the predicate name is used for the table name. + <br/> + + @author Jomi */ public class JDBCPersistentBB extends DefaultBeliefBase { private static Logger logger = Logger.getLogger(JDBCPersistentBB.class.getName()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |