com.ashridgetech.jamda.uml
Class StructuredType.PropertyImpl

java.lang.Object
  |
  +--com.ashridgetech.jamda.uml.StructuredType.PropertyImpl
All Implemented Interfaces:
Property, TypedItem
Enclosing class:
StructuredType

protected static class StructuredType.PropertyImpl
extends java.lang.Object
implements Property

Implementation of the Property interface for a getter and/or setter Operation. May also be linked to an Attribute.


Constructor Summary
protected StructuredType.PropertyImpl(Operation getter, Operation setter, Attribute attribute)
           
 
Method Summary
 StructuredType.Aggregation getAggregation()
          Get the aggregation level of this property.
 Association.End getAssociationEnd()
          Get the Association.End connected with this property, if there is one.
 Attribute getAttribute()
          Get the Attribute connected with this property, if there is one.
 java.lang.String getComment()
          Get the comment for this item.
 ModelElement getDirectSource()
          Get the immediate source element of the underlying element of this property.
 Operation getGetter()
          Get the getter Operation connected with this property, if there is one.
 java.lang.String getMultName()
          Get the name of this TypedItem , converted to plural using Util.pluralize(java.lang.String) if isMultiple() returns true.
 java.lang.String getName()
          Get the name of this item.
 ModelElement getOriginalSource()
          Get the original source element of the underlying element of this property.
 Parameter getParameter()
          Get the Parameter connected with this property, if there is one.
 java.util.Set getReaders()
          Get Actors who can read this Property
 Operation getSetter()
          Get the setter Operation connected with this property, if there is one.
 Type getType()
          Get the type of this item.
 ModelElement getUnderlyingElement()
          Get the underlying element of this property.
 Operation getUnderlyingOperation()
          Get the principal Operation connected with this property.
 java.util.Set getWriters()
          Get Actors who can write this Property
 boolean isMultiple()
          Indicate whether this item can have multiple values.
 boolean isOid()
          Indicate whether this property is an object identifier (OID) for its StructuredType.
 boolean isReadable()
          Indicate whether the value(s) of this property can be read.
 boolean isReadableBy(Actor actor)
          Indicate whether the value(s) of this property can be read by a given Actor.
 boolean isWritable()
          Indicate whether the value(s) of this property can be written.
 boolean isWritableBy(Actor actor)
          Indicate whether the value(s) of this property can be written by a given Actor.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructuredType.PropertyImpl

protected StructuredType.PropertyImpl(Operation getter,
                                      Operation setter,
                                      Attribute attribute)
Method Detail

getName

public java.lang.String getName()
Get the name of this item.

Specified by:
getName in interface TypedItem
Returns:
the name

getMultName

public java.lang.String getMultName()
Get the name of this TypedItem , converted to plural using Util.pluralize(java.lang.String) if isMultiple() returns true.

Specified by:
getMultName in interface TypedItem
Returns:
the singular or plural name

getType

public Type getType()
Get the type of this item.

Specified by:
getType in interface TypedItem
Returns:
the type

getComment

public java.lang.String getComment()
Get the comment for this item.

Specified by:
getComment in interface TypedItem
Returns:
the comment

isMultiple

public boolean isMultiple()
Indicate whether this item can have multiple values.

Specified by:
isMultiple in interface TypedItem
Returns:
true if the getter return type or the setter parameter has multiple values

isReadable

public boolean isReadable()
Indicate whether the value(s) of this property can be read.

Specified by:
isReadable in interface Property
Returns:
true if the values can be read

isReadableBy

public boolean isReadableBy(Actor actor)
Indicate whether the value(s) of this property can be read by a given Actor. This implementation does not distinguish between different actors.

Specified by:
isReadableBy in interface Property
Returns:
the value of isReadable()

isWritable

public boolean isWritable()
Indicate whether the value(s) of this property can be written.

Specified by:
isWritable in interface Property
Returns:
true if the values can be updated

isWritableBy

public boolean isWritableBy(Actor actor)
Indicate whether the value(s) of this property can be written by a given Actor. This implementation does not distinguish between different actors.

Specified by:
isWritableBy in interface Property
Returns:
the value of isWritable()

getAggregation

public StructuredType.Aggregation getAggregation()
Get the aggregation level of this property.

Specified by:
getAggregation in interface Property
Returns:
the Aggregation instance

isOid

public boolean isOid()
Indicate whether this property is an object identifier (OID) for its StructuredType.

Specified by:
isOid in interface Property
Returns:
true if this property is an oid

getDirectSource

public ModelElement getDirectSource()
Get the immediate source element of the underlying element of this property.

Specified by:
getDirectSource in interface Property
Returns:
the source element
See Also:
getUnderlyingElement(), getOriginalSource()

getOriginalSource

public ModelElement getOriginalSource()
Get the original source element of the underlying element of this property.

Specified by:
getOriginalSource in interface Property
Returns:
the source element
See Also:
getUnderlyingElement(), getDirectSource()

getUnderlyingElement

public ModelElement getUnderlyingElement()
Get the underlying element of this property. This will be one of the elements returned by getGetter(), getSetter(), getAttribute() or getAssociationEnd().

Specified by:
getUnderlyingElement in interface Property
Returns:
the source element
See Also:
getUnderlyingElement()

getReaders

public java.util.Set getReaders()
Get Actors who can read this Property

Specified by:
getReaders in interface Property
Returns:
the set of Actors. May be null to indicate that ALL Actors can read this Property, or an empty Set to indicate that NO Actors can read this Property

getWriters

public java.util.Set getWriters()
Get Actors who can write this Property

Specified by:
getWriters in interface Property
Returns:
the set of Actors. May be null to indicate that ALL Actors can write this Property, or an empty Set to indicate that NO Actors can write this Property

getGetter

public Operation getGetter()
Get the getter Operation connected with this property, if there is one.

Specified by:
getGetter in interface Property
Returns:
the getter

getSetter

public Operation getSetter()
Get the setter Operation connected with this property, if there is one.

Specified by:
getSetter in interface Property
Returns:
the setter

getAttribute

public Attribute getAttribute()
Get the Attribute connected with this property, if there is one.

Specified by:
getAttribute in interface Property
Returns:
the Attribute

getAssociationEnd

public Association.End getAssociationEnd()
Get the Association.End connected with this property, if there is one.

Specified by:
getAssociationEnd in interface Property
Returns:
the association end - always null

getParameter

public Parameter getParameter()
Get the Parameter connected with this property, if there is one.

Specified by:
getParameter in interface Property
Returns:
the Parameter - always null

getUnderlyingOperation

public Operation getUnderlyingOperation()
Get the principal Operation connected with this property. This is the getter if there is one, the setter otherwise.

Returns:
the Operation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.