Package net.aifusion.metamodel
Class CimProperty
java.lang.Object
net.aifusion.metamodel.QualifiedElement
net.aifusion.metamodel.CimProperty
Class to represent a CIM Property. A property is a qualified element that can contain primitive data types,
references, structure values, enumeration values, CimInstances, or their arrays
- Author:
- Sharad Singhal
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the data type associated with this propertyGet the default value of this propertyGet the CIM type of this elementgetEnum()
Get the enumeration associated with this propertyGet the full name for this property.Get the case-normalized (lower case) name for this elementgetName()
Get the name of this elementGet the name of the class or structure where this property is declaredGet the referenced class name for this propertyGet the structure associated with this propertygetValue()
Get the value of this property.boolean
Check if this property has a default value defined in itint
hashCode()
boolean
Check if this property has a non-null value defined in itboolean
hasValue()
Check if this property has a value defined in itboolean
isKey()
Check if this property is a KEY property, i.e., has KEY(true) qualifierboolean
Check if this property is readable (i.e., has READ(True) qualifier)boolean
Check if this property is a required propertyboolean
isStatic()
Check if this property is a static propertyboolean
Check if this property is writable (i.e., has WRITE(True) qualifier)void
Set the value of this propertytoMOF()
Return the MOF representation of this elementtoString()
void
Validate a data value against the definitions in this propertyMethods inherited from class net.aifusion.metamodel.QualifiedElement
getQualifiers, getQualifierValue, hasQualifier
-
Method Details
-
getFullName
Get the full name for this property. The full name for the property is the originClass '#' featureName- Returns:
- full name for the property
-
getOriginClass
Get the name of the class or structure where this property is declared- Returns:
- - fully qualified name of the declaring class or structure
-
getRefClassName
Get the referenced class name for this property- Returns:
- - referenced class name. Null if this property is not a reference property
-
getEnum
Get the enumeration associated with this property- Returns:
- - referenced enumeration. Null if this property does not refer to an enumeration
-
getStruct
Get the structure associated with this property- Returns:
- - referenced structure. Null if this property does not refer to a structure
-
getDataType
Get the data type associated with this property- Returns:
- - data type for this property
-
hasDefaultValue
public boolean hasDefaultValue()Check if this property has a default value defined in it- Returns:
- - true if this property has a default value, false otherwise
-
getDefaultValue
Get the default value of this property- Returns:
- - default value of this property. Null if no default value is defined
-
hasValue
public boolean hasValue()Check if this property has a value defined in it- Returns:
- - true if this property has a value, false otherwise
-
hasNonNullValue
public boolean hasNonNullValue()Check if this property has a non-null value defined in it- Returns:
- - true if the property has a value defined, and it contains a non-null value, false otherwise
-
isReadable
public boolean isReadable()Check if this property is readable (i.e., has READ(True) qualifier)- Returns:
- true if this property is readable
- See Also:
-
isWritable
public boolean isWritable()Check if this property is writable (i.e., has WRITE(True) qualifier)- Returns:
- true if this property is writable, false otherwise
- See Also:
-
isKey
public boolean isKey()Check if this property is a KEY property, i.e., has KEY(true) qualifier- Returns:
- - true if this property is a key property, false otherwise
- See Also:
-
isRequired
public boolean isRequired()Check if this property is a required property- Returns:
- - true if this property is Key, or has a REQUIRED qualifier on it, false otherwise
-
isStatic
public boolean isStatic()Check if this property is a static property- Returns:
- - true if this property has STATIC(true) qualifier
-
validate
Validate a data value against the definitions in this property- Parameters:
v
- - data value to validate
-
getValue
Get the value of this property. If no value is defined, returns the default value of the property- Returns:
- - value of the property
- Throws:
ModelException
- if property is not readable- See Also:
-
setValue
Set the value of this property- Parameters:
value
- - value to set in this property- Throws:
ModelException
- if property is not writable, or if the data type of the value does not match property data value- See Also:
-
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()
-