Package pl.poznan.put.cs.idss.jrs.types

Provides classes for wrapping anything you can put into decision table. This means that elements of the package are stored directly into MemoryContainer. You can read them from and write to another containers of different data type as well.

Storing information

Each element in the decision table is called a field, which is represented by Field class. We have fields of two kinds. These are simple fields and compound fields. The different is that compound field contain information which is represented by few simple fields. For instance, you can have IntervalField where each bound is IntegerField, which means you have a single interval in one field at decision table. For example it is possible to create followed interval: (5,8). All compound fields are derived from CompoundField.

It is possible to store simple field in decision table as well. So you don't have to use compound field at all. Remember that simple fields are derived from SimpleField and can be compared (it applies only to two elements of the same class). Values of number types have the order of specified domain (natural order). For EnumField, where you define domain by yourself, order of elements is the same as their appearance in definition.

Simple and compound fields are derived from Field class. Those fields are grouped in one row of decision table in Example. When you want something to put into decision table, you do it using an example. First row of decision table is special, because its fields don't have any values. Information stored there is to define params of columns. Using Attribute class you can change everything what is common for whole column. Each attribute is part of Metadata class, where are stored data associated with decision table, but which are not stored there. For example it could be author's name, date of creating the table, etc.

Unknown values

It is possible not to assign any value to the field. You have to only use setUnknown() method for field. It means that none domain value is used to assign "unknown" status to the field. It applies only to simple fields, because compound field is unknown only when its all components are unknown. Value of compound field is fully determined when all simple fields it contains have assigned value. Otherwise we have got semiknown field. It is very important that simple fields, where at least one is unknown, cannot be compared.

Copying and duplicating

For most of this package elements copy and duplicate method is defined. So it is very simple to create new instance of object, which contains the same value. Or to copy value from another object. Remember that copying applies only when both object are instances of the same class or object to copy value from is instance of class representing object assigning value to itself. Of course even unknown status can be copied or duplicated as well.

Format converting

Elements of this package are used in conversion between two formats (from ISF to XML, for instance). You can simply read metadata and each example stored in one format and write it to another one. As you know example contains fields with all information stored in decision table and represented by given data format. So if you want to manipulate these values during conversion, you need to see into documentation...
Skip navigation links