K-class
Jump to navigation
Jump to search
knowledge class: A pattern (definition) which all instances of the object must fulfil; basically a list of attributes
Example
- Consider as an example the class of all flowers, termed flower (singular) for short: The individual flowers (k-instances) have much in common and can differ a lot from each other, e.g. w.r.t. the attributes color, size, flavor.
- By referring to the notion flower we implicitly describe the attributes common to all flowers.
- To encompass the variety of individial flowers the class should contain at least the most important attributes in which the flowers differ.
- The list of attributes might be extended later on. In this case the individual flowers already existing in the database obtain the value undefined (or null) for the new attributes. The user can also give a default value for the existing k-instances. This is required, if an attribute does not allow for the value null.
- It depends on the intended purpose whether it makes sense to define own classes for roses, tulips, violets etc., which then would be subclasses of the class of all flowers. - If it is considered important e.g. for roses to have the attribute thornless, while it is considered superfluous for tulips, then roses could be defined as a subclass of flower with an additional attribute thornless.
- Another possibility would be this: Add the attribute thornless to the class of all flowers and have the value of this attribute filled in automatically (with true) for the subclasses tulip, violet, ...
Definition
A k-class consists of the following components:
- kclassId
- A uuid.
- k-attribute list
- A family (mapping with natural numbers as indices) of k-attributes of the k-class, containing only attributes not contained in the parent k-class.
- k-constraint set
- A set of k-constraints.
- logical dependency list
- The logical dependencies between the attributes are important for the input and display of data. E.g. if a shape attribute can have the values circular or squared, then either diameter or side length should be asked and displayed, but not both. find a syntax for logical dependency between attributes
- Note: Constaints on unused substructures must not be checked.
- k-coordinates
- See here.
- k-access
- See here. rework k-access for k-class
Rules
- K-Classes in the public domain are uniquely identified by their name.
- K-Classes not in the public domain are per creator uniquely identified by their name.
- K-Classes, once defined and having at least one instance are persistent forever.
- K-Classes naturally are located in the class hierarchy.
- Extensions (subclasses) can be defined at any time.
k-class language mapping
The common meaning of the object is established only via the k-class language mapping.
Versioning
kclass table
- kclassid
- uuid not null
- unique id of the kclass
- parentids
- uuid[]
- array with parent kclass ids; can be more than one
- childids
- uuid[]
- array with child kclass ids
- public
- boolean not null
- whether the kclass is public
- visible
- boolean not null
- whether the kclass is visible
- access
- text not null
- a string describing K-access, i.e. which users/groups have which access to this kclass
- status
- text not null
- status of this kclass, can be one of
- * immutable
- * ...
- modtime
- integer not null
- time of the last modification of this kclass
- definition
- text not null
- json-encoded definition of this kclass