All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class kraft.monitor.adapter.CCQL

java.lang.Object
   |
   +----kraft.monitor.adapter.CCQL

public class CCQL
extends Object
implements Message
Represents a CCQL message as an object. This means this message can be passed to the Monitor like any other Message object At the moment this is used in conjunction with Kraft_msg, to format the CCQL part of these messages in a way suitable for visualisation. Strings representing prolog term structures (ccql/2) are parsed by this class.

Author:
Ted Francis
See Also:
Kraft_msg

Variable Index

 o content
 o in_reply_to
 o language
 o performative
 o receiver
 o reply_with
 o sender

Constructor Index

 o CCQL(String)
Create a new CCQL message with the given string
 o CCQL(TermInString)
Create a new CCQL message with the given Term

Method Index

 o equals(Object)
Whether another object represents the same message as this one.
 o formatContent(String, int)
Parse the content field of the message.
 o getCommandString()
Returns the performative of the CCQL message.
 o getDisplayString(int)
Returns a formatted string representing the CCQL message.
 o toString()
Returns the original, unformatted term structure.

Variables

 o performative
 public String performative
 o sender
 public String sender
 o receiver
 public String receiver
 o language
 public String language
 o content
 public String content
 o reply_with
 public String reply_with
 o in_reply_to
 public String in_reply_to

Constructors

 o CCQL
 public CCQL(String str) throws Exception
Create a new CCQL message with the given string

Throws: Exception
if the string is not a valid ccql term
 o CCQL
 public CCQL(TermInString term) throws Exception
Create a new CCQL message with the given Term

Throws: Exception
if the string is not a valid ccql term

Methods

 o formatContent
 protected String formatContent(String content,
                                int level)
Parse the content field of the message. Checks to see whether the string is a term, and if so, formats it.

 o getDisplayString
 public String getDisplayString(int detail)
Returns a formatted string representing the CCQL message. In this implementation, the value of detail is ignored, the same string is always returned Needed so this class can implement the Message interface

See Also:
Message
 o getCommandString
 public String getCommandString()
Returns the performative of the CCQL message. Needed so this class can implement the Message interface

 o toString
 public String toString()
Returns the original, unformatted term structure. Needed to implement the Message interface

Overrides:
toString in class Object
 o equals
 public boolean equals(Object obj)
Whether another object represents the same message as this one. Needed so this class can implement the Message interface

Overrides:
equals in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index