Class CimProperty

java.lang.Object
net.aifusion.metamodel.QualifiedElement
net.aifusion.metamodel.CimProperty

public class CimProperty extends QualifiedElement
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 Details

    • getFullName

      public String 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

      public String 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

      public String getRefClassName()
      Get the referenced class name for this property
      Returns:
      - referenced class name. Null if this property is not a reference property
    • getEnum

      public CimEnumeration getEnum()
      Get the enumeration associated with this property
      Returns:
      - referenced enumeration. Null if this property does not refer to an enumeration
    • getStruct

      public CimStructure getStruct()
      Get the structure associated with this property
      Returns:
      - referenced structure. Null if this property does not refer to a structure
    • getDataType

      public DataType 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

      public DataValue 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

      public void validate(DataValue v)
      Validate a data value against the definitions in this property
      Parameters:
      v - - data value to validate
    • getValue

      public DataValue 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

      public void setValue(DataValue value)
      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

      public boolean equals(Object o)
      Overrides:
      equals in class QualifiedElement
    • getName

      public String getName()
      Get the name of this element
      Returns:
      - name of this element
      See Also:
    • getLowerCaseName

      public String getLowerCaseName()
      Get the case-normalized (lower case) name for this element
      Returns:
      - name of this element normalized to lower case
      See Also:
    • getElementType

      public ElementType getElementType()
      Get the CIM type of this element
      Returns:
      - CIMType for this element
      See Also:
    • toMOF

      public String toMOF()
      Return the MOF representation of this element
      Returns:
      - String containing MOF representation of this element
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object