de.interactive_instruments.ShapeChange.Ocl
Class OclNode

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Ocl.OclNode
Direct Known Subclasses:
OclNode.Declaration, OclNode.Expression, OclNode.IfExp, OclNode.LetExp, OclNode.LiteralExp, OclNode.PropertyCallExp, OclNode.VariableExp

public abstract class OclNode
extends Object

OclNodes stand for the syntactic constructs of the supported subset of OCL in this package. They form a complete description of the OCL particles and their relation to the UML model.

OclNode itself is abstract and stands for an OCL expression expressed by roughly in 5 flavors, namely:

Additionally there is:

All OclNodes carry a datatype, which is either built-in or from the UML model.

Use OclNodes by directly accessing their public fields.

Version:
0.1
Author:
Reinhard Erstling (c) interactive instruments GmbH, Bonn, Germany

Nested Class Summary
static class OclNode.AttributeCallExp
          OclNode.AttributeCallExp stands for an OCL construct of the form object.selector, where the object can be any object or built-in type valued construct and selector selects some specific slot from that resource, typically an attribute name or a role name.
static class OclNode.BooleanLiteralExp
          A BooleanLiteralExp OclNode represents a boolean value.
static class OclNode.BuiltInDescr
           
static class OclNode.BuiltInType
          Enum describing the implemented Built-in primitive Types
static class OclNode.ClassLiteralExp
          A ClassLiteralExp OclNode represents a class from the model.
static class OclNode.DataType
          All OclNodes own a DataType, which is either built-in, or from the UML model in the context, or both.
static class OclNode.DateTimeLiteralExp
          A DateTimeLiteralExp OclNode represents a defined date and time or if constructed without a parameter the current date and time.
static class OclNode.Declaration
          Objects of this class represent the declaration of variables in some context, such as a let-expression or an iterator reference.
static class OclNode.EnumerationLiteralExp
          A EnumerationLiteralExp represents a property of a enumeration or codelist class from the model.
static class OclNode.Expression
          OclNode.OclExpression wraps a complete OCL expression classifying it as either an invariant or an expression of the derive/init type.
static class OclNode.IfExp
          OclNode.IfExp stands for an if-then-else-endif construct.
static class OclNode.IntegerLiteralExp
          A IntegerLiteralExp OclNode represents an integer value.
static class OclNode.IterationCallExp
          OclNode.IterationCallExp stands for an OCL construct of the form object.selector(var1,...
static class OclNode.LetExp
          OclNode.LetExp represents a let-construct.
static class OclNode.LiteralExp
          LiteralExp is the common root of all implemented OCL literal expressions.
static class OclNode.MultiplicityMapping
          Mapping characteristic of the applied selector
static class OclNode.OclVoidLiteralExp
          A OclVoidLiteralExp OclNode represents the 'null' item, which is of type OclVoid.
static class OclNode.OperationCallExp
          OclNode.OperationCallExp stands for an OCL construct of the form object.selector(arg1,...)
static class OclNode.PackageLiteralExp
          A PackageLiteral OclNode represents a UML package.
static class OclNode.PropertyCallExp
          The abstract class OclNode.CallExp stands for a selector step, which is applied to some object or set of objects.
static class OclNode.PropertyCategory
          Property selector categories.
static class OclNode.PropertySelector
          Objects of class OclNode.PropertySelector stand for selecting and characterizing properties on UML classes, or OCL supplied built-in objects.
static class OclNode.RealLiteralExp
          A RealLiteralExp OclNode represents a real value.
static class OclNode.StringLiteralExp
          A StringLiteralExp OclNode represents a String value.
static class OclNode.VariableExp
          VariableExp objects stand for an instance of a variable in some expression.
 
Field Summary
 OclNode.DataType dataType
          The DataType carried by every OclNode.
 
Constructor Summary
OclNode()
           
 
Method Summary
 void debugPrint(PrintWriter stream)
          The method debugPrint outputs the content of an OclNode for the purpose of debugging this software.
 void debugPrintContent(PrintWriter stream)
          This is for generating debug output out of OclNodes.
 OclNode.DataType getDataType()
          Inquire the DataType of the OclNode.
 boolean isBuiltInType()
          Find out whether this is OclNode is of an OCL built-in datatype.
 boolean isMultiple()
          Find out whether this OclNode represents a multiple entity, such as a Set or other Collection type.
static OclNode.BuiltInType iso19103AssumedBuiltInType(ClassInfo ci)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataType

public OclNode.DataType dataType
The DataType carried by every OclNode.

Constructor Detail

OclNode

public OclNode()
Method Detail

iso19103AssumedBuiltInType

public static OclNode.BuiltInType iso19103AssumedBuiltInType(ClassInfo ci)

debugPrint

public void debugPrint(PrintWriter stream)

The method debugPrint outputs the content of an OclNode for the purpose of debugging this software.

Parameters:
stream - PrintWriter onto which the debug output is to be directed.

debugPrintContent

public void debugPrintContent(PrintWriter stream)

This is for generating debug output out of OclNodes.

Parameters:
streamPrint - Writer onto which the debug output is to be directed.

getDataType

public OclNode.DataType getDataType()

Inquire the DataType of the OclNode.

Returns:
DataType

isBuiltInType

public boolean isBuiltInType()

Find out whether this is OclNode is of an OCL built-in datatype.

Returns:
Flag - this is of built-in type.

isMultiple

public boolean isMultiple()

Find out whether this OclNode represents a multiple entity, such as a Set or other Collection type.

Returns:
Flag - this represents a multiple entity


Copyright © 2015. All rights reserved.