Package net.aifusion.metamodel
Class NamedElement
java.lang.Object
net.aifusion.metamodel.QualifiedElement
net.aifusion.metamodel.NamedElement
- All Implemented Interfaces:
CimEventGenerator
- Direct Known Subclasses:
CimEnumeration
,CimStructure
,QualifierType
,StructureValue
Base class for all CIM Elements that reside in a namespace. Named elements can be located via their
ObjectPath, and can generate events
- Author:
- Sharad Singhal
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addListener
(CimEventType type, CimListener listener) Add a listener to this generatorboolean
Get all qualifiers declared on, or inherited by this qualified ElementGet the CIM type of this elementReturn the full name of this Named element.Get the case-normalized (lower case) name for this elementgetName()
Get the name of this elementGet the namespace path for this named elementGet the object path for this named elementgetQualifierValue
(String qualifierName) Get the value of a qualifier declared on this element, inherited by it, or the default defined in standard qualifiers.Get the direct superType of this element, if anyint
hashCode()
boolean
hasListener
(CimEventType type, CimListener listener) Check if this event generator has a listener for an event typeboolean
hasQualifier
(String qName) Check if this qualified element has a particular qualifier declared in it (or inherited by it)boolean
Check if this NamedElement is abstractboolean
isSubTypeOf
(String name) Check if this NamedElement is a subType of another NamedElementvoid
removeListener
(CimEventType type, CimListener listener) Remove a listener from this generatortoMOF()
Return the MOF representation of this elementtoString()
Methods inherited from class net.aifusion.metamodel.QualifiedElement
getQualifiers
-
Method Details
-
addListener
Description copied from interface:CimEventGenerator
Add a listener to this generator- Specified by:
addListener
in interfaceCimEventGenerator
- Parameters:
type
- - type of event the listener wantslistener
- - CimListener interested in events- Returns:
- - true if listener was successfully added, false otherwise
-
removeListener
Description copied from interface:CimEventGenerator
Remove a listener from this generator- Specified by:
removeListener
in interfaceCimEventGenerator
- Parameters:
type
- of event the listener wantslistener
- - CimListener to be removed
-
hasListener
Description copied from interface:CimEventGenerator
Check if this event generator has a listener for an event type- Specified by:
hasListener
in interfaceCimEventGenerator
- Parameters:
type
- - type of eventlistener
- - listener to check. If null, check if any listener is registered- Returns:
- - true if the generator has at least one registered listener for the event type, false otherwise
-
getObjectPath
Get the object path for this named element- Returns:
- - object path for this element
-
getNameSpacePath
Get the namespace path for this named element- Returns:
- - namespace path for this element
-
getSuperType
Get the direct superType of this element, if any- Returns:
- - direct superType of this element, null if none defined
-
isSubTypeOf
Check if this NamedElement is a subType of another NamedElement- Parameters:
name
- - Name of the NamedElement to be checked- Returns:
- - true if the given name is the name of this element, or any of its superTypes. False otherwise
-
isAbstract
public boolean isAbstract()Check if this NamedElement is abstract- Returns:
- - true if this NamedElement is abstract, false otherwise
-
getFullName
Return the full name of this Named element. The fully qualified name of the element is (... SupName1.SupName0.Name), where Name is the name of this element, SupName0 is the immediate superType, SupName1 is the next ancestor, and so on. If the element does not have a superType, its name is returned- Returns:
- - fully qualified name of this element
- See Also:
-
getQualifierValue
Get the value of a qualifier declared on this element, inherited by it, or the default defined in standard qualifiers.- Overrides:
getQualifierValue
in classQualifiedElement
- Parameters:
qualifierName
- - name of the qualifier to search- Returns:
- - value of the qualifier or default from a standard qualifier. Null if none defined
- See Also:
-
getAllQualifiers
Get all qualifiers declared on, or inherited by this qualified Element- Returns:
- - list of all qualifiers. Empty list is returned if none are declared
- See Also:
-
hasQualifier
Check if this qualified element has a particular qualifier declared in it (or inherited by it)- Overrides:
hasQualifier
in classQualifiedElement
- Parameters:
qName
- - name of the qualifier- Returns:
- - true if the qualified element has a qualifier declared in it (or inherited by it), false otherwise
-
equals
- Overrides:
equals
in classQualifiedElement
-
getName
Get the name of this element- Returns:
- - name of this element
- See Also:
-
getLowerCaseName
Get the case-normalized (lower case) name for this element- Returns:
- - name of this element normalized to lower case
- See Also:
-
getElementType
Get the CIM type of this element- Returns:
- - CIMType for this element
- See Also:
-
toMOF
Return the MOF representation of this element- Returns:
- - String containing MOF representation of this element
-
toString
-
hashCode
public int hashCode()
-