public class GenericPropertyInfo extends PropertyInfoImpl implements MessageSource
Type | Property and Description |
---|---|
PropertyInfo |
reverse |
Modifier and Type | Field and Description |
---|---|
protected AssociationInfo |
association |
protected Multiplicity |
cardinality |
protected List<Constraint> |
constraints |
protected String |
id |
protected ClassInfo |
inClass |
protected String |
initialValue |
protected String |
inlineOrByReference |
protected boolean |
isAggregation |
protected boolean |
isAttribute |
protected boolean |
isComposition |
protected boolean |
isDerived |
protected boolean |
isNavigable |
protected boolean |
isOrdered |
protected boolean |
isReadOnly |
protected boolean |
isUnique |
protected GenericModel |
model |
protected String |
name |
protected Options |
options |
protected ShapeChangeResult |
result |
protected PropertyInfo |
reverseProperty |
protected StructuredNumber |
sequenceNumber |
protected Type |
typeInfo |
implementedByNilReason, nilReasonAllowed, profiles, qualifiers, restriction
descriptors, stereotypesCache, taggedValuesCache
GLOBAL_SEQUENCE_NUMBER_START_VALUE_FOR_ASSOCIATIONROLES, GLOBAL_SEQUENCE_NUMBER_START_VALUE_FOR_ATTRIBUTES
Constructor and Description |
---|
GenericPropertyInfo() |
GenericPropertyInfo(GenericModel model,
String id,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
addPrefixToModelElementIDs(String prefix)
Adds the prefix to the 'id' of this class.
|
AssociationInfo |
association() |
Multiplicity |
cardinality() |
List<Constraint> |
constraints()
This method returns the constraints associated with the property.
|
void |
copyTypeInfo(Type typeInfo)
Uses the id and name from the given Type object to initialise the fields
of this object's typeInfo value (which is initialized first in case it is
null ). |
GenericPropertyInfo |
createCopy(String copyId) |
boolean |
hasConstraints() |
String |
id()
Return unique id of model element (unique within the model).
|
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 |
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.
|
boolean |
isUnique()
Find out if the property allows duplicates in the values or if only
unique values are allowed.
|
String |
message(int mnr)
Return a message for a message number.
|
GenericModel |
model() |
String |
name()
Obtain the name of the model element.
|
Options |
options() |
String |
printAsString(String indent) |
ShapeChangeResult |
result() |
PropertyInfo |
reverseProperty() |
StructuredNumber |
sequenceNumber() |
void |
setAggregation(boolean isAggregation) |
void |
setAssociation(AssociationInfo association) |
void |
setAttribute(boolean isAttribute) |
void |
setCardinality(Multiplicity cardinality) |
void |
setComposition(boolean isComposition) |
void |
setConstraints(List<Constraint> list) |
void |
setDerived(boolean isDerived) |
void |
setId(String id) |
void |
setInClass(ClassInfo inClass) |
void |
setInitialValue(String initialValue) |
void |
setInlineOrByReference(String inlineOrByReference) |
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 |
setProfiles(Profiles profiles) |
void |
setQualifiers(Vector<Qualifier> qualifiers) |
void |
setReadOnly(boolean isReadOnly) |
void |
setRestriction(boolean isRestriction) |
void |
setResult(ShapeChangeResult result) |
void |
setReverseProperty(PropertyInfo reverseProperty) |
void |
setSequenceNumber(StructuredNumber sequenceNumber,
boolean updateTaggedValue)
Sets the structured number to be used by this object.
|
void |
setStereotype(String stereotype) |
void |
setStereotypes(Stereotypes stereotypeSet) |
void |
setTaggedValue(String tvName,
String tvValue,
boolean updateFields) |
void |
setTaggedValues(TaggedValues taggedValues,
boolean updateFields) |
void |
setTypeInfo(Type typeInfo)
NOTE: sets the value of the typeInfo attribute of this
GenericPropertyInfo object to reference the given one.
|
void |
setUnique(boolean isUnique) |
Type |
typeInfo() |
protected void |
updateFieldsForTaggedValue(String tvName,
String tvValue)
Encapsulates the logic to update property fields based upon the value of
a named tagged value.
|
void |
validateStereotypesCache()
Save the (normalized) stereotypes in the cache.
|
void |
validateTaggedValuesCache()
Create cache of stereotypes and tagged values
|
categoryOfValue, defaultCodeSpace, encodingRule, fullName, fullNameInSchema, getNextNumberForAssociationRoleWithoutExplicitSequenceNumber, getNextNumberForAttributeWithoutExplicitSequenceNumber, implementedByNilReason, inlineOrByReferenceFromEncodingRule, isMetadata, isRestriction, language, nilReasonAllowed, nilReasonAllowed, postprocessAfterLoadingAndValidate, profiles, qname, qualifier, qualifiers, voidable
aliasName, compareTo, dataCaptureStatements, definition, derivedDocumentation, description, descriptors, descriptorSource, descriptorValues, documentation, examples, globalIdentifier, legalBasis, matches, primaryCode, removeTaggedValue, setDescriptors, stereotype, stereotypes, taggedValue, taggedValueInLanguage, taggedValues, taggedValues, taggedValuesAll, taggedValuesForTag, taggedValuesForTagAsLangStrings, taggedValuesForTagList, taggedValuesInLanguage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
aliasName, dataCaptureStatements, definition, derivedDocumentation, description, descriptors, documentation, examples, globalIdentifier, legalBasis, matches, primaryCode, removeTaggedValue, stereotype, stereotypes, taggedValue, taggedValueInLanguage, taggedValues, taggedValues, taggedValuesAll, taggedValuesForTag, taggedValuesForTagAsLangStrings, taggedValuesForTagList, taggedValuesInLanguage
compareTo
public PropertyInfo reverseProperty
reverseProperty
in interface PropertyInfo
protected Options options
protected ShapeChangeResult result
protected GenericModel model
protected String id
protected String name
protected Multiplicity cardinality
protected boolean isNavigable
protected StructuredNumber sequenceNumber
protected Type typeInfo
protected boolean isDerived
protected boolean isReadOnly
protected boolean isAttribute
protected boolean isOrdered
protected boolean isUnique
protected boolean isComposition
protected boolean isAggregation
protected String initialValue
protected String inlineOrByReference
protected PropertyInfo reverseProperty
protected AssociationInfo association
protected List<Constraint> constraints
protected ClassInfo inClass
public GenericPropertyInfo()
public GenericPropertyInfo(GenericModel model, String id, String name)
public void setAttribute(boolean isAttribute)
isAttribute
- the isAttribute to setpublic void setReverseProperty(PropertyInfo reverseProperty)
reverseProperty
- the reverseProperty to setpublic void setInClass(ClassInfo inClass)
inClass
- the inClass to setpublic void setAssociation(AssociationInfo association)
association
- the association to setpublic boolean isDerived()
PropertyInfo
isDerived
in interface PropertyInfo
public boolean isAttribute()
PropertyInfo
isAttribute
in interface PropertyInfo
public Type typeInfo()
typeInfo
in interface PropertyInfo
public boolean isNavigable()
PropertyInfo
isNavigable
in interface PropertyInfo
public boolean isOrdered()
PropertyInfo
isOrdered
in interface PropertyInfo
public boolean isUnique()
PropertyInfo
isUnique
in interface PropertyInfo
public boolean hasConstraints()
public boolean isComposition()
PropertyInfo
isComposition
in interface PropertyInfo
public boolean isAggregation()
PropertyInfo
isAggregation
in interface PropertyInfo
public Multiplicity cardinality()
cardinality
in interface PropertyInfo
public String initialValue()
initialValue
in interface PropertyInfo
public String inlineOrByReference()
inlineOrByReference
in interface PropertyInfo
public PropertyInfo reverseProperty()
reverseProperty
in interface PropertyInfo
public ClassInfo inClass()
inClass
in interface PropertyInfo
public void inClass(ClassInfo ci)
inClass
in interface PropertyInfo
public StructuredNumber sequenceNumber()
sequenceNumber
in interface PropertyInfo
public List<Constraint> constraints()
PropertyInfo
constraints
in interface PropertyInfo
null
public AssociationInfo association()
association
in interface PropertyInfo
public void setCardinality(Multiplicity cardinality)
cardinality
- the cardinality to setpublic void setConstraints(List<Constraint> list)
list
- the constraints to set; can be empty or null
public void setInitialValue(String initialValue)
initialValue
- the initialValue to setpublic void setInlineOrByReference(String inlineOrByReference)
inlineOrByReference
- the inlineOrByReference to setpublic void setAggregation(boolean isAggregation)
isAggregation
- the isAggregation to setpublic void setComposition(boolean isComposition)
isComposition
- the isComposition to setpublic void setDerived(boolean isDerived)
isDerived
- the isDerived to setpublic void setNavigable(boolean isNavigable)
isNavigable
- the isNavigable to setpublic void setOrdered(boolean isOrdered)
isOrdered
- the isOrdered to setpublic void setUnique(boolean isUnique)
isUnique
- the isUnique to setpublic void setSequenceNumber(StructuredNumber sequenceNumber, boolean updateTaggedValue)
sequenceNumber
- the sequenceNumber to setupdateTaggedValue
- true
if the "sequenceNumber" tagged value shall
be set to the given sequence number, else false
public void setTypeInfo(Type typeInfo)
typeInfo
- the typeInfo to setpublic void copyTypeInfo(Type typeInfo)
null
). The typeInfo value of this object thus does not
reference the given Type object (which could cause trouble).typeInfo
- public void setNilReasonAllowed(boolean nilReasonAllowed)
public void setRestriction(boolean isRestriction)
public String id()
Info
public GenericModel model()
public String name()
Info
public ShapeChangeResult result()
public void setId(String id)
id
- public void setModel(GenericModel model)
model
- public void setName(String name)
name
- public void setOptions(Options options)
options
- public void setResult(ShapeChangeResult result)
result
- public void validateStereotypesCache()
validateStereotypesCache
in interface Info
public void setStereotypes(Stereotypes stereotypeSet)
stereotypeSet
- public void setStereotype(String stereotype)
stereotype
- public void validateTaggedValuesCache()
Info
validateTaggedValuesCache
in interface Info
public void setTaggedValues(TaggedValues taggedValues, boolean updateFields)
taggedValues
- updateFields
- true if class fields should be updated based upon information
from given tagged values, else falsepublic GenericPropertyInfo createCopy(String copyId)
public boolean isReadOnly()
PropertyInfoImpl
isReadOnly
in interface PropertyInfo
isReadOnly
in class PropertyInfoImpl
PropertyInfo.isReadOnly()
public void setReadOnly(boolean isReadOnly)
isReadOnly
- the isReadOnly to setpublic void setTaggedValue(String tvName, String tvValue, boolean updateFields)
tvName
- tvValue
- updateFields
- true if property fields should be updated based upon
information from given tagged value, else falseprotected void updateFieldsForTaggedValue(String tvName, String tvValue)
taggedValueName
- taggedValueValue
- public void addPrefixToModelElementIDs(String prefix)
null
). Does NOT update the 'globalId'.
NOTE: this method is used by the FeatureCatalogue target to ensure that
IDs used in a reference model are unique to that model and do not get
mixed up with the IDs of the input model.prefix
- public void setProfiles(Profiles profiles)
profiles
- new set of profiles for this property; may be
null
public String message(int mnr)
MessageSource
message
in interface MessageSource
Copyright © 2017. All rights reserved.