Package io.lionweb.lioncore.java.model
Interface HasFeatureValues
- All Known Subinterfaces:
AnnotationInstance
,ClassifierInstance<T>
,Node
- All Known Implementing Classes:
AbstractClassifierInstance
,Annotation
,Classifier
,Concept
,Containment
,DataType
,DynamicAnnotationInstance
,DynamicClassifierInstance
,DynamicNode
,Enumeration
,EnumerationLiteral
,Feature
,Field
,Interface
,Language
,LanguageEntity
,Link
,LionCoreBuiltins
,M3Node
,PrimitiveType
,Property
,ProxyNode
,Reference
,StructuredDataType
public interface HasFeatureValues
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(Containment containment, Node child) Add a child to the specified list of children associated with the given Containment relation.void
addReferenceValue
(Reference reference, ReferenceValue referredNode) Add the Node to the list of Nodes referred to from this Node under the given Reference.getChildren
(Containment containment) This return all the Nodes directly contained into this Node under the specific Containment relation specified.getPropertyValue
(Property property) Get the property value associated with the specified property.getReferenceValues
(Reference reference) void
removeChild
(Containment containment, int index) Remove the child at the given index, considering the children under the given containment.void
removeChild
(Node node) Remove the given child from the list of children associated with the Node, making it a dangling Node.void
removeReferenceValue
(Reference reference, int index) Remove the reference value at the given index, considering the reference values under the given reference.void
removeReferenceValue
(Reference reference, ReferenceValue referenceValue) Remove the first reference value that is equal to the given referenceValue.void
setPropertyValue
(Property property, Object value) void
setReferenceValues
(Reference reference, List<? extends ReferenceValue> values)
-
Method Details
-
getPropertyValue
Get the property value associated with the specified property. -
setPropertyValue
void setPropertyValue(@Nonnull Property property, @Nullable Object value) throws IllegalArgumentException - Throws:
IllegalArgumentException
- If the value is not compatible with the type of the property
-
getChildren
This return all the Nodes directly contained into this Node under the specific Containment relation specified. -
addChild
Add a child to the specified list of children associated with the given Containment relation. If the specified Containment does not allow for multiple values, and if a value is already set than the exception IllegalStateException will be thrown.If the child has not a Concept compatible with the target of the Containement, the exception IllegalArgumentException will be thrown.
-
removeChild
Remove the given child from the list of children associated with the Node, making it a dangling Node. If the specified Node is not currently a child of this Node the exception IllegalArgumentException will be thrown. -
removeChild
Remove the child at the given index, considering the children under the given containment.If there is no match the exception IllegalArgumentException will be thrown.
-
getReferenceValues
-
addReferenceValue
Add the Node to the list of Nodes referred to from this Node under the given Reference.If the Reference is not multiple, any previous value will be replaced.
The Node specified should be either part of this Node's Model or of Models imported by this Node's Model. If that is not the case the exception IllegalArgumentException will be thrown.
If the referredNode has not a Concept compatible with the target of the Reference, the exception IllegalArgumentException will be thrown.
-
removeReferenceValue
Remove the first reference value that is equal to the given referenceValue. Node. If there is no match the exception IllegalArgumentException will be thrown. -
removeReferenceValue
Remove the reference value at the given index, considering the reference values under the given reference.If there is no match the exception IllegalArgumentException will be thrown.
-
setReferenceValues
void setReferenceValues(@Nonnull Reference reference, @Nonnull List<? extends ReferenceValue> values)
-