001 package de.deepamehta.core; 002 003 import de.deepamehta.core.model.AssociationDefinitionModel; 004 005 006 007 /** 008 * Definition of an association between 2 topic types -- part of DeepaMehta'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 */ 013 public interface AssociationDefinition extends Association { 014 015 /** 016 * @return The custom association type, or <code>null</code> if not set. 017 */ 018 String getCustomAssocTypeUri(); 019 020 /** 021 * @return The type to be used to create an association instance based on this association definition. 022 * This is the custom association type if set, otherwise this is <code>dm4.core.composition</code> 023 * or <code>dm4.core.aggregation</code> depending on this association definition's type. 024 * Is never <code>null</code>. 025 */ 026 String getInstanceLevelAssocTypeUri(); 027 028 String getParentTypeUri(); 029 030 String getChildTypeUri(); 031 032 String getParentCardinalityUri(); 033 034 String getChildCardinalityUri(); 035 036 ViewConfiguration getViewConfig(); 037 038 // --- 039 040 AssociationDefinitionModel getModel(); 041 042 // --- 043 044 void setCustomAssocTypeUri(String customAssocTypeUri); 045 046 // --- 047 048 void setParentCardinalityUri(String parentCardinalityUri); 049 050 void setChildCardinalityUri(String childCardinalityUri); 051 052 // === Updating === 053 054 void update(AssociationDefinitionModel model); 055 }