de.interactive_instruments.ShapeChange.Model.Generic
Class GenericPropertyInfo

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.Generic.GenericPropertyInfo
All Implemented Interfaces:
MessageSource, Info, PropertyInfo

public class GenericPropertyInfo
extends PropertyInfoImpl
implements MessageSource


Field Summary
protected  AssociationInfo association
           
protected  Multiplicity cardinality
           
protected  int categoryOfValue
           
protected  Vector<Constraint> constraints
           
protected  String defaultCodeSpace
           
protected  String id
           
protected  boolean implementedByNilReason
           
protected  ClassInfo inClass
           
protected  String initialValue
           
protected  String inlineOrByReference
           
protected  boolean isAggregation
           
protected  boolean isAttribute
           
protected  boolean isComposition
           
protected  boolean isDerived
           
protected  boolean isMetadata
           
protected  boolean isNavigable
           
protected  boolean isOrdered
           
protected  boolean isReadOnly
           
protected  GenericModel model
           
protected  String name
           
protected  Options options
           
protected  ShapeChangeResult result
           
protected  PropertyInfo reverseProperty
           
protected  StructuredNumber sequenceNumber
           
protected  HashSet<String> stereotypes
           
protected  HashMap<String,String> taggedValues
           
protected  Type typeInfo
           
protected  boolean voidable
           
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.PropertyInfoImpl
nilReasonAllowed, qualifiers, restriction
 
Fields inherited from class de.interactive_instruments.ShapeChange.Model.InfoImpl
aliasName, definition, description, documentation
 
Constructor Summary
GenericPropertyInfo(GenericModel model, String id, String name, int categoryOfValue)
           
 
Method Summary
 String aliasName()
          Retrieve the alias, typically a human readable name
 AssociationInfo association()
           
 Multiplicity cardinality()
           
 int categoryOfValue()
           
 Vector<Constraint> constraints()
           
 GenericPropertyInfo createCopy(String copyId)
           
 String defaultCodeSpace()
           
 String documentation()
           
 boolean hasConstraints()
           
 String id()
           
 boolean implementedByNilReason()
          Check the tagged value "gmlImplementedByNilReason" to find out whether the property shall allow for nil value treatment.
 ClassInfo inClass()
           
 void inClass(ClassInfo ci)
           
 String initialValue()
           
 String inlineOrByReference()
           
 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 isMetadata()
          This inquires whether the property represents metadata, i.e. if it carries an appropriate tagged value.
 boolean isNavigable()
          Indicate whether the property is navigable.
 boolean isOrdered()
          Find out if the property represents an ordered collection.
 boolean isReadOnly()
          Default implementation investigates the initial value set for the property.
 String message(int mnr)
          Return a message for a message number.
 Model model()
           
 String name()
           
 Options options()
           
 ShapeChangeResult result()
           
 PropertyInfo reverseProperty()
           
 StructuredNumber sequenceNumber()
           
 void setAggregation(boolean isAggregation)
           
 void setAliasName(String aliasName)
           
 void setAssociation(AssociationInfo association)
           
 void setAttribute(boolean isAttribute)
           
 void setCardinality(Multiplicity cardinality)
           
 void setCategoryOfValue(int categoryOfValue)
           
 void setComposition(boolean isComposition)
           
 void setConstraints(Vector<Constraint> constraints)
           
 void setDefaultCodeSpace(String defaultCodeSpace)
           
 void setDerived(boolean isDerived)
           
 void setDocumentation(String documentation)
          Sets the documentation of this property to the given value.
 void setId(String id)
           
 void setImplementedByNilReason(boolean implementedByNilReason)
           
 void setInClass(ClassInfo inClass)
           
 void setInitialValue(String initialValue)
           
 void setInlineOrByReference(String inlineOrByReference)
           
 void setMetadata(boolean isMetadata)
           
 void setModel(GenericModel model)
           
 void setName(String name)
           
 void setNavigable(boolean isNavigable)
           
 void setNilReasonAllowed(boolean nilReasonAllowed)
           
 void setOptions(Options options)
           
 void setOrdered(boolean isOrdered)
           
 void setReadOnly(boolean isReadOnly)
           
 void setRestriction(boolean isRestriction)
           
 void setResult(ShapeChangeResult result)
           
 void setReverseProperty(PropertyInfo reverseProperty)
           
 void setSequenceNumber(StructuredNumber sequenceNumber)
           
 void setStereotype(String stereotype)
           
 void setStereotypes(Set<String> stereotypeSet)
           
 void setTaggedValue(String tvName, String tvValue, boolean updateFields)
           
 void setTaggedValues(HashMap<String,String> taggedValues, boolean updateFields)
           
 void setTypeInfo(Type typeInfo)
           
 void setVoidable(boolean voidable)
           
 Set<String> stereotypes()
           
 String taggedValue(String tag)
           
 HashMap<String,String> taggedValues()
           
 HashMap<String,String> taggedValues(String tagList)
          Return all the tagged values listed in the input string.
 String toString(String indent)
           
 Type typeInfo()
           
 boolean voidable()
           
 
Methods inherited from class de.interactive_instruments.ShapeChange.Model.PropertyInfoImpl
encodingRule, fullName, 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.Info
definition, description, matches, stereotype
 

Field Detail

options

protected Options options

result

protected ShapeChangeResult result

model

protected GenericModel model

id

protected String id

name

protected String name

stereotypes

protected HashSet<String> stereotypes

taggedValues

protected HashMap<String,String> taggedValues

isDerived

protected boolean isDerived

isReadOnly

protected boolean isReadOnly

isAttribute

protected boolean isAttribute

typeInfo

protected Type typeInfo

isNavigable

protected boolean isNavigable

isOrdered

protected boolean isOrdered

isComposition

protected boolean isComposition

isAggregation

protected boolean isAggregation

cardinality

protected Multiplicity cardinality

initialValue

protected String initialValue

inlineOrByReference

protected String inlineOrByReference

defaultCodeSpace

protected String defaultCodeSpace

isMetadata

protected boolean isMetadata

reverseProperty

protected PropertyInfo reverseProperty

inClass

protected ClassInfo inClass

sequenceNumber

protected StructuredNumber sequenceNumber

implementedByNilReason

protected boolean implementedByNilReason

voidable

protected boolean voidable

constraints

protected Vector<Constraint> constraints

association

protected AssociationInfo association

categoryOfValue

protected int categoryOfValue
Constructor Detail

GenericPropertyInfo

public GenericPropertyInfo(GenericModel model,
                           String id,
                           String name,
                           int categoryOfValue)
Method Detail

isMetadata

public boolean isMetadata()
Description copied from class: PropertyInfoImpl
This inquires whether the property represents metadata, i.e. if it carries an appropriate tagged value.

Specified by:
isMetadata in interface PropertyInfo
Overrides:
isMetadata in class PropertyInfoImpl
Returns:
the isMetadata

setAttribute

public void setAttribute(boolean isAttribute)
Parameters:
isAttribute - the isAttribute to set

setMetadata

public void setMetadata(boolean isMetadata)
Parameters:
isMetadata - the isMetadata to set

setReverseProperty

public void setReverseProperty(PropertyInfo reverseProperty)
Parameters:
reverseProperty - the reverseProperty to set

setInClass

public void setInClass(ClassInfo inClass)
Parameters:
inClass - the inClass to set

setImplementedByNilReason

public void setImplementedByNilReason(boolean implementedByNilReason)
Parameters:
implementedByNilReason - the implementedByNilReason to set

setAssociation

public void setAssociation(AssociationInfo association)
Parameters:
association - the association to set

setCategoryOfValue

public void setCategoryOfValue(int categoryOfValue)
Parameters:
categoryOfValue - the categoryOfValue to set

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()

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()

typeInfo

public Type typeInfo()
Specified by:
typeInfo in interface PropertyInfo
See Also:
PropertyInfo.typeInfo()

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()

hasConstraints

public boolean hasConstraints()

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()

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()

cardinality

public Multiplicity cardinality()
Specified by:
cardinality in interface PropertyInfo
See Also:
PropertyInfo.cardinality()

initialValue

public String initialValue()
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.
See Also:
PropertyInfo.initialValue()

inlineOrByReference

public String inlineOrByReference()
Specified by:
inlineOrByReference in interface PropertyInfo
See Also:
()

defaultCodeSpace

public String defaultCodeSpace()
Specified by:
defaultCodeSpace in interface PropertyInfo
See Also:
()

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:
()

inClass

public ClassInfo inClass()
Specified by:
inClass in interface PropertyInfo
See Also:
PropertyInfo.inClass()

inClass

public void inClass(ClassInfo ci)
Specified by:
inClass in interface PropertyInfo
See Also:
de.interactive_instruments.ShapeChange.Model.PropertyInfo#inClass(de. interactive_instruments.ShapeChange.Model.ClassInfo)

sequenceNumber

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

voidable

public boolean voidable()
Specified by:
voidable in interface PropertyInfo
See Also:
PropertyInfo.voidable()

constraints

public Vector<Constraint> constraints()
Specified by:
constraints in interface PropertyInfo
See Also:
PropertyInfo.constraints()

association

public AssociationInfo association()
Specified by:
association in interface PropertyInfo
See Also:
PropertyInfo.association()

setCardinality

public void setCardinality(Multiplicity cardinality)
Parameters:
cardinality - the cardinality to set

setConstraints

public void setConstraints(Vector<Constraint> constraints)
Parameters:
constraints - the constraints to set

setDefaultCodeSpace

public void setDefaultCodeSpace(String defaultCodeSpace)
Parameters:
defaultCodeSpace - the defaultCodeSpace to set

setInitialValue

public void setInitialValue(String initialValue)
Parameters:
initialValue - the initialValue to set

setInlineOrByReference

public void setInlineOrByReference(String inlineOrByReference)
Parameters:
inlineOrByReference - the inlineOrByReference to set

setAggregation

public void setAggregation(boolean isAggregation)
Parameters:
isAggregation - the isAggregation to set

setComposition

public void setComposition(boolean isComposition)
Parameters:
isComposition - the isComposition to set

setDerived

public void setDerived(boolean isDerived)
Parameters:
isDerived - the isDerived to set

setNavigable

public void setNavigable(boolean isNavigable)
Parameters:
isNavigable - the isNavigable to set

setOrdered

public void setOrdered(boolean isOrdered)
Parameters:
isOrdered - the isOrdered to set

setSequenceNumber

public void setSequenceNumber(StructuredNumber sequenceNumber)
Parameters:
sequenceNumber - the sequenceNumber to set

setTypeInfo

public void setTypeInfo(Type typeInfo)
Parameters:
typeInfo - the typeInfo to set

setVoidable

public void setVoidable(boolean voidable)
Parameters:
voidable - the voidable to set

setNilReasonAllowed

public void setNilReasonAllowed(boolean nilReasonAllowed)

setRestriction

public void setRestriction(boolean isRestriction)

stereotypes

public Set<String> stereotypes()
Specified by:
stereotypes in interface Info
See Also:
Info.stereotypes()

aliasName

public String aliasName()
Description copied from class: InfoImpl
Retrieve the alias, typically a human readable name

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

documentation

public String documentation()
Specified by:
documentation in interface Info
Overrides:
documentation in class InfoImpl
See Also:
InfoImpl.documentation()

id

public String id()
Specified by:
id in interface Info
See Also:
Info.id()

model

public Model model()
Specified by:
model in interface Info
See Also:
Info.model()

name

public String name()
Specified by:
name in interface Info
See Also:
Info.name()

options

public Options options()
Specified by:
options in interface Info
See Also:
Info.options()

result

public ShapeChangeResult result()
Specified by:
result in interface Info
See Also:
Info.result()

setAliasName

public void setAliasName(String aliasName)
Parameters:
aliasName -

setDocumentation

public void setDocumentation(String documentation)
Sets the documentation of this property to the given value. Also invalidates the definition and description values so that they are computed based upon the new documentation.

Parameters:
documentation -

setId

public void setId(String id)
Parameters:
id -

setModel

public void setModel(GenericModel model)
Parameters:
model -

setName

public void setName(String name)
Parameters:
name -

setOptions

public void setOptions(Options options)
Parameters:
options -

setResult

public void setResult(ShapeChangeResult result)
Parameters:
result -

setStereotypes

public void setStereotypes(Set<String> stereotypeSet)
Parameters:
stereotypeSet -

setStereotype

public void setStereotype(String stereotype)
Parameters:
stereotype -

setTaggedValues

public void setTaggedValues(HashMap<String,String> taggedValues,
                            boolean updateFields)
Parameters:
taggedValues -
updateFields - true if class fields should be updated based upon information from given tagged values, else false

taggedValue

public String taggedValue(String tag)
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.
See Also:
Info.taggedValue(java.lang.String)

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()

taggedValues

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

Specified by:
taggedValues in interface Info
See Also:
Info.taggedValues(java.lang.String)

implementedByNilReason

public boolean implementedByNilReason()
Description copied from class: PropertyInfoImpl
Check the tagged value "gmlImplementedByNilReason" to find out whether the property shall allow for nil value treatment. Alternatively check the characteristics of the property

Specified by:
implementedByNilReason in interface PropertyInfo
Overrides:
implementedByNilReason in class PropertyInfoImpl
See Also:
PropertyInfoImpl.implementedByNilReason()

categoryOfValue

public int categoryOfValue()
Specified by:
categoryOfValue in interface PropertyInfo
Overrides:
categoryOfValue in class PropertyInfoImpl
See Also:
PropertyInfoImpl.categoryOfValue()

createCopy

public GenericPropertyInfo createCopy(String copyId)

toString

public String toString(String indent)

message

public String message(int mnr)
Description copied from interface: MessageSource
Return a message for a message number.

Specified by:
message in interface MessageSource

isReadOnly

public boolean isReadOnly()
Description copied from class: PropertyInfoImpl
Default implementation investigates the initial value set for the property. If an initial value is set and it contains the String {frozen} or {readOnly} then this evaluates to true, else false. Subclasses of PropertyInfoImpl can override this method if they have a more direct way to determine if the property is readOnly.

Specified by:
isReadOnly in interface PropertyInfo
Overrides:
isReadOnly in class PropertyInfoImpl
Returns:
the isReadOnly
See Also:
PropertyInfo.isReadOnly()

setReadOnly

public void setReadOnly(boolean isReadOnly)
Parameters:
isReadOnly - the isReadOnly to set

setTaggedValue

public void setTaggedValue(String tvName,
                           String tvValue,
                           boolean updateFields)
Parameters:
tvName -
tvValue -
updateFields - true if property fields should be updated based upon information from given tagged value, else false


Copyright © 2015. All rights reserved.