de.deepamehta.core.model
Class AssociationDefinitionModel

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.model.DeepaMehtaObjectModel
      extended by de.deepamehta.core.model.AssociationModel
          extended by 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

Field Summary
private  String childCardinalityUri
           
private  String childTypeUri
           
private  String instanceLevelAssocTypeUri
           
private  Logger logger
           
private  String parentCardinalityUri
           
private  String parentTypeUri
           
private  ViewConfigurationModel viewConfigModel
           
 
Fields inherited from class de.deepamehta.core.model.DeepaMehtaObjectModel
childTopics, id, typeUri, uri, value
 
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)
           
 
Method Summary
private static TopicRoleModel childRoleModel(String childTypeUri)
           
(package private) static AssociationDefinitionModel fromJSON(JSONObject assocDef, String parentTypeUri)
           
 String getChildCardinalityUri()
           
 String getChildTypeUri()
           
 String getInstanceLevelAssocTypeUri()
           
 String getParentCardinalityUri()
           
 String getParentTypeUri()
           
 ViewConfigurationModel getViewConfigModel()
           
private  String instanceLevelAssocTypeUri(String typeUri)
           
private static TopicRoleModel parentRoleModel(String parentTypeUri)
           
 void setChildCardinalityUri(String childCardinalityUri)
           
 void setParentCardinalityUri(String parentCardinalityUri)
           
 void setTypeUri(String typeUri)
           
 void setViewConfigModel(ViewConfigurationModel viewConfigModel)
           
 JSONObject toJSON()
           
(package private) static void toJSON(Collection<AssociationDefinitionModel> assocDefs, JSONObject o)
           
 String toString()
           
 
Methods inherited from class de.deepamehta.core.model.AssociationModel
clone, createRoleModel, getOtherPlayerId, getRoleModel, getRoleModel1, getRoleModel2, hasSameRoleTypeUris
 
Methods inherited from class de.deepamehta.core.model.DeepaMehtaObjectModel
equals, getChildTopicsModel, getId, getSimpleValue, getTypeUri, getUri, hashCode, set, setChildTopicsModel, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setUri
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

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)
Method Detail

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.