Class ProxyNode
- All Implemented Interfaces:
ClassifierInstance<Concept>,HasFeatureValues,Node
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassException thrown when invoking most methods of a ProxyNode. -
Field Summary
Fields inherited from class io.lionweb.model.impl.AbstractClassifierInstance
annotations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(Containment containment, Node child) Add a child to the specified list of children associated with the given Containment relation.voidaddReferenceValue(Reference reference, ReferenceValue referredNode) Add the Node to the list of Nodes referred to from this Node under the given Reference.booleanReturn all the annotations associated to this ClassifierInstance.getChildren(Containment containment) This return all the Nodes directly contained into this Node under the specific Containment relation specified.The concept of which this Node is an instance.Return the Containment feature used to hold this Node within its parent.getID()This return the Node ID.The immediate parent of the Node.getPropertyValue(Property property) Get the property value associated with the specified property.getReferenceValues(Reference reference) inthashCode()voidremoveChild(Containment containment, int index) Remove the child at the given index, considering the children under the given containment.voidremoveChild(Node node) Remove the given child from the list of children associated with the Node, making it a dangling Node.voidremoveReferenceValue(Reference reference, int index) Remove the reference value at the given index, considering the reference values under the given reference.voidremoveReferenceValue(Reference reference, ReferenceValue referenceValue) Remove the first reference value that is equal to the given referenceValue.voidsetPropertyValue(Property property, Object value) voidsetReferenceValues(Reference reference, List<? extends ReferenceValue> values) toString()Methods inherited from class io.lionweb.model.impl.AbstractClassifierInstance
addAnnotation, getAnnotations, removeAnnotationMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.lionweb.model.ClassifierInstance
addAnnotation, getAnnotations, removeAnnotationMethods inherited from interface io.lionweb.model.Node
getRoot, isRoot, thisAndAllDescendants
-
Constructor Details
-
ProxyNode
-
-
Method Details
-
getParent
Description copied from interface:ClassifierInstanceThe immediate parent of the Node. This should be null only for root nodes.- Specified by:
getParentin interfaceClassifierInstance<Concept>- Specified by:
getParentin interfaceNode
-
getPropertyValue
Description copied from interface:HasFeatureValuesGet the property value associated with the specified property.- Specified by:
getPropertyValuein interfaceHasFeatureValues
-
setPropertyValue
- Specified by:
setPropertyValuein interfaceHasFeatureValues
-
getChildren
Description copied from interface:HasFeatureValuesThis return all the Nodes directly contained into this Node under the specific Containment relation specified.- Specified by:
getChildrenin interfaceHasFeatureValues
-
addChild
Description copied from interface:HasFeatureValuesAdd 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.
- Specified by:
addChildin interfaceHasFeatureValues
-
removeChild
Description copied from interface:HasFeatureValuesRemove 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.- Specified by:
removeChildin interfaceHasFeatureValues- Overrides:
removeChildin classAbstractClassifierInstance<Concept>
-
getReferenceValues
- Specified by:
getReferenceValuesin interfaceHasFeatureValues
-
addReferenceValue
Description copied from interface:HasFeatureValuesAdd 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.
- Specified by:
addReferenceValuein interfaceHasFeatureValues
-
getID
Description copied from interface:NodeThis return the Node ID.A valid Node ID should not be null, but this method can return a null value in case the Node is in invalid state.
- Specified by:
getIDin interfaceClassifierInstance<Concept>- Specified by:
getIDin interfaceNode
-
getClassifier
Description copied from interface:NodeThe concept of which this Node is an instance. The Concept should not be abstract.- Specified by:
getClassifierin interfaceClassifierInstance<Concept>- Specified by:
getClassifierin interfaceNode
-
getAnnotations
Description copied from interface:ClassifierInstanceReturn all the annotations associated to this ClassifierInstance.- Specified by:
getAnnotationsin interfaceClassifierInstance<Concept>- Overrides:
getAnnotationsin classAbstractClassifierInstance<Concept>
-
getContainmentFeature
Description copied from interface:NodeReturn the Containment feature used to hold this Node within its parent. This will be null only for root nodes or dangling nodes (which are not distinguishable by looking at the node itself).- Specified by:
getContainmentFeaturein interfaceNode- Returns:
- the Containment holding the Node. Or null, if the Node has no parent
- See Also:
-
toString
-
equals
-
hashCode
public int hashCode() -
removeChild
Description copied from interface:HasFeatureValuesRemove the child at the given index, considering the children under the given containment.If there is no match the exception IllegalArgumentException will be thrown.
- Specified by:
removeChildin interfaceHasFeatureValues- Overrides:
removeChildin classAbstractClassifierInstance<Concept>
-
removeReferenceValue
public void removeReferenceValue(@Nonnull Reference reference, @Nullable ReferenceValue referenceValue) Description copied from interface:HasFeatureValuesRemove the first reference value that is equal to the given referenceValue. Node. If there is no match the exception IllegalArgumentException will be thrown.- Specified by:
removeReferenceValuein interfaceHasFeatureValues- Overrides:
removeReferenceValuein classAbstractClassifierInstance<Concept>
-
removeReferenceValue
Description copied from interface:HasFeatureValuesRemove 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.
- Specified by:
removeReferenceValuein interfaceHasFeatureValues- Overrides:
removeReferenceValuein classAbstractClassifierInstance<Concept>
-
setReferenceValues
public void setReferenceValues(@Nonnull Reference reference, @Nonnull List<? extends ReferenceValue> values) - Specified by:
setReferenceValuesin interfaceHasFeatureValues
-