de.interactive_instruments.ShapeChange.Model.EA
Class PropertyInfoEA

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Model.InfoImpl
      extended by de.interactive_instruments.ShapeChange.Model.PropertyInfoImpl
          extended by de.interactive_instruments.ShapeChange.Model.EA.PropertyInfoEA
All Implemented Interfaces:
Info, PropertyInfo

public class PropertyInfoEA
extends PropertyInfoImpl
implements PropertyInfo


Field Summary
protected  String aggregationTypeCache
          Aggregation type cache
protected  boolean aliasAccessed
          Flag used to prevent duplicate retrieval/computation of the alias of this property.
protected  ClassInfoEA classInfo
          Class the property belongs to
protected  Vector<Constraint> constraintsCache
          Cache set of constraints
protected  EADocument document
          Access to the document object
protected  boolean documentationAccessed
          Flag used to prevent duplicate retrieval/computation of the documentation of this property.
protected  org.sparx.Attribute eaAttribute
          EA attribute object, if this is an attribute
protected  String eaName
          Name of the property
protected  String eaPropertyId
          Model-unique id.
protected  String initialValueCache
          Initial value cache
protected  Boolean isDerivedCache
          Is derived cache
protected  Boolean isNavigableCache
          Is navigable cache
protected  Boolean isOrderedCache
          Cache for ordering in property
protected  Boolean isReadOnlyCache
          Is read only cache
protected  Multiplicity multiplicity
          Multiplicity of property
protected  StructuredNumber sequenceNumber
          Sequence number of property
protected  HashSet<String> stereotypesCache
          Cache set for stereotypes
protected  HashMap<String,String> taggedValuesCache
          Cache map for tagged values
protected  ClassInfoEA typeClassInfo
           
protected  Type typeInfo
          Type information
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.PropertyInfoImpl
implementedByNilReason, nilReasonAllowed, qualifiers, restriction
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.InfoImpl
aliasName, definition, description, documentation
 
Constructor Summary
PropertyInfoEA(EADocument doc, ClassInfoEA ci, AssociationInfoEA ai, boolean reversed, org.sparx.ConnectorEnd eaCE, ClassInfoEA tci)
          Create a PropertyInfo object given an AssociationInfo and a ConnectorEnd.
PropertyInfoEA(EADocument doc, ClassInfoEA ci, org.sparx.Attribute attr)
          Create a PropertyInfo object given an EA Attribute.
 
Method Summary
 String aliasName()
          Get alias name of the property.
 AssociationInfo association()
           
 Multiplicity cardinality()
          Return multiplicity of property
 Vector<Constraint> constraints()
          This method returns the constraints associated with the class.
 String defaultCodeSpace()
          Return value of tagged value "defaultCodeSpace"
 String documentation()
          Return the documentation attached to the property object.
 String id()
          Return model-unique id of property.
 ClassInfo inClass()
          Return the class object to which this property belongs.
 void inClass(ClassInfo ci)
          Make the property belong to the class given.
 String initialValue()
          Return the initialValue of the property in case such a thing is specified in the model, null otherwise.
 String inlineOrByReference()
          From the tagged value "inlineOrByReference" find out whether the property shall be translated into a construct which embeds the value into the property ("inline") or refers it ("byreference").
 boolean isAggregation()
          Find out whether this property is an aggregation.
 boolean isAttribute()
          Indicate whether this property is an attribute (and not a role)
 boolean isComposition()
          Find out whether this property is a composition.
 boolean isDerived()
          Find out whether this property is a derived one.
 boolean isNavigable()
          Indicate whether the property is navigable.
 boolean isOrdered()
          Find out if the property represents an ordered collection.
 boolean isReadOnly()
          Retrieves information on whether the property is read only directly via the EA API.
 Model model()
          Return EA model object.
 String name()
          Obtain the name of the property.
 Options options()
          Return options and configuration object.
 ShapeChangeResult result()
          Return result object for error reporting.
 PropertyInfo reverseProperty()
           
 StructuredNumber sequenceNumber()
           
 Set<String> stereotypes()
          Return the normalized stereotype of the property.
 String taggedValue(String tag)
          Return the tagged value for the tag given or null if missing.
 void taggedValue(String tag, String value)
          Set the tagged value for the tag given.
 HashMap<String,String> taggedValues()
           
 HashMap<String,String> taggedValues(String tagList)
          Return all the tagged values listed in the input string.
 Type typeInfo()
          Return id and name of type of property
 boolean voidable()
          Find out whether the property owns the stereotype voidable.
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.PropertyInfoImpl
categoryOfValue, encodingRule, fullName, implementedByNilReason, isMetadata, isRestriction, nilReasonAllowed, nilReasonAllowed, postprocessAfterLoadingAndValidate, qname, qualifier, qualifiers
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.InfoImpl
definition, description, matches, stereotype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.interactive_instruments.ShapeChange.Model.PropertyInfo
categoryOfValue, implementedByNilReason, isMetadata, isRestriction, nilReasonAllowed, nilReasonAllowed, qname, qualifier, qualifiers
 
Methods inherited from interface de.interactive_instruments.ShapeChange.Model.Info
definition, description, encodingRule, fullName, matches, postprocessAfterLoadingAndValidate, stereotype
 

Field Detail

aliasAccessed

protected boolean aliasAccessed
Flag used to prevent duplicate retrieval/computation of the alias of this property.


documentationAccessed

protected boolean documentationAccessed
Flag used to prevent duplicate retrieval/computation of the documentation of this property.


document

protected EADocument document
Access to the document object


classInfo

protected ClassInfoEA classInfo
Class the property belongs to


eaPropertyId

protected String eaPropertyId
Model-unique id. For attributes this is the ID from EA Attributes prefixed by the class id. For roles this is derived from the Connector and a sign.


eaName

protected String eaName
Name of the property


typeInfo

protected Type typeInfo
Type information


typeClassInfo

protected ClassInfoEA typeClassInfo

eaAttribute

protected org.sparx.Attribute eaAttribute
EA attribute object, if this is an attribute


sequenceNumber

protected StructuredNumber sequenceNumber
Sequence number of property


multiplicity

protected Multiplicity multiplicity
Multiplicity of property


initialValueCache

protected String initialValueCache
Initial value cache


isReadOnlyCache

protected Boolean isReadOnlyCache
Is read only cache


isDerivedCache

protected Boolean isDerivedCache
Is derived cache


isNavigableCache

protected Boolean isNavigableCache
Is navigable cache


aggregationTypeCache

protected String aggregationTypeCache
Aggregation type cache


isOrderedCache

protected Boolean isOrderedCache
Cache for ordering in property


stereotypesCache

protected HashSet<String> stereotypesCache
Cache set for stereotypes


taggedValuesCache

protected HashMap<String,String> taggedValuesCache
Cache map for tagged values


constraintsCache

protected Vector<Constraint> constraintsCache
Cache set of constraints

Constructor Detail

PropertyInfoEA

public PropertyInfoEA(EADocument doc,
                      ClassInfoEA ci,
                      org.sparx.Attribute attr)
Create a PropertyInfo object given an EA Attribute.


PropertyInfoEA

public PropertyInfoEA(EADocument doc,
                      ClassInfoEA ci,
                      AssociationInfoEA ai,
                      boolean reversed,
                      org.sparx.ConnectorEnd eaCE,
                      ClassInfoEA tci)
Create a PropertyInfo object given an AssociationInfo and a ConnectorEnd.

Method Detail

model

public Model model()
Return EA model object.

Specified by:
model in interface Info

options

public Options options()
Return options and configuration object.

Specified by:
options in interface Info

result

public ShapeChangeResult result()
Return result object for error reporting.

Specified by:
result in interface Info

cardinality

public Multiplicity cardinality()
Return multiplicity of property

Specified by:
cardinality in interface PropertyInfo

defaultCodeSpace

public String defaultCodeSpace()
Return value of tagged value "defaultCodeSpace"

Specified by:
defaultCodeSpace in interface PropertyInfo

inClass

public ClassInfo inClass()
Return the class object to which this property belongs.

Specified by:
inClass in interface PropertyInfo

inClass

public void inClass(ClassInfo ci)
Make the property belong to the class given.

Specified by:
inClass in interface PropertyInfo

initialValue

public String initialValue()
Return the initialValue of the property in case such a thing is specified in the model, null otherwise. This works only for attributes.

Specified by:
initialValue in interface PropertyInfo
Returns:
the initial value of the property in case such a thing is specified in the model, null otherwise. This works only for attributes.

isReadOnly

public boolean isReadOnly()
Retrieves information on whether the property is read only directly via the EA API.

Specified by:
isReadOnly in interface PropertyInfo
Overrides:
isReadOnly in class PropertyInfoImpl
Returns:
true if the attribute may not be written to after initialization, else false (default).
See Also:
PropertyInfoImpl.isReadOnly()

inlineOrByReference

public String inlineOrByReference()
From the tagged value "inlineOrByReference" find out whether the property shall be translated into a construct which embeds the value into the property ("inline") or refers it ("byreference").

Specified by:
inlineOrByReference in interface PropertyInfo

isAggregation

public boolean isAggregation()
Description copied from interface: PropertyInfo
Find out whether this property is an aggregation.

Specified by:
isAggregation in interface PropertyInfo
See Also:
PropertyInfo.isAggregation()

isAttribute

public boolean isAttribute()
Description copied from interface: PropertyInfo
Indicate whether this property is an attribute (and not a role)

Specified by:
isAttribute in interface PropertyInfo
See Also:
PropertyInfo.isAttribute()

isComposition

public boolean isComposition()
Description copied from interface: PropertyInfo
Find out whether this property is a composition.

Specified by:
isComposition in interface PropertyInfo
See Also:
PropertyInfo.isComposition()

isDerived

public boolean isDerived()
Description copied from interface: PropertyInfo
Find out whether this property is a derived one.

Specified by:
isDerived in interface PropertyInfo
See Also:
PropertyInfo.isDerived()

isNavigable

public boolean isNavigable()
Description copied from interface: PropertyInfo
Indicate whether the property is navigable. An attribute is always navigable, while an association role may not be navigable.

Specified by:
isNavigable in interface PropertyInfo
See Also:
PropertyInfo.isNavigable()

isOrdered

public boolean isOrdered()
Description copied from interface: PropertyInfo
Find out if the property represents an ordered collection.

Specified by:
isOrdered in interface PropertyInfo
See Also:
PropertyInfo.isOrdered()

reverseProperty

public PropertyInfo reverseProperty()
Specified by:
reverseProperty in interface PropertyInfo
Returns:
the property on the other end of the association; null for attribute properties.
See Also:
PropertyInfo.reverseProperty()

sequenceNumber

public StructuredNumber sequenceNumber()
Specified by:
sequenceNumber in interface PropertyInfo

stereotypes

public Set<String> stereotypes()
Return the normalized stereotype of the property.

Specified by:
stereotypes in interface Info

taggedValues

public HashMap<String,String> taggedValues()
Specified by:
taggedValues in interface Info
Returns:
a map with the tagged values defined for this object (key: tagged value name, value: the value of the tagged value); can be an empty map but not null
See Also:
Info.taggedValues()

taggedValue

public String taggedValue(String tag)
Return the tagged value for the tag given or null if missing.

Specified by:
taggedValue in interface Info
Parameters:
tag - name of the tagged value to look up
Returns:
the tagged value for the tag given or null if the tagged value is missing.

taggedValue

public void taggedValue(String tag,
                        String value)
Set the tagged value for the tag given.


typeInfo

public Type typeInfo()
Return id and name of type of property

Specified by:
typeInfo in interface PropertyInfo

voidable

public boolean voidable()
Find out whether the property owns the stereotype voidable.

Specified by:
voidable in interface PropertyInfo

documentation

public String documentation()
Return the documentation attached to the property object. This is fetched from tagged values and - if this is absent - from the 'notes' specific to the EA objects model.

Specified by:
documentation in interface Info
Overrides:
documentation in class InfoImpl

id

public String id()
Return model-unique id of property.

Specified by:
id in interface Info

name

public String name()
Obtain the name of the property.

Specified by:
name in interface Info

aliasName

public String aliasName()
Get alias name of the property.

Specified by:
aliasName in interface Info
Overrides:
aliasName in class InfoImpl
Returns:
the human readable name or an empty string if none exists

taggedValues

public HashMap<String,String> taggedValues(String tagList)
Return all the tagged values listed in the input string. Tags are assumed to be separated by commas.

Specified by:
taggedValues in interface Info

constraints

public Vector<Constraint> constraints()
This method returns the constraints associated with the class.

Specified by:
constraints in interface PropertyInfo

association

public AssociationInfo association()
Specified by:
association in interface PropertyInfo


Copyright © 2015. All rights reserved.