de.deepamehta.core.model
Class AssociationModel

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.model.DeepaMehtaObjectModel
      extended by de.deepamehta.core.model.AssociationModel
All Implemented Interfaces:
Identifiable, JSONEnabled, Cloneable
Direct Known Subclasses:
AssociationDefinitionModel, AssociationViewmodel, RelatedAssociationModel

public class AssociationModel
extends DeepaMehtaObjectModel

Collection of the data that makes up an Association.

Author:
Jörg Richter

Field Summary
private  RoleModel roleModel1
           
private  RoleModel roleModel2
           
 
Fields inherited from class de.deepamehta.core.model.DeepaMehtaObjectModel
childTopics, id, typeUri, uri, value
 
Constructor Summary
AssociationModel()
           
AssociationModel(AssociationModel assoc)
           
AssociationModel(ChildTopicsModel childTopics)
           
AssociationModel(org.codehaus.jettison.json.JSONObject assoc)
           
AssociationModel(long id)
           
AssociationModel(long id, String uri, String typeUri, RoleModel roleModel1, RoleModel roleModel2)
           
AssociationModel(long id, String uri, String typeUri, RoleModel roleModel1, RoleModel roleModel2, SimpleValue value, ChildTopicsModel childTopics)
           
AssociationModel(String typeUri, RoleModel roleModel1, RoleModel roleModel2)
           
AssociationModel(String typeUri, RoleModel roleModel1, RoleModel roleModel2, ChildTopicsModel childTopics)
           
 
Method Summary
 AssociationModel clone()
           
 RoleModel createRoleModel(String roleTypeUri)
           
 long getOtherPlayerId(long id)
           
 RoleModel getRoleModel(String roleTypeUri)
           
 RoleModel getRoleModel1()
           
 RoleModel getRoleModel2()
           
 boolean hasSameRoleTypeUris()
           
private  RoleModel parseRole(org.codehaus.jettison.json.JSONObject roleModel)
           
 void setRoleModel1(RoleModel roleModel1)
           
 void setRoleModel2(RoleModel roleModel2)
           
 org.codehaus.jettison.json.JSONObject toJSON()
           
 String toString()
           
 
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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

roleModel1

private RoleModel roleModel1

roleModel2

private RoleModel roleModel2
Constructor Detail

AssociationModel

public AssociationModel(String typeUri,
                        RoleModel roleModel1,
                        RoleModel roleModel2)

AssociationModel

public AssociationModel(String typeUri,
                        RoleModel roleModel1,
                        RoleModel roleModel2,
                        ChildTopicsModel childTopics)

AssociationModel

public AssociationModel()

AssociationModel

public AssociationModel(long id)

AssociationModel

public AssociationModel(ChildTopicsModel childTopics)

AssociationModel

public AssociationModel(long id,
                        String uri,
                        String typeUri,
                        RoleModel roleModel1,
                        RoleModel roleModel2)

AssociationModel

public AssociationModel(long id,
                        String uri,
                        String typeUri,
                        RoleModel roleModel1,
                        RoleModel roleModel2,
                        SimpleValue value,
                        ChildTopicsModel childTopics)

AssociationModel

public AssociationModel(AssociationModel assoc)

AssociationModel

public AssociationModel(org.codehaus.jettison.json.JSONObject assoc)
Method Detail

getRoleModel1

public RoleModel getRoleModel1()

getRoleModel2

public RoleModel getRoleModel2()

setRoleModel1

public void setRoleModel1(RoleModel roleModel1)

setRoleModel2

public void setRoleModel2(RoleModel roleModel2)

getRoleModel

public RoleModel getRoleModel(String roleTypeUri)

getOtherPlayerId

public long getOtherPlayerId(long id)

hasSameRoleTypeUris

public boolean hasSameRoleTypeUris()

createRoleModel

public RoleModel createRoleModel(String roleTypeUri)
Specified by:
createRoleModel in class DeepaMehtaObjectModel

toJSON

public org.codehaus.jettison.json.JSONObject toJSON()
Specified by:
toJSON in interface JSONEnabled
Overrides:
toJSON in class DeepaMehtaObjectModel

clone

public AssociationModel clone()
Overrides:
clone in class DeepaMehtaObjectModel

toString

public String toString()
Overrides:
toString in class DeepaMehtaObjectModel

parseRole

private RoleModel parseRole(org.codehaus.jettison.json.JSONObject roleModel)


Copyright © 2015. All Rights Reserved.