LISp-Miner Control Language Reference, version: 27.15.01 of 27 Oct 2017

Class AttributeGroup

Group of categorized attributes
inherits from LMWrapName
namespace: lm.prepro

Constructor

AttributeGroup()
Creates a new object of this class

Parameters

  • luaTable - to store named parameters

Obligatory named parameters

  • name : string - unique name for the new group of attributes
  • pParentGroup : AttributeGroup - parent group of attributes

Properties List

AttributeCount  Number of attributes in this group
ID  Unique identifier (primary key) of the object
Name  Unique name of this object. Cannot be empty.
NameHierarchy  Fully qualified name of the group (including names of all of its parent groups in the hierarchy
Note  Text comment to this object (up to 255 characters)
SubAttributeGroupCount  Number of sub attribute groups in this group

Methods List

calcCategoryFrequencies () Pre-calculates frequencies for all categories of all attributes in this group. Frequencies are otherwise calculated ad-hod in a function requesting frequency of a category as its input.
canDel () Returns true if the object could be deleted (is not used)
findAttribute () Tries to look-up a Attribute with a unique property given as parameter. Just one parameter has to be specified. Returns nil if Attribute with this property doesn't exists.
findSubAttributeGroup () Tries to look-up a AttributeGroup with a unique property given as parameter. Just one parameter has to be specified. Returns nil if AttributeGroup with this property doesn't exists.
getAttributeCount () Returns the value of AttributeCount property
getID () Returns unique identifier (primary key) of the object
getName () Returns the value of Name property, name of this object
getNameHierarchy () Returns the value of NameHierarchy property
getNote () Returns the value of Note property
getSubAttributeCount () Returns the value of SubAttributeCount property
onAdd () Store the newly created object into metabase
onDel () Delete the object from metabase (fails if canDel returns false)
onUpdate () Save changes made to the object into metabase
prepareAttributeArray () Returns array of Attributes in this group of attributes
prepareSubAttributeGroupArray () Returns array of AttributeGroups in this group of attributes
setName () Sets the value of Name property, name of this object (must be unique)
setNote () Sets the value of Note property

Properties

AttributeCount  (read-only) : integer
Number of attributes in this group
ID  (read-only) : integer
Unique identifier (primary key) of the object
Intherited from: LMWrap
Name : string
Unique name of this object. Cannot be empty.
Intherited from: LMWrapName
NameHierarchy  (read-only) : string
Fully qualified name of the group (including names of all of its parent groups in the hierarchy
Note : string
Text comment to this object (up to 255 characters)
Intherited from: LMWrapName
SubAttributeGroupCount  (read-only) : integer
Number of sub attribute groups in this group

Methods

calcCategoryFrequencies()
Pre-calculates frequencies for all categories of all attributes in this group. Frequencies are otherwise calculated ad-hod in a function requesting frequency of a category as its input.

Returns

  • boolean - true, if successfull for all attributes
canDel() : boolean
Returns true if the object could be deleted (is not used)
Intherited from: LMWrap

Returns

  • boolean
findAttribute() : Attribute
Tries to look-up a Attribute with a unique property given as parameter. Just one parameter has to be specified. Returns nil if Attribute with this property doesn't exists.

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • nID : integer - an ID of the attribute to look-up
  • pDataTable : DataTable - database table with column the attribute should be based upon. Should be specified if there are two or more database tables
  • name : string - a name of the attribute to look-up

Returns

findSubAttributeGroup() : AttributeGroup
Tries to look-up a AttributeGroup with a unique property given as parameter. Just one parameter has to be specified. Returns nil if AttributeGroup with this property doesn't exists.

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • nID : integer - an ID of the group of attributes to look-up
  • name : string - a name of the group of attributes to look-up

Returns

getAttributeCount() : integer
Returns the value of AttributeCount property

Returns

  • integer
getID() : integer
Returns unique identifier (primary key) of the object
Intherited from: LMWrap

Returns

  • integer
getName() : string
Returns the value of Name property, name of this object
Intherited from: LMWrapName

Returns

  • string
getNameHierarchy() : integer
Returns the value of NameHierarchy property

Returns

  • integer
getNote() : string
Returns the value of Note property
Intherited from: LMWrapName

Returns

  • string
getSubAttributeCount() : integer
Returns the value of SubAttributeCount property

Returns

  • integer
onAdd()
Store the newly created object into metabase
Intherited from: LMWrap
onDel()
Delete the object from metabase (fails if canDel returns false)
Intherited from: LMWrap
onUpdate()
Save changes made to the object into metabase
Intherited from: LMWrap
prepareAttributeArray() : luaTable
Returns array of Attributes in this group of attributes

Parameters

  • luaTable - to store named parameters

Optional named parameters

  • pDataTable : DataTable - database table the attributes should be based upon
  • pDataColumn : DataColumn - database table column the attributes should be based upon

Returns

  • luaTable
prepareSubAttributeGroupArray() : luaTable
Returns array of AttributeGroups in this group of attributes

Returns

  • luaTable
setName( string )
Sets the value of Name property, name of this object (must be unique)
Intherited from: LMWrapName

Parameters

  • string - cannot be empty
setNote( string )
Sets the value of Note property
Intherited from: LMWrapName

Parameters

  • string