Package net.aifusion.metamodel
Class CimStructure
java.lang.Object
net.aifusion.metamodel.QualifiedElement
net.aifusion.metamodel.NamedElement
net.aifusion.metamodel.CimStructure
- All Implemented Interfaces:
CimEventGenerator
- Direct Known Subclasses:
CimClass
Class to model a CIM CimStructure. A CIM Structure is a template for a named value containing other name-value pairs.
- Author:
- Sharad Singhal
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the names of all enumerations defined in this structure (or its supertypes)Get names of interfaces defined in this structure or its superTypes.Get names of all properties defined in this structure or its supertypesGet the names of locally defined structures in this structure, or its supertypesgetDefaultPropertyValue
(String propertyName) Get the default value of a propertyGet the CIM type of this elementgetEnumeration
(String enumerationName) get a local Enumeration defined in this structureGet the names of all enumerations locally defined in this structuregetInterface
(String interfaceName) get an interface defined within this structure or one of its supertypesGet the names of all interfaces locally defined in this structureGet the case-normalized (lower case) name for this elementgetName()
Get the name of this elementGet names of all properties defined in this structuregetPropertyOriginClass
(String propertyName) Get the origin class for a property defined in this structuregetPropertyQualifiers
(String propertyName) Get the qualifiers declared on a propertygetPropertyQualifierValue
(String propertyName, String qualifierName) Get the value of a property qualifiergetPropertyType
(String propertyName) Get the data type associated with a given propertygetPropertyValue
(String propertyName) Return the value of a property defined in this structuregetReferencedClass
(String propertyName) Get the name of the class referenced by a reference propertygetReferencedEnum
(String propertyName) Get the Enumeration associated with a EnumerationValue propertygetReferencedStructure
(String propertyName) Get the structure associated with a structureValue propertygetStructure
(String structureName) get a structure defined within this structure, or one of its supertypesGet the names of structures locally defined in this structure or interfaces implemented by itboolean
hasEnumeration
(String enumerationName) Check if this structure defines a local Enumerationint
hashCode()
boolean
hasKeys()
Check if this structure (or its superType hierarchy) has at least one key property definedboolean
hasProperty
(String propertyName) Check if this structure has a given propertyboolean
hasPropertyQualifier
(String propertyName, String qualifierName) Test if a property has a given qualifierboolean
hasStructure
(String structureName) Check if this structure (or one of its supertypes) defines a structureboolean
implementsInterface
(String interfaceName) Check if this structure or it's superTypes implement a given interfacevoid
setPropertyValue
(String propertyName, DataValue propertyValue) Set the value of a property in this structuretoMOF()
Return the MOF representation of this elementtoString()
Methods inherited from class net.aifusion.metamodel.NamedElement
addListener, getAllQualifiers, getFullName, getNameSpacePath, getObjectPath, getQualifierValue, getSuperType, hasListener, hasQualifier, isAbstract, isSubTypeOf, removeListener
Methods inherited from class net.aifusion.metamodel.QualifiedElement
getQualifiers
-
Method Details
-
getInterfaceNames
Get the names of all interfaces locally defined in this structure- Returns:
- - set containing names of all defined interfaces. Empty if none defined
- See Also:
-
getAllInterfaceNames
Get names of interfaces defined in this structure or its superTypes.- Returns:
- - set containing names of defined interfaces. Empty if none defined
- See Also:
-
implementsInterface
Check if this structure or it's superTypes implement a given interface- Parameters:
interfaceName
- - name of the property- Returns:
- - true if the structure implements the interface, false otherwise
-
getInterface
get an interface defined within this structure or one of its supertypes- Parameters:
interfaceName
- - name of the local interface- Returns:
- - the given Interface, null if no such interface exists
-
getStructureNames
Get the names of structures locally defined in this structure or interfaces implemented by it- Returns:
- - set containing names of all locally defined structures. Empty if none defined
-
getAllStructureNames
Get the names of locally defined structures in this structure, or its supertypes- Returns:
- - names of locally defined structures
-
hasStructure
Check if this structure (or one of its supertypes) defines a structure- Parameters:
structureName
- - name of the structure- Returns:
- - true if the structure defines the given structure, false otherwise
-
getStructure
get a structure defined within this structure, or one of its supertypes- Parameters:
structureName
- - name of the structure- Returns:
- - the given structure, null if no such structure exists
-
getEnumerationNames
Get the names of all enumerations locally defined in this structure- Returns:
- - name of all defined enumerations. Empty if none defined
-
getAllEnumerationNames
Get the names of all enumerations defined in this structure (or its supertypes)- Returns:
- - name of all defined enumerations. Empty if none defined
-
hasEnumeration
Check if this structure defines a local Enumeration- Parameters:
enumerationName
- - name of the local Enumeration- Returns:
- - true if the structure defines the given local enumeration, false otherwise
-
getEnumeration
get a local Enumeration defined in this structure- Parameters:
enumerationName
- - name of the local Enumeration- Returns:
- - the given local enumeration, null if no such Enumeration
-
getPropertyNames
Get names of all properties defined in this structure- Returns:
- - mixed case names of all properties defined locally in this structure
-
getAllPropertyNames
Get names of all properties defined in this structure or its supertypes- Returns:
- - mixed case names of all properties defined in this structure
-
hasProperty
Check if this structure has a given property- Parameters:
propertyName
- - name of the property- Returns:
- - true if the structure has the given property, false otherwise
-
getPropertyOriginClass
Get the origin class for a property defined in this structure- Parameters:
propertyName
- - name of the property- Returns:
- - class where this property is defined. Null if no such property exists
-
getPropertyQualifiers
Get the qualifiers declared on a property- Parameters:
propertyName
- - name of the property- Returns:
- - all qualifiers on the property. Empty if none declared
-
hasKeys
public boolean hasKeys()Check if this structure (or its superType hierarchy) has at least one key property defined- Returns:
- - true if this structure has a key property in it, false otherwise
-
getPropertyValue
Return the value of a property defined in this structure- Parameters:
propertyName
- - name of the property to be checked- Returns:
- - value of the property. Null if no such property
- Throws:
ModelException
- if a non-static property is read
-
getDefaultPropertyValue
Get the default value of a property- Parameters:
propertyName
- - name of the property to be checked- Returns:
- - value of the property. Null if no such property, or no default is present
-
setPropertyValue
Set the value of a property in this structure- Parameters:
propertyName
- - name of the propertypropertyValue
- - value to be set in the property- Throws:
ModelException
- if property does not exist or is not static
-
getReferencedStructure
Get the structure associated with a structureValue property- Parameters:
propertyName
- - name of the property- Returns:
- - structure associated with the property. Null if the property does not exist, or is not a structure property
-
getReferencedEnum
Get the Enumeration associated with a EnumerationValue property- Parameters:
propertyName
- - name of the properfy- Returns:
- - Enumeration associated with the property. Null if the property does not exist, or is not an enum property
-
getReferencedClass
Get the name of the class referenced by a reference property- Parameters:
propertyName
- - name of the property- Returns:
- - name of the class referenced by this property. Null if the property does not exist, or is not an object reference
-
getPropertyType
Get the data type associated with a given property- Parameters:
propertyName
- - name of the property- Returns:
- - data type associated with that property. Null if no such property exists
-
getPropertyQualifierValue
Get the value of a property qualifier- Parameters:
propertyName
- - name of the propertyqualifierName
- - name of the qualifier- Returns:
- - value of the qualifier. Null if the property does not exist, or the qualifier does not exist
-
hasPropertyQualifier
Test if a property has a given qualifier- Parameters:
propertyName
- - name of the property to testqualifierName
- - name of the qualifier to test- Returns:
- - true of the property has the given qualifier. False otherwise
-
equals
- Overrides:
equals
in classNamedElement
-
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()
-