Associations have a rich semantic and therefor there is a large spectrum of how they may be transformed into abstract models.
Panckoucke comes with 6 predefined classification schemes, each of them incorporating a different view on the associations where a given Topic t0 plays a role.
The following are the 6 predefined classification schemes:
The following gives you a more detailed description how the choice of the classification-scheme influences the resulting model.
To choose a particular classification scheme, you pass an AbstractionContext that specifies the scheme you want to use. To do so, you set an abstraction hint with the name that is defined in the public static field AssociationCompressDispatcher.ASSOCIATION_COMPRESSION. As the value of the hint you use a String constant that identifies the particular scheme.
For every supported scheme, the class AssociationCompressDispatcher defines a public static String, that serves to identify the scheme. See the discussion of the available schemes below for the particular constants to use.
For example, setting the byRolesOfCenter-Classification scheme, you can use code like this:
AbstractionContext abstractionContext; ... Properties hints = abstractionContext.getAbstractorHints(); hints.setProperty(AssociationCompressDispatcher.ASSOCIATION_COMPRESSION, AssociationCompressDispatcher.CS_L2_BY_ROLE_OF_CENTER);
This classification scheme groups all role-playing-topics under the role that they play in one of the considered associations.
The considered associations are: All associations where t0 plays a role in.
The hint value is defined by the field: AssociationCompressDispatcher.CS_L2_BY_ROLE_OF_OTHERS
The following characteristics apply
For test topic john, the result looks like this:
This classification scheme groups all role-playing-topics under the role that t0 plays in one of the considered associations.
The considered associations are: All associations where t0 plays a role in.
The hint value is defined by the field: AssociationCompressDispatcher.CS_L2_BY_ROLE_OF_CENTER
The following characteristics apply
For test topic john, the result looks like this:
This classification scheme groups all role-playing-topics under the type of one of the considered associations.
The considered associations are: All associations where t0 plays a role in.
The hint value is defined by the field: AssociationCompressDispatcher.CS_L2_BY_TYPE_OF_ASSOC
The following characteristics apply
For test topic john, the result looks like this:
This classification scheme groups the considered associations in three steps.
In the first step, the associations are grouped under the role that t0 plays. The second step bundles the associations under their type.Finally, in the third step, the associations are grouped by the number of their members and the roles that are played.
Considered associations: All associations where t0 plays a role in.
Identifier: The hint value is defined by the field: AssociationCompressDispatcher.CS_L6_BY_ROLE_TYPE_PLAYER
The following characteristics apply
For test topic john, the result looks like this:
This classification scheme uses an implementation of org.tm4j.panckoucke.impl.abstraction.Shelfmark to group associations.
After all associations are classified, each of the resulting groups is transformed into an AbstractModel by using the matrix pattern.
Considered associations: All associations where t0 plays a role in.
Identifier: The field AssociationCompressDispatcher.CS_MATRIX_BY_ROLES defines a classification scheme that uses the Shelfmark-implementation org.tm4j.panckoucke.impl.abstraction.AssociationRoleShelfmark..
The following characteristics apply
For the owns-car-associations of test topic john, the result looks like this:
This scheme transforms the considered associations to a model that resembles the structure of the topicmap graph as it is build in tm4j.
The considered associations are: All associations where t0 plays a role in.
The hint value is defined by the field: AssociationCompressDispatcher.CS_L4_UNCOMPRESSED
The following characteristics apply
For test topic john, the result looks like this: