ix.iserve.ipc
Class LinearIXSyntax

java.lang.Object
  extended by ix.iserve.ipc.LinearIXSyntax

public class LinearIXSyntax
extends java.lang.Object

A simple string representation of I-X items for use by communication strategies.

Syntax out of I-X Java representation:

   Activity:   Aid^from^pattern
   Chat:       M^from^text
 

Syntax into I-X Java representation:

   Activity:   Aid^to^pattern
   Constraint: C^to^type subtype pattern=value
   Report:     Rrefid^to^type text
   Chat:       M^to^text
 

For messages coming into I-X, 'from' will be attached or determined somehow by the communication strategy, either on the sending or receiving side, and will be installed as the senderId on the receiving side after decoding from linear syntax.

The 'refid' will be the id of an activity and will include the initial 'A' for 'activity'.

In the "into I-X" syntax for a constraint, the type "world-state" can be abbreviated to "state".


Constructor Summary
LinearIXSyntax(java.lang.String fromName)
           
 
Method Summary
 Sendable decode(java.lang.String s)
          Decoding
 Activity decodeActivity(java.lang.String s)
           
 ChatMessage decodeChatMessage(java.lang.String s)
           
 Constraint decodeConstraint(java.lang.String s)
           
 Report decodeReport(java.lang.String s)
           
 java.lang.String encode(Activity act)
           
 java.lang.String encode(ChatMessage m)
           
 java.lang.String encode(Sendable item)
          Encoding
static void main(java.lang.String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearIXSyntax

public LinearIXSyntax(java.lang.String fromName)
Method Detail

encode

public java.lang.String encode(Sendable item)
Encoding


encode

public java.lang.String encode(Activity act)

encode

public java.lang.String encode(ChatMessage m)

decode

public Sendable decode(java.lang.String s)
Decoding


decodeActivity

public Activity decodeActivity(java.lang.String s)

decodeConstraint

public Constraint decodeConstraint(java.lang.String s)

decodeReport

public Report decodeReport(java.lang.String s)

decodeChatMessage

public ChatMessage decodeChatMessage(java.lang.String s)

main

public static void main(java.lang.String[] argv)