Class ProxyNode
- All Implemented Interfaces:
ClassifierInstance<Concept>
,HasFeatureValues
,Node
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Exception thrown when invoking most methods of a ProxyNode. -
Field Summary
Fields inherited from class io.lionweb.lioncore.java.model.impl.AbstractClassifierInstance
annotations
-
Constructor Summary
Constructors -
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.boolean
Return 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) int
hashCode()
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) toString()
Methods inherited from class io.lionweb.lioncore.java.model.impl.AbstractClassifierInstance
addAnnotation, getAnnotations, removeAnnotation
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.lionweb.lioncore.java.model.ClassifierInstance
addAnnotation, getAnnotations, removeAnnotation
Methods inherited from interface io.lionweb.lioncore.java.model.Node
getRoot, isRoot, thisAndAllDescendants
-
Constructor Details
-
ProxyNode
-
-
Method Details
-
getParent
Description copied from interface:ClassifierInstance
The immediate parent of the Node. This should be null only for root nodes.- Specified by:
getParent
in interfaceClassifierInstance<Concept>
- Specified by:
getParent
in interfaceNode
-
getPropertyValue
Description copied from interface:HasFeatureValues
Get the property value associated with the specified property.- Specified by:
getPropertyValue
in interfaceHasFeatureValues
-
setPropertyValue
- Specified by:
setPropertyValue
in interfaceHasFeatureValues
-
getChildren
Description copied from interface:HasFeatureValues
This return all the Nodes directly contained into this Node under the specific Containment relation specified.- Specified by:
getChildren
in interfaceHasFeatureValues
-
addChild
Description copied from interface:HasFeatureValues
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.
- Specified by:
addChild
in interfaceHasFeatureValues
-
removeChild
Description copied from interface:HasFeatureValues
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.- Specified by:
removeChild
in interfaceHasFeatureValues
- Overrides:
removeChild
in classAbstractClassifierInstance<Concept>
-
getReferenceValues
- Specified by:
getReferenceValues
in interfaceHasFeatureValues
-
addReferenceValue
Description copied from interface:HasFeatureValues
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.
- Specified by:
addReferenceValue
in interfaceHasFeatureValues
-
getID
Description copied from interface:Node
This 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:
getID
in interfaceClassifierInstance<Concept>
- Specified by:
getID
in interfaceNode
-
getClassifier
Description copied from interface:Node
The concept of which this Node is an instance. The Concept should not be abstract.- Specified by:
getClassifier
in interfaceClassifierInstance<Concept>
- Specified by:
getClassifier
in interfaceNode
-
getAnnotations
Description copied from interface:ClassifierInstance
Return all the annotations associated to this ClassifierInstance.- Specified by:
getAnnotations
in interfaceClassifierInstance<Concept>
- Overrides:
getAnnotations
in classAbstractClassifierInstance<Concept>
-
getContainmentFeature
Description copied from interface:Node
Return 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:
getContainmentFeature
in interfaceNode
- See Also:
-
toString
-
equals
-
hashCode
public int hashCode() -
removeChild
Description copied from interface:HasFeatureValues
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.
- Specified by:
removeChild
in interfaceHasFeatureValues
- Overrides:
removeChild
in classAbstractClassifierInstance<Concept>
-
removeReferenceValue
public void removeReferenceValue(@Nonnull Reference reference, @Nullable ReferenceValue referenceValue) Description copied from interface:HasFeatureValues
Remove 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:
removeReferenceValue
in interfaceHasFeatureValues
- Overrides:
removeReferenceValue
in classAbstractClassifierInstance<Concept>
-
removeReferenceValue
Description copied from interface:HasFeatureValues
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.
- Specified by:
removeReferenceValue
in interfaceHasFeatureValues
- Overrides:
removeReferenceValue
in classAbstractClassifierInstance<Concept>
-
setReferenceValues
public void setReferenceValues(@Nonnull Reference reference, @Nonnull List<? extends ReferenceValue> values) - Specified by:
setReferenceValues
in interfaceHasFeatureValues
-