AROM-2_2_13

arom.kr.model
Interface NamedEntity

All Superinterfaces:
AMEntity, helix.util.beans.CompoundPropertySet, DocumentableObject, helix.util.beans.PropertySet
All Known Subinterfaces:
AMAssociation, AMClass, AMObject, KnowledgeBase, NameSpace, Role, Slot, SpecializableEntity, Structure, Variable

public interface NamedEntity
extends AMEntity, helix.util.beans.PropertySet

This interface specializes the AMEntity interface to indicate that the entity is named. The name of the entity is an atomic property designated by the NAME class variable. Objects interested in name changes must register with this NamedEntity in order to receive name change notifications.

A named entity is part of a name space that can be retreived via the getNameSpace method. That name space act as the container for this entity.

Author:
bruley

Field Summary
static String NAME
          The key used to designate the 'name' property.
 
Method Summary
 String getFQName()
          Returns the fully qualified name of this entity.
 String getName()
          Returns the name of this entity, or null if no name had been set to the entity.
 NameSpace getNameSpace()
          Returns the name space in which this named entity belongs to.
 void setName(String name)
          Sets the name of this entity.
 
Methods inherited from interface arom.kr.model.AMEntity
addEntityListener, delete, getContainer, getIdentifier, removeEntityListener, verify
 
Methods inherited from interface arom.kr.model.DocumentableObject
applyDocumentationModifier, cancelDocumentationModifier, documentationModifiers, getDocumentation, lookupDocumentationModifier
 
Methods inherited from interface helix.util.beans.PropertySet
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from interface helix.util.beans.CompoundPropertySet
addCompositionChangeListener, addCompositionChangeListener, addVetoableCompositionChangeListener, addVetoableCompositionChangeListener, removeCompositionChangeListener, removeCompositionChangeListener, removeVetoableCompositionChangeListener, removeVetoableCompositionChangeListener
 

Field Detail

NAME

public static final String NAME
The key used to designate the 'name' property. This string object is used by property change event to identify the name of this entity.

See Also:
Constant Field Values
Method Detail

setName

public void setName(String name)
             throws InvalidNameException
Sets the name of this entity. The name must be a string approved by the isValidName method of the namespace this entity belongs to. If the name is not valid, an InvalidNameException is thrown.

Parameters:
name - the name to be set to this entity.
Throws:
InvalidNameException - if the supplied name is invalid in the name space of this entity.
See Also:
NameSpace.isValidName(String)

getName

public String getName()
Returns the name of this entity, or null if no name had been set to the entity. The name is the string that is sets to the entity by the setName method.

Returns:
the name of this entity.
See Also:
getFQName()

getFQName

public String getFQName()
Returns the fully qualified name of this entity. Each named entity is contained by a NameSpace object which itself is a named entity. The fully qualified name of the entity is the name that uniquely identify the entity in the outermost containing name space.

Returns:
the fully qualified name of this entity.
See Also:
getName()

getNameSpace

public NameSpace getNameSpace()
Returns the name space in which this named entity belongs to. The relation between an entity and it's name space and the relation between en entity and it's container are two representations of the same relation. the NamedEntity-NameSpace is a specialization of the AMEntity-container entity relation. This specialization simply implies that a named entity is part of a container which is a NameSpace. getNameSpace() and getContainer() both returns the same entity.

Returns:
the name space this entity belongs to.
See Also:
NameSpace, AMEntity.getContainer()

AROM-2_2_13