Package io.lionweb.lioncore.java.model
Interface ClassifierInstance<T extends Classifier<T>>
- All Superinterfaces:
HasFeatureValues
- All Known Subinterfaces:
AnnotationInstance
,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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotation
(AnnotationInstance instance) Add the annotation.static <T extends ClassifierInstance<?>>
voidcollectSelfAndDescendants
(T self, boolean includeAnnotations, Collection<T> result) Collects `self` and all its descendants into `result`.Return all the annotations associated to this ClassifierInstance.getAnnotations
(Annotation annotation) Given a specific Annotation type it returns either the list of instances of that Annotation associated to the Node.getID()
The immediate parent of the Node.void
removeAnnotation
(AnnotationInstance instance) Methods inherited from interface io.lionweb.lioncore.java.model.HasFeatureValues
addChild, addReferenceValue, getChildren, getPropertyValue, getReferenceValues, removeChild, removeChild, removeReferenceValue, removeReferenceValue, setPropertyValue, setReferenceValues
-
Method Details
-
getAnnotations
Return all the annotations associated to this ClassifierInstance. -
getAnnotations
Given a specific Annotation type it returns either the list of instances of that Annotation associated to the Node. -
addAnnotation
Add the annotation. Note that we can always have multiple annotation instances of the same annotation type attached to a node, so this will never replace an existing annotation instance.- Throws:
IllegalArgumentException
- In case the specified Annotation link cannot be used on Nodes of this Concept.
-
removeAnnotation
-
getID
String getID() -
getClassifier
T getClassifier() -
getParent
ClassifierInstance<?> getParent()The immediate parent of the Node. This should be null only for root nodes. -
collectSelfAndDescendants
static <T extends ClassifierInstance<?>> void collectSelfAndDescendants(T self, boolean includeAnnotations, Collection<T> result) Collects `self` and all its descendants into `result`.
-