de.topicmapslab.majortom.core
Class ConstructImpl

java.lang.Object
  extended by de.topicmapslab.majortom.core.ConstructImpl
All Implemented Interfaces:
de.topicmapslab.majortom.model.core.IConstruct, java.io.Serializable, java.lang.Comparable<de.topicmapslab.majortom.model.core.IConstruct>, org.tmapi.core.Construct
Direct Known Subclasses:
ReifiableImpl, TopicImpl

public abstract class ConstructImpl
extends java.lang.Object
implements de.topicmapslab.majortom.model.core.IConstruct

Base implementation of IConstruct.

Author:
Sven Krosse
See Also:
Serialized Form

Field Summary
private  de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity identity
          the identity of this construct
private  de.topicmapslab.majortom.model.core.IConstruct parent
          the parent of this construct;
private  boolean removed
          removed flag
private static long serialVersionUID
           
private  de.topicmapslab.majortom.model.core.ITopicMap topicMap
          the topic map
 
Constructor Summary
protected ConstructImpl(de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity identity, de.topicmapslab.majortom.model.core.ITopicMap topicMap, de.topicmapslab.majortom.model.core.IConstruct parent)
          constructor
 
Method Summary
 void addItemIdentifier(org.tmapi.core.Locator identifier)
          
 int compareTo(de.topicmapslab.majortom.model.core.IConstruct o)
          
 boolean equals(java.lang.Object obj)
          
 java.lang.String getId()
          
 de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity getIdentity()
          Returns the identity of this construct
 java.util.Set<org.tmapi.core.Locator> getItemIdentifiers()
          
 org.tmapi.core.Construct getParent()
          
 de.topicmapslab.majortom.model.core.ITopicMap getTopicMap()
          
 int hashCode()
          
 boolean isRemoved()
          
 long longId()
          
 void remove()
          
 void remove(boolean cascade)
          
 void removeItemIdentifier(org.tmapi.core.Locator identifier)
          
 void setRemoved(boolean removed)
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

removed

private boolean removed
removed flag


topicMap

private de.topicmapslab.majortom.model.core.ITopicMap topicMap
the topic map


parent

private de.topicmapslab.majortom.model.core.IConstruct parent
the parent of this construct;


identity

private de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity identity
the identity of this construct

Constructor Detail

ConstructImpl

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

Parameters:
identity - the ITopicMapStoreIdentity
topicMap - the containing topic map
parent - the parent construct
Method Detail

getTopicMap

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

Specified by:
getTopicMap in interface de.topicmapslab.majortom.model.core.IConstruct
Specified by:
getTopicMap in interface org.tmapi.core.Construct

addItemIdentifier

public void addItemIdentifier(org.tmapi.core.Locator identifier)
                       throws org.tmapi.core.ModelConstraintException

Specified by:
addItemIdentifier in interface org.tmapi.core.Construct
Throws:
org.tmapi.core.ModelConstraintException

getId

public java.lang.String getId()

Specified by:
getId in interface org.tmapi.core.Construct

longId

public long longId()

Specified by:
longId in interface de.topicmapslab.majortom.model.core.IConstruct

getItemIdentifiers

public java.util.Set<org.tmapi.core.Locator> getItemIdentifiers()

Specified by:
getItemIdentifiers in interface org.tmapi.core.Construct

remove

public void remove()

Specified by:
remove in interface org.tmapi.core.Construct

remove

public void remove(boolean cascade)
            throws org.tmapi.core.TopicInUseException

Specified by:
remove in interface de.topicmapslab.majortom.model.core.IConstruct
Throws:
org.tmapi.core.TopicInUseException

removeItemIdentifier

public void removeItemIdentifier(org.tmapi.core.Locator identifier)

Specified by:
removeItemIdentifier in interface org.tmapi.core.Construct

getParent

public org.tmapi.core.Construct getParent()

Specified by:
getParent in interface org.tmapi.core.Construct

getIdentity

public de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity getIdentity()
Returns the identity of this construct

Returns:
the identity the ITopicMapStoreIdentity

compareTo

public int compareTo(de.topicmapslab.majortom.model.core.IConstruct o)

Specified by:
compareTo in interface java.lang.Comparable<de.topicmapslab.majortom.model.core.IConstruct>

equals

public boolean equals(java.lang.Object obj)

Specified by:
equals in interface org.tmapi.core.Construct
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Specified by:
hashCode in interface org.tmapi.core.Construct
Overrides:
hashCode in class java.lang.Object

isRemoved

public boolean isRemoved()

Specified by:
isRemoved in interface de.topicmapslab.majortom.model.core.IConstruct

setRemoved

public void setRemoved(boolean removed)