de.deepamehta.core.model
Class AssociationDefinitionModel
java.lang.Object
de.deepamehta.core.model.DeepaMehtaObjectModel
de.deepamehta.core.model.AssociationModel
de.deepamehta.core.model.AssociationDefinitionModel
- All Implemented Interfaces:
- Identifiable, JSONEnabled, Cloneable
public class AssociationDefinitionModel
- extends AssociationModel
Definition of an association between 2 topic types -- part of DeepaMehta's type system,
like an association in a class diagram. Used to represent both, aggregations and compositions.
### FIXDOC: also assoc types have assoc defs
- Author:
- Jörg Richter
Constructor Summary |
AssociationDefinitionModel(long id,
String uri,
String typeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri,
ViewConfigurationModel viewConfigModel)
|
AssociationDefinitionModel(String typeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri)
|
Methods inherited from class de.deepamehta.core.model.DeepaMehtaObjectModel |
equals, getCompositeValueModel, getId, getSimpleValue, getTypeUri, getUri, hashCode, set, setCompositeValue, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setUri |
instanceLevelAssocTypeUri
private String instanceLevelAssocTypeUri
parentTypeUri
private String parentTypeUri
childTypeUri
private String childTypeUri
parentCardinalityUri
private String parentCardinalityUri
childCardinalityUri
private String childCardinalityUri
viewConfigModel
private ViewConfigurationModel viewConfigModel
logger
private Logger logger
AssociationDefinitionModel
public AssociationDefinitionModel(String typeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri)
AssociationDefinitionModel
public AssociationDefinitionModel(long id,
String uri,
String typeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri,
ViewConfigurationModel viewConfigModel)
getInstanceLevelAssocTypeUri
public String getInstanceLevelAssocTypeUri()
getParentTypeUri
public String getParentTypeUri()
getChildTypeUri
public String getChildTypeUri()
getParentCardinalityUri
public String getParentCardinalityUri()
getChildCardinalityUri
public String getChildCardinalityUri()
getViewConfigModel
public ViewConfigurationModel getViewConfigModel()
setTypeUri
public void setTypeUri(String typeUri)
- Overrides:
setTypeUri
in class DeepaMehtaObjectModel
setParentCardinalityUri
public void setParentCardinalityUri(String parentCardinalityUri)
setChildCardinalityUri
public void setChildCardinalityUri(String childCardinalityUri)
setViewConfigModel
public void setViewConfigModel(ViewConfigurationModel viewConfigModel)
toJSON
public JSONObject toJSON()
- Specified by:
toJSON
in interface JSONEnabled
- Overrides:
toJSON
in class AssociationModel
toString
public String toString()
- Overrides:
toString
in class AssociationModel
fromJSON
static AssociationDefinitionModel fromJSON(JSONObject assocDef,
String parentTypeUri)
toJSON
static void toJSON(Collection<AssociationDefinitionModel> assocDefs,
JSONObject o)
throws Exception
- Throws:
Exception
parentRoleModel
private static TopicRoleModel parentRoleModel(String parentTypeUri)
childRoleModel
private static TopicRoleModel childRoleModel(String childTypeUri)
instanceLevelAssocTypeUri
private String instanceLevelAssocTypeUri(String typeUri)
Copyright © 2014. All Rights Reserved.