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(org.codehaus.jettison.json.JSONObject assocDef)
|
AssociationDefinitionModel(long id,
String uri,
String assocTypeUri,
String customAssocTypeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri,
ViewConfigurationModel viewConfigModel)
|
AssociationDefinitionModel(String assocTypeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri)
|
AssociationDefinitionModel(String assocTypeUri,
String customAssocTypeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri)
|
Methods inherited from class de.deepamehta.core.model.DeepaMehtaObjectModel |
equals, getChildTopicsModel, getId, getSimpleValue, getTypeUri, getUri, hashCode, set, setChildTopicsModel, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri |
customAssocTypeUri
private String customAssocTypeUri
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 assocTypeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri)
AssociationDefinitionModel
public AssociationDefinitionModel(String assocTypeUri,
String customAssocTypeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri)
AssociationDefinitionModel
public AssociationDefinitionModel(long id,
String uri,
String assocTypeUri,
String customAssocTypeUri,
String parentTypeUri,
String childTypeUri,
String parentCardinalityUri,
String childCardinalityUri,
ViewConfigurationModel viewConfigModel)
- Parameters:
customAssocTypeUri
- if null no custom association type will be set.
AssociationDefinitionModel
AssociationDefinitionModel(org.codehaus.jettison.json.JSONObject assocDef)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
getCustomAssocTypeUri
public String getCustomAssocTypeUri()
getInstanceLevelAssocTypeUri
public String getInstanceLevelAssocTypeUri()
- The type to be used to create an association instance based on this association definition.
getParentTypeUri
public String getParentTypeUri()
getChildTypeUri
public String getChildTypeUri()
getParentCardinalityUri
public String getParentCardinalityUri()
getChildCardinalityUri
public String getChildCardinalityUri()
getViewConfigModel
public ViewConfigurationModel getViewConfigModel()
setCustomAssocTypeUri
public void setCustomAssocTypeUri(String customAssocTypeUri)
setParentCardinalityUri
public void setParentCardinalityUri(String parentCardinalityUri)
setChildCardinalityUri
public void setChildCardinalityUri(String childCardinalityUri)
setViewConfigModel
public void setViewConfigModel(ViewConfigurationModel viewConfigModel)
toJSON
public org.codehaus.jettison.json.JSONObject toJSON()
- Specified by:
toJSON
in interface JSONEnabled
- Overrides:
toJSON
in class AssociationModel
toString
public String toString()
- Overrides:
toString
in class AssociationModel
toJSON
static void toJSON(Collection<AssociationDefinitionModel> assocDefs,
org.codehaus.jettison.json.JSONObject o)
throws Exception
- Throws:
Exception
parentRoleModel
private static TopicRoleModel parentRoleModel(org.codehaus.jettison.json.JSONObject assocDef)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
childRoleModel
private static TopicRoleModel childRoleModel(org.codehaus.jettison.json.JSONObject assocDef)
throws org.codehaus.jettison.json.JSONException
- Throws:
org.codehaus.jettison.json.JSONException
parentRoleModel
private static TopicRoleModel parentRoleModel(String parentTypeUri)
childRoleModel
private static TopicRoleModel childRoleModel(String childTypeUri)
parentTypeUri
private String parentTypeUri()
childTypeUri
private String childTypeUri()
defaultInstanceLevelAssocTypeUri
private String defaultInstanceLevelAssocTypeUri()
Copyright © 2015. All Rights Reserved.