de.topicmapslab.majortom.core
Class AssociationImpl

java.lang.Object
  extended by de.topicmapslab.majortom.core.ConstructImpl
      extended by de.topicmapslab.majortom.core.ReifiableImpl
          extended by de.topicmapslab.majortom.core.ScopeableImpl
              extended by de.topicmapslab.majortom.core.AssociationImpl
All Implemented Interfaces:
de.topicmapslab.majortom.model.core.IAssociation, de.topicmapslab.majortom.model.core.IConstruct, de.topicmapslab.majortom.model.core.IReifiable, de.topicmapslab.majortom.model.core.IScopable, de.topicmapslab.majortom.model.core.ITypeable, de.topicmapslab.majortom.model.core.paged.IPagedAssociation, java.io.Serializable, java.lang.Comparable<de.topicmapslab.majortom.model.core.IConstruct>, org.tmapi.core.Association, org.tmapi.core.Construct, org.tmapi.core.Reifiable, org.tmapi.core.Scoped, org.tmapi.core.Typed

public class AssociationImpl
extends ScopeableImpl
implements de.topicmapslab.majortom.model.core.IAssociation, de.topicmapslab.majortom.model.core.paged.IPagedAssociation

Base implementation of IAssociation

Author:
Sven Krosse
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Constructor Summary
protected AssociationImpl(de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity identity, de.topicmapslab.majortom.model.core.ITopicMap topicMap)
          constructor
 
Method Summary
 org.tmapi.core.Role createRole(org.tmapi.core.Topic type, org.tmapi.core.Topic player)
          
 long getNumberOfRoles()
          
 de.topicmapslab.majortom.model.core.ITopicMap getParent()
          
 java.util.Set<org.tmapi.core.Role> getRoles()
          
 java.util.List<org.tmapi.core.Role> getRoles(int offset, int limit)
          
 java.util.List<org.tmapi.core.Role> getRoles(int offset, int limit, java.util.Comparator<org.tmapi.core.Role> comparator)
          
 java.util.Set<org.tmapi.core.Role> getRoles(org.tmapi.core.Topic type)
          
 java.util.Set<org.tmapi.core.Topic> getRoleTypes()
          
 org.tmapi.core.Topic getType()
          
 void setType(org.tmapi.core.Topic type)
          
 java.lang.String toString()
          
 
Methods inherited from class de.topicmapslab.majortom.core.ScopeableImpl
addTheme, getScope, getScopeObject, removeTheme
 
Methods inherited from class de.topicmapslab.majortom.core.ReifiableImpl
getReifier, setReifier
 
Methods inherited from class de.topicmapslab.majortom.core.ConstructImpl
addItemIdentifier, compareTo, equals, getId, getIdentity, getItemIdentifiers, getTopicMap, hashCode, isRemoved, longId, remove, remove, removeItemIdentifier, setRemoved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tmapi.core.Reifiable
getReifier, setReifier
 
Methods inherited from interface de.topicmapslab.majortom.model.core.IScopable
getScopeObject, getTopicMap
 
Methods inherited from interface org.tmapi.core.Scoped
addTheme, getScope, removeTheme
 
Methods inherited from interface de.topicmapslab.majortom.model.core.IConstruct
isRemoved, longId, remove
 
Methods inherited from interface org.tmapi.core.Construct
addItemIdentifier, equals, getId, getItemIdentifiers, hashCode, remove, removeItemIdentifier
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

AssociationImpl

protected AssociationImpl(de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity identity,
                          de.topicmapslab.majortom.model.core.ITopicMap topicMap)
constructor

Parameters:
identity - the ITopicMapStoreIdentity
topicMap - the topic map
Method Detail

createRole

public org.tmapi.core.Role createRole(org.tmapi.core.Topic type,
                                      org.tmapi.core.Topic player)
                               throws org.tmapi.core.ModelConstraintException

Specified by:
createRole in interface org.tmapi.core.Association
Throws:
org.tmapi.core.ModelConstraintException

getParent

public de.topicmapslab.majortom.model.core.ITopicMap getParent()

Specified by:
getParent in interface de.topicmapslab.majortom.model.core.IAssociation
Specified by:
getParent in interface org.tmapi.core.Association
Specified by:
getParent in interface org.tmapi.core.Construct
Overrides:
getParent in class ConstructImpl

getRoleTypes

public java.util.Set<org.tmapi.core.Topic> getRoleTypes()

Specified by:
getRoleTypes in interface org.tmapi.core.Association

getRoles

public java.util.Set<org.tmapi.core.Role> getRoles()

Specified by:
getRoles in interface org.tmapi.core.Association

getRoles

public java.util.Set<org.tmapi.core.Role> getRoles(org.tmapi.core.Topic type)

Specified by:
getRoles in interface org.tmapi.core.Association

setType

public void setType(org.tmapi.core.Topic type)

Specified by:
setType in interface org.tmapi.core.Typed

getType

public org.tmapi.core.Topic getType()

Specified by:
getType in interface org.tmapi.core.Typed

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

getRoles

public java.util.List<org.tmapi.core.Role> getRoles(int offset,
                                                    int limit)

Specified by:
getRoles in interface de.topicmapslab.majortom.model.core.paged.IPagedAssociation

getRoles

public java.util.List<org.tmapi.core.Role> getRoles(int offset,
                                                    int limit,
                                                    java.util.Comparator<org.tmapi.core.Role> comparator)

Specified by:
getRoles in interface de.topicmapslab.majortom.model.core.paged.IPagedAssociation

getNumberOfRoles

public long getNumberOfRoles()

Specified by:
getNumberOfRoles in interface de.topicmapslab.majortom.model.core.paged.IPagedAssociation