dk.brics.bisimulationGame.model
Class GlobalModelImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by dk.brics.bisimulationGame.model.GlobalModelImpl
All Implemented Interfaces:
GlobalModel, java.io.Serializable, java.rmi.Remote

public class GlobalModelImpl
extends java.rmi.server.UnicastRemoteObject
implements GlobalModel

Implementation of the GlobalModel.

Author:
Martin Mosegaard martinm@daimi.au.dk
See Also:
GlobalModel, Serialized Form

Field Summary
private  int bisimulation
           
private  java.lang.String leftFile
           
private  java.lang.String leftGraphAsDot
           
private  java.lang.String rightFile
           
private  java.lang.String rightGraphAsDot
           
private  int role
           
private static long serialVersionUID
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
GlobalModelImpl(java.lang.String leftFilePath, java.lang.String rightFilePath, java.lang.String leftFile, java.lang.String rightFile, int role, int bisimulation)
          Constructs a global model.
 
Method Summary
 int getBisimulation()
           
private  java.lang.String getDotFromGraph(java.lang.String filename)
          From a file containing graph output from The Edinburgh CWB, a dot graph is constructed.
 java.lang.String getLeftFile()
           
 java.lang.String getLeftGraphAsDot()
           
 java.lang.String getRightFile()
           
 java.lang.String getRightGraphAsDot()
           
 int getRole()
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

leftFile

private java.lang.String leftFile

leftGraphAsDot

private java.lang.String leftGraphAsDot

rightFile

private java.lang.String rightFile

rightGraphAsDot

private java.lang.String rightGraphAsDot

role

private int role

bisimulation

private int bisimulation
Constructor Detail

GlobalModelImpl

public GlobalModelImpl(java.lang.String leftFilePath,
                       java.lang.String rightFilePath,
                       java.lang.String leftFile,
                       java.lang.String rightFile,
                       int role,
                       int bisimulation)
                throws java.rmi.RemoteException
Constructs a global model.

Parameters:
leftFilePath - Path name of the left LTS
rightFilePath - Path name of the right LTS
leftFile - File name of the left LTS
rightFile - File name of the right LTS
role - The role of the player creating the global model
bisimulation - The bisimulation type
Throws:
java.rmi.RemoteException
Method Detail

getDotFromGraph

private java.lang.String getDotFromGraph(java.lang.String filename)
From a file containing graph output from The Edinburgh CWB, a dot graph is constructed. This is later passed as input to Grappa.

Parameters:
filename - File name
Returns:
Dot representation of a graph

getLeftFile

public java.lang.String getLeftFile()
                             throws java.rmi.RemoteException
Specified by:
getLeftFile in interface GlobalModel
Returns:
The left file name
Throws:
java.rmi.RemoteException

getRightFile

public java.lang.String getRightFile()
                              throws java.rmi.RemoteException
Specified by:
getRightFile in interface GlobalModel
Returns:
The right file name
Throws:
java.rmi.RemoteException

getRole

public int getRole()
            throws java.rmi.RemoteException
Specified by:
getRole in interface GlobalModel
Returns:
The role of the player who created the global model object (attacker/defender)
Throws:
java.rmi.RemoteException

getLeftGraphAsDot

public java.lang.String getLeftGraphAsDot()
                                   throws java.rmi.RemoteException
Specified by:
getLeftGraphAsDot in interface GlobalModel
Returns:
The left Grappa graph as a dot representation
Throws:
java.rmi.RemoteException

getRightGraphAsDot

public java.lang.String getRightGraphAsDot()
                                    throws java.rmi.RemoteException
Specified by:
getRightGraphAsDot in interface GlobalModel
Returns:
The right Grappa graph as a dot representation
Throws:
java.rmi.RemoteException

getBisimulation

public int getBisimulation()
                    throws java.rmi.RemoteException
Specified by:
getBisimulation in interface GlobalModel
Returns:
The bisimulation type (strong/weak)
Throws:
java.rmi.RemoteException