001package systems.dmx.core;
002
003import systems.dmx.core.model.AssociationDefinitionModel;
004
005
006
007/**
008 * Definition of an association between 2 topic types -- part of DMX's type system,
009 * like an association in a class diagram. Used to represent both, aggregations and compositions.
010 *
011 * @author <a href="mailto:jri@deepamehta.de">Jörg Richter</a>
012 */
013public interface AssociationDefinition extends Association {
014
015    String getAssocDefUri();
016
017    // ---
018
019    String getParentTypeUri();
020
021    String getChildTypeUri();
022
023    // ---
024
025    /**
026     * @return  The custom association type, or <code>null</code> if not set.
027     */
028    String getCustomAssocTypeUri();
029
030    /**
031     * @return  The type to be used to create an association instance based on this association definition.
032     *          This is the custom association type if set, otherwise this is <code>dmx.core.composition</code>
033     *          or <code>dmx.core.aggregation</code> depending on this association definition's type.
034     *          Is never <code>null</code>.
035     */
036    String getInstanceLevelAssocTypeUri();
037
038    // --- Parent Cardinality ---
039
040    String getParentCardinalityUri();
041
042    void setParentCardinalityUri(String parentCardinalityUri);
043
044    // --- Child Cardinality ---
045
046    String getChildCardinalityUri();
047
048    void setChildCardinalityUri(String childCardinalityUri);
049
050    // ---
051
052    ViewConfiguration getViewConfig();
053
054    // ---
055
056    void update(AssociationDefinitionModel model);
057
058    // ---
059
060    AssociationDefinitionModel getModel();
061}