Kermeta API Documentation

Generation date: Apr 12, 2012
API : kermeta • kermeta::kunit • kermeta::language • kermeta::language::structure • kermeta::language::behavior • kermeta::standard • kermeta::utils • kermeta::xmltype • kermeta::persistence • kermeta::exceptions • kermeta::io • kermeta::interpreter • kermeta::ecore

Package kermeta

kermeta
@
The root package. See the other packages if you want to browse the classes of Kermeta api.

Class DummyClass

kermeta::DummyClass inherits kermeta::language::structure::Object
@This class is used to workaround an EMF bug, it doesn't really belong to Kermeta metamodel

Package kunit

kermeta::kunit

Contains the implementation of a unit test tool. This is a clone of
JUnit architecture.
Reference : http://junit.sourceforge.net/doc/cookstour/cookstour.htm

Usage example of kunit can be found in fr.irisa.triskell.kermeta.samples project.



main features of the famous Unit test tool for Kermeta language

Operation assert

operation assert(condition : kermeta::standard::Boolean) : Void
process the given condition and react if it is not satisfied

Operation assertEqual

operation assertEqual(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void
process the two given string and react if they are not equal

Operation assertFalse

operation assertFalse(condition : kermeta::standard::Boolean) : Void
process the given condition and react if it is satisfied

Operation assertFalseWithMsg

operation assertFalseWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void

process the given condition and react with the given message
if it is satisfied

Operation assertSimilar

operation assertSimilar(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void

Log a failure if the two strings are not identical modulo-white-space

Operation assertTrue

operation assertTrue(condition : kermeta::standard::Boolean) : Void
process the given condition and react if it is not satisfied

Operation assertTrueWithMsg

operation assertTrueWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void

process the given condition and react with the given message
if it is not satisfied

Operation assertWithMsg

operation assertWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void

process the given condition and react with the given message
if it is not satisfied

Operation distil

operation distil(s : kermeta::standard::String) : kermeta::standard::String

* reduces all runs of white-space to a single space character

Operation fail

operation fail(msg : kermeta::standard::String) : Void
to be used if a failure reaction is needed

Class AbstractFallible

kermeta::kunit::AbstractFallible inherits kermeta::language::structure::Object

to be written ############################
@

Operation assert

method assert(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible
Fails if condition is false

Operation assertEqual

method assertEqual(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
Will fail if the two strings are not identical

Operation assertFalse

method assertFalse(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible
will fail if condition is true

Operation assertFalseWithMsg

method assertFalseWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
will fail if condition is true

Operation assertTrue

method assertTrue(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible
will fail if condition is false

Operation assertTrueWithMsg

method assertTrueWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
will fail if condition is false

Operation assertWithMsg

method assertWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
will fail if condition is false

Operation fail

method fail(msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
raise a AssertionViolatedException with the provided message

Class Assert

kermeta::kunit::Assert inherits kermeta::kunit::AbstractFallible
@

Class AssertionFailedError

kermeta::kunit::AssertionFailedError inherits kermeta::exceptions::Exception
AssertionViolatedException are raised when assertions are violated @

Operation initFrom

operation initFrom(error : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : kermeta::kunit::Error

Sets up a new error with failable object and the exception that occurred
by default it will be a test error. Use makeSetUp or makeTearDown to
change its type

Operation makeSetUp

operation makeSetUp() : kermeta::kunit::Error

Changes the type of an error to SetUpError, the best way to use
this method is to call it after the init from line:
var e : Error init Error.new.initFrom(f, e).makeSetUp

Operation makeTearDown

operation makeTearDown() : kermeta::kunit::Error

Changes the type of an error to makeTearDownError, the best way to use
this method is to call it after the init from line:
var e : Error init Error.new.initFrom(f, e).makeTearDown

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

overwrite the default method, in order to add :
- the type
- the message
- the stack trace

Property error

reference error: kermeta::kunit::Fallible

the stored error

Property exception

reference exception: kermeta::exceptions::Exception

the Kermeta exception corresponding to the error

Property kind

attribute kind: kermeta::kunit::ErrorKind

the nature of the stored error

Class Error

kermeta::kunit::Error inherits kermeta::language::structure::Object

Error represents an occurrence of an exception in setUp, tearDown or a test
and is stored in a failure log
@

Operation initFrom

operation initFrom(fallible : kermeta::kunit::Fallible, msg : kermeta::standard::String) : kermeta::kunit::Failure

initialization of the failure

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

overwrite the default method, in order to add the message

Property failure

reference failure: kermeta::kunit::Fallible

the stored failure

Property message

reference message: kermeta::standard::String

the stored message (given or generated one)

Class Failure

kermeta::kunit::Failure inherits kermeta::language::structure::Object

Failure represents an assertion failure stored in a failure log
@

Operation assert

method assert(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Operation assertEqual

method assertEqual(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if the two strings are not identical

Operation assertFalse

method assertFalse(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is true

Operation assertFalseWithMsg

method assertFalseWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is true

Operation assertTrue

method assertTrue(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Operation assertTrueWithMsg

method assertTrueWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Operation assertWithMsg

method assertWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Operation fail

method fail(msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure

Operation getLog

operation getLog() : kermeta::kunit::Log

where failures will be put

Operation mustStop

operation mustStop() : kermeta::standard::Boolean
Undocumented

Operation number

operation number() : kermeta::standard::Integer

current order position of counter of assertions

Property rank

attribute rank: kermeta::standard::Integer

counter of assertions in the test method

Property stopOnFailure

attribute stopOnFailure: kermeta::standard::Boolean

Set this attribute to false if you wish your test to not stop if the assert fails.
note : if set to false, the count of failures/errors may be bigger that the number of executed test operations

Class Fallible

kermeta::kunit::Fallible inherits kermeta::kunit::AbstractFallible

This is represents the aspect of tests that they may go wrong.
it defines the ability to define the conditions for success
(assertions) and the mechanism for recording that those
conditions have not been met.
@

Class InvalidParameterException

kermeta::kunit::InvalidParameterException inherits kermeta::exceptions::Exception

This is for when we try to build a suite from a class that isn't a TestCase
@

Class InvalidTestCaseNameException

kermeta::kunit::InvalidTestCaseNameException inherits kermeta::exceptions::Exception

This exception is rose if there is a problem on the name of the test method
@

Operation addFailure

operation addFailure(test : kermeta::kunit::Fallible, msg : kermeta::standard::String) : Void

Adds a failed test to the list of failed tests

Operation addSetUpError

operation addSetUpError(test : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : Void

Adds errors which occur during the SetUp phase

Operation addTearDownError

operation addTearDownError(test : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : Void

Adds errors which occur during the TearDown phase

Operation addTestError

operation addTestError(test : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : Void

Adds an error to the list of errors

Operation newAttempt

operation newAttempt() : Void

Increments the runtests counter

Property errors

reference errors: kermeta::kunit::Error[0..*]

list of detected test errors

Property failures

reference failures: kermeta::kunit::Failure[0..*]

list of detected assertion failures

Property harnessErrors

reference harnessErrors: kermeta::kunit::Error[0..*]

list of detected errors with the test harness

Property runtests

attribute runtests: kermeta::standard::Integer

number of test that were run

Class Log

kermeta::kunit::Log inherits kermeta::language::structure::Object

Log is a log of failures and errors that happened to fallibles since start was called
@

Operation initLog

operation initLog() : kermeta::kunit::Log

called when run by the java testrunner

Operation run

operation run() : Void

Execute the test and verify its assertions

Operation setLog

operation setLog(log : kermeta::kunit::Log) : Void

Initializes the log where failures and errors will be put

Property log

reference log: kermeta::kunit::Log

where failures and errors will be put

Class Test

kermeta::kunit::Test inherits kermeta::language::structure::Object

The abstact notion of a test which is runnable and which has a log
in which it can keep note of failures
@

Operation getLog

method getLog() : kermeta::kunit::Log from kermeta::kunit::Fallible

accessor on the log

Operation getTestMethodName

operation getTestMethodName() : kermeta::standard::String

accessor on the method name

Operation raiseIfHasFailures

operation raiseIfHasFailures() : Void

operation used when the TestCase is run from a java test runner, encapsulates the failures results
into an AssertionFailedError so the TestRunner can detect it

Operation run

method run() : kermeta::standard::Void from kermeta::kunit::Test

Execute the whole test case : SetUp, test method, TearDown
The assertions of the test method are computed

Operation setTestMethodName

operation setTestMethodName(name : kermeta::standard::String) : kermeta::kunit::TestCase

Sets the name of the method from the concrete subclass of
TestCase that should be executed when this TestCase instance
is run as a test.
Throws invalidTestCaseNameException if the given string is not
the name of a method in the test case

Operation setUp

operation setUp() : Void

the things to be done before execution of the test method
(designed to be overwritten in real TestCase classes)

Operation tearDown

operation tearDown() : Void

the things to be done after execution of the test method
(designed to be overwritten in real TestCase classes)

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

overwrites the default method for more informative output

Property __testMethodName

attribute __testMethodName: kermeta::standard::String

the name of the method which corresponds to the test case in the test class

Class TestCase

kermeta::kunit::TestCase inherits kermeta::kunit::Test, kermeta::kunit::Fallible

A test case comprises one or more test methods plus
setUp and tearDown that build and destroy their test harness.
An instance of a subclass of TestCase should have its
testMethodName set to the name of one of its operations
which should be called whe the test is run. You can do this
yourself:

var testCase : TestCase init MyTestCaseClass.new.setTestMethodName("testSomething")

Alternatively if your TestCase Class has many methods whose
name begins with 'test' you can create a set of instaces already
set up with their testMethodName using the addAllTestCasesFrom
operation on TestSuite
@

Operation printTestResult

operation printTestResult() : kermeta::standard::Void

Prints the log or errors and failures from a test run.
Run some tests first.

Operation run

operation run(testCaseClass : kermeta::language::structure::Class) : Void

For backwards compatibility with old kunit, this takes a test case class
and creates the necessary suite, and runs it. DEPRECATED

Operation runTest

operation runTest(test : kermeta::kunit::Test) : Void

Use this to run a test case or a test suite.
If you want to run all the test.... methods in a TestCase class,
you can populate a suite with TestSuite.addAllTestCasesFrom

Property log

attribute log: kermeta::kunit::Log

Where to register the failures and errors

Class TestRunner

kermeta::kunit::TestRunner inherits kermeta::language::structure::Object

Create and use a test runner to run one or more tests and print the failure log. E.g.:
do
var suite : TestSuite init TestSuite.new.addAllTestCasesFrom(InterestingTestCaseSet)
var runner : TestRunner init TestRunner.new
runner.run(suite)
runner.printLogs
end

Where InterestingTestCaseSet is a subclass of TestCase and contains several test... methods
@

Operation addAllTestCasesFrom

operation addAllTestCasesFrom(testCaseClass : kermeta::language::structure::Class) : kermeta::kunit::TestSuite

Add to this suite, a set of test cases of type c, one for each
test method in class c. C must be a descendent of TestCase

Operation addAllTestCasesFromAspects

operation addAllTestCasesFromAspects(testCaseClass : kermeta::language::structure::Class, anAspect : kermeta::language::structure::ClassDefinition) : Void

to be written #####################################################

Operation run

method run() : kermeta::standard::Void from kermeta::kunit::Test

Run all the tests in the test suite

Property tests

reference tests: kermeta::kunit::Test[0..*]

The collection of tests which will be ran as the suite

Class TestSuite

kermeta::kunit::TestSuite inherits kermeta::kunit::Test

A TestSuite is a structured collection of tests, using the
composite pattern, all tests are runnable and have a log
In addition a suite can be populated automatically from a
test case class with one test case object for each test
method in the class.
You can make a suite and populate it manually like this:

var suite : TestSuite init TestSuite.new.
suite.tests.add(t1)

Alternatively you can populate a suite automatically from
a class that inherits TestCase and which has several methods
called test:

var suite : TestSuite init TestSuite.new.addAllTestCasesFrom(InterestingTestCaseSet)
@

Package language

kermeta::language
@
Contains the implementation of Kermeta reflective collections.

Class DummyClass

kermeta::language::DummyClass inherits kermeta::language::structure::Object
@This class is used to workaround an EMF bug, it doesn't really belong to Kermeta metamodel

Operation add

method add(element : G) : Void from kermeta::standard::Set

Overrides kermeta::standard::Set<G>.add(G)
Add an element to this collection and update its opposite property if it exists.

Operation clear

method clear() : Void from kermeta::standard::Collection

Overrides kermeta::standard::Collection<G>.clear(G)

Operation remove

method remove(element : G) : Void from kermeta::standard::Set

Overrides kermeta::standard::Set<G>.remove(G)

Class ReflectiveCollection

kermeta::language::ReflectiveCollection<G> inherits kermeta::standard::Set<G>

ReflectiveCollection is a special collection that is used to define the type
of attributes that have an upper multiplicity > 1 in a class. It indeed handles
the update of opposite property if such an attribute has got one.
@

Operation add

method add(element : G) : Void from kermeta::language::ReflectiveCollection

Overrides kermeta::language::ReflectiveCollection<G>.add(G)

Operation addAt

method addAt(index : kermeta::standard::Integer, element : G) : Void from kermeta::standard::OrderedSet

Overrides kermeta::standard::OrderedSet.addAt(Integer)

Operation clear

method clear() : Void from kermeta::language::ReflectiveCollection

Overrides kermeta::language::ReflectiveCollection<G>.clear()

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::OrderedSet

Overrides kermeta::standard::OrderedSet.equals(Object)

Operation remove

method remove(element : G) : Void from kermeta::language::ReflectiveCollection

Overrides kermeta::language::ReflectiveCollection<G>.remove(G)

Operation removeAt

method removeAt(index : kermeta::standard::Integer) : Void from kermeta::standard::OrderedCollection

Overrides kermeta::standard::OrderedSet.removeAt(Integer)

Class ReflectiveSequence

kermeta::language::ReflectiveSequence<G> inherits kermeta::standard::OrderedSet<G>, kermeta::language::ReflectiveCollection<G>

ReflectiveSequence is an ordered ReflectiveCollection.
@

Package structure

kermeta::language::structure
@
Contains the concrete implementation (including the operation bodies)
of the classes of the kermeta::reflection package.
If you need more documentation, please take a look at the
kermeta::reflection package which is more complete.


Alias Boolean

kermeta::language::structure::Boolean
@

Operation clone

method clone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object from kermeta::language::structure::Type
@

Operation deepClone

method deepClone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object from kermeta::language::structure::Type
@

Operation equals

method equals(other : kermeta::language::structure::Object) : kermeta::language::structure::Boolean from kermeta::language::structure::Object
@

Operation new

operation new() : kermeta::language::structure::Object

Instantiates a new occurence for this Class
@

Operation toString

method toString() : kermeta::language::structure::String from kermeta::language::structure::Object

Returns the String representation of this class.
Note : throws an exception if this class has no classDefinition
or if the classDefinition is not well constructed.

Property classDefinition

property classDefinition: kermeta::language::structure::ClassDefinition readonly

Returns the ClassDefinition for this class

Property isAbstract

property isAbstract: kermeta::language::structure::Boolean readonly
@Returns a Boolean stating whether ClassDefinition of this Class is abstract.

Property name

property name: kermeta::language::structure::String readonly
@Returns the name of the ClassDefinition of this Class

Property ownedAttribute

property ownedAttribute: set kermeta::language::structure::Property[0..*] readonly
@Returns the Attributes, References, and derived Properties owned by
the ClassDefinition of this Class.

Property ownedOperation

property ownedOperation: kermeta::language::structure::Operation[0..*] readonly
@Returns the Operations owned by the ClassDefinition of this Class.

Property superClass

property superClass: set kermeta::language::structure::Class[0..*] readonly
@Returns the Classes of which the ClassDefinition of this Class inherits.

Class Class

kermeta::language::structure::Class inherits kermeta::language::structure::ParameterizedType
@Returns the Attributes, References, and derived Properties owned by
the ClassDefinition of this Class.

Operation allSuperTypes

operation allSuperTypes() : kermeta::standard::Set<kermeta::language::structure::Type>

Returns all the types directly and indirectly inherited by this ClasDefinition

Operation getCachedAllAttribute

operation getCachedAllAttribute() : kermeta::standard::Set<kermeta::language::structure::Property>

returns a cached version of the derived property allAttribute
It is intended to be used to optimize access on the reflexivity,
do not use this cache if you are modifying the ClassDefinition

Operation getCachedAllSuperTypes

operation getCachedAllSuperTypes() : kermeta::standard::Set<kermeta::language::structure::Type>

returns a cached version of the derived property allSuperTypes
It is intended to be used to optimize access on the reflexivity,
do not use this cache if you are modifying the ClassDefinition

Property _allAttributeCache

reference _allAttributeCache: kermeta::standard::Set<kermeta::language::structure::Property>

Data structure for getCachedAllAttribute

Property _allSuperTypesCache

reference _allSuperTypesCache: kermeta::standard::Set<kermeta::language::structure::Type>

Data structure for getCachedAllSuperTypes

Property allAttribute

property allAttribute: set kermeta::language::structure::Property[0..*] readonly

Returns all the Attributes, References, derived Properties of this
ClassDefinition including the inherited ones

Property allOperation

property allOperation: set kermeta::language::structure::Operation[0..*] readonly

Returns all the Operations of this ClassDefinition
including the inherited ones

Property inv

attribute inv: kermeta::language::structure::Constraint[0..*]#invOwner
@Invariants defined for this ClassDefinition

Property isAbstract

attribute isAbstract: kermeta::language::structure::Boolean
@Boolean stating whether the ClassDefinition is abstract (which means that
no instance can be allocated)

Property ownedAttribute

attribute ownedAttribute: kermeta::language::structure::Property[0..*]#owningClass
@Attributes, References, and derived Properties owned by this ClassDefinition.

Property ownedOperation

attribute ownedOperation: kermeta::language::structure::Operation[0..*]#owningClass
@Operations owned by this ClassDefinition.

Property superType

reference superType: kermeta::language::structure::Type[0..*]
@Classes from which this ClassDefinition inherits.

Class ClassDefinition

kermeta::language::structure::ClassDefinition inherits kermeta::language::structure::GenericTypeDefinition, kermeta::language::structure::TypeContainer
@The definition of a class definition :)
class A
{
attribute s : String
}
is a class definition; in :

main() : A is do end

A is a Class : it corresponds to the use of the class definition of A

Property body

attribute body: kermeta::language::behavior::Expression[1..1]
@Body of the constraint, expressed as a KerMeta expression

Property invOwner

reference invOwner: kermeta::language::structure::ClassDefinition#~inv
@Owning ClassDefinition if Constraint corresponds to invariant

Property language

attribute language: kermeta::language::structure::ConstraintLanguage
@Language in which the constraint is expressed

Property postOwner

reference postOwner: kermeta::language::structure::Operation#~post
@Owning Operation if Constraint corresponds to post-condition

Property preOwner

reference preOwner: kermeta::language::structure::Operation#~pre
@Owning Operation if Constraint corresponds to pre-condition

Property stereotype

attribute stereotype: kermeta::language::structure::ConstraintType
@Type of the Constraint (precond/postcond/inv)

Class Constraint

kermeta::language::structure::Constraint inherits kermeta::language::structure::NamedElement
@Constraint is part of a contract implementation in a Class definition or an operation.
Three kinds of constraints are available : pre, post, and inv (invariant constraint)

Class DataType

kermeta::language::structure::DataType inherits kermeta::language::structure::Type, kermeta::language::structure::TypeDefinition
@Special type definition for Enumeration, PrimitiveType

Operation clone

method clone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object from kermeta::language::structure::Type

Implements kermeta::language::structure::Type.clone(Object)
@

Property ownedLiteral

attribute ownedLiteral: kermeta::language::structure::EnumerationLiteral[0..*]#~enumeration
@Owned items in an Enumeration

Class Enumeration

kermeta::language::structure::Enumeration inherits kermeta::language::structure::DataType
@Definition for Enumeration

Property enumeration

reference enumeration: kermeta::language::structure::Enumeration#ownedLiteral
@@Owning Enumeration

Class EnumerationLiteral

kermeta::language::structure::EnumerationLiteral inherits kermeta::language::structure::NamedElement
@Item definition for enumeration

Property qualifiedName

attribute qualifiedName: kermeta::language::structure::String
@To be written

Class Filter

kermeta::language::structure::Filter inherits kermeta::language::structure::Object
@Filter is the class that represent a filter on a ModelingUnit.
the qualifiedName represent the beginning of the matched names

Property left

reference left: kermeta::language::structure::Type
@Parameters of the function (a ProductType for multiple parameters)

Property right

reference right: kermeta::language::structure::Type
@Result type of the function

Class FunctionType

kermeta::language::structure::FunctionType inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::Type
@Type used to define the use of lambda expressions.
Uses :
operation forAll(func : <G -> Boolean>) : Boolean is do
var test : Boolean init true
from var it : Iterator<G> init iterator
until it.isOff
loop
test := test and func(it.next)
end
result := test
end


In the above example, <G -> Boolean> is a function type f(G) ->
Boolean, with a parameter of type G and a return type of type Boolean
The operation forAll takes a lambda expression as parameter.

Property typeParameter

attribute typeParameter: kermeta::language::structure::TypeVariable[0..*]
@Type variables defined for the GenericTypeDefinition

Class GenericTypeDefinition

kermeta::language::structure::GenericTypeDefinition inherits kermeta::language::structure::TypeDefinition
@Abstracts the definition of generic type definitions (i.e. type definitions that
can be parameterized), namely, for ClassDefinition and ModelTypeDefinition.

Alias Integer

kermeta::language::structure::Integer
@

Operation add

operation add(obj : kermeta::language::structure::Object) : Void

Add an object to the model. According to the ModelType, the typechecker will statically verify if the object can be added or not
@

Operation addAllCompatible

operation addAllCompatible(objectsToAdd : kermeta::standard::Collection<kermeta::language::structure::Object>) : kermeta::standard::Collection<kermeta::language::structure::Object>

Add all the Object of the collection that are copmpatible with the ModelDefinition. Other objects are ignored.
Returns the list of Object that have been added (One can check that some element have been ignored or not)
@

Operation addCompatible

operation addCompatible(objectToAdd : kermeta::language::structure::Object) : kermeta::language::structure::Object

Add the Object if it is copmpatible with the ModelDefinition. Other objects are ignored.
Returns the object if it has been added (One can check that some element have been ignored or not)
return Void if not added
@

Operation filter

operation filter(typeName : kermeta::language::structure::Type) : kermeta::standard::Set<kermeta::language::structure::Object>

Returns a set of all the elements of the model that are instance of the given Type
@

Operation remove

operation remove(obj : kermeta::language::structure::Object) : Void

Remove an object from the model
@

Property contents

reference contents: kermeta::language::structure::Object[0..*] readonly
@Contents of this model...

Class Model

kermeta::language::structure::Model inherits kermeta::language::structure::Object
@Is the holder of a set of model elements (Object) that are compatible with the ModelType that has
instantiated this Model.

Operation isModelTypeOf

operation isModelTypeOf(m : kermeta::language::structure::Model) : kermeta::language::structure::Boolean

To be written ##########################################
@

Operation new

operation new() : kermeta::language::structure::Model

To be written ##########################################
@

Property includedTypeDefinition

reference includedTypeDefinition: kermeta::language::structure::TypeDefinition[0..*]
@To be written

Class ModelType

kermeta::language::structure::ModelType inherits kermeta::language::structure::Type, kermeta::language::structure::TypeDefinition
@Type of a model, consisting of a set of included type definitions

Property virtualType

attribute virtualType: kermeta::language::structure::VirtualType[0..*]#modelType
@To be written

Class ModelTypeVariable

kermeta::language::structure::ModelTypeVariable inherits kermeta::language::structure::TypeVariable
@To be written

Property excludeFilters

attribute excludeFilters: kermeta::language::structure::Filter[0..*]
@list of filters that apply to this modeling unit.
This means that if the same unit was loaded without this filters, it would have loaded more content
element whose qualified name begins with one of these filter will NOT be loaded in the unit

Property includeFilters

attribute includeFilters: kermeta::language::structure::Filter[0..*]
@list of filters that apply to this modeling unit.
This means that if the same unit was loaded without this filters, it would have loaded more content
only element whose qualified name begins with one of these filter will be loaded in the unit

Property packages

attribute packages: kermeta::language::structure::Package[0..*]
@root packages contained by this ModelingUnit

Property referencedModelingUnits

reference referencedModelingUnits: kermeta::language::structure::ModelingUnit[0..*]
@To be written

Property requires

attribute requires: kermeta::language::structure::Require[0..*]
@Set of "require" statements associated with this ModelingUnit. Ie. list of the other
files required to run this unit

Property usings

attribute usings: kermeta::language::structure::Using[0..*]
@Set of "using" statement associated with this ModelingUnit. Ie. list of "syntatic shortcut"
that can be used within this unit.

Class ModelingUnit

kermeta::language::structure::ModelingUnit inherits kermeta::language::structure::Object
@The modeling unit is the root of any kermeta model. It contains packages, requires and usings.
It also reference others modeling unit.

Property isOrdered

attribute isOrdered: kermeta::language::structure::Boolean
@Boolean stating whether the element is ordered

Property isUnique

attribute isUnique: kermeta::language::structure::Boolean
@Boolean stating whether duplicated elements are allowed

Property lower

attribute lower: kermeta::language::structure::Integer
@Min cardinality of the element

Property upper

attribute upper: kermeta::language::structure::UnlimitedNatural
@Max cardinality of the element, '-1' for '*'

Class MultiplicityElement

kermeta::language::structure::MultiplicityElement inherits kermeta::language::structure::TypedElement
@ Model elements with a multiplicity [lower..upper] inherit this class

Operation qualifiedName

operation qualifiedName() : kermeta::language::structure::String

Returns the qualified name of this named element. Qualified name is
the list of the names of the packages hierarchically ordered, delimited by
a "::", followed by the name of this named element.

Property name

attribute name: kermeta::language::structure::String[1..1]
@Name of this named element

Class NamedElement

kermeta::language::structure::NamedElement inherits kermeta::language::structure::Object
@Any element that contain a name (example : Operation, Property) inherit this
class.

Operation asType

operation asType(type : kermeta::language::structure::Class) : kermeta::language::structure::Object

Implementation of OCL like cast. It returns self if the object object conforms to the type given as parameter.
@

Operation checkAllInvariants

operation checkAllInvariants() : Void

Recursively runs checking of invariants defined for the metaclass of the Object
and its supertypes
Ignores derived attributes.
@

Operation checkInvariant

operation checkInvariant(invariant : kermeta::language::structure::Constraint) : Void

Checks a constraint invariant defined for the metaclass of the Object
You can use PropertyConstraint for checking structural constraints associated to a property
@

Operation checkInvariants

operation checkInvariants() : Void

Runs checking of invariants defined for the metaclass of the Object
Also check the multiplicity of attributes (except derived and transient attributes)
@

Operation container

operation container() : kermeta::language::structure::Object

Returns the Object that contains current Object, void if the Object has
no container
@

Operation containingResource

operation containingResource() : kermeta::persistence::Resource

Returns the Resource currently containing (directly or indirectly) the Object
or void if the object belongs to no Resource
@

Operation equals

operation equals(element : kermeta::language::structure::Object) : kermeta::language::structure::Boolean

semantic equality,
if you wish to test for object identity you need to use the method oid
ex: x.oid == y.oid
by default, (ie. if not overloaded), the equals method for class Object implements
the most discriminating possible equivalence relation on objects; that is, for any non-null
reference values x and y, this method returns true if and only if x and y refer to the same
object (x.oid == y.oid has the value true).

note1: the operator == is mapped to this
note2: overloading this operation have some impact on the behavior on collection and hashtable that rely on it
@

Operation freeze

operation freeze() : Void

Freeze the Object
@

Operation get

operation get(~property : kermeta::language::structure::Property) : kermeta::language::structure::Object

Returns the instances of the given property for this Object.

Example :

class A { reference attr : String }

Using A :

operation getAProp() is do
var a : A
var s : String
var the_attr : Property init self.getMetaClass.ownedAttribute.one
s ?= a.get(the_attr)
end

The user has to cast
the result of this method according to the type and the upper multiplicity
of this property. If upper multiplicity > 1, than the effective type of the
result is a Sequence<ThePropertyName>. Otherwise, the type corresponds to
the name of the given Property (i.e the type of the property instance).
@

Operation getMetaClass

operation getMetaClass() : kermeta::language::structure::Class

Returns the Class object that is the metaclass of current Object
@

Operation getViolatedConstraints

operation getViolatedConstraints() : kermeta::exceptions::ConstraintsDiagnostic

Checks all the invariants for this object and return a complete diagnostic.
This also includes the structural constraints associated to the properties.
@

Operation hashcode

operation hashcode() : kermeta::language::structure::Integer

code used in hashtable in order to identify an object in the hashtable keys
This system is similar to the hashcode used in java. Please refer to java documentation
for more information about hashcode
@

Operation isFrozen

operation isFrozen() : kermeta::language::structure::Boolean

Returns a Boolean stating whether the Object is currently in a
frozen state
@

Operation isInstanceOf

operation isInstanceOf(type : kermeta::language::structure::Type) : kermeta::language::structure::Boolean

Returns a Boolean stating whether the current Object conforms to given Type
This means: is this object an instance of this type, or is it an instance of its subtype
@

Operation isKindOf

operation isKindOf(cl : kermeta::language::structure::Class) : kermeta::language::structure::Boolean

Returns a Boolean stating whether the current Object is an instance of the given Class

Operation isNotEqual

operation isNotEqual(element : kermeta::language::structure::Object) : kermeta::language::structure::Boolean

See kermeta::language::structure::Object.equals(Object)
@

Operation isSet

operation isSet(~property : kermeta::language::structure::Property) : kermeta::language::structure::Boolean

True if the ~property of the object has been set
@

Operation isVoid

operation isVoid() : kermeta::language::structure::Boolean

Returns a Boolean stating whether the Object is Void
@

Operation oid

operation oid() : kermeta::language::structure::Integer

Returns the unique Oid of the Object
@

Operation set

operation ~set(~property : kermeta::language::structure::Property, element : kermeta::language::structure::Object) : Void

Sets the element to the ~property of the object
@

Operation toString

operation toString() : kermeta::language::structure::String

Implements Object.toString()
Returns a String of form [qn:oid] where 'qn' is the qualified name of
the object type, and oid the unique ID of the object
@

Operation unset

operation unset(~property : kermeta::language::structure::Property) : Void

Remove the element set as the ~property of the object.
The isSet(~property) method will then return False
@

Property ownedTags

attribute ownedTags: kermeta::language::structure::Tag[0..*]
@An object can contains a Tag.
Be careful, owning a tag doesn't means that the tag applies to the Object
To know which Tags apply to the object use the "tag" reference

Property tag

reference tag: kermeta::language::structure::Tag[0..*]#object
@An Object can be tagged by a Tag.
They are typically used to put comments/documentation on the object

Class Object

kermeta::language::structure::Object
@Object definition: all entities of Kermeta metamodel explicitly inherit from Object

Class ObjectTypeVariable

kermeta::language::structure::ObjectTypeVariable inherits kermeta::language::structure::TypeVariable
@To be written

Property body

attribute body: kermeta::language::behavior::Expression
@Body of the Operation, expressed as a KerMeta expression

Property isAbstract

attribute isAbstract: kermeta::language::structure::Boolean
@Boolean stating whether the Operation is abstract

Property ownedParameter

attribute ownedParameter: kermeta::language::structure::Parameter[0..*]#~operation
@Parameters of the Operation

Property owningClass

reference owningClass: kermeta::language::structure::ClassDefinition#ownedOperation
@ClassDefinition owning the Operation

Property post

attribute post: kermeta::language::structure::Constraint[0..*]#postOwner
@Post-conditions of the Operation

Property pre

attribute pre: kermeta::language::structure::Constraint[0..*]#preOwner
@Pre-conditions of the Operation

Property raisedException

reference raisedException: kermeta::language::structure::Type[0..*]
@Exceptions raised by the Operation

Property superOperation

reference superOperation: kermeta::language::structure::Operation
@Super-operation of the Operation, if any

Property typeParameter

reference typeParameter: kermeta::language::structure::TypeVariable[0..*]
@TypeParameters of the Operation

Class Operation

kermeta::language::structure::Operation inherits kermeta::language::structure::MultiplicityElement
@Every one knows what an operation is.

Property nestedPackage

attribute nestedPackage: kermeta::language::structure::Package[0..*]#nestingPackage
@Nested Packages contained by the Package

Property nestingPackage

reference nestingPackage: kermeta::language::structure::Package#nestedPackage
@@Owning Package, if any

Property uri

attribute uri: kermeta::language::structure::String
@Uri of the Package

Class Package

kermeta::language::structure::Package inherits kermeta::language::structure::NamedElement, kermeta::language::structure::TypeDefinitionContainer
@Package in kermeta. Each kermeta model must have a root package.

Property operation

reference operation: kermeta::language::structure::Operation#ownedParameter
@@Owning operation

Class Parameter

kermeta::language::structure::Parameter inherits kermeta::language::structure::MultiplicityElement
@Definition for operation parameter

Property typeDefinition

reference typeDefinition: kermeta::language::structure::GenericTypeDefinition[1..1]
@Definition of the Type

Property typeParamBinding

attribute typeParamBinding: kermeta::language::structure::TypeVariableBinding[0..*]
@Bindings between type variables and provided types

Property virtualTypeBinding

attribute virtualTypeBinding: kermeta::language::structure::TypeVariableBinding[0..*]
@To be written

Class ParameterizedType

kermeta::language::structure::ParameterizedType inherits kermeta::language::structure::Type
@Abstraction for Parameterized types, namely, Class and ModelType

Property instanceType

reference instanceType: kermeta::language::structure::Type
@The type the primitive type is linked with

Class PrimitiveType

kermeta::language::structure::PrimitiveType inherits kermeta::language::structure::DataType, kermeta::language::structure::TypeContainer
@The class definition for kermeta aliases. Above statement defines a primitive
type called MyString, which instanceType is kermeta::standard::String
alias MyString : kermeta::standard::String
. Another example could be: root::apackage::AClass
alias MyClass : root::apackage::AClass
, thus a primitive type may be not a subtype of ValueType (ValueType is a concept from the Kermeta framework).

Property type

reference type: seq kermeta::language::structure::Type[0..*]
@Types

Class ProductType

kermeta::language::structure::ProductType inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::Type
@Type corresponding to a set of Types
Only used in the context of FunctionType

Operation getViolatedConstraintsMustDrillDown

operation getViolatedConstraintsMustDrillDown() : kermeta::language::structure::Boolean
@

Property default

attribute default: kermeta::language::structure::String
@To be written

Property getViolatedConstraintsMustDrillDownCache

attribute getViolatedConstraintsMustDrillDownCache: kermeta::language::structure::Boolean
Undocumented

Property getterBody

attribute getterBody: kermeta::language::behavior::Expression
@To be written

Property isComposite

attribute isComposite: kermeta::language::structure::Boolean
@Boolean stating whether the Property has a containment role

Property isDerived

attribute isDerived: kermeta::language::structure::Boolean
@If True, the value of the property is not stored but computed from other properties

Property isGetterAbstract

attribute isGetterAbstract: kermeta::language::structure::Boolean
@Boolean stating wether the getter is abstract.

Property isID

attribute isID: kermeta::language::structure::Boolean
@Boolean stating whether the property allows to identify its containing Object

Property isReadOnly

attribute isReadOnly: kermeta::language::structure::Boolean
@Boolean stating whether the Property is read-only

Property isSetterAbstract

attribute isSetterAbstract: kermeta::language::structure::Boolean
@Boolean stating wether the setter is abstract.

Property opposite

reference opposite: kermeta::language::structure::Property
@Opposite Property of the Property, void if the Property has no opposite

Property owningClass

reference owningClass: kermeta::language::structure::ClassDefinition#ownedAttribute
@ClassDefinition that owns the Property

Property propertyConstraint

attribute propertyConstraint: kermeta::language::structure::PropertyConstraint#~property
special constraint that apply to this Property
Used by the getViolatedConstraints

Property setterBody

attribute setterBody: kermeta::language::behavior::Expression
@To be written

Class Property

kermeta::language::structure::Property inherits kermeta::language::structure::MultiplicityElement
@Class representing the property definition. Kermeta<->Ecore equivalence:
- Property with isComposite == true or with type is a base type (String, Integer, Boolean) : EAttribute
- Property with isComposite == false : EReference

Property property

reference property: kermeta::language::structure::Property#propertyConstraint

The property that is checked by this constraint
Typically, it will check the lower and upper bounds

Class PropertyConstraint

kermeta::language::structure::PropertyConstraint inherits kermeta::language::structure::Constraint
Undocumented. See also inherited classes.

Property uri

attribute uri: kermeta::language::structure::String
@To be written

Class Require

kermeta::language::structure::Require inherits kermeta::language::structure::Object
@To be written

Alias String

kermeta::language::structure::String
@

Property name

attribute name: kermeta::language::structure::String
@Name of the Tag

Property object

reference object: kermeta::language::structure::Object[1..*]#tag
@Objects to which the Tag is attached to

Property value

attribute value: kermeta::language::structure::String
@String value of the Tag

Class Tag

kermeta::language::structure::Tag inherits kermeta::language::structure::Object
@Tag is intended to be used to add documentation on a model element,
or add some textual information that cannot be expressed with any
model element definition.

Operation clone

operation clone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object

Returns a copy of passed Object built by recursively copying attribute
properties, and referencing original reference properties values
@

Operation deepClone

operation deepClone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object

Returns a copy of passed Object built by recursively copying values of
all properties, no matter the property kind
@

Operation isInstance

operation isInstance(element : kermeta::language::structure::Object) : kermeta::language::structure::Boolean

Implements Type.isInstance(Object)
@

Operation isSubTypeOf

operation isSubTypeOf(object : kermeta::language::structure::Type) : kermeta::language::structure::Boolean

Implements Type.isSubTypeOf(Type)
For technical reason, the current implementation works only with Type that comes from a kermeta declaration (ie. in a require)
it won't work with Type created programmaticaly by the user. If you need that, please ask to the kermeta developpers
to extend it.
@

Operation isSuperTypeOf

operation isSuperTypeOf(object : kermeta::language::structure::Type) : kermeta::language::structure::Boolean

Implements Type.isSuperTypeOf(Type)
For technical reason, the current implementation works only with Type that comes from a kermeta declaration (ie. in a require)
it won't work with Type created programmaticaly by the user. If you need that, please ask to the kermeta developpers
to extend it.
@

Property typeContainer

reference typeContainer: kermeta::language::structure::TypeContainer#containedType
@Owning TypeContainer, if any

Class Type

kermeta::language::structure::Type inherits kermeta::language::structure::Object
@Alias to kermeta::standard::IntegerBase class definition for the use of a type.

Property containedType

attribute containedType: kermeta::language::structure::Type[0..*]#typeContainer
@Contained types

Class TypeContainer

kermeta::language::structure::TypeContainer inherits kermeta::language::structure::Object
@Phantom class : EMF reflexive editors need that any element of a metamodel
has a direct or indirect containment relationship with the root model element of
the metamodel. This class resolves this technical requirement.

Property isAspect

attribute isAspect: kermeta::language::structure::Boolean
@

Class TypeDefinition

kermeta::language::structure::TypeDefinition inherits kermeta::language::structure::NamedElement
@This boolean allows to tell if this Type definition is an aspect or not
If it is an aspect, then at runtime, its definition will be merged with the definition of another
TypeDefinition that has exactly the same qualified nameAbstraction for type definitions (ClassDefinition, ModelTypeDefinition, DataType inherit
this class)

Property ownedTypeDefinition

attribute ownedTypeDefinition: kermeta::language::structure::TypeDefinition[0..*]
@Contained TypeDefinitions

Class TypeDefinitionContainer

kermeta::language::structure::TypeDefinitionContainer inherits kermeta::language::structure::NamedElement
@Abstraction of the notion of containment for type definitions. Now, kermeta metamodel contains one container
element, that is Package. In a later release, ModelTypeDefinition will be the main container for type and
package definition.

Property supertype

reference supertype: kermeta::language::structure::Type
@Reference to the supertype, if any

Class TypeVariable

kermeta::language::structure::TypeVariable inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::Type, kermeta::language::structure::NamedElement
@Definition of a type variable for generic types :
in class definition
class AClass<X,Y> {}
, X and Y are type variables.

Property type

reference type: kermeta::language::structure::Type[1..1]
@Assigned Type

Property variable

reference variable: kermeta::language::structure::TypeVariable[1..1]
@TypeVariable

Class TypeVariableBinding

kermeta::language::structure::TypeVariableBinding inherits kermeta::language::structure::TypeContainer
@Definition of a binding between a TypeVariable and a Type

Property type

reference type: kermeta::language::structure::Type
@Type of the model element

Class TypedElement

kermeta::language::structure::TypedElement inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::NamedElement
@Abstraction of the notion of typed element : each element
that is typed inherits this class.

Alias UnlimitedNatural

kermeta::language::structure::UnlimitedNatural
@

Property qualifiedName

attribute qualifiedName: kermeta::language::structure::String
@To be written

Class Using

kermeta::language::structure::Using inherits kermeta::language::structure::Object
@To be written

Property classDefinition

reference classDefinition: kermeta::language::structure::ClassDefinition[1..1]
@To be written

Property modelType

reference modelType: kermeta::language::structure::ModelTypeVariable[1..1]#virtualType
@To be written

Property typeParamBinding

attribute typeParamBinding: kermeta::language::structure::TypeVariableBinding[0..*]
@To be written

Class VirtualType

kermeta::language::structure::VirtualType inherits kermeta::language::structure::ObjectTypeVariable
@To be written

Class VoidType

kermeta::language::structure::VoidType inherits kermeta::language::structure::Type
@Class definition for the
Void
type

Package behavior

kermeta::language::behavior
@

Property isCast

attribute isCast: kermeta::language::structure::Boolean
@Boolean stating whether current assignment corresponds to a cast operation

Property target

attribute target: kermeta::language::behavior::CallExpression[1..1]
@Target of the assignment, as a CallExpression

Property value

attribute value: kermeta::language::behavior::Expression[1..1]
@Value to be assigned, as a KerMeta expression

Class Assignment

kermeta::language::behavior::Assignment inherits kermeta::language::behavior::Expression
@Assignment is the model-element representation of the assignment statement x := y

Property rescueBlock

attribute rescueBlock: kermeta::language::behavior::Rescue[0..*]
@List of rescues defined for the block

Property statement

attribute statement: kermeta::language::behavior::Expression[0..*]
@List of statements composing the block

Class Block

kermeta::language::behavior::Block inherits kermeta::language::behavior::Expression
@Block is the model-element representation for the do...end block.

Property value

attribute value: kermeta::language::structure::Boolean
@The concrete value represented by this literal

Class BooleanLiteral

kermeta::language::behavior::BooleanLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing a Boolean value, typically : true or false keyword

Property name

attribute name: kermeta::language::structure::String
@A call must be named

Property parameters

attribute parameters: kermeta::language::behavior::Expression[0..*]
@Kermeta calls can embedd expressions as parameters

Property staticTypeVariableBindings

reference staticTypeVariableBindings: kermeta::language::structure::Type[0..*]
@To be written

Class CallExpression

kermeta::language::behavior::CallExpression inherits kermeta::language::behavior::Expression
@Any callable expression inherits this class, e.g :
- variable call
- feature call ( a.b : b is a feature call)

Property isAtpre

attribute isAtpre: kermeta::language::structure::Boolean
@Tells whether this CallFeature represents a call to @pre in a postcondition

Property staticEnumLiteral

reference staticEnumLiteral: kermeta::language::structure::EnumerationLiteral
@To be written

Property staticOperation

reference staticOperation: kermeta::language::structure::Operation
@The method which will be executed (operation case)
and the result value passed to the caller

Property staticProperty

reference staticProperty: kermeta::language::structure::Property
@The object which will be returned (property case)

Property target

attribute target: kermeta::language::behavior::Expression
@Target Expression (the owner of the feature)

Class CallFeature

kermeta::language::behavior::CallFeature inherits kermeta::language::behavior::CallExpression
@CallFeature is the model element that refers to the use of a feature, i.e either
a property or an operation in a statement. In stdio.writeln("hello"),
writeln is a CallFeature.

Class CallResult

kermeta::language::behavior::CallResult inherits kermeta::language::behavior::CallVariable
@This class represents a call to the special internal variable "result" that is used to store the return value of any operation

Class CallSuperOperation

kermeta::language::behavior::CallSuperOperation inherits kermeta::language::behavior::CallExpression
@This class represents a call to the operataion in the parent class
In the following example, the type of super(element) is CallSuperOperation:

class ParentClass {
operation op(element : Integer) : Integer is do
result := element + 1
end
}

class ChildClass {
method op(element : Integer) : Integer is do
result := super(element)
end
}

Class CallValue

kermeta::language::behavior::CallValue inherits kermeta::language::behavior::CallExpression
@CallValue refers to the use of the value reserved keyword. This keyword is
only used in the body of the setter part of derived properties.

Property isAtpre

attribute isAtpre: kermeta::language::structure::Boolean
@Tells whether this CallVariable represents a call to @pre in a postcondition

Class CallVariable

kermeta::language::behavior::CallVariable inherits kermeta::language::behavior::CallExpression
@We call "CallVariable" the use of a variable in a statement.
in i := j + 1, i and j are 2 CallVariables.

Property condition

attribute condition: kermeta::language::behavior::Expression[1..1]
@Condition expression of conditional statement

Property elseBody

attribute elseBody: kermeta::language::behavior::Expression
@Optional else part of the conditional statement

Property thenBody

attribute thenBody: kermeta::language::behavior::Expression[1..1]
@Then part of the conditional statement

Class Conditional

kermeta::language::behavior::Conditional inherits kermeta::language::behavior::Expression
@Condition is the model-element representation for the

Class EmptyExpression

kermeta::language::behavior::EmptyExpression inherits kermeta::language::behavior::Expression
@As suggested by its name, this class represents an expression that do nothing. Like a "nop"

Property staticType

reference staticType: kermeta::language::structure::Type
@Type of the Expression (set by type checking)

Class Expression

kermeta::language::behavior::Expression inherits kermeta::language::structure::TypeContainer
@The base class for every entity used to define a behavior in operation body.

Property value

attribute value: kermeta::language::structure::Integer
@The concrete value represented by this literal

Class IntegerLiteral

kermeta::language::behavior::IntegerLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing an Integer value

Property jclass

attribute jclass: kermeta::language::structure::String
@Qualified name of the targeted Java class

Property jmethod

attribute jmethod: kermeta::language::structure::String
@Name of the Java method to be launched in the identified Java class

Property parameters

attribute parameters: kermeta::language::behavior::Expression[0..*]
@Parameters of the Java static call provided as KerMeta expressions

Class JavaStaticCall

kermeta::language::behavior::JavaStaticCall inherits kermeta::language::behavior::Expression
@This class represent a call to an extern Java operation.
This Java operation must be static and have at least one RuntimeO

Property body

attribute body: kermeta::language::behavior::Expression[1..1]
@Body of the lambda expression providede as a KerMeta expression

Property parameters

attribute parameters: kermeta::language::behavior::LambdaParameter[0..*]
@Parameters of the lambda expression

Class LambdaExpression

kermeta::language::behavior::LambdaExpression inherits kermeta::language::behavior::Expression
@Refers to lambda expression definition (function { e | stdio.writeln(e.toString) })

Property name

attribute name: kermeta::language::structure::String
@Name of the lambda parameter

Property type

attribute type: kermeta::language::behavior::TypeReference[1..1]
@To be written ################################

Class LambdaParameter

kermeta::language::behavior::LambdaParameter inherits kermeta::language::structure::Object
@Refers to parameter definition in lambda expression

Class Literal

kermeta::language::behavior::Literal inherits kermeta::language::behavior::Expression
@Literal refers to String values, Integer values, etc.

Property body

attribute body: kermeta::language::behavior::Expression
@Body of the loop

Property initialization

attribute initialization: kermeta::language::behavior::Expression
@Initialization expression for the loop

Property stopCondition

attribute stopCondition: kermeta::language::behavior::Expression[1..1]
@Stop condition of the loop, is interpreted as a Bollean value

Class Loop

kermeta::language::behavior::Loop inherits kermeta::language::behavior::Expression
@Loop refers to from var x : X init a until booleanCondition loop ... end

Property expression

attribute expression: kermeta::language::behavior::Expression[1..1]
@To be written #######################

Class Raise

kermeta::language::behavior::Raise inherits kermeta::language::behavior::Expression
@Refers to raise exception block

Property body

attribute body: kermeta::language::behavior::Expression[1..*]
@Body of the rescue block, specified as a KerMeta expression

Property exceptionName

attribute exceptionName: kermeta::language::structure::String
@Name of the catched exception

Property exceptionType

attribute exceptionType: kermeta::language::behavior::TypeReference[1..1]
@Type of the cathed exception

Class Rescue

kermeta::language::behavior::Rescue inherits kermeta::language::structure::Object
@Refers to rescue exception block

Class SelfExpression

kermeta::language::behavior::SelfExpression inherits kermeta::language::behavior::Expression
@Refers to self use

Property value

attribute value: kermeta::language::structure::String
@The concrete value represented by this literal

Class StringLiteral

kermeta::language::behavior::StringLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing a String value, typically : "my string"

Property typeref

attribute typeref: kermeta::language::behavior::TypeReference[1..1]
@The type refered by this literal

Class TypeLiteral

kermeta::language::behavior::TypeLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing a Type.
for example, in
Integer.new
Integer is a type literal representing the type kermeta::standard::Integer

Class TypeReference

kermeta::language::behavior::TypeReference inherits kermeta::language::structure::MultiplicityElement
@TypeReference refers to the type used in a variable declaration

Property identifier

attribute identifier: kermeta::language::structure::String
@Initialization expression for the variable
Default value is void ????

Property initialization

attribute initialization: kermeta::language::behavior::Expression
@Initialization expression for the variable
Default value is void ????

Property type

attribute type: kermeta::language::behavior::TypeReference[1..1]
@Type of the declared variable

Class VariableDecl

kermeta::language::behavior::VariableDecl inherits kermeta::language::behavior::Expression
@refers to variable declaration var x : X init a

Class VoidLiteral

kermeta::language::behavior::VoidLiteral inherits kermeta::language::behavior::Literal
@This class is used to represent the special expression void

Package standard

kermeta::standard

Defines value types


Defines Collection types


Contains types dedicated to dealing with java objects

Operation asBag

method asBag() : kermeta::standard::Bag<G> from kermeta::standard::Collection

Overrides Collection<G>.asBag()
Returns a new Bag containing all elements of current Bag

Operation asOrderedSet

method asOrderedSet() : kermeta::standard::OrderedSet<G> from kermeta::standard::Collection

Overrides Collection<G>.asOrderedSet()
Returns a new OrderedSet containing elements of the Bag without duplicates

Operation asSequence

method asSequence() : kermeta::standard::Sequence<G> from kermeta::standard::Collection

Overrides Collection<G>.asSequence()
Returns a new Sequence containing all elements of current Bag

Operation asSet

method asSet() : kermeta::standard::Set<G> from kermeta::standard::Collection

Overrides Collection<G>.asSet()
Returns a new Set containing elements of the Bag without duplicates

Operation concatenate

operation concatenate(less : kermeta::standard::Sequence<G>, pivot : kermeta::standard::Sequence<G>, greater : kermeta::standard::Sequence<G>) : kermeta::standard::Sequence<G>

Returns a sequence of the bag elements sorted using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Recursive sort of the given sequence using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Internal concatenation tool for recursive 'quickSort()' method

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Overrides Object.equals(elt : Object)
Returns a Boolean stating whether the provided element is equal to
current Bag

Operation excluding

operation excluding(object : G) : kermeta::standard::Bag<G>

Returns a new Bag which content includes the content of the
current Bag from which all instances of object have been
removed

Operation flatten

operation flatten() : kermeta::standard::Bag<kermeta::standard::Object>

Returns a new Bag which content includes all non-Collection elements
of the current Set, and, for each Collection element of the current
Bag, as many elements as the Collection contains

Operation including

operation including(object : G) : kermeta::standard::Bag<G>

Returns a new Bag which content includes the content of the
current Bag and the element object

Operation intersection

operation intersection(elements : kermeta::standard::Bag<G>) : kermeta::standard::Bag<G>

Returns a new Bag corresponding to the intersection of elements
and the Bag

Operation intersectionWithSet

operation intersectionWithSet(elements : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the intersection of a Set of
elements and the Bag

Operation removeFromOid

operation removeFromOid(elementOid : kermeta::standard::Integer) : Void

Removes the element identified by the provided Oid from the Bag

Operation removeOne

operation removeOne(element : G) : Void

Removes one instance of element from the Bag

Operation union

operation union(elements : kermeta::standard::Collection<G>) : kermeta::standard::Bag<G>

Returns a new Bag corresponding to the union of elements and
current Bag

Class Bag

kermeta::standard::Bag<G> inherits kermeta::standard::Collection<G>

Bag is a concrete non-ordered Collection allowing duplicates
@

Operation and

operation ~and(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self and other

Operation andThen

operation andThen(right : < Void->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Short-circuit version of AND. This means that the function passed in parameter will be evaluated only if self is true
Note: we don't have a dedicated operator in the syntax for it yet so here is an example of use :
self.andThen{v | functionThatReturnABoolean() }

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Boolean
and has the same boolean value than current object.

Operation implies

operation implies(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self implies other
http://en.wikipedia.org/wiki/Material_implication
meaning : (not self) or other

Operation nand

operation nand(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self nand other

Operation not

operation ~not() : kermeta::standard::Boolean

return not self

Operation or

operation ~or(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self or other

Operation orElse

operation orElse(right : < Void->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Short-circuit version of OR. This means that the function passed in parameter will be evaluated only if self is false
Note: we don't have a dedicated operator in the syntax for it yet so here is an example of use :
self.orElse{v | functionThatReturnABoolean() }

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Returns 'true' or 'false', depending on self value

Operation xor

operation xor(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self xor other

Class Boolean

kermeta::standard::Boolean inherits kermeta::standard::ValueType

The Boolean type
@

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparaison

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Character
and has the same letter value than current object.

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Conversion from Character to String

Class Character

kermeta::standard::Character inherits kermeta::standard::ValueType, kermeta::standard::Comparable

The class Character
@

Operation add

operation add(element : G) : Void

Adds an element in the Collection (default implementation)

Operation addAll

operation addAll(elements : kermeta::standard::Collection<G>) : Void

Adds all elements from the Collection elements in the current Collection

Operation any

operation any() : G

Returns an element from the Collection
Raises an EmptyCollection exception if the Collection is empty

Operation asBag

operation asBag() : kermeta::standard::Bag<G>

Returns a new Bag built from the Collection

Operation asOrderedSet

operation asOrderedSet() : kermeta::standard::OrderedSet<G>

Returns a new OrderedSet built from the Collection

Operation asSequence

operation asSequence() : kermeta::standard::Sequence<G>

Returns a new Sequence built from the Collection

Operation asSet

operation asSet() : kermeta::standard::Set<G>

Returns a new Set built from the Collection

Operation clear

operation clear() : Void

Removes all elements from the Collection

Operation collect

operation collect<T>(collector : < G->T >) : kermeta::standard::Sequence<T>

Returns a new Sequence which content corresponds to the result
of running the collector function for each element of the Collection
The new collection size is the same as in the original collection, and which element types is the type of the result of the expression.
example :
aCollection2 := aCollection.collect { e | \/* put here an expression, for example e.name *\/ }

Operation contains

operation contains(element : G) : kermeta::standard::Boolean

Returns a Boolean stating whether the Collection contains at least one
instance of element, based on G.equals(elt : Object) definition
Note: for checking whether a physical element is contained by the collection,
make use of G.oid()

Operation containsAll

operation containsAll(elements : kermeta::standard::Collection<G>) : kermeta::standard::Boolean

Returns true if current Collection contains all elements of Collection elements
See Collection<G>.contains(Object)

Operation count

operation count(element : G) : kermeta::standard::Integer

Returns the number of instances of element in the Collection

Operation detect

operation detect(detector : < G->kermeta::standard::Boolean >) : G

Returns an element of the Collection (usually the first) for which the detector function
is not false
Returns void if no elements is validated by the detector function
example :
anObject := aCollection.detect { e | \/* a condition *\/} // returns an element that fulfill the condition.

Operation each

operation each(func : < G->kermeta::standard::Object >) : Void

Runs function func on each element of the Collection
example :
aCollection.each { e | \/* do something with each element e of this collection *\/ }

Operation empty

operation empty() : kermeta::standard::Boolean

Returns a Boolean stating whether the Collection is empty

Operation excludes

operation excludes(element : G) : kermeta::standard::Boolean

Returns true if the Collection does not contain element

Operation excludesAll

operation excludesAll(elements : kermeta::standard::Collection<G>) : kermeta::standard::Boolean

Returns true if the Collection contains no element of Collection elements

Operation exists

operation exists(func : < G->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Returns a Boolean stating whether at least one element of the Collection
validates the condition specified by function func
example :
aBoolean := aCollection.exists { e | \/* a condition *\/} // returns true if at least one element fulfill the condition.

Operation existsCpl

operation existsCpl(f : < [G, G]->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Combinaison of exists on two elements in the collection
=> result := self.exists{x | self.exists {y | f(x,y)}}

Operation forAll

operation forAll(func : < G->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Returns a Boolean stating whether no element of the Collection invalidates
the condition specified by function func
example :
aBoolean := aCollection.forAll { e | \/* put here a condition *\/ } // return true if the condition is true for all elements in the collection.

Operation forAllCpl

operation forAllCpl(f : < [G, G]->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Combinaison of ForAll on two elements in the collection
result := self.forAll{x | self.forAll {y | f(x,y)}}
(where x and y are 2 elements of the Collection)
typical use sample : ownedState.forAll{s1,s2| (s1.name==s2.name)implies(s1==s2)}

Operation includes

operation includes(element : G) : kermeta::standard::Boolean

OCL API alignment, doeas the same as contains
See Collection<G>.contains(Object)

Operation includesAll

operation includesAll(elements : kermeta::standard::Collection<G>) : kermeta::standard::Boolean

OCL API alignment, does the same as containsAll
See Collection<G>.containsAll(Collection<G>)

Operation indexedEach

operation indexedEach(func : < [G, kermeta::standard::EachContext]->kermeta::standard::Object >) : Void

Runs function func on each element of the Collection
the eachContext contains some information about the each process that can be used in the function,
for example the index represents the rank in the collection, start on 0
or boolean to indicates weither we are processing the first and/or the last element of the collection
note that this rank is relative to the processing order. this processing order is ensured only for sequence and ordered set

example :
aCollection.indexedEach { e, eachContext | \/* do something with each element e of this collection *\/ }

Operation isEmpty

operation isEmpty() : kermeta::standard::Boolean

OCL alignment API, does the same as empty
See Collection<G>.empty()

Operation isNotEmpty

operation isNotEmpty() : kermeta::standard::Boolean

OCL alignment API
Returns a Boolean stating whether the Collection contains at least
one element
See also Collection<G>.contains(Object)

Operation isUnique

operation isUnique<T>(collector : < G->T >) : kermeta::standard::Boolean

Returns a Boolean stating whether the the collector function evaluates to a
different value for each element of the Collection
example :
aCollection2 := aCollection.isUnique { e | \/* put here an expression that must be unique for all elements, for example e.name *\/ }

Operation iterator

operation iterator() : kermeta::standard::Iterator<G>

Returns an Iterator on the Collection

Operation one

operation one() : G

Returns an element from the Collection or void if the Collection is empty

Operation reject

operation reject(rejector : < G->kermeta::standard::Boolean >) : kermeta::standard::Sequence<G>

Returns a new Sequence composed of elements of the Collection that
do not validate the rejector function
example :
aCollection2 := aCollection.reject { e |
\/* put here a condition that returns true for elements that must be exclude in the resulting Collection *\/
}

Operation remove

operation remove(element : G) : Void

Removes all instances of element from the Collection, based on
G.equals(Object) definition

Operation select

operation ~select(selector : < G->kermeta::standard::Boolean >) : kermeta::standard::Sequence<G>

Returns a new Sequence composed of elements of the Collection that
validate the selector function
example :
aCollection2 := aCollection.select { e |
\/* put here a condition that returns true for elements that must be included in the resulting Collection *\/
}

Operation size

operation size() : kermeta::standard::Integer

Returns the number of elements in the Collection

Operation sum

operation sum() : G

Sum the element if they are summable (ie implement '+' operator by inheriting of the class Summable)

Class Collection

kermeta::standard::Collection<G> inherits kermeta::language::structure::Object

Collection is the root abstract class for all kermeta collections
@

Operation compareTo

operation compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer

This method should be implemented by any class that inherits
from Comparable.
returns 0 if self = other
returns > 0 if self > other
returns < 0 if self < other

Operation isGreater

operation isGreater(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self > other

Operation isGreaterOrEqual

operation isGreaterOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self >= other

Operation isLower

operation isLower(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self < other

Operation isLowerOrEqual

operation isLowerOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self <= other

Class Comparable

kermeta::standard::Comparable inherits kermeta::language::structure::Object

The abstract class Comparable defines a set of operation
to compare instances of a class.
Sub-classes only has to implement abstract operation compareTo.
All other methods are defined w.r.t. the compareTo operation
@

Operation initialize

operation initialize(i : kermeta::standard::Integer, first : kermeta::standard::Boolean, last : kermeta::standard::Boolean) : kermeta::standard::EachContext
Undocumented

Property index

attribute index: kermeta::standard::Integer
Undocumented

Property isFirst

attribute isFirst: kermeta::standard::Boolean
Undocumented

Property isLast

attribute isLast: kermeta::standard::Boolean
Undocumented

Class EachContext

kermeta::standard::EachContext inherits kermeta::language::structure::Object

context used in the indexedEach of Collection
@

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparison

Operation div

operation div(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self / other

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Integer or Real
and has the same numeric value than current object.

Operation isGreater

method isGreater(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self > other

Operation isGreaterOrEqual

method isGreaterOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self >= other

Operation isLower

method isLower(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self < other

Operation isLowerOrEqual

method isLowerOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self <= other

Operation minus

operation minus(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self - other

Operation mod

operation mod(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self modulo other

Operation mult

operation mult(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self * other

Operation plus

method plus(other : kermeta::standard::Integer) : kermeta::standard::Integer from kermeta::standard::Summable

returns self + other

Operation times

operation times(body : < kermeta::standard::Integer->kermeta::standard::Object >) : Void

Iteration

Operation toReal

operation toReal() : kermeta::standard::Real

Convert self as a Real

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Numeric value in string format

Operation uminus

operation uminus() : kermeta::standard::Integer

returns -self

Class Integer

kermeta::standard::Integer inherits kermeta::standard::Numeric, kermeta::standard::Summable<kermeta::standard::Integer>

The class Integer
@

Operation hasNext

operation hasNext() : kermeta::standard::Boolean

Returns true if the iterator has a next element

Operation isOff

operation isOff() : kermeta::standard::Boolean

Returns true if the iterator is on the last element
i.e. returns not self.hasNext()

Operation next

operation next() : G

Returns the next element of the iterator
Raises IteratorIsOff exception in case the iterator is on the last element

Class Iterator

kermeta::standard::Iterator<G> inherits kermeta::language::structure::Object

Iterator to be used with Collection
See also Collection<G>.getIterator()
@

Class NotComparableException

kermeta::standard::NotComparableException inherits kermeta::exceptions::Exception

raised when two objects are not comparable
@

Class Numeric

kermeta::standard::Numeric inherits kermeta::standard::Comparable, kermeta::standard::ValueType

The abstract class Numeric is the root class for all
numeric types
@

Alias Object

kermeta::standard::Object
@

Operation addAt

operation addAt(index : kermeta::standard::Integer, element : G) : Void

Adds element in the OrderedCollection at rank index
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedCollection

Operation elementAt

operation elementAt(index : kermeta::standard::Integer) : G

Returns the element at rank index in the OrderedCollection
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedCollection

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Overrides Object.equals(Object)
Returns a Boolean stating whether the provided element is equal to
current OrderedCollection

Operation first

operation first() : G

Returns the first element in the OrderedCollection
Raises an EmptyCollection exception if the OrderedCollection is empty

Operation indexOf

operation indexOf(element : G) : kermeta::standard::Integer

Returns the index of the first instance of element in the OrderedCollection
or -1 if the element is not contained by the OrderedCollection
Raises an EmptyCollection exception if the OrderedCollection is empty

Operation last

operation last() : G

Returns the last element in the OrderedCollection
Raises an EmptyCollection exception if the OrderedCollection is empty

Operation removeAt

operation removeAt(index : kermeta::standard::Integer) : Void

Removes the element at rank index from the OrderedCollection
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedCollection

Class OrderedCollection

kermeta::standard::OrderedCollection<G> inherits kermeta::standard::Collection<G>

An OrderedCollection is the root abstract class for all ordered Collections.
@

Operation add

method add(element : G) : kermeta::standard::Void from kermeta::standard::Set

See Set<G>.add(G)

Operation addAt

method addAt(index : kermeta::standard::Integer, element : G) : Void from kermeta::standard::OrderedCollection

Overrides OrderedCollection<G>.addAt(Integer, G)
Adds element in the OrderedSet at rank index if the ordered set does
not already contain the element, does nothing otherwise

Operation append

operation append(element : G) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet from current one with element
inserted in head

Operation at

operation at(index : kermeta::standard::Integer) : G

Returns element at rank index in the sequence
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedSet

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::OrderedCollection

See OrderedCollection<G>.equals(Object)

Operation insertAt

operation insertAt(index : kermeta::standard::Integer, subject : G) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet from current one with element
inserted at rank index

Operation preppend

operation preppend(element : G) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet from current one with element
inserted in tail

Operation subSet

operation subSet(min : kermeta::standard::Integer, max : kermeta::standard::Integer) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet composed of elements of current ordered
set from rank min to rank max (order is respected)
Raises IndexOutOfBound exception if min is negative, max is larger than
the size of the ordered set or min is larger than max

Class OrderedSet

kermeta::standard::OrderedSet<G> inherits kermeta::standard::Set<G>, kermeta::standard::OrderedCollection<G>

An OrderedSet is a Set that contained ordered distinct elements
@

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparison

Operation div

operation div(other : kermeta::standard::Real) : kermeta::standard::Real

returns self / other

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Integer or Real
and has the same numeric value than current object.

Operation minus

operation minus(other : kermeta::standard::Real) : kermeta::standard::Real

returns self - other

Operation mult

operation mult(other : kermeta::standard::Real) : kermeta::standard::Real

returns self * other

Operation plus

method plus(other : kermeta::standard::Real) : kermeta::standard::Real from kermeta::standard::Summable

returns self + other

Operation toInteger

operation toInteger() : kermeta::standard::Integer

Convert self as an Integer

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Returns numeric value in string format

Operation uminus

operation uminus() : kermeta::standard::Real

returns -self

Class Real

kermeta::standard::Real inherits kermeta::standard::Numeric, kermeta::standard::Summable<kermeta::standard::Real>

class Real
@

Operation append

operation append(element : G) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence from current one with element
inserted in head

Operation at

operation at(index : kermeta::standard::Integer) : G

Returns element at rank index in the sequence
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the Sequence

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::OrderedCollection

Overrides OrderedCollection<G>.equals(Object)
Returns a Boolean stating whether the provided element is equal to
current Sequence

Operation insertAt

operation insertAt(index : kermeta::standard::Integer, element : G) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence from current one with element
inserted at rank index

Operation preppend

operation preppend(element : G) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence from current one with element
inserted in tail

Operation subSequence

operation subSequence(min : kermeta::standard::Integer, max : kermeta::standard::Integer) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence composed of elements of current sequence
from rank min to rank max (order is respected)
Raises IndexOutOfBound exception if min is negative, max is larger than
the size of the sequence or min is larger than max

Class Sequence

kermeta::standard::Sequence<G> inherits kermeta::standard::Bag<G>, kermeta::standard::OrderedCollection<G>

A Sequence is an OrderedCollection of elements allowing duplicates
@

Operation add

method add(element : G) : Void from kermeta::standard::Collection

Overrides Collection<G>.add(G)
Adds elt to the Set if it is not already contained by the
Set, does nothing otherwise

Operation asBag

method asBag() : kermeta::standard::Bag<G> from kermeta::standard::Collection

Overrides Collection<G>.asBag()
Returns a new Bag composed of all elements of current Set

Operation asOrderedSet

method asOrderedSet() : kermeta::standard::OrderedSet<G> from kermeta::standard::Collection

Overrides Collection<G>.asOrderedSet()
Returns a new OrderedSet that contains all elements of current Set

Operation asSequence

method asSequence() : kermeta::standard::Sequence<G> from kermeta::standard::Collection

Overrides Collection<G>.asSequence()
Returns a new Sequence composed of all elements of current Set

Operation asSet

method asSet() : kermeta::standard::Set<G> from kermeta::standard::Collection

Overrides Collection<G>.asSet()
Returns a new Set composed of all elements of current Set

Operation concatenate

operation concatenate(less : kermeta::standard::OrderedSet<G>, pivot : kermeta::standard::OrderedSet<G>, greater : kermeta::standard::OrderedSet<G>) : kermeta::standard::OrderedSet<G>

Returns a ordered set of the bag elements sorted using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Recursive sort of the given (ordered) set using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Internal concatenation tool for recursive 'quickSort()' method

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Overrides Object.equals(Object)
Returns a Boolean stating whether the provided element is equal to
current Set

Operation flatten

operation flatten() : kermeta::standard::Set<kermeta::standard::Object>

Returns a new Set which content includes all non-Collection elements
of the current Set, and, for each Collection element of the current
Set, as many elements as the Collection contains
Duplicates are removed

Operation intersection

operation intersection(elements : kermeta::standard::Collection<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the intersection of the Set elements
with the current Set

Operation minus

operation minus(elements : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the difference between the
current Set and the Set elements, ie all elements contained by
the current Set that do not appear in the elements Set

Operation remove

method remove(element : G) : Void from kermeta::standard::Collection

Overrides Collection<G>.remove(G)
Removes the element from the Set if it is contained by the Set

Operation symmetricDifference

operation symmetricDifference(s : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set which contents corresponds to the symmetric
difference between current Set and Set s, ie all elements of
each Set that do not appear in the other one

Operation union

operation union(elements : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the union of the Set elements
with the current Set

Operation unionWithBag

operation unionWithBag(elements : kermeta::standard::Bag<G>) : kermeta::standard::Bag<G>

Returns a new Bag corresponding to the union of the Bag elements
with the current Set

Class Set

kermeta::standard::Set<G> inherits kermeta::standard::Collection<G>

A Set is a non-ordered collection that contains distinct elements
(with regards to the G.equals(Object) operation)
@

Operation append

operation append(other : kermeta::standard::String) : Void

Appends other at the end of self
A more efficient method is kermeta::utils::StringBuffer::append(other)

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparaison

Operation contains

operation contains(str1 : kermeta::standard::String) : kermeta::standard::Boolean

Return if a string is contained by another string

Operation elementAt

operation elementAt(index : kermeta::standard::Integer) : kermeta::standard::Character

returns the character at index in the String

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is String
and has the same string value than current object.

Operation indexOf

operation indexOf(str : kermeta::standard::String) : kermeta::standard::Integer

returns the index within this string of the first
occurrence of the specified substring

Operation plus

method plus(other : kermeta::standard::String) : kermeta::standard::String from kermeta::standard::Summable

returns a new string self + other

Operation replace

operation replace(str1 : kermeta::standard::String, str2 : kermeta::standard::String) : kermeta::standard::String

Replaces all occurences of str1 in the current string by the string str2

Operation size

operation size() : kermeta::standard::Integer

returns the number of characters in the current String

Operation split

operation split(delimiter : kermeta::standard::String) : kermeta::standard::Sequence<kermeta::standard::String>

Return of an ordered set of the splitted string
Note that the delimiter is a regular expression (as the split operation in java)

Operation substring

operation substring(startIndex : kermeta::standard::Integer, endIndex : kermeta::standard::Integer) : kermeta::standard::String

returns a new string that is a substring of this string
takes as parameters : the startIndex and endIndex

Operation toBoolean

operation toBoolean() : kermeta::standard::Boolean

Parses the current string and returns true if the string is "true" and false if the string is "false"
The parsing is not case sensitive and if no boolean value is recognized then a StringFormatException is raised.

Operation toInteger

operation toInteger() : kermeta::standard::Integer

Parses the current string into an integer.
if no integer value is recognized then a StringFormatException is raised.

Operation toLowerCase

operation toLowerCase() : kermeta::standard::String

Return the current string in lower case

Operation toReal

operation toReal() : kermeta::standard::Real

Parses the current string into a real.
if no real value is recognized then a StringFormatException is raised.

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

returns the string itself

Operation toUpperCase

operation toUpperCase() : kermeta::standard::String

Return the current string in upper case

Class String

kermeta::standard::String inherits kermeta::standard::ValueType, kermeta::standard::Comparable, kermeta::standard::Summable<kermeta::standard::String>

The class String
@

Operation plus

operation plus(other : G) : G

Summarization method to be implemented by any summable class.
The parameter must have the same type (or one of its subtypes)
than the current object .

Class Summable

kermeta::standard::Summable<G> inherits kermeta::language::structure::Object

The abstract class Summable defines a set of operation
to sum instances of a class.
Sub-classes only has to implement abstract operation plus.
@

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

NOT IMPLEMENTED

Class UnknownJavaObject

kermeta::standard::UnknownJavaObject inherits kermeta::language::structure::Object

This special object is used to represent java objects that cannot be concretely used with kermeta
the only actions possible on these objects are : assignment and passing them as parameter

@

Alias UnlimitedNatural

kermeta::standard::UnlimitedNatural

Unlimited natural is used for reflection.
It is mapped to integer.equals().
Any negative number is interpreted as '*'
@

Class ValueType

kermeta::standard::ValueType inherits kermeta::language::structure::Object

The abstract class ValueType does not contain any feature.
However, any instance of a sub-class of ValueType will be passed by value
instead of by reference for any other objects.
that means that each time you := such object it will call the clone function associated to it (Not implemented yet except for Integer, String and boolean!!!)

@

Operation isInstanceOf

method isInstanceOf(type : kermeta::language::structure::Type) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true

Operation isVoid

method isVoid() : kermeta::standard::Boolean from kermeta::language::structure::Object

Return true

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Returns the String identifier '<void>'

Class Void

kermeta::standard::~Void inherits kermeta::language::structure::Object

The class Void
By convention it is a sub-type of everything
@

Package utils

kermeta::utils

Contains special classes (Hashtable, Stack) that are not contained in Kermeta
metamodel

Contains special classes (Hashtable, Stack) that are not contained in Kermeta
metamodel


Operation clear

operation clear() : Void

Removes all elements from the Hashtable

Operation containsKey

operation containsKey(key : K) : kermeta::standard::Boolean

Returns a Boolean stating whether a key is present or not in this Hashtable

Operation getValue

operation getValue(key : K) : V

Returns the value for key 'key' if it exists, otherwise returns Void

Operation keyIterator

operation keyIterator() : kermeta::standard::Iterator<K>

Returns an iterator over the Keys of this Hashtable

Operation keys

operation keys() : kermeta::standard::Set<K>

Returns a set containing the hash keys of this Hashtable

Operation put

operation put(key : K, ~value : V) : Void

Adds a entry into the Hashtable

Operation remove

operation remove(key : K) : Void

Removes the entry with key equals to 'key'

Operation size

operation size() : kermeta::standard::Integer

Returns the size of this Hashtable

Operation valueIterator

operation valueIterator() : kermeta::standard::Iterator<V>

Returns an iterator over the values of this Hashtable

Operation values

operation values() : kermeta::standard::Collection<V>

Returns a collection containing the elements of this Hashtable

Class Hashtable

kermeta::utils::Hashtable<K, V> inherits kermeta::language::structure::Object

An implementation of hashtable
This implementation is for speed optimisation it cannot be serialized.
If your wish to serialize its content you need to copy its content into a classical ecore structure (attribute or references)

@

Operation peek

operation peek() : G

Gets the element at the top of the stack

Operation pop

operation pop() : G

Get and remove the element at the top of the stack

Operation push

operation push(element : G) : Void

Pushes an element into the stack

Class Stack

kermeta::utils::Stack<G> inherits kermeta::standard::Sequence<G>

An implementation of stack

@

Operation append

operation append(arg0 : kermeta::standard::String) : kermeta::utils::StringBuffer

Append a given string at the end of this StringBuffer
@param arg0 A string to append at the end of this StringBuffer
@return A reference to this object

Operation length

operation length() : kermeta::standard::Integer

Return the length of the StringBuffer
@return length of the StringBuffer

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Convert this StringBuffer to String and return its value
@return The string value of this StringBuffer

Class StringBuffer

kermeta::utils::StringBuffer inherits kermeta::language::structure::Object

This class mimic the behavior of the java's StringBuffer class. This enables better performance in long
string concatenation.<br>
Only work on Strings

@

Package xmltype

kermeta::xmltype

Contains the definition of a Kermeta classes used for compatibility with XMLType.ecore

Class QName

kermeta::xmltype::QName inherits kermeta::standard::String

Kermeta representation of EMF type::QName from XMLType.ecore

@

Package persistence

kermeta::persistence

Contains the classes that handle the serialization of models, in particular
EMF models.

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

user friendly message build with those informations

Property danglingElement

reference danglingElement: kermeta::standard::Object

Element that is not contained by a resource in the repository

Property referencingElement

reference referencingElement: kermeta::standard::Object

Element that has a reference to the dangling element

Property referencingProperty

reference referencingProperty: kermeta::language::structure::Property

Property used to reference the dangling element

Class DanglingDiagnostic

kermeta::persistence::DanglingDiagnostic inherits kermeta::language::structure::Object

class used to gather the information required to make a user friendly report about a dangling element
(see. findDanglingModelElements())
@

Operation createResource

method createResource(uri : kermeta::standard::String, mm_uri : kermeta::standard::String) : kermeta::persistence::Resource from kermeta::persistence::Repository

Overrides Repository.createResource(String, String)
Create a new resource for a model given by its uri,
which meta-model is stored in file given by mm_uri
If file already exists, you'll be able to call the load method to concretly load the model
otherwise, you can only call the save method

Operation registerEcoreFile

operation registerEcoreFile(mm_uri : kermeta::standard::String) : Void

Register the content of the given ecore file into EMF registry
Once registered, EMF will be able to load and save models conformant to this ecore file
Warning: if the NSURI you wish to register is already, registered (either statically or due to a previous call)
it will do nothing. Ie. modification in the ecore file will not be taken into account unless you manually unregister it.

Property ignoreAllLoadErrors

attribute ignoreAllLoadErrors: kermeta::standard::Boolean

When loading the Resources,
if there are some errors while loading some objects, the loader can try to ignore them
setting this attribute to true is equivalent to setting ignoreLoadErrorUnknownMetaclass and ignoreLoadErrorUnknownProperty to true
by default, not setting this attribute is considered as false.

Property ignoreLoadErrorUnknownMetaclass

attribute ignoreLoadErrorUnknownMetaclass: kermeta::standard::Boolean

When loading the Resources,
if there are some errors due to an unknown metaclass while loading some objects, the loader try to ignore them
by default, not setting this attribute is considered as false.

Property ignoreLoadErrorUnknownProperty

attribute ignoreLoadErrorUnknownProperty: kermeta::standard::Boolean

When loading the Resources,
if there are some errors due to an unknown property while loading some objects (ie. the metaclass is known but it cannot retreive
the given reference or attribute in the ClassDefinition, the loader try to ignore them
by default, not setting this attribute is considered as false.

Property useInterpreterInternalResources

attribute useInterpreterInternalResources: kermeta::standard::Boolean

If true, tells to the save of the resources that they should also integrate the resources from Kermeta interpreter itself
this is useful for example to make a dependency to framework.km
by default, not setting this is considered as false.

Class EMFRepository

kermeta::persistence::EMFRepository inherits kermeta::persistence::Repository

Repository that stores and manages resources that come from EMF
@

Operation add

method add(instance : kermeta::standard::Object) : Void from kermeta::standard::Set

Overrides Set<Object>.add(Object)
Add an instance to the Resource
Ensures that the instance is referenced by a one and only one Resource of the same Repository
Ensures that the instance does not appear more than once in the Resource

Operation clean

operation clean() : kermeta::standard::Void
Undocumented

Operation load

method load() : Void from kermeta::persistence::Resource

Overrides Resource.load()
In case the metamodelURI was not previously set, metamodelURI is filled with
the nsuri of the root package of the metamodel used to load the Resource after
a successful load

Operation mark

operation mark(message : kermeta::standard::String) : kermeta::standard::Void
Undocumented

Operation remove

method remove(instance : kermeta::standard::Object) : Void from kermeta::standard::Set

Overrides Set<Object>.remove(Object)
Remove the instance from the Resource

Operation save

method save() : Void from kermeta::persistence::Resource

Overrides Resource.save()

Operation saveAndValidateWithEMF

operation saveAndValidateWithEMF() : kermeta::standard::Boolean

Checks the Resource using the EMF validation function, and saves it if
validation succeeds
Applies validation to all root objects of the Resource
Returns true if the validation reports no error, raises exceptions otherwise

Operation saveWithNewURI

method saveWithNewURI(new_uri : kermeta::standard::String) : Void from kermeta::persistence::Resource

Overrides Resource.saveWithNewURI(String)

Class EMFResource

kermeta::persistence::EMFResource inherits kermeta::persistence::Resource
@
Extension of the Resource class definition that is specific to EMF Repository.
User is not supposed to directly create it. Otherwise it will not be correctly initialized
You must To create one
@

Operation createResource

operation createResource(uri : kermeta::standard::String, mm_uri : kermeta::standard::String) : kermeta::persistence::Resource

Creates a new Resource with given uri, and an optional mm_uri
mm_uri is required when creating a new model from scratch.
Raises a ResourceCreate exception in case the Repository already
contains a Resource with the given uri
If uri does not points to an existing model file (in the case of
a model creation), calls to load() operation will fail as long as
the model has not been saved once

Operation findDanglingModelElements

operation findDanglingModelElements() : kermeta::standard::Set<kermeta::persistence::DanglingDiagnostic>

Search for elements referenced by one element contained by this repository that are not contained by this repository
ie. element that EMF would claim as "not contained in a resource"
example of use :
var report : Set<DanglingDiagnostic>
report := repository.findDanglingModelElements()
report.each{ diag | stdio.writeln(diag.toString ) }

Operation getResource

operation getResource(uri : kermeta::standard::String) : kermeta::persistence::Resource

Returns the Resource associated with the given uri if this uri is associated with
an already created Resource of the Repository.
If the Repository contains no Resource associated with the given uri, creates
a new Resource and loads it.
In order to prevent multiple load of the same file by using variant path to the same file, all URI used by this function are normalized
Raises a ResourceCreate exception if the given uri does not point to an existing
model file
May also raises loading exceptions if this is the first retrieval of the resource

Operation normalizeUri

operation normalizeUri(uri : kermeta::standard::String) : kermeta::standard::String

Return a normalized version of the Uri
in order to prevent several loading of the same file because they have different path that leads to them, kermeta uses normalizedURI
for some of its functions (eg. repository.getResource )
As EMF needs URI of the form platform:/resource or platform:/plugin, kermeta automatically
normalize the uri when loading or saving. This is especially true for file:/ uri or relative uri (./ or / )
If you wish to know what concrete uri is used by kermeta when loading and saving you can use this function
to check how a given uri is normalized by kermeta

Property resources

attribute resources: set kermeta::persistence::Resource[0..*]#repository

Resources created by this Repository
This feature is supposed read only, otherwise it cannot garantee that an element is contained by only
one Resource of a given Repository

Class Repository

kermeta::persistence::Repository inherits kermeta::language::structure::Object

Abstract resource container, that contains a list of available loaded resources,
and methods to create or get a resource given an URI.
A repository cannot contain 2 resources which points to the same file (ie. that have the same normalizedURI)
@

Operation findDanglingModelElements

operation findDanglingModelElements() : kermeta::standard::Set<kermeta::persistence::DanglingDiagnostic>

Search for elements referenced by one element contained by this resource that are not contained by this repository
ie. element that EMF would claim as "not contained in a resource"
checks only objects directly referenced by the element in this resource, ignores indirectly referenced objects
example of use :
var report : Set<DanglingDiagnostic>
report := resource.findDanglingModelElements()
report.each{ diag | stdio.writeln(diag.toString ) }

Operation instances

operation instances() : kermeta::persistence::Resource

The entities contained in the model-instance, that are provided when user loads a resource
instances == rootContents
this is a loop on Resource itself in order to get backward compatibility
@

Operation load

operation load() : Void

Loads the Resource, thus making content of the Resource browsable.
Raises a ResourceLoadException in case loaded Resource is empty

Operation normalizedUri

operation normalizedUri() : kermeta::standard::String

Return a normalized version of the Uri of this resource
in order to prevent several loading of the same file because they have different path that leads to them, kermeta uses normalizedURI
for some of its functions (eg. repository.getResource )
As EMF needs URI of the form platform:/resource or platform:/plugin, kermeta automatically
normalize the uri when loading or saving. This is especially true for file:/ uri or relative uri (./ or / )
If you wish to know what concrete uri is used by kermeta when loading and saving you can use this function
to check how a given uri is normalized by kermeta

Operation save

operation save() : Void

Save a Resource in the file specified by the current value of uri

Operation saveWithNewURI

operation saveWithNewURI(new_uri : kermeta::standard::String) : Void

Save a Resource in a file referenced by the new uri.
note: this doesn't change the URI of the resource, it is only saved in another place

Property contents

property contents: set kermeta::standard::Object[0..*] readonly

Returns the set of all Objects directly or indirectly contained by the Resource,
or an empty set if the Resource is empty
implementation note: since this derived property build a set, it guarantees the unicity, as a drawback,
calling this property on large resources will be really slow due to this verification. some user may prefer
to reimplement it using a bag.

Property dependentResources

property dependentResources: set kermeta::persistence::Resource[0..*] readonly

Returns the set of Resources the current Resource, which must have been loaded,
depends on, an empty set if current Resource has no dependency

Property isReadOnly

attribute isReadOnly: kermeta::standard::Boolean

Indicates weither this resource will be updated when saving the repository
This is useful if the repository contains some metamodels that should not be saved.

Note that in the current version, it doesn't ensure that you have not modified its content (using the freeze)
If you modify the elements of such resource, other resource that depend on it will be incorrectly saved

Property metaModelURI

attribute metaModelURI: kermeta::standard::String

Uri of the meta-model of the Resource to load

Property repository

reference repository: kermeta::persistence::Repository#resources

Repository used to create the Resource
This feature is supposed read only, otherwise it cannot garantee that an element is contained by only
one Resource of a given Repository

Property uri

attribute uri: kermeta::standard::String

Uri of the Resource to load

Class Resource

kermeta::persistence::Resource inherits kermeta::standard::Set<kermeta::standard::Object>

The main class that handle a loaded/saved model.
There are a few important things to note for the developer :

- load a Resource : this loads a Collection of instances corresponding to the
objects in the loaded model. If the Collection of instances is empty, than
a ResourceLoadException is raised

- save a Resource : this saves the collection of instances in a new file. This can
be correctly done if and only if the instances saved are conform to the metamodel
linked to this resource (this link does not need to be explicit. It is normally retrieved
through the EMF model -- see Java wrapping "Resource.java").

- add/remove an instance to the Resource : this adds an element in the resource. It cannot
be "simply" added because of the following potential errors :

- The object added is not conform to the metamodel -> Error
- The object was already added in the resource -> Not a real error : we do nothing
- The object to remove does not exist -> redirect to a collection-specific error
- The object to remove is attached to an object in the collection -> "dependency-violation" exception?

@

Package exceptions

kermeta::exceptions

Contains the definition of a Kermeta exception and a few basic exceptions.

Class AbstractClassInstantiationError

kermeta::exceptions::AbstractClassInstantiationError inherits kermeta::exceptions::RuntimeError

Creation on an abstract class. Usually this is detected by the type-checker. The only
case where this happens is when instantiating a type variable, whose bound type turns
out to be abstract.
@

Class CallOnVoidTarget

kermeta::exceptions::CallOnVoidTarget inherits kermeta::exceptions::RuntimeError
Occurs when a feature is called on void @

Property constraintAppliedTo

reference constraintAppliedTo: kermeta::standard::Object
Object on which the constraint was applied to
On Invariant, we can generally consider this object as the faulty Object

Property failedConstraint

reference failedConstraint: kermeta::language::structure::Constraint
constraint that has failed

Class ConstraintViolatedException

kermeta::exceptions::ConstraintViolatedException inherits kermeta::exceptions::Exception
Common super class for all ConstraintVioloated exceptions @

Class ConstraintViolatedInv

kermeta::exceptions::ConstraintViolatedInv inherits kermeta::exceptions::ConstraintViolatedException
An invariant isn't satisfied on a given Object @

Class ConstraintViolatedPost

kermeta::exceptions::ConstraintViolatedPost inherits kermeta::exceptions::ConstraintViolatedException
The post-condition is not satisfied @

Class ConstraintViolatedPre

kermeta::exceptions::ConstraintViolatedPre inherits kermeta::exceptions::ConstraintViolatedException
The pre-condition is not satisfied @

Operation add

operation add(cons : kermeta::exceptions::ConstraintViolatedInv) : kermeta::standard::Void
Undocumented

Operation initialize

operation initialize() : kermeta::exceptions::ConstraintsDiagnostic
Undocumented

Operation prettyPrint

operation prettyPrint() : Void
Undocumented

Property setConstraints

attribute setConstraints: kermeta::standard::Bag<kermeta::exceptions::ConstraintViolatedInv>
Undocumented

Class ConstraintsDiagnostic

kermeta::exceptions::ConstraintsDiagnostic inherits kermeta::language::structure::Object
@

Class DivisionByZero

kermeta::exceptions::DivisionByZero inherits kermeta::exceptions::Exception
well-known attempt to divide with a zero valued divider @

Class DynamicExpressionException

kermeta::exceptions::DynamicExpressionException inherits kermeta::exceptions::Exception

to be written #########################################
@

Class EmptyCollection

kermeta::exceptions::EmptyCollection inherits kermeta::exceptions::Exception
Occurs when trying to access element on an empty collection @

Property message

attribute message: kermeta::standard::String
The message attached to the exception

Property nestedException

attribute nestedException: kermeta::exceptions::Exception
Any nested exception

Property stackTrace

attribute stackTrace: kermeta::standard::String

The stack trace as a String
Filled by the interpreted when the exception is raised

Class Exception

kermeta::exceptions::Exception inherits kermeta::language::structure::Object

Generic exceptions
The main class from which all the exception inherit
@

Class FileNotFoundException

kermeta::exceptions::FileNotFoundException inherits kermeta::exceptions::IOException
the file has not be found on the underlying system @

Class IOException

kermeta::exceptions::IOException inherits kermeta::exceptions::Exception
an interaction with the underlying system failed @

Class IncompatibleTypeError

kermeta::exceptions::IncompatibleTypeError inherits kermeta::exceptions::RuntimeError

Raised by the Object::set operation if the type of the
Object to set has an incompatible type.
@

Class IndexOutOfBound

kermeta::exceptions::IndexOutOfBound inherits kermeta::exceptions::Exception
Occurs when trying to access out of bounds elements @

Class IteratorIsOff

kermeta::exceptions::IteratorIsOff inherits kermeta::exceptions::Exception

Occurs when calling next() operation while iterator is already
positioned on the last element of a collection
@

Class NotImplementedException

kermeta::exceptions::NotImplementedException inherits kermeta::exceptions::RuntimeError

Use this exception when you want to forbid the access to an unimplemented operation
and invite to implement it
@

Class OverflowError

kermeta::exceptions::OverflowError inherits kermeta::exceptions::Exception
the figure oversteps the capacity of the numeric variable @

Class ResourceCreateException

kermeta::exceptions::ResourceCreateException inherits kermeta::exceptions::Exception
Occurs when trying to crate a Resource already existing in the Repository @

Class ResourceLoadException

kermeta::exceptions::ResourceLoadException inherits kermeta::exceptions::Exception
Occurs when Resource loading fails for some reasons @

Class ResourceMixedLevelsException

kermeta::exceptions::ResourceMixedLevelsException inherits kermeta::exceptions::ResourceSaveException
Occurs when Resource saving fails because an object refers to an element which
belongs to the Definition of the currently running program @

Property failedWhileSaving

reference failedWhileSaving: kermeta::standard::Object
Object on which the the saved failed
One can rescue the exception and analyse the structure next to this object,
this can give some clue about the faulty structure

Class ResourceSaveException

kermeta::exceptions::ResourceSaveException inherits kermeta::exceptions::Exception
Occurs when Resource saving fails for some reasons @

Class ResourceUnconformityException

kermeta::exceptions::ResourceUnconformityException inherits kermeta::exceptions::Exception
Raised when user tries to add an object that is not conform to the metamodel @

Property expression

attribute expression: kermeta::language::behavior::Expression
The code that raised the exception

Class RuntimeError

kermeta::exceptions::RuntimeError inherits kermeta::exceptions::Exception
Exception for interpreter exceptions @

Class StringFormatException

kermeta::exceptions::StringFormatException inherits kermeta::exceptions::Exception

to be written #########################################
@

Class StringIndexOutOfBound

kermeta::exceptions::StringIndexOutOfBound inherits kermeta::exceptions::Exception
the data overstep the size of the string variable @

Class TypeCastError

kermeta::exceptions::TypeCastError inherits kermeta::exceptions::RuntimeError

Occurs when a cast (Object::asType operation) fails
@

Class UnregisteredMetamodelException

kermeta::exceptions::UnregisteredMetamodelException inherits kermeta::exceptions::Exception
Raised when a resource cannot be loaded or saved because the URI used for
the metamodel is not registered
@

Class UpperBoundReachedError

kermeta::exceptions::UpperBoundReachedError inherits kermeta::exceptions::RuntimeError

Use this exception when user tries to add an element to a property which type is collection
which has an upper bound != -1 ( ie *)
@

Class VoidOperandError

kermeta::exceptions::VoidOperandError inherits kermeta::exceptions::Exception
one of the required operands is void @

Package io

kermeta::io

Contains file input/output related classes.


Contains standard input/output related classes.

Operation readTextFile

operation readTextFile(filename : kermeta::standard::String) : kermeta::standard::String

Reads a text file

Operation writeTextFile

operation writeTextFile(filename : kermeta::standard::String, text : kermeta::standard::String) : Void

Writes a String in a text file

Operation writeTextFileWithEncoding

operation writeTextFileWithEncoding(filename : kermeta::standard::String, text : kermeta::standard::String, encoding : kermeta::standard::String) : Void

Writes a String in a text file by using a specific encoding

Class FileIO

kermeta::io::FileIO inherits kermeta::language::structure::Object

Implementation of simple helpers to read ans write text files

@

Operation error

operation error(object : kermeta::standard::String) : Void

Writes the object to error output

Operation errorln

operation errorln(object : kermeta::standard::String) : Void

Writeln the object to error output

Operation read

operation read(prompt : kermeta::standard::String) : kermeta::standard::String

Reads a String from standard input

Operation write

operation write(object : kermeta::standard::String) : Void

Writes the object to standard output

Operation writeln

operation writeln(object : kermeta::standard::String) : Void

Writeln the object to standard output

Class StdIO

kermeta::io::StdIO inherits kermeta::language::structure::Object

An implementation of StdIO : standard input/output

@

Package interpreter

kermeta::interpreter

Contains a set of classes whose function is to evaluate a kermeta
expression written as a string.

Operation evalString

operation evalString(body : kermeta::standard::String, selfObj : kermeta::standard::Object, actualParams : kermeta::utils::Hashtable<kermeta::standard::String, kermeta::standard::Object>) : kermeta::standard::Object

Execute the expression given as a string.
the self type and formal parameters are supposed to be set
before calling this operation

Operation execute

operation execute(selfObj : kermeta::standard::Object, actualParams : kermeta::utils::Hashtable<kermeta::standard::String, kermeta::standard::Object>) : kermeta::standard::Object

Execute the expression in the given context

Operation initializeDefaults

operation initializeDefaults() : kermeta::standard::Void

Initializes the formalParameters with an empty set of parameters
and the self type with void

Operation parse

operation parse(expression : kermeta::standard::String) : kermeta::standard::Boolean

Parse the expression as a string
and updates the expression field and errors
Returns true if the expression was parsed sucessfuly

Property errors

reference errors: kermeta::interpreter::KermetaError[0..*]

Parse errors and type errors

Property expression

reference expression: kermeta::language::behavior::Expression

the expression

Property formalParameters

reference formalParameters: kermeta::utils::Hashtable<kermeta::standard::String, kermeta::language::structure::Type>

Formal parameters of the expression (bindings between parameters' names and types)

Property selfClass

reference selfClass: kermeta::language::structure::ClassDefinition

The type of the self object
or void if the expression is not to be executed
in the context of an object

Class DynamicExpression

kermeta::interpreter::DynamicExpression inherits kermeta::language::structure::Object

DynamicExpression is a class used to make dynamic calls, i.e dynamic evaluation
of Kermeta statements represented in a string.

An example :
var de : DynamicExpression init DynamicExpression.new
de.initializeDefaults
de.formalParameters.put("a", String)
de.parse("stdio.writeln(a)") // note: to execute a list of statements, you have to surround them with do..end
var params : Hashtable<String, Object> init Hashtable<String, Object>.new
params.put("a", "hello world!")
de.execute(void, params)

@

Property message

attribute message: kermeta::standard::String

Error message

Class KermetaError

kermeta::interpreter::KermetaError inherits kermeta::language::structure::Object

Kermeta language error in a code written in Kermeta
@

Class ParseError

kermeta::interpreter::ParseError inherits kermeta::interpreter::KermetaError

Kermeta error for parsing problems
@

Class TypeError

kermeta::interpreter::TypeError inherits kermeta::interpreter::KermetaError

Type errors in a code written in Kermeta
@

Package ecore

kermeta::ecore

Contains the definition of a Kermeta classes used for compatibility with Ecore

Property eStructuralFeatureName

attribute eStructuralFeatureName: kermeta::standard::String
Undocumented

Property value

attribute value: kermeta::language::structure::Object
Undocumented

Class EFeatureMapEntry

kermeta::ecore::EFeatureMapEntry inherits kermeta::language::structure::Object

Kermeta representation of EMF EFeatureMapEntry
it contains the name of the required feature and the actual value

@

Property errors

reference errors: kermeta::interpreter::KermetaError[0..*]

Parse errors and type errors

Class DynamicExpressionException

kermeta::exceptions::DynamicExpressionException inherits kermeta::exceptions::Exception

to be written #########################################
@
behavior::VoidLiteral

Class SelfExpression

kermeta::language::behavior::SelfExpression inherits kermeta::language::behavior::Expression
@Refers to self use

Property message

attribute message: kermeta::standard::String
The message attached to the exception

Class FunctionType

kermeta::language::structure::FunctionType inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::Type
@Type used to define the use of lambda expressions.
Uses :
operation forAll(func : <G -> Boolean>) : Boolean is do
var test : Boolean init true
from var it : Iterator<G> init iterator
until it.isOff
loop
test := test and func(it.next)
end
result := test
end


In the above example, <G -> Boolean> is a function type f(G) ->
Boolean, with a parameter of type G and a return type of type Boolean
The operation forAll takes a lambda expression as parameter.
interpreter::KermetaError
Attributes
exceptions::CallOnVoidTarget

Property virtualTypeBinding

attribute virtualTypeBinding: kermeta::language::structure::TypeVariableBinding[0..*]
@To be written

Property isCast

attribute isCast: kermeta::language::structure::Boolean
@Boolean stating whether current assignment corresponds to a cast operation

Operation indexOf

operation indexOf(element : G) : kermeta::standard::Integer

Returns the index of the first instance of element in the OrderedCollection
or -1 if the element is not contained by the OrderedCollection
Raises an EmptyCollection exception if the OrderedCollection is empty

Class TypedElement

kermeta::language::structure::TypedElement inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::NamedElement
@Abstraction of the notion of typed element : each element
that is typed inherits this class.

Class Object

kermeta::language::structure::Object
@Object definition: all entities of Kermeta metamodel explicitly inherit from Object

Class EnumerationLiteral

kermeta::language::structure::EnumerationLiteral inherits kermeta::language::structure::NamedElement
@Item definition for enumeration

Class NotComparableException

kermeta::standard::NotComparableException inherits kermeta::exceptions::Exception

raised when two objects are not comparable
@

Operation add

method add(instance : kermeta::standard::Object) : Void from kermeta::standard::Set

Overrides Set<Object>.add(Object)
Add an instance to the Resource
Ensures that the instance is referenced by a one and only one Resource of the same Repository
Ensures that the instance does not appear more than once in the Resource

Operation toUpperCase

operation toUpperCase() : kermeta::standard::String

Return the current string in upper case

Operation getCachedAllSuperTypes

operation getCachedAllSuperTypes() : kermeta::standard::Set<kermeta::language::structure::Type>

returns a cached version of the derived property allSuperTypes
It is intended to be used to optimize access on the reflexivity,
do not use this cache if you are modifying the ClassDefinition

Operation distil

operation distil(s : kermeta::standard::String) : kermeta::standard::String

* reduces all runs of white-space to a single space character

Operation subSet

operation subSet(min : kermeta::standard::Integer, max : kermeta::standard::Integer) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet composed of elements of current ordered
set from rank min to rank max (order is respected)
Raises IndexOutOfBound exception if min is negative, max is larger than
the size of the ordered set or min is larger than max

Operation printTestResult

operation printTestResult() : kermeta::standard::Void

Prints the log or errors and failures from a test run.
Run some tests first.

Class ModelingUnit

kermeta::language::structure::ModelingUnit inherits kermeta::language::structure::Object
@The modeling unit is the root of any kermeta model. It contains packages, requires and usings.
It also reference others modeling unit.

Operation isNotEqual

operation isNotEqual(element : kermeta::language::structure::Object) : kermeta::language::structure::Boolean

See kermeta::language::structure::Object.equals(Object)
@

Operation andThen

operation andThen(right : < Void->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Short-circuit version of AND. This means that the function passed in parameter will be evaluated only if self is true
Note: we don't have a dedicated operator in the syntax for it yet so here is an example of use :
self.andThen{v | functionThatReturnABoolean() }

Property value

attribute value: kermeta::language::structure::String
@String value of the Tag

Operation write

operation write(object : kermeta::standard::String) : Void

Writes the object to standard output

Property typeParamBinding

attribute typeParamBinding: kermeta::language::structure::TypeVariableBinding[0..*]
@Bindings between type variables and provided types

Class DummyClass

kermeta::language::DummyClass inherits kermeta::language::structure::Object
@This class is used to workaround an EMF bug, it doesn't really belong to Kermeta metamodel

Property metaModelURI

attribute metaModelURI: kermeta::standard::String

Uri of the meta-model of the Resource to load

Operation add

operation add(obj : kermeta::language::structure::Object) : Void

Add an object to the model. According to the ModelType, the typechecker will statically verify if the object can be added or not
@

Property isDerived

attribute isDerived: kermeta::language::structure::Boolean
@If True, the value of the property is not stored but computed from other properties

Property right

reference right: kermeta::language::structure::Type
@Result type of the function

Operation add

method add(element : G) : Void from kermeta::language::ReflectiveCollection

Overrides kermeta::language::ReflectiveCollection<G>.add(G)

Class Log

kermeta::kunit::Log inherits kermeta::language::structure::Object

Log is a log of failures and errors that happened to fallibles since start was called
@

Property opposite

reference opposite: kermeta::language::structure::Property
@Opposite Property of the Property, void if the Property has no opposite

Class ModelType

kermeta::language::structure::ModelType inherits kermeta::language::structure::Type, kermeta::language::structure::TypeDefinition
@Type of a model, consisting of a set of included type definitions

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Boolean
and has the same boolean value than current object.

Operation intersection

operation intersection(elements : kermeta::standard::Collection<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the intersection of the Set elements
with the current Set

Operation valueIterator

operation valueIterator() : kermeta::standard::Iterator<V>

Returns an iterator over the values of this Hashtable

Package ecore

kermeta::ecore

Contains the definition of a Kermeta classes used for compatibility with Ecore

Class PropertyConstraint

kermeta::language::structure::PropertyConstraint inherits kermeta::language::structure::Constraint
Undocumented. See also inherited classes.

Operation normalizeUri

operation normalizeUri(uri : kermeta::standard::String) : kermeta::standard::String

Return a normalized version of the Uri
in order to prevent several loading of the same file because they have different path that leads to them, kermeta uses normalizedURI
for some of its functions (eg. repository.getResource )
As EMF needs URI of the form platform:/resource or platform:/plugin, kermeta automatically
normalize the uri when loading or saving. This is especially true for file:/ uri or relative uri (./ or / )
If you wish to know what concrete uri is used by kermeta when loading and saving you can use this function
to check how a given uri is normalized by kermeta

Operation and

operation ~and(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self and other

Operation implies

operation implies(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self implies other
http://en.wikipedia.org/wiki/Material_implication
meaning : (not self) or other

Operation append

operation append(arg0 : kermeta::standard::String) : kermeta::utils::StringBuffer

Append a given string at the end of this StringBuffer
@param arg0 A string to append at the end of this StringBuffer
@return A reference to this object

Class IteratorIsOff

kermeta::exceptions::IteratorIsOff inherits kermeta::exceptions::Exception

Occurs when calling next() operation while iterator is already
positioned on the last element of a collection
@

Property type

reference type: kermeta::language::structure::Type
@Type of the model element

Operation isSuperTypeOf

operation isSuperTypeOf(object : kermeta::language::structure::Type) : kermeta::language::structure::Boolean

Implements Type.isSuperTypeOf(Type)
For technical reason, the current implementation works only with Type that comes from a kermeta declaration (ie. in a require)
it won't work with Type created programmaticaly by the user. If you need that, please ask to the kermeta developpers
to extend it.
@

Class UnregisteredMetamodelException

kermeta::exceptions::UnregisteredMetamodelException inherits kermeta::exceptions::Exception
Raised when a resource cannot be loaded or saved because the URI used for
the metamodel is not registered
@

Class IndexOutOfBound

kermeta::exceptions::IndexOutOfBound inherits kermeta::exceptions::Exception
Occurs when trying to access out of bounds elements @

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Overrides Object.equals(Object)
Returns a Boolean stating whether the provided element is equal to
current Set

Operation div

operation div(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self / other

Property language

attribute language: kermeta::language::structure::ConstraintLanguage
@Language in which the constraint is expressed

Property raisedException

reference raisedException: kermeta::language::structure::Type[0..*]
@Exceptions raised by the Operation

Operation includesAll

operation includesAll(elements : kermeta::standard::Collection<G>) : kermeta::standard::Boolean

OCL API alignment, does the same as containsAll
See Collection<G>.containsAll(Collection<G>)

Class Failure

kermeta::kunit::Failure inherits kermeta::language::structure::Object

Failure represents an assertion failure stored in a failure log
@

Class DanglingDiagnostic

kermeta::persistence::DanglingDiagnostic inherits kermeta::language::structure::Object

class used to gather the information required to make a user friendly report about a dangling element
(see. findDanglingModelElements())
@

Operation clone

method clone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object from kermeta::language::structure::Type

Implements kermeta::language::structure::Type.clone(Object)
@

Class IOException

kermeta::exceptions::IOException inherits kermeta::exceptions::Exception
an interaction with the underlying system failed @

Operation remove

method remove(element : G) : Void from kermeta::standard::Set

Overrides kermeta::standard::Set<G>.remove(G)

Operation mod

operation mod(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self modulo other

Operation add

operation add(cons : kermeta::exceptions::ConstraintViolatedInv) : kermeta::standard::Void
Undocumented

Operation includes

operation includes(element : G) : kermeta::standard::Boolean

OCL API alignment, doeas the same as contains
See Collection<G>.contains(Object)

Property type

attribute type: kermeta::language::behavior::TypeReference[1..1]
@To be written ################################

Operation addAt

method addAt(index : kermeta::standard::Integer, element : G) : Void from kermeta::standard::OrderedSet

Overrides kermeta::standard::OrderedSet.addAt(Integer)

Property failure

reference failure: kermeta::kunit::Fallible

the stored failure

Class CallFeature

kermeta::language::behavior::CallFeature inherits kermeta::language::behavior::CallExpression
@CallFeature is the model element that refers to the use of a feature, i.e either
a property or an operation in a statement. In stdio.writeln("hello"),
writeln is a CallFeature.

Operation asOrderedSet

method asOrderedSet() : kermeta::standard::OrderedSet<G> from kermeta::standard::Collection

Overrides Collection<G>.asOrderedSet()
Returns a new OrderedSet that contains all elements of current Set

Operation remove

operation remove(obj : kermeta::language::structure::Object) : Void

Remove an object from the model
@

Operation add

method add(element : G) : kermeta::standard::Void from kermeta::standard::Set

See Set<G>.add(G)

Operation remove

operation remove(element : G) : Void

Removes all instances of element from the Collection, based on
G.equals(Object) definition

Operation writeln

operation writeln(object : kermeta::standard::String) : Void

Writeln the object to standard output

Class ObjectTypeVariable

kermeta::language::structure::ObjectTypeVariable inherits kermeta::language::structure::TypeVariable
@To be written

Class ResourceLoadException

kermeta::exceptions::ResourceLoadException inherits kermeta::exceptions::Exception
Occurs when Resource loading fails for some reasons @

Operation isLower

method isLower(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self < other

Operation nand

operation nand(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self nand other

Operation new

operation new() : kermeta::language::structure::Object

Instantiates a new occurence for this Class
@

Operation isSubTypeOf

operation isSubTypeOf(object : kermeta::language::structure::Type) : kermeta::language::structure::Boolean

Implements Type.isSubTypeOf(Type)
For technical reason, the current implementation works only with Type that comes from a kermeta declaration (ie. in a require)
it won't work with Type created programmaticaly by the user. If you need that, please ask to the kermeta developpers
to extend it.
@

Operation load

operation load() : Void

Loads the Resource, thus making content of the Resource browsable.
Raises a ResourceLoadException in case loaded Resource is empty

Operation assertFalseWithMsg

method assertFalseWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is true

Property log

attribute log: kermeta::kunit::Log

Where to register the failures and errors

Operation getLog

operation getLog() : kermeta::kunit::Log

where failures will be put

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::OrderedCollection

Overrides OrderedCollection<G>.equals(Object)
Returns a Boolean stating whether the provided element is equal to
current Sequence

Property referencedModelingUnits

reference referencedModelingUnits: kermeta::language::structure::ModelingUnit[0..*]
@To be written

Operation findDanglingModelElements

operation findDanglingModelElements() : kermeta::standard::Set<kermeta::persistence::DanglingDiagnostic>

Search for elements referenced by one element contained by this repository that are not contained by this repository
ie. element that EMF would claim as "not contained in a resource"
example of use :
var report : Set<DanglingDiagnostic>
report := repository.findDanglingModelElements()
report.each{ diag | stdio.writeln(diag.toString ) }

Operation readTextFile

operation readTextFile(filename : kermeta::standard::String) : kermeta::standard::String

Reads a text file

Operation put

operation put(key : K, ~value : V) : Void

Adds a entry into the Hashtable

Operation run

method run() : kermeta::standard::Void from kermeta::kunit::Test

Execute the whole test case : SetUp, test method, TearDown
The assertions of the test method are computed

Operation save

method save() : Void from kermeta::persistence::Resource

Overrides Resource.save()

Property typeParameter

reference typeParameter: kermeta::language::structure::TypeVariable[0..*]
@TypeParameters of the Operation

Operation insertAt

operation insertAt(index : kermeta::standard::Integer, subject : G) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet from current one with element
inserted at rank index

Operation saveAndValidateWithEMF

operation saveAndValidateWithEMF() : kermeta::standard::Boolean

Checks the Resource using the EMF validation function, and saves it if
validation succeeds
Applies validation to all root objects of the Resource
Returns true if the validation reports no error, raises exceptions otherwise

Operation addCompatible

operation addCompatible(objectToAdd : kermeta::language::structure::Object) : kermeta::language::structure::Object

Add the Object if it is copmpatible with the ModelDefinition. Other objects are ignored.
Returns the object if it has been added (One can check that some element have been ignored or not)
return Void if not added
@

Operation at

operation at(index : kermeta::standard::Integer) : G

Returns element at rank index in the sequence
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the Sequence

Operation size

operation size() : kermeta::standard::Integer

Returns the size of this Hashtable

Class CallOnVoidTarget

kermeta::exceptions::CallOnVoidTarget inherits kermeta::exceptions::RuntimeError
Occurs when a feature is called on void @

Operation tearDown

operation tearDown() : Void

the things to be done after execution of the test method
(designed to be overwritten in real TestCase classes)

Class Model

kermeta::language::structure::Model inherits kermeta::language::structure::Object
@Is the holder of a set of model elements (Object) that are compatible with the ModelType that has
instantiated this Model.

Property exceptionName

attribute exceptionName: kermeta::language::structure::String
@Name of the catched exception

Class ClassDefinition

kermeta::language::structure::ClassDefinition inherits kermeta::language::structure::GenericTypeDefinition, kermeta::language::structure::TypeContainer
@The definition of a class definition :)
class A
{
attribute s : String
}
is a class definition; in :

main() : A is do end

A is a Class : it corresponds to the use of the class definition of A

Operation iterator

operation iterator() : kermeta::standard::Iterator<G>

Returns an Iterator on the Collection

Operation union

operation union(elements : kermeta::standard::Collection<G>) : kermeta::standard::Bag<G>

Returns a new Bag corresponding to the union of elements and
current Bag
Attributes

Property name

attribute name: kermeta::language::structure::String
@Name of the lambda parameter

Operation initLog

operation initLog() : kermeta::kunit::Log

called when run by the java testrunner

Property resources

attribute resources: set kermeta::persistence::Resource[0..*]#repository

Resources created by this Repository
This feature is supposed read only, otherwise it cannot garantee that an element is contained by only
one Resource of a given Repository

Operation isOff

operation isOff() : kermeta::standard::Boolean

Returns true if the iterator is on the last element
i.e. returns not self.hasNext()
kunit::Test
Methods
Attributes

Property uri

attribute uri: kermeta::language::structure::String
@Uri of the Package

Operation assert

method assert(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible
Fails if condition is false

Operation select

operation ~select(selector : < G->kermeta::standard::Boolean >) : kermeta::standard::Sequence<G>

Returns a new Sequence composed of elements of the Collection that
validate the selector function
example :
aCollection2 := aCollection.select { e |
\/* put here a condition that returns true for elements that must be included in the resulting Collection *\/
}

Operation forAll

operation forAll(func : < G->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Returns a Boolean stating whether no element of the Collection invalidates
the condition specified by function func
example :
aBoolean := aCollection.forAll { e | \/* put here a condition *\/ } // return true if the condition is true for all elements in the collection.

Class TypeLiteral

kermeta::language::behavior::TypeLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing a Type.
for example, in
Integer.new
Integer is a type literal representing the type kermeta::standard::Integer
structure::Using
Attributes
kermeta::DummyClass

Property harnessErrors

reference harnessErrors: kermeta::kunit::Error[0..*]

list of detected errors with the test harness

Property parameters

attribute parameters: kermeta::language::behavior::LambdaParameter[0..*]
@Parameters of the lambda expression

Property isComposite

attribute isComposite: kermeta::language::structure::Boolean
@Boolean stating whether the Property has a containment role

Operation assertTrue

method assertTrue(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Class ModelTypeVariable

kermeta::language::structure::ModelTypeVariable inherits kermeta::language::structure::TypeVariable
@To be written

Operation split

operation split(delimiter : kermeta::standard::String) : kermeta::standard::Sequence<kermeta::standard::String>

Return of an ordered set of the splitted string
Note that the delimiter is a regular expression (as the split operation in java)

Class Set

kermeta::standard::Set<G> inherits kermeta::standard::Collection<G>

A Set is a non-ordered collection that contains distinct elements
(with regards to the G.equals(Object) operation)
@

Operation asBag

method asBag() : kermeta::standard::Bag<G> from kermeta::standard::Collection

Overrides Collection<G>.asBag()
Returns a new Bag containing all elements of current Bag

Operation addAllCompatible

operation addAllCompatible(objectsToAdd : kermeta::standard::Collection<kermeta::language::structure::Object>) : kermeta::standard::Collection<kermeta::language::structure::Object>

Add all the Object of the collection that are copmpatible with the ModelDefinition. Other objects are ignored.
Returns the list of Object that have been added (One can check that some element have been ignored or not)
@

Property failedWhileSaving

reference failedWhileSaving: kermeta::standard::Object
Object on which the the saved failed
One can rescue the exception and analyse the structure next to this object,
this can give some clue about the faulty structure

Property message

attribute message: kermeta::standard::String

Error message

Operation clone

method clone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object from kermeta::language::structure::Type
@

Property rescueBlock

attribute rescueBlock: kermeta::language::behavior::Rescue[0..*]
@List of rescues defined for the block

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparaison

Operation last

operation last() : G

Returns the last element in the OrderedCollection
Raises an EmptyCollection exception if the OrderedCollection is empty

Property isGetterAbstract

attribute isGetterAbstract: kermeta::language::structure::Boolean
@Boolean stating wether the getter is abstract.

Class UnknownJavaObject

kermeta::standard::UnknownJavaObject inherits kermeta::language::structure::Object

This special object is used to represent java objects that cannot be concretely used with kermeta
the only actions possible on these objects are : assignment and passing them as parameter

@

Property isSetterAbstract

attribute isSetterAbstract: kermeta::language::structure::Boolean
@Boolean stating wether the setter is abstract.

Property getViolatedConstraintsMustDrillDownCache

attribute getViolatedConstraintsMustDrillDownCache: kermeta::language::structure::Boolean
Undocumented

Operation assertFalse

method assertFalse(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is true

Operation assertTrueWithMsg

operation assertTrueWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void

process the given condition and react with the given message
if it is not satisfied

Property _allAttributeCache

reference _allAttributeCache: kermeta::standard::Set<kermeta::language::structure::Property>

Data structure for getCachedAllAttribute

Operation append

operation append(element : G) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet from current one with element
inserted in head

Class Block

kermeta::language::behavior::Block inherits kermeta::language::behavior::Expression
@Block is the model-element representation for the do...end block.

Property danglingElement

reference danglingElement: kermeta::standard::Object

Element that is not contained by a resource in the repository

Operation next

operation next() : G

Returns the next element of the iterator
Raises IteratorIsOff exception in case the iterator is on the last element

Operation including

operation including(object : G) : kermeta::standard::Bag<G>

Returns a new Bag which content includes the content of the
current Bag and the element object

Operation preppend

operation preppend(element : G) : kermeta::standard::OrderedSet<G>

Builds and returns a new OrderedSet from current one with element
inserted in tail

Property thenBody

attribute thenBody: kermeta::language::behavior::Expression[1..1]
@Then part of the conditional statement

Operation any

operation any() : G

Returns an element from the Collection
Raises an EmptyCollection exception if the Collection is empty

Class GenericTypeDefinition

kermeta::language::structure::GenericTypeDefinition inherits kermeta::language::structure::TypeDefinition
@Abstracts the definition of generic type definitions (i.e. type definitions that
can be parameterized), namely, for ClassDefinition and ModelTypeDefinition.

Property useInterpreterInternalResources

attribute useInterpreterInternalResources: kermeta::standard::Boolean

If true, tells to the save of the resources that they should also integrate the resources from Kermeta interpreter itself
this is useful for example to make a dependency to framework.km
by default, not setting this is considered as false.

Operation normalizedUri

operation normalizedUri() : kermeta::standard::String

Return a normalized version of the Uri of this resource
in order to prevent several loading of the same file because they have different path that leads to them, kermeta uses normalizedURI
for some of its functions (eg. repository.getResource )
As EMF needs URI of the form platform:/resource or platform:/plugin, kermeta automatically
normalize the uri when loading or saving. This is especially true for file:/ uri or relative uri (./ or / )
If you wish to know what concrete uri is used by kermeta when loading and saving you can use this function
to check how a given uri is normalized by kermeta

Operation assertTrue

method assertTrue(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible
will fail if condition is false

Operation asBag

operation asBag() : kermeta::standard::Bag<G>

Returns a new Bag built from the Collection

Operation mult

operation mult(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self * other

Property isAspect

attribute isAspect: kermeta::language::structure::Boolean
@

Property invOwner

reference invOwner: kermeta::language::structure::ClassDefinition#~inv
@Owning ClassDefinition if Constraint corresponds to invariant
Methods

Operation number

operation number() : kermeta::standard::Integer

current order position of counter of assertions

Class EmptyExpression

kermeta::language::behavior::EmptyExpression inherits kermeta::language::behavior::Expression
@As suggested by its name, this class represents an expression that do nothing. Like a "nop"

Property ownedParameter

attribute ownedParameter: kermeta::language::structure::Parameter[0..*]#~operation
@Parameters of the Operation

Operation times

operation times(body : < kermeta::standard::Integer->kermeta::standard::Object >) : Void

Iteration

Property jclass

attribute jclass: kermeta::language::structure::String
@Qualified name of the targeted Java class

Property ignoreAllLoadErrors

attribute ignoreAllLoadErrors: kermeta::standard::Boolean

When loading the Resources,
if there are some errors while loading some objects, the loader can try to ignore them
setting this attribute to true is equivalent to setting ignoreLoadErrorUnknownMetaclass and ignoreLoadErrorUnknownProperty to true
by default, not setting this attribute is considered as false.

Property usings

attribute usings: kermeta::language::structure::Using[0..*]
@Set of "using" statement associated with this ModelingUnit. Ie. list of "syntatic shortcut"
that can be used within this unit.

Operation assertTrue

operation assertTrue(condition : kermeta::standard::Boolean) : Void
process the given condition and react if it is not satisfied

Property condition

attribute condition: kermeta::language::behavior::Expression[1..1]
@Condition expression of conditional statement
behavior::StringLiteral
Attributes

Operation assertEqual

method assertEqual(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
Will fail if the two strings are not identical

Class AbstractClassInstantiationError

kermeta::exceptions::AbstractClassInstantiationError inherits kermeta::exceptions::RuntimeError

Creation on an abstract class. Usually this is detected by the type-checker. The only
case where this happens is when instantiating a type variable, whose bound type turns
out to be abstract.
@

Class Repository

kermeta::persistence::Repository inherits kermeta::language::structure::Object

Abstract resource container, that contains a list of available loaded resources,
and methods to create or get a resource given an URI.
A repository cannot contain 2 resources which points to the same file (ie. that have the same normalizedURI)
@

Operation pop

operation pop() : G

Get and remove the element at the top of the stack

Class Summable

kermeta::standard::Summable<G> inherits kermeta::language::structure::Object

The abstract class Summable defines a set of operation
to sum instances of a class.
Sub-classes only has to implement abstract operation plus.
@
utils::Stack
Methods

Operation writeTextFile

operation writeTextFile(filename : kermeta::standard::String, text : kermeta::standard::String) : Void

Writes a String in a text file

Property name

attribute name: kermeta::language::structure::String
@Name of the Tag

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparaison

Operation isVoid

operation isVoid() : kermeta::language::structure::Boolean

Returns a Boolean stating whether the Object is Void
@

Operation checkInvariant

operation checkInvariant(invariant : kermeta::language::structure::Constraint) : Void

Checks a constraint invariant defined for the metaclass of the Object
You can use PropertyConstraint for checking structural constraints associated to a property
@

Property body

attribute body: kermeta::language::behavior::Expression[1..*]
@Body of the rescue block, specified as a KerMeta expression
structure::Tag
Attributes

Operation fail

operation fail(msg : kermeta::standard::String) : Void
to be used if a failure reaction is needed

Operation size

operation size() : kermeta::standard::Integer

returns the number of characters in the current String

Property allOperation

property allOperation: set kermeta::language::structure::Operation[0..*] readonly

Returns all the Operations of this ClassDefinition
including the inherited ones

Class TypeVariableBinding

kermeta::language::structure::TypeVariableBinding inherits kermeta::language::structure::TypeContainer
@Definition of a binding between a TypeVariable and a Type

Class FileIO

kermeta::io::FileIO inherits kermeta::language::structure::Object

Implementation of simple helpers to read ans write text files

@

Operation length

operation length() : kermeta::standard::Integer

Return the length of the StringBuffer
@return length of the StringBuffer

Class OrderedSet

kermeta::standard::OrderedSet<G> inherits kermeta::standard::Set<G>, kermeta::standard::OrderedCollection<G>

An OrderedSet is a Set that contained ordered distinct elements
@

Class ConstraintViolatedException

kermeta::exceptions::ConstraintViolatedException inherits kermeta::exceptions::Exception
Common super class for all ConstraintVioloated exceptions @

Property ownedTypeDefinition

attribute ownedTypeDefinition: kermeta::language::structure::TypeDefinition[0..*]
@Contained TypeDefinitions

Property object

reference object: kermeta::language::structure::Object[1..*]#tag
@Objects to which the Tag is attached to

Operation excluding

operation excluding(object : G) : kermeta::standard::Bag<G>

Returns a new Bag which content includes the content of the
current Bag from which all instances of object have been
removed

Property _allSuperTypesCache

reference _allSuperTypesCache: kermeta::standard::Set<kermeta::language::structure::Type>

Data structure for getCachedAllSuperTypes

Class Test

kermeta::kunit::Test inherits kermeta::language::structure::Object

The abstact notion of a test which is runnable and which has a log
in which it can keep note of failures
@

Class Sequence

kermeta::standard::Sequence<G> inherits kermeta::standard::Bag<G>, kermeta::standard::OrderedCollection<G>

A Sequence is an OrderedCollection of elements allowing duplicates
@

Operation addAt

operation addAt(index : kermeta::standard::Integer, element : G) : Void

Adds element in the OrderedCollection at rank index
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedCollection
structure::NamedElement
Methods
Attributes

Class DataType

kermeta::language::structure::DataType inherits kermeta::language::structure::Type, kermeta::language::structure::TypeDefinition
@Special type definition for Enumeration, PrimitiveType

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Returns 'true' or 'false', depending on self value

Class DummyClass

kermeta::DummyClass inherits kermeta::language::structure::Object
@This class is used to workaround an EMF bug, it doesn't really belong to Kermeta metamodel

Operation remove

method remove(instance : kermeta::standard::Object) : Void from kermeta::standard::Set

Overrides Set<Object>.remove(Object)
Remove the instance from the Resource

Property target

attribute target: kermeta::language::behavior::Expression
@Target Expression (the owner of the feature)

Operation indexedEach

operation indexedEach(func : < [G, kermeta::standard::EachContext]->kermeta::standard::Object >) : Void

Runs function func on each element of the Collection
the eachContext contains some information about the each process that can be used in the function,
for example the index represents the rank in the collection, start on 0
or boolean to indicates weither we are processing the first and/or the last element of the collection
note that this rank is relative to the processing order. this processing order is ensured only for sequence and ordered set

example :
aCollection.indexedEach { e, eachContext | \/* do something with each element e of this collection *\/ }

Property excludeFilters

attribute excludeFilters: kermeta::language::structure::Filter[0..*]
@list of filters that apply to this modeling unit.
This means that if the same unit was loaded without this filters, it would have loaded more content
element whose qualified name begins with one of these filter will NOT be loaded in the unit

Property staticEnumLiteral

reference staticEnumLiteral: kermeta::language::structure::EnumerationLiteral
@To be written

Operation qualifiedName

operation qualifiedName() : kermeta::language::structure::String

Returns the qualified name of this named element. Qualified name is
the list of the names of the packages hierarchically ordered, delimited by
a "::", followed by the name of this named element.

Property typeParamBinding

attribute typeParamBinding: kermeta::language::structure::TypeVariableBinding[0..*]
@To be written
standard::ValueType

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

overwrites the default method for more informative output

Class JavaStaticCall

kermeta::language::behavior::JavaStaticCall inherits kermeta::language::behavior::Expression
@This class represent a call to an extern Java operation.
This Java operation must be static and have at least one RuntimeO

Operation concatenate

operation concatenate(less : kermeta::standard::Sequence<G>, pivot : kermeta::standard::Sequence<G>, greater : kermeta::standard::Sequence<G>) : kermeta::standard::Sequence<G>

Returns a sequence of the bag elements sorted using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Recursive sort of the given sequence using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Internal concatenation tool for recursive 'quickSort()' method
behavior::IntegerLiteral
Attributes

Operation clean

operation clean() : kermeta::standard::Void
Undocumented

Operation toInteger

operation toInteger() : kermeta::standard::Integer

Convert self as an Integer

Operation getValue

operation getValue(key : K) : V

Returns the value for key 'key' if it exists, otherwise returns Void

Operation equals

operation equals(element : kermeta::language::structure::Object) : kermeta::language::structure::Boolean

semantic equality,
if you wish to test for object identity you need to use the method oid
ex: x.oid == y.oid
by default, (ie. if not overloaded), the equals method for class Object implements
the most discriminating possible equivalence relation on objects; that is, for any non-null
reference values x and y, this method returns true if and only if x and y refer to the same
object (x.oid == y.oid has the value true).

note1: the operator == is mapped to this
note2: overloading this operation have some impact on the behavior on collection and hashtable that rely on it
@

Package kunit

kermeta::kunit

Contains the implementation of a unit test tool. This is a clone of
JUnit architecture.
Reference : http://junit.sourceforge.net/doc/cookstour/cookstour.htm

Usage example of kunit can be found in fr.irisa.triskell.kermeta.samples project.



main features of the famous Unit test tool for Kermeta language

Operation add

method add(element : G) : Void from kermeta::standard::Set

Overrides kermeta::standard::Set<G>.add(G)
Add an element to this collection and update its opposite property if it exists.

Operation new

operation new() : kermeta::language::structure::Model

To be written ##########################################
@
structure::Filter
Attributes

Property getterBody

attribute getterBody: kermeta::language::behavior::Expression
@To be written

Class BooleanLiteral

kermeta::language::behavior::BooleanLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing a Boolean value, typically : true or false keyword

Operation fail

method fail(msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
raise a AssertionViolatedException with the provided message

Operation raiseIfHasFailures

operation raiseIfHasFailures() : Void

operation used when the TestCase is run from a java test runner, encapsulates the failures results
into an AssertionFailedError so the TestRunner can detect it

Property referencingElement

reference referencingElement: kermeta::standard::Object

Element that has a reference to the dangling element

Operation toReal

operation toReal() : kermeta::standard::Real

Convert self as a Real

Operation push

operation push(element : G) : Void

Pushes an element into the stack

Operation initialize

operation initialize(i : kermeta::standard::Integer, first : kermeta::standard::Boolean, last : kermeta::standard::Boolean) : kermeta::standard::EachContext
Undocumented

Property isOrdered

attribute isOrdered: kermeta::language::structure::Boolean
@Boolean stating whether the element is ordered

Operation minus

operation minus(other : kermeta::standard::Integer) : kermeta::standard::Integer

returns self - other

Operation error

operation error(object : kermeta::standard::String) : Void

Writes the object to error output

Operation filter

operation filter(typeName : kermeta::language::structure::Type) : kermeta::standard::Set<kermeta::language::structure::Object>

Returns a set of all the elements of the model that are instance of the given Type
@

Alias UnlimitedNatural

kermeta::standard::UnlimitedNatural

Unlimited natural is used for reflection.
It is mapped to integer.equals().
Any negative number is interpreted as '*'
@

Property body

attribute body: kermeta::language::behavior::Expression
@Body of the Operation, expressed as a KerMeta expression

Class CallSuperOperation

kermeta::language::behavior::CallSuperOperation inherits kermeta::language::behavior::CallExpression
@This class represents a call to the operataion in the parent class
In the following example, the type of super(element) is CallSuperOperation:

class ParentClass {
operation op(element : Integer) : Integer is do
result := element + 1
end
}

class ChildClass {
method op(element : Integer) : Integer is do
result := super(element)
end
}

Operation createResource

operation createResource(uri : kermeta::standard::String, mm_uri : kermeta::standard::String) : kermeta::persistence::Resource

Creates a new Resource with given uri, and an optional mm_uri
mm_uri is required when creating a new model from scratch.
Raises a ResourceCreate exception in case the Repository already
contains a Resource with the given uri
If uri does not points to an existing model file (in the case of
a model creation), calls to load() operation will fail as long as
the model has not been saved once

Operation preppend

operation preppend(element : G) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence from current one with element
inserted in tail

Class Property

kermeta::language::structure::Property inherits kermeta::language::structure::MultiplicityElement
@Class representing the property definition. Kermeta<->Ecore equivalence:
- Property with isComposite == true or with type is a base type (String, Integer, Boolean) : EAttribute
- Property with isComposite == false : EReference

Operation remove

method remove(element : G) : Void from kermeta::language::ReflectiveCollection

Overrides kermeta::language::ReflectiveCollection<G>.remove(G)

Operation newAttempt

operation newAttempt() : Void

Increments the runtests counter

Property log

reference log: kermeta::kunit::Log

where failures and errors will be put

Property statement

attribute statement: kermeta::language::behavior::Expression[0..*]
@List of statements composing the block

Operation unset

operation unset(~property : kermeta::language::structure::Property) : Void

Remove the element set as the ~property of the object.
The isSet(~property) method will then return False
@

Property upper

attribute upper: kermeta::language::structure::UnlimitedNatural
@Max cardinality of the element, '-1' for '*'

Class StringIndexOutOfBound

kermeta::exceptions::StringIndexOutOfBound inherits kermeta::exceptions::Exception
the data overstep the size of the string variable @

Operation keyIterator

operation keyIterator() : kermeta::standard::Iterator<K>

Returns an iterator over the Keys of this Hashtable

Package utils

kermeta::utils

Contains special classes (Hashtable, Stack) that are not contained in Kermeta
metamodel

Contains special classes (Hashtable, Stack) that are not contained in Kermeta
metamodel


behavior::Assignment
Attributes

Property qualifiedName

attribute qualifiedName: kermeta::language::structure::String
@To be written

Property ignoreLoadErrorUnknownMetaclass

attribute ignoreLoadErrorUnknownMetaclass: kermeta::standard::Boolean

When loading the Resources,
if there are some errors due to an unknown metaclass while loading some objects, the loader try to ignore them
by default, not setting this attribute is considered as false.

Class InvalidTestCaseNameException

kermeta::kunit::InvalidTestCaseNameException inherits kermeta::exceptions::Exception

This exception is rose if there is a problem on the name of the test method
@

Class StringLiteral

kermeta::language::behavior::StringLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing a String value, typically : "my string"

Class EFeatureMapEntry

kermeta::ecore::EFeatureMapEntry inherits kermeta::language::structure::Object

Kermeta representation of EMF EFeatureMapEntry
it contains the name of the required feature and the actual value

@

Class Stack

kermeta::utils::Stack<G> inherits kermeta::standard::Sequence<G>

An implementation of stack

@

Property expression

attribute expression: kermeta::language::behavior::Expression[1..1]
@To be written #######################

Property referencingProperty

reference referencingProperty: kermeta::language::structure::Property

Property used to reference the dangling element

Operation peek

operation peek() : G

Gets the element at the top of the stack

Alias Boolean

kermeta::language::structure::Boolean
@

Operation clone

operation clone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object

Returns a copy of passed Object built by recursively copying attribute
properties, and referencing original reference properties values
@

Property failures

reference failures: kermeta::kunit::Failure[0..*]

list of detected assertion failures

Class Tag

kermeta::language::structure::Tag inherits kermeta::language::structure::Object
@Tag is intended to be used to add documentation on a model element,
or add some textual information that cannot be expressed with any
model element definition.

Class VirtualType

kermeta::language::structure::VirtualType inherits kermeta::language::structure::ObjectTypeVariable
@To be written

Operation at

operation at(index : kermeta::standard::Integer) : G

Returns element at rank index in the sequence
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedSet

Operation errorln

operation errorln(object : kermeta::standard::String) : Void

Writeln the object to error output

Operation asSet

method asSet() : kermeta::standard::Set<G> from kermeta::standard::Collection

Overrides Collection<G>.asSet()
Returns a new Set containing elements of the Bag without duplicates

Operation plus

method plus(other : kermeta::standard::String) : kermeta::standard::String from kermeta::standard::Summable

returns a new string self + other

Operation minus

operation minus(other : kermeta::standard::Real) : kermeta::standard::Real

returns self - other

Property name

attribute name: kermeta::language::structure::String[1..1]
@Name of this named element

Property body

attribute body: kermeta::language::behavior::Expression[1..1]
@Body of the constraint, expressed as a KerMeta expression

Property stopOnFailure

attribute stopOnFailure: kermeta::standard::Boolean

Set this attribute to false if you wish your test to not stop if the assert fails.
note : if set to false, the count of failures/errors may be bigger that the number of executed test operations

Operation clear

method clear() : Void from kermeta::language::ReflectiveCollection

Overrides kermeta::language::ReflectiveCollection<G>.clear()

Property isID

attribute isID: kermeta::language::structure::Boolean
@Boolean stating whether the property allows to identify its containing Object

Package interpreter

kermeta::interpreter

Contains a set of classes whose function is to evaluate a kermeta
expression written as a string.

Operation containsKey

operation containsKey(key : K) : kermeta::standard::Boolean

Returns a Boolean stating whether a key is present or not in this Hashtable

Operation removeFromOid

operation removeFromOid(elementOid : kermeta::standard::Integer) : Void

Removes the element identified by the provided Oid from the Bag

Operation assertWithMsg

operation assertWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void

process the given condition and react with the given message
if it is not satisfied

Class ConstraintsDiagnostic

kermeta::exceptions::ConstraintsDiagnostic inherits kermeta::language::structure::Object
@

Class LambdaExpression

kermeta::language::behavior::LambdaExpression inherits kermeta::language::behavior::Expression
@Refers to lambda expression definition (function { e | stdio.writeln(e.toString) })

Class Loop

kermeta::language::behavior::Loop inherits kermeta::language::behavior::Expression
@Loop refers to from var x : X init a until booleanCondition loop ... end
xmltype::QName

Operation first

operation first() : G

Returns the first element in the OrderedCollection
Raises an EmptyCollection exception if the OrderedCollection is empty
interpreter::ParseError

Operation writeTextFileWithEncoding

operation writeTextFileWithEncoding(filename : kermeta::standard::String, text : kermeta::standard::String, encoding : kermeta::standard::String) : Void

Writes a String in a text file by using a specific encoding

Operation toLowerCase

operation toLowerCase() : kermeta::standard::String

Return the current string in lower case

Class String

kermeta::standard::String inherits kermeta::standard::ValueType, kermeta::standard::Comparable, kermeta::standard::Summable<kermeta::standard::String>

The class String
@

Class NamedElement

kermeta::language::structure::NamedElement inherits kermeta::language::structure::Object
@Any element that contain a name (example : Operation, Property) inherit this
class.

Class AssertionFailedError

kermeta::kunit::AssertionFailedError inherits kermeta::exceptions::Exception
AssertionViolatedException are raised when assertions are violated @

Operation oid

operation oid() : kermeta::language::structure::Integer

Returns the unique Oid of the Object
@

Operation each

operation each(func : < G->kermeta::standard::Object >) : Void

Runs function func on each element of the Collection
example :
aCollection.each { e | \/* do something with each element e of this collection *\/ }

Property virtualType

attribute virtualType: kermeta::language::structure::VirtualType[0..*]#modelType
@To be written

Class AbstractFallible

kermeta::kunit::AbstractFallible inherits kermeta::language::structure::Object

to be written ############################
@

Class ValueType

kermeta::standard::ValueType inherits kermeta::language::structure::Object

The abstract class ValueType does not contain any feature.
However, any instance of a sub-class of ValueType will be passed by value
instead of by reference for any other objects.
that means that each time you := such object it will call the clone function associated to it (Not implemented yet except for Integer, String and boolean!!!)

@

Class MultiplicityElement

kermeta::language::structure::MultiplicityElement inherits kermeta::language::structure::TypedElement
@ Model elements with a multiplicity [lower..upper] inherit this class

Class RuntimeError

kermeta::exceptions::RuntimeError inherits kermeta::exceptions::Exception
Exception for interpreter exceptions @

Operation sum

operation sum() : G

Sum the element if they are summable (ie implement '+' operator by inheriting of the class Summable)

Property postOwner

reference postOwner: kermeta::language::structure::Operation#~post
@Owning Operation if Constraint corresponds to post-condition

Operation deepClone

operation deepClone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object

Returns a copy of passed Object built by recursively copying values of
all properties, no matter the property kind
@

Class EMFResource

kermeta::persistence::EMFResource inherits kermeta::persistence::Resource
@
Extension of the Resource class definition that is specific to EMF Repository.
User is not supposed to directly create it. Otherwise it will not be correctly initialized
You must To create one
@

Property pre

attribute pre: kermeta::language::structure::Constraint[0..*]#preOwner
@Pre-conditions of the Operation

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

overwrite the default method, in order to add the message
behavior::CallResult

Class Filter

kermeta::language::structure::Filter inherits kermeta::language::structure::Object
@Filter is the class that represent a filter on a ModelingUnit.
the qualifiedName represent the beginning of the matched names

Class Error

kermeta::kunit::Error inherits kermeta::language::structure::Object

Error represents an occurrence of an exception in setUp, tearDown or a test
and is stored in a failure log
@

Operation plus

operation plus(other : G) : G

Summarization method to be implemented by any summable class.
The parameter must have the same type (or one of its subtypes)
than the current object .

Operation concatenate

operation concatenate(less : kermeta::standard::OrderedSet<G>, pivot : kermeta::standard::OrderedSet<G>, greater : kermeta::standard::OrderedSet<G>) : kermeta::standard::OrderedSet<G>

Returns a ordered set of the bag elements sorted using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Recursive sort of the given (ordered) set using the given comparator.
The comparator must return :<ul>
<li>+1 if the second <G> element is greater than the first</li>
<li>0 if the second <G> element equals the first</li>
<li>-1 if the second <G> element is lower than the first</li>

Internal concatenation tool for recursive 'quickSort()' method

Operation isLowerOrEqual

operation isLowerOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self <= other

Property ownedTags

attribute ownedTags: kermeta::language::structure::Tag[0..*]
@An object can contains a Tag.
Be careful, owning a tag doesn't means that the tag applies to the Object
To know which Tags apply to the object use the "tag" reference

Property value

attribute value: kermeta::language::behavior::Expression[1..1]
@Value to be assigned, as a KerMeta expression

Operation run

method run() : kermeta::standard::Void from kermeta::kunit::Test

Run all the tests in the test suite

Property name

attribute name: kermeta::language::structure::String
@A call must be named

Operation assertEqual

method assertEqual(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if the two strings are not identical

Operation elementAt

operation elementAt(index : kermeta::standard::Integer) : G

Returns the element at rank index in the OrderedCollection
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedCollection

Operation isGreater

operation isGreater(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self > other

Package exceptions

kermeta::exceptions

Contains the definition of a Kermeta exception and a few basic exceptions.

structure::Parameter
Attributes

Property identifier

attribute identifier: kermeta::language::structure::String
@Initialization expression for the variable
Default value is void ????

Operation mark

operation mark(message : kermeta::standard::String) : kermeta::standard::Void
Undocumented

Package kermeta

kermeta
@
The root package. See the other packages if you want to browse the classes of Kermeta api.

Class EMFRepository

kermeta::persistence::EMFRepository inherits kermeta::persistence::Repository

Repository that stores and manages resources that come from EMF
@

Operation isModelTypeOf

operation isModelTypeOf(m : kermeta::language::structure::Model) : kermeta::language::structure::Boolean

To be written ##########################################
@

Class IncompatibleTypeError

kermeta::exceptions::IncompatibleTypeError inherits kermeta::exceptions::RuntimeError

Raised by the Object::set operation if the type of the
Object to set has an incompatible type.
@

Operation assertFalse

operation assertFalse(condition : kermeta::standard::Boolean) : Void
process the given condition and react if it is satisfied

Operation contains

operation contains(element : G) : kermeta::standard::Boolean

Returns a Boolean stating whether the Collection contains at least one
instance of element, based on G.equals(elt : Object) definition
Note: for checking whether a physical element is contained by the collection,
make use of G.oid()

Class VoidLiteral

kermeta::language::behavior::VoidLiteral inherits kermeta::language::behavior::Literal
@This class is used to represent the special expression void

Operation containsAll

operation containsAll(elements : kermeta::standard::Collection<G>) : kermeta::standard::Boolean

Returns true if current Collection contains all elements of Collection elements
See Collection<G>.contains(Object)

Operation addTearDownError

operation addTearDownError(test : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : Void

Adds errors which occur during the TearDown phase

Property qualifiedName

attribute qualifiedName: kermeta::language::structure::String
@To be written

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Convert this StringBuffer to String and return its value
@return The string value of this StringBuffer

Property runtests

attribute runtests: kermeta::standard::Integer

number of test that were run

Property isAtpre

attribute isAtpre: kermeta::language::structure::Boolean
@Tells whether this CallVariable represents a call to @pre in a postcondition

Class KermetaError

kermeta::interpreter::KermetaError inherits kermeta::language::structure::Object

Kermeta language error in a code written in Kermeta
@

Operation hasNext

operation hasNext() : kermeta::standard::Boolean

Returns true if the iterator has a next element

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

overwrite the default method, in order to add :
- the type
- the message
- the stack trace

Operation reject

operation reject(rejector : < G->kermeta::standard::Boolean >) : kermeta::standard::Sequence<G>

Returns a new Sequence composed of elements of the Collection that
do not validate the rejector function
example :
aCollection2 := aCollection.reject { e |
\/* put here a condition that returns true for elements that must be exclude in the resulting Collection *\/
}

Operation isInstanceOf

operation isInstanceOf(type : kermeta::language::structure::Type) : kermeta::language::structure::Boolean

Returns a Boolean stating whether the current Object conforms to given Type
This means: is this object an instance of this type, or is it an instance of its subtype
@

Class Assignment

kermeta::language::behavior::Assignment inherits kermeta::language::behavior::Expression
@Assignment is the model-element representation of the assignment statement x := y

Class Literal

kermeta::language::behavior::Literal inherits kermeta::language::behavior::Expression
@Literal refers to String values, Integer values, etc.

Operation remove

operation remove(key : K) : Void

Removes the entry with key equals to 'key'

Operation mult

operation mult(other : kermeta::standard::Real) : kermeta::standard::Real

returns self * other

Operation toString

operation toString() : kermeta::language::structure::String

Implements Object.toString()
Returns a String of form [qn:oid] where 'qn' is the qualified name of
the object type, and oid the unique ID of the object
@

Property initialization

attribute initialization: kermeta::language::behavior::Expression
@Initialization expression for the variable
Default value is void ????

Class ReflectiveCollection

kermeta::language::ReflectiveCollection<G> inherits kermeta::standard::Set<G>

ReflectiveCollection is a special collection that is used to define the type
of attributes that have an upper multiplicity > 1 in a class. It indeed handles
the update of opposite property if such an attribute has got one.
@
behavior::CallValue

Class StringFormatException

kermeta::exceptions::StringFormatException inherits kermeta::exceptions::Exception

to be written #########################################
@

Operation run

operation run() : Void

Execute the test and verify its assertions

Operation checkInvariants

operation checkInvariants() : Void

Runs checking of invariants defined for the metaclass of the Object
Also check the multiplicity of attributes (except derived and transient attributes)
@

Operation freeze

operation freeze() : Void

Freeze the Object
@

Property owningClass

reference owningClass: kermeta::language::structure::ClassDefinition#ownedAttribute
@ClassDefinition that owns the Property

Class Assert

kermeta::kunit::Assert inherits kermeta::kunit::AbstractFallible
@

Class PrimitiveType

kermeta::language::structure::PrimitiveType inherits kermeta::language::structure::DataType, kermeta::language::structure::TypeContainer
@The class definition for kermeta aliases. Above statement defines a primitive
type called MyString, which instanceType is kermeta::standard::String
alias MyString : kermeta::standard::String
. Another example could be: root::apackage::AClass
alias MyClass : root::apackage::AClass
, thus a primitive type may be not a subtype of ValueType (ValueType is a concept from the Kermeta framework).

Operation size

operation size() : kermeta::standard::Integer

Returns the number of elements in the Collection

Operation keys

operation keys() : kermeta::standard::Set<K>

Returns a set containing the hash keys of this Hashtable

Operation getViolatedConstraints

operation getViolatedConstraints() : kermeta::exceptions::ConstraintsDiagnostic

Checks all the invariants for this object and return a complete diagnostic.
This also includes the structural constraints associated to the properties.
@

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Character
and has the same letter value than current object.

Property contents

reference contents: kermeta::language::structure::Object[0..*] readonly
@Contents of this model...

Alias String

kermeta::language::structure::String
@

Property uri

attribute uri: kermeta::standard::String

Uri of the Resource to load

Property message

reference message: kermeta::standard::String

the stored message (given or generated one)
behavior::TypeReference

Property isFirst

attribute isFirst: kermeta::standard::Boolean
Undocumented
exceptions::EmptyCollection

Operation saveWithNewURI

operation saveWithNewURI(new_uri : kermeta::standard::String) : Void

Save a Resource in a file referenced by the new uri.
note: this doesn't change the URI of the resource, it is only saved in another place

Class DynamicExpression

kermeta::interpreter::DynamicExpression inherits kermeta::language::structure::Object

DynamicExpression is a class used to make dynamic calls, i.e dynamic evaluation
of Kermeta statements represented in a string.

An example :
var de : DynamicExpression init DynamicExpression.new
de.initializeDefaults
de.formalParameters.put("a", String)
de.parse("stdio.writeln(a)") // note: to execute a list of statements, you have to surround them with do..end
var params : Hashtable<String, Object> init Hashtable<String, Object>.new
params.put("a", "hello world!")
de.execute(void, params)

@

Class Real

kermeta::standard::Real inherits kermeta::standard::Numeric, kermeta::standard::Summable<kermeta::standard::Real>

class Real
@
behavior::Literal

Property preOwner

reference preOwner: kermeta::language::structure::Operation#~pre
@Owning Operation if Constraint corresponds to pre-condition

Class ResourceSaveException

kermeta::exceptions::ResourceSaveException inherits kermeta::exceptions::Exception
Occurs when Resource saving fails for some reasons @

Class QName

kermeta::xmltype::QName inherits kermeta::standard::String

Kermeta representation of EMF type::QName from XMLType.ecore

@

Operation isGreater

method isGreater(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self > other

Operation indexOf

operation indexOf(str : kermeta::standard::String) : kermeta::standard::Integer

returns the index within this string of the first
occurrence of the specified substring

Operation subSequence

operation subSequence(min : kermeta::standard::Integer, max : kermeta::standard::Integer) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence composed of elements of current sequence
from rank min to rank max (order is respected)
Raises IndexOutOfBound exception if min is negative, max is larger than
the size of the sequence or min is larger than max

Operation removeOne

operation removeOne(element : G) : Void

Removes one instance of element from the Bag

Operation exists

operation exists(func : < G->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Returns a Boolean stating whether at least one element of the Collection
validates the condition specified by function func
example :
aBoolean := aCollection.exists { e | \/* a condition *\/} // returns true if at least one element fulfill the condition.

Operation uminus

operation uminus() : kermeta::standard::Integer

returns -self

Operation initFrom

operation initFrom(error : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : kermeta::kunit::Error

Sets up a new error with failable object and the exception that occurred
by default it will be a test error. Use makeSetUp or makeTearDown to
change its type

Class Integer

kermeta::standard::Integer inherits kermeta::standard::Numeric, kermeta::standard::Summable<kermeta::standard::Integer>

The class Integer
@

Operation isGreaterOrEqual

method isGreaterOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self >= other

Operation isLower

operation isLower(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self < other

Operation toBoolean

operation toBoolean() : kermeta::standard::Boolean

Parses the current string and returns true if the string is "true" and false if the string is "false"
The parsing is not case sensitive and if no boolean value is recognized then a StringFormatException is raised.

Operation addSetUpError

operation addSetUpError(test : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : Void

Adds errors which occur during the SetUp phase
structure::PrimitiveType
Attributes

Operation excludes

operation excludes(element : G) : kermeta::standard::Boolean

Returns true if the Collection does not contain element

Property staticProperty

reference staticProperty: kermeta::language::structure::Property
@The object which will be returned (property case)

Operation isVoid

method isVoid() : kermeta::standard::Boolean from kermeta::language::structure::Object

Return true
structure::TypeDefinition
Attributes

Property superClass

property superClass: set kermeta::language::structure::Class[0..*] readonly
@Returns the Classes of which the ClassDefinition of this Class inherits.

Property isReadOnly

attribute isReadOnly: kermeta::language::structure::Boolean
@Boolean stating whether the Property is read-only

Operation or

operation ~or(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self or other

Operation removeAt

method removeAt(index : kermeta::standard::Integer) : Void from kermeta::standard::OrderedCollection

Overrides kermeta::standard::OrderedSet.removeAt(Integer)

Class Hashtable

kermeta::utils::Hashtable<K, V> inherits kermeta::language::structure::Object

An implementation of hashtable
This implementation is for speed optimisation it cannot be serialized.
If your wish to serialize its content you need to copy its content into a classical ecore structure (attribute or references)

@

Operation prettyPrint

operation prettyPrint() : Void
Undocumented

Property value

attribute value: kermeta::language::structure::String
@The concrete value represented by this literal

Property error

reference error: kermeta::kunit::Fallible

the stored error
exceptions::TypeCastError

Property classDefinition

reference classDefinition: kermeta::language::structure::ClassDefinition[1..1]
@To be written
behavior::CallVariable
Attributes

Operation assert

operation assert(condition : kermeta::standard::Boolean) : Void
process the given condition and react if it is not satisfied

Property superType

reference superType: kermeta::language::structure::Type[0..*]
@Classes from which this ClassDefinition inherits.

Operation setUp

operation setUp() : Void

the things to be done before execution of the test method
(designed to be overwritten in real TestCase classes)

Operation allSuperTypes

operation allSuperTypes() : kermeta::standard::Set<kermeta::language::structure::Type>

Returns all the types directly and indirectly inherited by this ClasDefinition

Property kind

attribute kind: kermeta::kunit::ErrorKind

the nature of the stored error

Property failedConstraint

reference failedConstraint: kermeta::language::structure::Constraint
constraint that has failed

Property parameters

attribute parameters: kermeta::language::behavior::Expression[0..*]
@Parameters of the Java static call provided as KerMeta expressions

Operation isEmpty

operation isEmpty() : kermeta::standard::Boolean

OCL alignment API, does the same as empty
See Collection<G>.empty()

Operation addFailure

operation addFailure(test : kermeta::kunit::Fallible, msg : kermeta::standard::String) : Void

Adds a failed test to the list of failed tests

Operation assertFalseWithMsg

operation assertFalseWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void

process the given condition and react with the given message
if it is satisfied

Operation containingResource

operation containingResource() : kermeta::persistence::Resource

Returns the Resource currently containing (directly or indirectly) the Object
or void if the object belongs to no Resource
@

Class CallExpression

kermeta::language::behavior::CallExpression inherits kermeta::language::behavior::Expression
@Any callable expression inherits this class, e.g :
- variable call
- feature call ( a.b : b is a feature call)

Operation symmetricDifference

operation symmetricDifference(s : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set which contents corresponds to the symmetric
difference between current Set and Set s, ie all elements of
each Set that do not appear in the other one

Operation empty

operation empty() : kermeta::standard::Boolean

Returns a Boolean stating whether the Collection is empty

Alias Object

kermeta::standard::Object
@

Operation isInstance

operation isInstance(element : kermeta::language::structure::Object) : kermeta::language::structure::Boolean

Implements Type.isInstance(Object)
@

Operation getLog

method getLog() : kermeta::kunit::Log from kermeta::kunit::Fallible

accessor on the log

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

user friendly message build with those informations

Property operation

reference operation: kermeta::language::structure::Operation#ownedParameter
@@Owning operation
exceptions::VoidOperandError
structure::Require
Attributes

Package structure

kermeta::language::structure
@
Contains the concrete implementation (including the operation bodies)
of the classes of the kermeta::reflection package.
If you need more documentation, please take a look at the
kermeta::reflection package which is more complete.


Class NotImplementedException

kermeta::exceptions::NotImplementedException inherits kermeta::exceptions::RuntimeError

Use this exception when you want to forbid the access to an unimplemented operation
and invite to implement it
@

Class ConstraintViolatedPost

kermeta::exceptions::ConstraintViolatedPost inherits kermeta::exceptions::ConstraintViolatedException
The post-condition is not satisfied @

Operation assert

method assert(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Operation elementAt

operation elementAt(index : kermeta::standard::Integer) : kermeta::standard::Character

returns the character at index in the String

Class OrderedCollection

kermeta::standard::OrderedCollection<G> inherits kermeta::standard::Collection<G>

An OrderedCollection is the root abstract class for all ordered Collections.
@

Operation hashcode

operation hashcode() : kermeta::language::structure::Integer

code used in hashtable in order to identify an object in the hashtable keys
This system is similar to the hashcode used in java. Please refer to java documentation
for more information about hashcode
@

Operation assertTrueWithMsg

method assertTrueWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
will fail if condition is false

Operation initialize

operation initialize() : kermeta::exceptions::ConstraintsDiagnostic
Undocumented
standard::EachContext
Methods
Attributes

Operation isLowerOrEqual

method isLowerOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::Comparable

return true if self <= other

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Numeric value in string format

Class CallValue

kermeta::language::behavior::CallValue inherits kermeta::language::behavior::CallExpression
@CallValue refers to the use of the value reserved keyword. This keyword is
only used in the body of the setter part of derived properties.

Operation excludesAll

operation excludesAll(elements : kermeta::standard::Collection<G>) : kermeta::standard::Boolean

Returns true if the Collection contains no element of Collection elements

Property eStructuralFeatureName

attribute eStructuralFeatureName: kermeta::standard::String
Undocumented
behavior::SelfExpression

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Returns the String identifier '<void>'

Property containedType

attribute containedType: kermeta::language::structure::Type[0..*]#typeContainer
@Contained types

Property left

reference left: kermeta::language::structure::Type
@Parameters of the function (a ProductType for multiple parameters)
structure::TypeContainer
Attributes

Class Constraint

kermeta::language::structure::Constraint inherits kermeta::language::structure::NamedElement
@Constraint is part of a contract implementation in a Class definition or an operation.
Three kinds of constraints are available : pre, post, and inv (invariant constraint)
structure::TypedElement
Attributes

Operation not

operation ~not() : kermeta::standard::Boolean

return not self

Operation unionWithBag

operation unionWithBag(elements : kermeta::standard::Bag<G>) : kermeta::standard::Bag<G>

Returns a new Bag corresponding to the union of the Bag elements
with the current Set

Operation removeAt

operation removeAt(index : kermeta::standard::Integer) : Void

Removes the element at rank index from the OrderedCollection
Raises IndexOutOfBound exception if provided index is lower than 0 or
larger than the size of the OrderedCollection

Property stackTrace

attribute stackTrace: kermeta::standard::String

The stack trace as a String
Filled by the interpreted when the exception is raised

Property initialization

attribute initialization: kermeta::language::behavior::Expression
@Initialization expression for the loop

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Conversion from Character to String

Class Using

kermeta::language::structure::Using inherits kermeta::language::structure::Object
@To be written
exceptions::IOException

Operation isKindOf

operation isKindOf(cl : kermeta::language::structure::Class) : kermeta::language::structure::Boolean

Returns a Boolean stating whether the current Object is an instance of the given Class

Operation container

operation container() : kermeta::language::structure::Object

Returns the Object that contains current Object, void if the Object has
no container
@

Class Fallible

kermeta::kunit::Fallible inherits kermeta::kunit::AbstractFallible

This is represents the aspect of tests that they may go wrong.
it defines the ability to define the conditions for success
(assertions) and the mechanism for recording that those
conditions have not been met.
@

Property setterBody

attribute setterBody: kermeta::language::behavior::Expression
@To be written

Operation isGreaterOrEqual

operation isGreaterOrEqual(other : kermeta::standard::Object) : kermeta::standard::Boolean

return true if self >= other

Property stopCondition

attribute stopCondition: kermeta::language::behavior::Expression[1..1]
@Stop condition of the loop, is interpreted as a Bollean value

Property isAtpre

attribute isAtpre: kermeta::language::structure::Boolean
@Tells whether this CallFeature represents a call to @pre in a postcondition

Class ConstraintViolatedInv

kermeta::exceptions::ConstraintViolatedInv inherits kermeta::exceptions::ConstraintViolatedException
An invariant isn't satisfied on a given Object @

Package persistence

kermeta::persistence

Contains the classes that handle the serialization of models, in particular
EMF models.

Property name

property name: kermeta::language::structure::String readonly
@Returns the name of the ClassDefinition of this Class

Operation toString

method toString() : kermeta::language::structure::String from kermeta::language::structure::Object

Returns the String representation of this class.
Note : throws an exception if this class has no classDefinition
or if the classDefinition is not well constructed.

Operation asSet

method asSet() : kermeta::standard::Set<G> from kermeta::standard::Collection

Overrides Collection<G>.asSet()
Returns a new Set composed of all elements of current Set

Property exception

reference exception: kermeta::exceptions::Exception

the Kermeta exception corresponding to the error

Operation asOrderedSet

method asOrderedSet() : kermeta::standard::OrderedSet<G> from kermeta::standard::Collection

Overrides Collection<G>.asOrderedSet()
Returns a new OrderedSet containing elements of the Bag without duplicates

Operation replace

operation replace(str1 : kermeta::standard::String, str2 : kermeta::standard::String) : kermeta::standard::String

Replaces all occurences of str1 in the current string by the string str2

Package behavior

kermeta::language::behavior
@

Operation existsCpl

operation existsCpl(f : < [G, G]->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Combinaison of exists on two elements in the collection
=> result := self.exists{x | self.exists {y | f(x,y)}}

Class Expression

kermeta::language::behavior::Expression inherits kermeta::language::structure::TypeContainer
@The base class for every entity used to define a behavior in operation body.

Property isUnique

attribute isUnique: kermeta::language::structure::Boolean
@Boolean stating whether duplicated elements are allowed

Property repository

reference repository: kermeta::persistence::Repository#resources

Repository used to create the Resource
This feature is supposed read only, otherwise it cannot garantee that an element is contained by only
one Resource of a given Repository
exceptions::IndexOutOfBound

Property ownedAttribute

property ownedAttribute: set kermeta::language::structure::Property[0..*] readonly
@Returns the Attributes, References, and derived Properties owned by
the ClassDefinition of this Class.

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Overrides Object.equals(Object)
Returns a Boolean stating whether the provided element is equal to
current OrderedCollection

Class StdIO

kermeta::io::StdIO inherits kermeta::language::structure::Object

An implementation of StdIO : standard input/output

@

Class TypeCastError

kermeta::exceptions::TypeCastError inherits kermeta::exceptions::RuntimeError

Occurs when a cast (Object::asType operation) fails
@
behavior::LambdaParameter
Attributes

Class Exception

kermeta::exceptions::Exception inherits kermeta::language::structure::Object

Generic exceptions
The main class from which all the exception inherit
@

Class Void

kermeta::standard::~Void inherits kermeta::language::structure::Object

The class Void
By convention it is a sub-type of everything
@

Operation clear

method clear() : Void from kermeta::standard::Collection

Overrides kermeta::standard::Collection<G>.clear(G)

Class Package

kermeta::language::structure::Package inherits kermeta::language::structure::NamedElement, kermeta::language::structure::TypeDefinitionContainer
@Package in kermeta. Each kermeta model must have a root package.

Property default

attribute default: kermeta::language::structure::String
@To be written
behavior::Expression
Attributes

Class Rescue

kermeta::language::behavior::Rescue inherits kermeta::language::structure::Object
@Refers to rescue exception block

Operation flatten

operation flatten() : kermeta::standard::Bag<kermeta::standard::Object>

Returns a new Bag which content includes all non-Collection elements
of the current Set, and, for each Collection element of the current
Bag, as many elements as the Collection contains

Property requires

attribute requires: kermeta::language::structure::Require[0..*]
@Set of "require" statements associated with this ModelingUnit. Ie. list of the other
files required to run this unit

Operation read

operation read(prompt : kermeta::standard::String) : kermeta::standard::String

Reads a String from standard input

Class VoidOperandError

kermeta::exceptions::VoidOperandError inherits kermeta::exceptions::Exception
one of the required operands is void @

Operation flatten

operation flatten() : kermeta::standard::Set<kermeta::standard::Object>

Returns a new Set which content includes all non-Collection elements
of the current Set, and, for each Collection element of the current
Set, as many elements as the Collection contains
Duplicates are removed

Class Require

kermeta::language::structure::Require inherits kermeta::language::structure::Object
@To be written

Property ignoreLoadErrorUnknownProperty

attribute ignoreLoadErrorUnknownProperty: kermeta::standard::Boolean

When loading the Resources,
if there are some errors due to an unknown property while loading some objects (ie. the metaclass is known but it cannot retreive
the given reference or attribute in the ClassDefinition, the loader try to ignore them
by default, not setting this attribute is considered as false.

Property formalParameters

reference formalParameters: kermeta::utils::Hashtable<kermeta::standard::String, kermeta::language::structure::Type>

Formal parameters of the expression (bindings between parameters' names and types)

Operation asSequence

method asSequence() : kermeta::standard::Sequence<G> from kermeta::standard::Collection

Overrides Collection<G>.asSequence()
Returns a new Sequence containing all elements of current Bag

Operation getViolatedConstraintsMustDrillDown

operation getViolatedConstraintsMustDrillDown() : kermeta::language::structure::Boolean
@

Property index

attribute index: kermeta::standard::Integer
Undocumented

Property owningClass

reference owningClass: kermeta::language::structure::ClassDefinition#ownedOperation
@ClassDefinition owning the Operation

Operation addAllTestCasesFrom

operation addAllTestCasesFrom(testCaseClass : kermeta::language::structure::Class) : kermeta::kunit::TestSuite

Add to this suite, a set of test cases of type c, one for each
test method in class c. C must be a descendent of TestCase

Operation substring

operation substring(startIndex : kermeta::standard::Integer, endIndex : kermeta::standard::Integer) : kermeta::standard::String

returns a new string that is a substring of this string
takes as parameters : the startIndex and endIndex

Operation xor

operation xor(other : kermeta::standard::Boolean) : kermeta::standard::Boolean

return self xor other

Class Bag

kermeta::standard::Bag<G> inherits kermeta::standard::Collection<G>

Bag is a concrete non-ordered Collection allowing duplicates
@

Operation forAllCpl

operation forAllCpl(f : < [G, G]->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Combinaison of ForAll on two elements in the collection
result := self.forAll{x | self.forAll {y | f(x,y)}}
(where x and y are 2 elements of the Collection)
typical use sample : ownedState.forAll{s1,s2| (s1.name==s2.name)implies(s1==s2)}

Operation makeSetUp

operation makeSetUp() : kermeta::kunit::Error

Changes the type of an error to SetUpError, the best way to use
this method is to call it after the init from line:
var e : Error init Error.new.initFrom(f, e).makeSetUp

Class EachContext

kermeta::standard::EachContext inherits kermeta::language::structure::Object

context used in the indexedEach of Collection
@

Property packages

attribute packages: kermeta::language::structure::Package[0..*]
@root packages contained by this ModelingUnit

Package xmltype

kermeta::xmltype

Contains the definition of a Kermeta classes used for compatibility with XMLType.ecore

Class Character

kermeta::standard::Character inherits kermeta::standard::ValueType, kermeta::standard::Comparable

The class Character
@

Operation set

operation ~set(~property : kermeta::language::structure::Property, element : kermeta::language::structure::Object) : Void

Sets the element to the ~property of the object
@

Property isLast

attribute isLast: kermeta::standard::Boolean
Undocumented

Alias Integer

kermeta::language::structure::Integer
@

Property staticType

reference staticType: kermeta::language::structure::Type
@Type of the Expression (set by type checking)

Operation minus

operation minus(elements : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the difference between the
current Set and the Set elements, ie all elements contained by
the current Set that do not appear in the elements Set

Operation load

method load() : Void from kermeta::persistence::Resource

Overrides Resource.load()
In case the metamodelURI was not previously set, metamodelURI is filled with
the nsuri of the root package of the metamodel used to load the Resource after
a successful load

Property errors

reference errors: kermeta::kunit::Error[0..*]

list of detected test errors

Operation setTestMethodName

operation setTestMethodName(name : kermeta::standard::String) : kermeta::kunit::TestCase

Sets the name of the method from the concrete subclass of
TestCase that should be executed when this TestCase instance
is run as a test.
Throws invalidTestCaseNameException if the given string is not
the name of a method in the test case

Operation deepClone

method deepClone(objectToClone : kermeta::language::structure::Object) : kermeta::language::structure::Object from kermeta::language::structure::Type
@

Class StringBuffer

kermeta::utils::StringBuffer inherits kermeta::language::structure::Object

This class mimic the behavior of the java's StringBuffer class. This enables better performance in long
string concatenation.<br>
Only work on Strings

@

Property staticTypeVariableBindings

reference staticTypeVariableBindings: kermeta::language::structure::Type[0..*]
@To be written

Class ParameterizedType

kermeta::language::structure::ParameterizedType inherits kermeta::language::structure::Type
@Abstraction for Parameterized types, namely, Class and ModelType

Class UpperBoundReachedError

kermeta::exceptions::UpperBoundReachedError inherits kermeta::exceptions::RuntimeError

Use this exception when user tries to add an element to a property which type is collection
which has an upper bound != -1 ( ie *)
@

Operation assertWithMsg

method assertWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Class TypeContainer

kermeta::language::structure::TypeContainer inherits kermeta::language::structure::Object
@Phantom class : EMF reflexive editors need that any element of a metamodel
has a direct or indirect containment relationship with the root model element of
the metamodel. This class resolves this technical requirement.

Operation run

operation run(testCaseClass : kermeta::language::structure::Class) : Void

For backwards compatibility with old kunit, this takes a test case class
and creates the necessary suite, and runs it. DEPRECATED

Operation addAllTestCasesFromAspects

operation addAllTestCasesFromAspects(testCaseClass : kermeta::language::structure::Class, anAspect : kermeta::language::structure::ClassDefinition) : Void

to be written #####################################################

Class TestCase

kermeta::kunit::TestCase inherits kermeta::kunit::Test, kermeta::kunit::Fallible

A test case comprises one or more test methods plus
setUp and tearDown that build and destroy their test harness.
An instance of a subclass of TestCase should have its
testMethodName set to the name of one of its operations
which should be called whe the test is run. You can do this
yourself:

var testCase : TestCase init MyTestCaseClass.new.setTestMethodName("testSomething")

Alternatively if your TestCase Class has many methods whose
name begins with 'test' you can create a set of instaces already
set up with their testMethodName using the addAllTestCasesFrom
operation on TestSuite
@

Property typeContainer

reference typeContainer: kermeta::language::structure::TypeContainer#containedType
@Owning TypeContainer, if any

Property isAbstract

property isAbstract: kermeta::language::structure::Boolean readonly
@Returns a Boolean stating whether ClassDefinition of this Class is abstract.

Operation clear

operation clear() : Void

Removes all elements from the Hashtable

Property propertyConstraint

attribute propertyConstraint: kermeta::language::structure::PropertyConstraint#~property
special constraint that apply to this Property
Used by the getViolatedConstraints

Property superOperation

reference superOperation: kermeta::language::structure::Operation
@Super-operation of the Operation, if any

Property lower

attribute lower: kermeta::language::structure::Integer
@Min cardinality of the element

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Overrides Object.equals(elt : Object)
Returns a Boolean stating whether the provided element is equal to
current Bag

Operation parse

operation parse(expression : kermeta::standard::String) : kermeta::standard::Boolean

Parse the expression as a string
and updates the expression field and errors
Returns true if the expression was parsed sucessfuly

Operation addAll

operation addAll(elements : kermeta::standard::Collection<G>) : Void

Adds all elements from the Collection elements in the current Collection

Property ownedOperation

property ownedOperation: kermeta::language::structure::Operation[0..*] readonly
@Returns the Operations owned by the ClassDefinition of this Class.

Operation clear

operation clear() : Void

Removes all elements from the Collection

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Integer or Real
and has the same numeric value than current object.

Package language

kermeta::language
@
Contains the implementation of Kermeta reflective collections.

Operation initFrom

operation initFrom(fallible : kermeta::kunit::Fallible, msg : kermeta::standard::String) : kermeta::kunit::Failure

initialization of the failure

Class ResourceMixedLevelsException

kermeta::exceptions::ResourceMixedLevelsException inherits kermeta::exceptions::ResourceSaveException
Occurs when Resource saving fails because an object refers to an element which
belongs to the Definition of the currently running program @

Class IntegerLiteral

kermeta::language::behavior::IntegerLiteral inherits kermeta::language::behavior::Literal
@This expression is a literal representing an Integer value

Operation asSequence

operation asSequence() : kermeta::standard::Sequence<G>

Returns a new Sequence built from the Collection

Operation mustStop

operation mustStop() : kermeta::standard::Boolean
Undocumented

Property body

attribute body: kermeta::language::behavior::Expression
@Body of the loop

Operation compareTo

operation compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer

This method should be implemented by any class that inherits
from Comparable.
returns 0 if self = other
returns > 0 if self > other
returns < 0 if self < other

Property value

attribute value: kermeta::language::structure::Object
Undocumented

Property allAttribute

property allAttribute: set kermeta::language::structure::Property[0..*] readonly

Returns all the Attributes, References, derived Properties of this
ClassDefinition including the inherited ones
Attributes

Operation getCachedAllAttribute

operation getCachedAllAttribute() : kermeta::standard::Set<kermeta::language::structure::Property>

returns a cached version of the derived property allAttribute
It is intended to be used to optimize access on the reflexivity,
do not use this cache if you are modifying the ClassDefinition

Operation plus

method plus(other : kermeta::standard::Real) : kermeta::standard::Real from kermeta::standard::Summable

returns self + other

Class Boolean

kermeta::standard::Boolean inherits kermeta::standard::ValueType

The Boolean type
@

Property staticOperation

reference staticOperation: kermeta::language::structure::Operation
@The method which will be executed (operation case)
and the result value passed to the caller

Property tag

reference tag: kermeta::language::structure::Tag[0..*]#object
@An Object can be tagged by a Tag.
They are typically used to put comments/documentation on the object

Property typeParameter

attribute typeParameter: kermeta::language::structure::TypeVariable[0..*]
@Type variables defined for the GenericTypeDefinition
Attributes

Property includedTypeDefinition

reference includedTypeDefinition: kermeta::language::structure::TypeDefinition[0..*]
@To be written

Property typeref

attribute typeref: kermeta::language::behavior::TypeReference[1..1]
@The type refered by this literal

Operation assertSimilar

operation assertSimilar(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void

Log a failure if the two strings are not identical modulo-white-space

Property value

attribute value: kermeta::language::structure::Boolean
@The concrete value represented by this literal

Class Resource

kermeta::persistence::Resource inherits kermeta::standard::Set<kermeta::standard::Object>

The main class that handle a loaded/saved model.
There are a few important things to note for the developer :

- load a Resource : this loads a Collection of instances corresponding to the
objects in the loaded model. If the Collection of instances is empty, than
a ResourceLoadException is raised

- save a Resource : this saves the collection of instances in a new file. This can
be correctly done if and only if the instances saved are conform to the metamodel
linked to this resource (this link does not need to be explicit. It is normally retrieved
through the EMF model -- see Java wrapping "Resource.java").

- add/remove an instance to the Resource : this adds an element in the resource. It cannot
be "simply" added because of the following potential errors :

- The object added is not conform to the metamodel -> Error
- The object was already added in the resource -> Not a real error : we do nothing
- The object to remove does not exist -> redirect to a collection-specific error
- The object to remove is attached to an object in the collection -> "dependency-violation" exception?

@

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparison

Operation values

operation values() : kermeta::standard::Collection<V>

Returns a collection containing the elements of this Hashtable

Class LambdaParameter

kermeta::language::behavior::LambdaParameter inherits kermeta::language::structure::Object
@Refers to parameter definition in lambda expression

Operation evalString

operation evalString(body : kermeta::standard::String, selfObj : kermeta::standard::Object, actualParams : kermeta::utils::Hashtable<kermeta::standard::String, kermeta::standard::Object>) : kermeta::standard::Object

Execute the expression given as a string.
the self type and formal parameters are supposed to be set
before calling this operation

Property dependentResources

property dependentResources: set kermeta::persistence::Resource[0..*] readonly

Returns the set of Resources the current Resource, which must have been loaded,
depends on, an empty set if current Resource has no dependency

Operation isInstanceOf

method isInstanceOf(type : kermeta::language::structure::Type) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true

Operation add

operation add(element : G) : Void

Adds an element in the Collection (default implementation)
structure::TypeVariable
Attributes

Property elseBody

attribute elseBody: kermeta::language::behavior::Expression
@Optional else part of the conditional statement

Property rank

attribute rank: kermeta::standard::Integer

counter of assertions in the test method
behavior::Block
Attributes

Property typeDefinition

reference typeDefinition: kermeta::language::structure::GenericTypeDefinition[1..1]
@Definition of the Type

Class TypeReference

kermeta::language::behavior::TypeReference inherits kermeta::language::structure::MultiplicityElement
@TypeReference refers to the type used in a variable declaration

Operation toInteger

operation toInteger() : kermeta::standard::Integer

Parses the current string into an integer.
if no integer value is recognized then a StringFormatException is raised.

Property selfClass

reference selfClass: kermeta::language::structure::ClassDefinition

The type of the self object
or void if the expression is not to be executed
in the context of an object

Property type

reference type: seq kermeta::language::structure::Type[0..*]
@Types

Property target

attribute target: kermeta::language::behavior::CallExpression[1..1]
@Target of the assignment, as a CallExpression

Class FileNotFoundException

kermeta::exceptions::FileNotFoundException inherits kermeta::exceptions::IOException
the file has not be found on the underlying system @

Property ownedAttribute

attribute ownedAttribute: kermeta::language::structure::Property[0..*]#owningClass
@Attributes, References, and derived Properties owned by this ClassDefinition.

Operation append

operation append(other : kermeta::standard::String) : Void

Appends other at the end of self
A more efficient method is kermeta::utils::StringBuffer::append(other)

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is String
and has the same string value than current object.

Operation equals

method equals(other : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::language::structure::Object

Returns true if other type is Integer or Real
and has the same numeric value than current object.

Operation intersectionWithSet

operation intersectionWithSet(elements : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the intersection of a Set of
elements and the Bag
structure::ProductType
Attributes
behavior::EmptyExpression

Operation asBag

method asBag() : kermeta::standard::Bag<G> from kermeta::standard::Collection

Overrides Collection<G>.asBag()
Returns a new Bag composed of all elements of current Set

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::OrderedCollection

See OrderedCollection<G>.equals(Object)

Operation assertFalseWithMsg

method assertFalseWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
will fail if condition is true

Class ReflectiveSequence

kermeta::language::ReflectiveSequence<G> inherits kermeta::standard::OrderedSet<G>, kermeta::language::ReflectiveCollection<G>

ReflectiveSequence is an ordered ReflectiveCollection.
@

Property setConstraints

attribute setConstraints: kermeta::standard::Bag<kermeta::exceptions::ConstraintViolatedInv>
Undocumented

Property includeFilters

attribute includeFilters: kermeta::language::structure::Filter[0..*]
@list of filters that apply to this modeling unit.
This means that if the same unit was loaded without this filters, it would have loaded more content
only element whose qualified name begins with one of these filter will be loaded in the unit

Operation registerEcoreFile

operation registerEcoreFile(mm_uri : kermeta::standard::String) : Void

Register the content of the given ecore file into EMF registry
Once registered, EMF will be able to load and save models conformant to this ecore file
Warning: if the NSURI you wish to register is already, registered (either statically or due to a previous call)
it will do nothing. Ie. modification in the ecore file will not be taken into account unless you manually unregister it.

Operation count

operation count(element : G) : kermeta::standard::Integer

Returns the number of instances of element in the Collection

Operation initializeDefaults

operation initializeDefaults() : kermeta::standard::Void

Initializes the formalParameters with an empty set of parameters
and the self type with void

Property __testMethodName

attribute __testMethodName: kermeta::standard::String

the name of the method which corresponds to the test case in the test class

Operation assertEqual

operation assertEqual(expected : kermeta::standard::String, actual : kermeta::standard::String) : Void
process the two given string and react if they are not equal
interpreter::TypeError
standard::Summable
Methods

Operation plus

method plus(other : kermeta::standard::Integer) : kermeta::standard::Integer from kermeta::standard::Summable

returns self + other

Operation equals

method equals(element : kermeta::standard::Object) : kermeta::standard::Boolean from kermeta::standard::OrderedSet

Overrides kermeta::standard::OrderedSet.equals(Object)

Class ParseError

kermeta::interpreter::ParseError inherits kermeta::interpreter::KermetaError

Kermeta error for parsing problems
@

Property classDefinition

property classDefinition: kermeta::language::structure::ClassDefinition readonly

Returns the ClassDefinition for this class
structure::Enumeration
Methods
Attributes

Property uri

attribute uri: kermeta::language::structure::String
@To be written
standard::Numeric

Property enumeration

reference enumeration: kermeta::language::structure::Enumeration#ownedLiteral
@@Owning Enumeration

Operation asSequence

method asSequence() : kermeta::standard::Sequence<G> from kermeta::standard::Collection

Overrides Collection<G>.asSequence()
Returns a new Sequence composed of all elements of current Set

Operation isUnique

operation isUnique<T>(collector : < G->T >) : kermeta::standard::Boolean

Returns a Boolean stating whether the the collector function evaluates to a
different value for each element of the Collection
example :
aCollection2 := aCollection.isUnique { e | \/* put here an expression that must be unique for all elements, for example e.name *\/ }

Operation remove

method remove(element : G) : Void from kermeta::standard::Collection

Overrides Collection<G>.remove(G)
Removes the element from the Set if it is contained by the Set

Operation toReal

operation toReal() : kermeta::standard::Real

Parses the current string into a real.
if no real value is recognized then a StringFormatException is raised.

Class VariableDecl

kermeta::language::behavior::VariableDecl inherits kermeta::language::behavior::Expression
@refers to variable declaration var x : X init a

Operation insertAt

operation insertAt(index : kermeta::standard::Integer, element : G) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence from current one with element
inserted at rank index

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

Returns numeric value in string format

Class InvalidParameterException

kermeta::kunit::InvalidParameterException inherits kermeta::exceptions::Exception

This is for when we try to build a suite from a class that isn't a TestCase
@

Property expression

attribute expression: kermeta::language::behavior::Expression
The code that raised the exception
structure::DataType

Operation findDanglingModelElements

operation findDanglingModelElements() : kermeta::standard::Set<kermeta::persistence::DanglingDiagnostic>

Search for elements referenced by one element contained by this resource that are not contained by this repository
ie. element that EMF would claim as "not contained in a resource"
checks only objects directly referenced by the element in this resource, ignores indirectly referenced objects
example of use :
var report : Set<DanglingDiagnostic>
report := resource.findDanglingModelElements()
report.each{ diag | stdio.writeln(diag.toString ) }

Property type

reference type: kermeta::language::structure::Type[1..1]
@Assigned Type

Class Collection

kermeta::standard::Collection<G> inherits kermeta::language::structure::Object

Collection is the root abstract class for all kermeta collections
@
exceptions::DivisionByZero

Property isAbstract

attribute isAbstract: kermeta::language::structure::Boolean
@Boolean stating whether the ClassDefinition is abstract (which means that
no instance can be allocated)

Property inv

attribute inv: kermeta::language::structure::Constraint[0..*]#invOwner
@Invariants defined for this ClassDefinition

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

returns the string itself

Operation isSet

operation isSet(~property : kermeta::language::structure::Property) : kermeta::language::structure::Boolean

True if the ~property of the object has been set
@

Operation compareTo

method compareTo(other : kermeta::standard::Object) : kermeta::standard::Integer from kermeta::standard::Comparable

Comparison

Operation div

operation div(other : kermeta::standard::Real) : kermeta::standard::Real

returns self / other

Operation collect

operation collect<T>(collector : < G->T >) : kermeta::standard::Sequence<T>

Returns a new Sequence which content corresponds to the result
of running the collector function for each element of the Collection
The new collection size is the same as in the original collection, and which element types is the type of the result of the expression.
example :
aCollection2 := aCollection.collect { e | \/* put here an expression, for example e.name *\/ }

Operation detect

operation detect(detector : < G->kermeta::standard::Boolean >) : G

Returns an element of the Collection (usually the first) for which the detector function
is not false
Returns void if no elements is validated by the detector function
example :
anObject := aCollection.detect { e | \/* a condition *\/} // returns an element that fulfill the condition.

Class Parameter

kermeta::language::structure::Parameter inherits kermeta::language::structure::MultiplicityElement
@Definition for operation parameter

Class ResourceCreateException

kermeta::exceptions::ResourceCreateException inherits kermeta::exceptions::Exception
Occurs when trying to crate a Resource already existing in the Repository @

Operation asSet

operation asSet() : kermeta::standard::Set<G>

Returns a new Set built from the Collection
behavior::BooleanLiteral
Attributes

Property variable

reference variable: kermeta::language::structure::TypeVariable[1..1]
@TypeVariable

Property exceptionType

attribute exceptionType: kermeta::language::behavior::TypeReference[1..1]
@Type of the cathed exception

Property ownedOperation

attribute ownedOperation: kermeta::language::structure::Operation[0..*]#owningClass
@Operations owned by this ClassDefinition.

Property stereotype

attribute stereotype: kermeta::language::structure::ConstraintType
@Type of the Constraint (precond/postcond/inv)

Property expression

reference expression: kermeta::language::behavior::Expression

the expression

Class TypeVariable

kermeta::language::structure::TypeVariable inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::Type, kermeta::language::structure::NamedElement
@Definition of a type variable for generic types :
in class definition
class AClass<X,Y> {}
, X and Y are type variables.

Property jmethod

attribute jmethod: kermeta::language::structure::String
@Name of the Java method to be launched in the identified Java class
behavior::TypeLiteral
Attributes

Class TestSuite

kermeta::kunit::TestSuite inherits kermeta::kunit::Test

A TestSuite is a structured collection of tests, using the
composite pattern, all tests are runnable and have a log
In addition a suite can be populated automatically from a
test case class with one test case object for each test
method in the class.
You can make a suite and populate it manually like this:

var suite : TestSuite init TestSuite.new.
suite.tests.add(t1)

Alternatively you can populate a suite automatically from
a class that inherits TestCase and which has several methods
called test:

var suite : TestSuite init TestSuite.new.addAllTestCasesFrom(InterestingTestCaseSet)
@

Package standard

kermeta::standard

Defines value types


Defines Collection types


Contains types dedicated to dealing with java objects

Property isAbstract

attribute isAbstract: kermeta::language::structure::Boolean
@Boolean stating whether the Operation is abstract
exceptions::OverflowError

Class Raise

kermeta::language::behavior::Raise inherits kermeta::language::behavior::Expression
@Refers to raise exception block

Operation fail

method fail(msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure
structure::VoidType

Class Operation

kermeta::language::structure::Operation inherits kermeta::language::structure::MultiplicityElement
@Every one knows what an operation is.

Property nestedPackage

attribute nestedPackage: kermeta::language::structure::Package[0..*]#nestingPackage
@Nested Packages contained by the Package

Property isReadOnly

attribute isReadOnly: kermeta::standard::Boolean

Indicates weither this resource will be updated when saving the repository
This is useful if the repository contains some metamodels that should not be saved.

Note that in the current version, it doesn't ensure that you have not modified its content (using the freeze)
If you modify the elements of such resource, other resource that depend on it will be incorrectly saved

Class Iterator

kermeta::standard::Iterator<G> inherits kermeta::language::structure::Object

Iterator to be used with Collection
See also Collection<G>.getIterator()
@

Alias UnlimitedNatural

kermeta::language::structure::UnlimitedNatural
@

Class CallResult

kermeta::language::behavior::CallResult inherits kermeta::language::behavior::CallVariable
@This class represents a call to the special internal variable "result" that is used to store the return value of any operation

Operation checkAllInvariants

operation checkAllInvariants() : Void

Recursively runs checking of invariants defined for the metaclass of the Object
and its supertypes
Ignores derived attributes.
@

Operation save

operation save() : Void

Save a Resource in the file specified by the current value of uri

Operation saveWithNewURI

method saveWithNewURI(new_uri : kermeta::standard::String) : Void from kermeta::persistence::Resource

Overrides Resource.saveWithNewURI(String)

Operation isFrozen

operation isFrozen() : kermeta::language::structure::Boolean

Returns a Boolean stating whether the Object is currently in a
frozen state
@

Class ProductType

kermeta::language::structure::ProductType inherits kermeta::language::structure::TypeContainer, kermeta::language::structure::Type
@Type corresponding to a set of Types
Only used in the context of FunctionType
structure::FunctionType
Attributes

Class TypeDefinitionContainer

kermeta::language::structure::TypeDefinitionContainer inherits kermeta::language::structure::NamedElement
@Abstraction of the notion of containment for type definitions. Now, kermeta metamodel contains one container
element, that is Package. In a later release, ModelTypeDefinition will be the main container for type and
package definition.

Property nestingPackage

reference nestingPackage: kermeta::language::structure::Package#nestedPackage
@@Owning Package, if any

Operation toString

method toString() : kermeta::standard::String from kermeta::language::structure::Object

NOT IMPLEMENTED

Operation assertTrueWithMsg

method assertTrueWithMsg(condition : kermeta::standard::Boolean, message : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible

Log a failure if condition is false

Class Type

kermeta::language::structure::Type inherits kermeta::language::structure::Object
@Alias to kermeta::standard::IntegerBase class definition for the use of a type.

Class Class

kermeta::language::structure::Class inherits kermeta::language::structure::ParameterizedType
@Returns the Attributes, References, and derived Properties owned by
the ClassDefinition of this Class.

Class ConstraintViolatedPre

kermeta::exceptions::ConstraintViolatedPre inherits kermeta::exceptions::ConstraintViolatedException
The pre-condition is not satisfied @

Operation makeTearDown

operation makeTearDown() : kermeta::kunit::Error

Changes the type of an error to makeTearDownError, the best way to use
this method is to call it after the init from line:
var e : Error init Error.new.initFrom(f, e).makeTearDown

Operation getResource

operation getResource(uri : kermeta::standard::String) : kermeta::persistence::Resource

Returns the Resource associated with the given uri if this uri is associated with
an already created Resource of the Repository.
If the Repository contains no Resource associated with the given uri, creates
a new Resource and loads it.
In order to prevent multiple load of the same file by using variant path to the same file, all URI used by this function are normalized
Raises a ResourceCreate exception if the given uri does not point to an existing
model file
May also raises loading exceptions if this is the first retrieval of the resource

Class TypeError

kermeta::interpreter::TypeError inherits kermeta::interpreter::KermetaError

Type errors in a code written in Kermeta
@
behavior::Raise
Attributes

Operation assertWithMsg

method assertWithMsg(condition : kermeta::standard::Boolean, msg : kermeta::standard::String) : Void from kermeta::kunit::AbstractFallible
will fail if condition is false

Class EmptyCollection

kermeta::exceptions::EmptyCollection inherits kermeta::exceptions::Exception
Occurs when trying to access element on an empty collection @

Operation add

method add(element : G) : Void from kermeta::standard::Collection

Overrides Collection<G>.add(G)
Adds elt to the Set if it is not already contained by the
Set, does nothing otherwise

Operation setLog

operation setLog(log : kermeta::kunit::Log) : Void

Initializes the log where failures and errors will be put
language::DummyClass
standard::Iterator
Methods

Class ResourceUnconformityException

kermeta::exceptions::ResourceUnconformityException inherits kermeta::exceptions::Exception
Raised when user tries to add an object that is not conform to the metamodel @

Property constraintAppliedTo

reference constraintAppliedTo: kermeta::standard::Object
Object on which the constraint was applied to
On Invariant, we can generally consider this object as the faulty Object

Operation addAt

method addAt(index : kermeta::standard::Integer, element : G) : Void from kermeta::standard::OrderedCollection

Overrides OrderedCollection<G>.addAt(Integer, G)
Adds element in the OrderedSet at rank index if the ordered set does
not already contain the element, does nothing otherwise

Operation asType

operation asType(type : kermeta::language::structure::Class) : kermeta::language::structure::Object

Implementation of OCL like cast. It returns self if the object object conforms to the type given as parameter.
@

Class Enumeration

kermeta::language::structure::Enumeration inherits kermeta::language::structure::DataType
@Definition for Enumeration

Operation intersection

operation intersection(elements : kermeta::standard::Bag<G>) : kermeta::standard::Bag<G>

Returns a new Bag corresponding to the intersection of elements
and the Bag

Operation orElse

operation orElse(right : < Void->kermeta::standard::Boolean >) : kermeta::standard::Boolean

Short-circuit version of OR. This means that the function passed in parameter will be evaluated only if self is false
Note: we don't have a dedicated operator in the syntax for it yet so here is an example of use :
self.orElse{v | functionThatReturnABoolean() }

Property instanceType

reference instanceType: kermeta::language::structure::Type
@The type the primitive type is linked with

Operation createResource

method createResource(uri : kermeta::standard::String, mm_uri : kermeta::standard::String) : kermeta::persistence::Resource from kermeta::persistence::Repository

Overrides Repository.createResource(String, String)
Create a new resource for a model given by its uri,
which meta-model is stored in file given by mm_uri
If file already exists, you'll be able to call the load method to concretly load the model
otherwise, you can only call the save method

Class Numeric

kermeta::standard::Numeric inherits kermeta::standard::Comparable, kermeta::standard::ValueType

The abstract class Numeric is the root class for all
numeric types
@

Operation assertFalse

method assertFalse(condition : kermeta::standard::Boolean) : Void from kermeta::kunit::AbstractFallible
will fail if condition is true

Class Conditional

kermeta::language::behavior::Conditional inherits kermeta::language::behavior::Expression
@Condition is the model-element representation for the
Attributes

Property supertype

reference supertype: kermeta::language::structure::Type
@Reference to the supertype, if any

Class TypeDefinition

kermeta::language::structure::TypeDefinition inherits kermeta::language::structure::NamedElement
@This boolean allows to tell if this Type definition is an aspect or not
If it is an aspect, then at runtime, its definition will be merged with the definition of another
TypeDefinition that has exactly the same qualified nameAbstraction for type definitions (ClassDefinition, ModelTypeDefinition, DataType inherit
this class)
Attributes

Operation equals

method equals(other : kermeta::language::structure::Object) : kermeta::language::structure::Boolean from kermeta::language::structure::Object
@
exceptions::IteratorIsOff

Operation asOrderedSet

operation asOrderedSet() : kermeta::standard::OrderedSet<G>

Returns a new OrderedSet built from the Collection

Operation append

operation append(element : G) : kermeta::standard::Sequence<G>

Builds and returns a new Sequence from current one with element
inserted in head

Property type

attribute type: kermeta::language::behavior::TypeReference[1..1]
@Type of the declared variable

Class CallVariable

kermeta::language::behavior::CallVariable inherits kermeta::language::behavior::CallExpression
@We call "CallVariable" the use of a variable in a statement.
in i := j + 1, i and j are 2 CallVariables.

Class TestRunner

kermeta::kunit::TestRunner inherits kermeta::language::structure::Object

Create and use a test runner to run one or more tests and print the failure log. E.g.:
do
var suite : TestSuite init TestSuite.new.addAllTestCasesFrom(InterestingTestCaseSet)
var runner : TestRunner init TestRunner.new
runner.run(suite)
runner.printLogs
end

Where InterestingTestCaseSet is a subclass of TestCase and contains several test... methods
@

Property value

attribute value: kermeta::language::structure::Integer
@The concrete value represented by this literal

Class DivisionByZero

kermeta::exceptions::DivisionByZero inherits kermeta::exceptions::Exception
well-known attempt to divide with a zero valued divider @
exceptions::RuntimeError
Attributes

Operation get

operation get(~property : kermeta::language::structure::Property) : kermeta::language::structure::Object

Returns the instances of the given property for this Object.

Example :

class A { reference attr : String }

Using A :

operation getAProp() is do
var a : A
var s : String
var the_attr : Property init self.getMetaClass.ownedAttribute.one
s ?= a.get(the_attr)
end

The user has to cast
the result of this method according to the type and the upper multiplicity
of this property. If upper multiplicity > 1, than the effective type of the
result is a Sequence<ThePropertyName>. Otherwise, the type corresponds to
the name of the given Property (i.e the type of the property instance).
@

Property ownedLiteral

attribute ownedLiteral: kermeta::language::structure::EnumerationLiteral[0..*]#~enumeration
@Owned items in an Enumeration

Operation getMetaClass

operation getMetaClass() : kermeta::language::structure::Class

Returns the Class object that is the metaclass of current Object
@

Operation union

operation union(elements : kermeta::standard::Set<G>) : kermeta::standard::Set<G>

Returns a new Set corresponding to the union of the Set elements
with the current Set

Property body

attribute body: kermeta::language::behavior::Expression[1..1]
@Body of the lambda expression providede as a KerMeta expression

Property property

reference property: kermeta::language::structure::Property#propertyConstraint

The property that is checked by this constraint
Typically, it will check the lower and upper bounds

Package io

kermeta::io

Contains file input/output related classes.


Contains standard input/output related classes.

Property nestedException

attribute nestedException: kermeta::exceptions::Exception
Any nested exception

Operation uminus

operation uminus() : kermeta::standard::Real

returns -self

Class Comparable

kermeta::standard::Comparable inherits kermeta::language::structure::Object

The abstract class Comparable defines a set of operation
to compare instances of a class.
Sub-classes only has to implement abstract operation compareTo.
All other methods are defined w.r.t. the compareTo operation
@

Property modelType

reference modelType: kermeta::language::structure::ModelTypeVariable[1..1]#virtualType
@To be written

Operation one

operation one() : G

Returns an element from the Collection or void if the Collection is empty

Property post

attribute post: kermeta::language::structure::Constraint[0..*]#postOwner
@Post-conditions of the Operation

Operation addTestError

operation addTestError(test : kermeta::kunit::Fallible, e : kermeta::exceptions::Exception) : Void

Adds an error to the list of errors

Operation execute

operation execute(selfObj : kermeta::standard::Object, actualParams : kermeta::utils::Hashtable<kermeta::standard::String, kermeta::standard::Object>) : kermeta::standard::Object

Execute the expression in the given context

Class OverflowError

kermeta::exceptions::OverflowError inherits kermeta::exceptions::Exception
the figure oversteps the capacity of the numeric variable @

Operation isNotEmpty

operation isNotEmpty() : kermeta::standard::Boolean

OCL alignment API
Returns a Boolean stating whether the Collection contains at least
one element
See also Collection<G>.contains(Object)

Operation runTest

operation runTest(test : kermeta::kunit::Test) : Void

Use this to run a test case or a test suite.
If you want to run all the test.... methods in a TestCase class,
you can populate a suite with TestSuite.addAllTestCasesFrom

Property tests

reference tests: kermeta::kunit::Test[0..*]

The collection of tests which will be ran as the suite

Class VoidType

kermeta::language::structure::VoidType inherits kermeta::language::structure::Type
@Class definition for the
Void
type

Operation getTestMethodName

operation getTestMethodName() : kermeta::standard::String

accessor on the method name

Property contents

property contents: set kermeta::standard::Object[0..*] readonly

Returns the set of all Objects directly or indirectly contained by the Resource,
or an empty set if the Resource is empty
implementation note: since this derived property build a set, it guarantees the unicity, as a drawback,
calling this property on large resources will be really slow due to this verification. some user may prefer
to reimplement it using a bag.

Operation contains

operation contains(str1 : kermeta::standard::String) : kermeta::standard::Boolean

Return if a string is contained by another string

Operation instances

operation instances() : kermeta::persistence::Resource

The entities contained in the model-instance, that are provided when user loads a resource
instances == rootContents
this is a loop on Resource itself in order to get backward compatibility
@

Property parameters

attribute parameters: kermeta::language::behavior::Expression[0..*]
@Kermeta calls can embedd expressions as parameters