Package io.lionweb.model.impl
Class DynamicNode
- All Implemented Interfaces:
ClassifierInstance<Concept>
,HasFeatureValues
,HasSettableParent
,Node
public class DynamicNode
extends DynamicClassifierInstance<Concept>
implements Node, HasSettableParent
DynamicNode can be used to represent Node of any Concept. The drawback is that this class expose
only homogeneous-APIs (e.g., getProperty('book')) and not heterogeneous-APIs (e.g., getBook()).
-
Field Summary
Fields inherited from class io.lionweb.model.impl.DynamicClassifierInstance
containmentValues, id, propertyValues, referenceValues
Fields inherited from class io.lionweb.model.impl.AbstractClassifierInstance
annotations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
The concept of which this Node is an instance.The immediate parent of the Node.int
hashCode()
void
setConcept
(Concept concept) setParent
(ClassifierInstance<?> parent) Set a new parent.toString()
Methods inherited from class io.lionweb.model.impl.DynamicClassifierInstance
addChild, addReferenceValue, getChildren, getID, getPropertyValue, getReferenceValues, removeChild, removeChild, removeReferenceValue, removeReferenceValue, setID, setPropertyValue, setReferenceValues
Methods inherited from class io.lionweb.model.impl.AbstractClassifierInstance
addAnnotation, getAnnotations, getAnnotations, removeAnnotation
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.lionweb.model.ClassifierInstance
addAnnotation, getAnnotations, getAnnotations, removeAnnotation
Methods inherited from interface io.lionweb.model.HasFeatureValues
addChild, addReferenceValue, getChildren, getPropertyValue, getReferenceValues, removeChild, removeChild, removeReferenceValue, removeReferenceValue, setPropertyValue, setReferenceValues
Methods inherited from interface io.lionweb.model.Node
getContainmentFeature, getID, getRoot, isRoot, thisAndAllDescendants
-
Constructor Details
-
DynamicNode
-
DynamicNode
public DynamicNode()
-
-
Method Details
-
setConcept
-
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
-
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
-
setParent
Description copied from interface:HasSettableParent
Set a new parent.- Specified by:
setParent
in interfaceHasSettableParent
- Parameters:
parent
- the new parent to be assigned- Returns:
- the element itself
-
equals
-
hashCode
public int hashCode() -
toString
-