core
Class IEOS

java.lang.Object
  extended by core.IEOS

public class IEOS
extends java.lang.Object

Author:
The Eye OCL Software Group

Constructor Summary
IEOS()
          This method creates a new instance of IEOS
 
Method Summary
 boolean closeClassDiagram()
          This method is called to disable the insertion of elements into the class diagram, thus we say that the class diagram gets ``closed''.
 boolean closeObjectDiagram()
          This method is called to disable the insertion of elements into the object diagram, thus we say that the object diagram gets ``closed''.
 boolean createClassDiagram()
          This method is called to create a class diagram where the user can insert elements
 boolean createObjectDiagram()
          This method is called to create an object diagram where the user can insert elements
 void exit()
          This method removes the state structure
 java.lang.String getVersion()
          This method returns the current version of the tool
 boolean insertAssociation(java.lang.String class1Name, java.lang.String role1Name, java.lang.String multiplicity1, java.lang.String multiplicity2, java.lang.String role2Name, java.lang.String class2Name)
          It inserts an association between two classes The parameters multiplicity1 and multiplicity2 can be of two forms: 1.- "a..b" with 'a' a natural number and 'b' a natural number greater than 'a' or the character '*'.
 boolean insertAttribute(java.lang.String className, java.lang.String attributeName, java.lang.String typeName)
          It inserts the attribute attributeName into the class className
 boolean insertClass(java.lang.String className)
          It inserts the class className into the class diagram
 boolean insertGeneralization(java.lang.String subClass, java.lang.String superClass)
          It inserts a generalization between two classes
 boolean insertLink(java.lang.String class1Name, java.lang.String object1Name, java.lang.String role1Name, java.lang.String role2Name, java.lang.String object2Name, java.lang.String class2Name)
          It inserts a link between two objects
 boolean insertObject(java.lang.String className, java.lang.String objectName)
          It inserts an object into the object diagram
 boolean insertOperation(java.lang.String contextClass, java.lang.String nameOperation, java.lang.String returnType, java.lang.String bodyOperation, java.lang.Object[] params)
          It inserts an user defined operation
 boolean insertValue(java.lang.String className, java.lang.String attributeName, java.lang.String objectName, java.lang.String value)
          It assigns a value to the attribute of an object
 java.lang.String query(java.lang.String query)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IEOS

public IEOS()
This method creates a new instance of IEOS

Method Detail

createClassDiagram

public boolean createClassDiagram()
This method is called to create a class diagram where the user can insert elements

Returns:
true if the class diagram class could be created and false otherwise

closeClassDiagram

public boolean closeClassDiagram()
This method is called to disable the insertion of elements into the class diagram, thus we say that the class diagram gets ``closed''.

Returns:
true if the current class diagram could be closed and false otherwise

createObjectDiagram

public boolean createObjectDiagram()
This method is called to create an object diagram where the user can insert elements

Returns:
true if the object diagram could be created and false otherwise

closeObjectDiagram

public boolean closeObjectDiagram()
                           throws java.lang.Exception
This method is called to disable the insertion of elements into the object diagram, thus we say that the object diagram gets ``closed''.

Returns:
true if current object diagram could be closed and false otherwise
Throws:
java.lang.Exception

insertClass

public boolean insertClass(java.lang.String className)
It inserts the class className into the class diagram

Parameters:
className - The name of the class to be inserted
Returns:
false whether a class diagram is not available or the class could not be inserted

insertAttribute

public boolean insertAttribute(java.lang.String className,
                               java.lang.String attributeName,
                               java.lang.String typeName)
It inserts the attribute attributeName into the class className

Parameters:
className - the name of the class where the attribute is to be inserted
attributeName - the name of the attribute to be inserted
typeName - the type of the attribute to be inserted
Returns:
false whether a class diagram is not available or the attribute could not be inserted

insertAssociation

public boolean insertAssociation(java.lang.String class1Name,
                                 java.lang.String role1Name,
                                 java.lang.String multiplicity1,
                                 java.lang.String multiplicity2,
                                 java.lang.String role2Name,
                                 java.lang.String class2Name)
It inserts an association between two classes

The parameters multiplicity1 and multiplicity2 can be of two forms:

1.- "a..b" with 'a' a natural number and 'b' a natural number greater than 'a' or the character '*'.

2.- "a" where 'a' is a natural number greater than 0 or the character '*'.

Parameters:
class1Name - the name of the class at one end of the association
role1Name - the name of the role played by class1Name in the association
multiplicity1 - the range of multiplicity allowed for instances of class1Name
multiplicity2 - the range of multiplicity allowed for instances of class1Name
role2Name - the name of the role played by class2Name in the association
class2Name - the name of the class at the other end of the association
Returns:
false whether a class diagram is not available or the association could not be inserted

insertGeneralization

public boolean insertGeneralization(java.lang.String subClass,
                                    java.lang.String superClass)
It inserts a generalization between two classes

Parameters:
subClass - the name of the child class in the generalization
superClass - the name of the parent class in the generalization
Returns:
false if a class diagram is not available or if the generalization could not be inserted

insertObject

public boolean insertObject(java.lang.String className,
                            java.lang.String objectName)
It inserts an object into the object diagram

Parameters:
className - the name of the class of which the object objectName is an instance
objectName - the name of the object to be inserted
Returns:
false whether a class diagram is not available or the object could not be inserted

insertValue

public boolean insertValue(java.lang.String className,
                           java.lang.String attributeName,
                           java.lang.String objectName,
                           java.lang.String value)
It assigns a value to the attribute of an object

Parameters:
className - the name of the class of which the object objectName is an instance
attributeName - the name of the attribute which receives the value
objectName - the name of the object that holds the attribute
value - the value to be assigned to the attribute
Returns:
false whether the class diagram is not available or the value could not be inserted

insertLink

public boolean insertLink(java.lang.String class1Name,
                          java.lang.String object1Name,
                          java.lang.String role1Name,
                          java.lang.String role2Name,
                          java.lang.String object2Name,
                          java.lang.String class2Name)
It inserts a link between two objects

Parameters:
class1Name - the name of the class at one end of the association that is going to be instanciated
object1Name - the name of the class1Name instance that is going to be linked
role1Name - the name of the role played by class1Name in the association that is going to be instanciated
role2Name - the name of the role played by class2Name in the association that is going to be instanciated
object2Name - the name of the class2Name instance that is going to be linked
class2Name - the name of the class at the other end of the association that is going to be instanciated
Returns:
false whether a class diagram is not available or the link could not be inserted

insertOperation

public boolean insertOperation(java.lang.String contextClass,
                               java.lang.String nameOperation,
                               java.lang.String returnType,
                               java.lang.String bodyOperation,
                               java.lang.Object[] params)
It inserts an user defined operation

Parameters:
contextClass - the contextual class of the operation
nameOperation - the name of the operation (all the operations declared must have a unique name)
returnType - the return type of the operation
bodyOperation - the OCL expression that defines the body of the operation
params - the n possible parameters of the operation. They are declared as an Object[n]. Each position in Object[n] holds a parameter p with the following structure: the parameter p is declared as a String[2] to hold the name of p at position 0, and the type of p at position 1. Notice that even when the operation f does not have parameters, an Object[0] has to be created
Returns:
true when the operation is well-formed and has been successfully defined

query

public java.lang.String query(java.lang.String query)
                       throws java.lang.Exception
Parameters:
query - It keeps the query in a String
Returns:
The result of the query when it has been first, successfully parsed and type-checked and second, successfully evaluated.
Throws:
java.lang.Exception

exit

public void exit()
This method removes the state structure


getVersion

public java.lang.String getVersion()
This method returns the current version of the tool