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
-
content
-
-
in_reply_to
-
-
language
-
-
performative
-
-
receiver
-
-
reply_with
-
-
sender
-
-
CCQL(String)
- Create a new CCQL message with the given string
-
CCQL(TermInString)
- Create a new CCQL message with the given Term
-
equals(Object)
- Whether another object represents the same message
as this one.
-
formatContent(String, int)
- Parse the content field of the message.
-
getCommandString()
- Returns the performative of the CCQL message.
-
getDisplayString(int)
- Returns a formatted string representing the CCQL
message.
-
toString()
- Returns the original, unformatted term structure.
performative
public String performative
sender
public String sender
receiver
public String receiver
language
public String language
content
public String content
reply_with
public String reply_with
in_reply_to
public String in_reply_to
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
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
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.
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
getCommandString
public String getCommandString()
- Returns the performative of the CCQL message.
Needed so this class can implement the Message interface
toString
public String toString()
- Returns the original, unformatted term structure.
Needed to implement the Message interface
- Overrides:
- toString in class Object
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