Package net.aifusion.metamodel
Class Qualifier
java.lang.Object
net.aifusion.metamodel.Qualifier
Element to represent a CIM Qualifier. Qualifiers are immutable once constructed
- Author:
- Sharad Singhal
-
Method Summary
Modifier and TypeMethodDescriptionboolean
appliesTo
(ElementType elementType) Check if this qualifier applies to a given elementTypeboolean
Check if this qualifier is the same as some other qualifier.Get the data type of this qualifier dataValueGet the CIM type of this elementGet the case-normalized (lower case) name for this elementgetName()
Get the name of this elementReturn the qualifier type associated with this qualifiergetValue()
Get the dataValue of this qualifier.int
hashCode()
boolean
Check if this Qualifier has a non-null dataValueboolean
Check if this qualifier has a given scopeboolean
hasValue()
Check if this qualifier has a dataValuetoMOF()
Return the MOF representation of this elementtoString()
-
Method Details
-
getDataType
Get the data type of this qualifier dataValue- Returns:
- - data type associated with this qualifier
-
getValue
Get the dataValue of this qualifier. If no dataValue was specified, the default dataValue from the qualifier type is returned- Returns:
- - dataValue of this qualifier. Return null if no default is given. A non-null dataValue containing a null is returned if a nullvalue is declared either for the qualifer or the qualifier type.
- See Also:
-
hasValue
public boolean hasValue()Check if this qualifier has a dataValue- Returns:
- - true if this qualifier has a dataValue defined in it, false otherwise
- See Also:
-
hasNonNullValue
public boolean hasNonNullValue()Check if this Qualifier has a non-null dataValue- Returns:
- - true if this qualifier has a non-null dataValue defined in it
- See Also:
-
getQualifierType
Return the qualifier type associated with this qualifier- Returns:
- - qualifier type associated with this qualifier
-
hasScope
Check if this qualifier has a given scope- Parameters:
scope
- - scope for which this qualifier is being checked- Returns:
- - true if this qualifier has the given scope type, else false
-
appliesTo
Check if this qualifier applies to a given elementType- Parameters:
elementType
- - elementType to check- Returns:
- - true if this qualifier can be applied to the given element type, false otherwise
-
equals
Check if this qualifier is the same as some other qualifier. A qualifier is considered the same as some other qualifier, if it has the same qualifierType and value- Parameters:
o
- - other qualifier- Returns:
- - true if both qualifiers are the same, else return false
-
hashCode
public int hashCode() -
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
-