Class MOF
java.lang.Object
org.sblim.cimclient.internal.util.MOF
Class MOF is responsible for helping MOF String generation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
ANYstatic final String
ASSOCIATIONstatic final String
CLASSstatic final int
OVERRIDABLE (true|false) 'true' -> DISABLEOVERRIDE=false TOSUBCLASS (true|false) 'true' -> RESTRICTED=false TOINSTANCE (true|false) 'false' TRANSLATABLE (true|false) 'false' -> TRANSLTE=falsestatic final String
DISABLEOVERRIDEstatic final String
DT_BOOLstatic final String
DT_CHAR16static final String
DT_DATETIMEstatic final String
DT_REAL32static final String
DT_REAL64static final String
DT_SINT16static final String
DT_SINT32static final String
DT_SINT64static final String
DT_SINT8static final String
DT_STRstatic final String
DT_UINT16static final String
DT_UINT32static final String
DT_UINT64static final String
DT_UINT8static final String
EMPTYstatic final String
ENABLEOVERRIDEstatic final String
FALSEstatic final String
INDENTstatic final String
INDICATIONstatic final String
INSTANCEstatic final String
INSTOFstatic final String
INVALIDstatic final String
METHODstatic final String
NAMESPACEstatic final String
NULLstatic final String
PARAMETERstatic final String
PROPERTYstatic final String
QUALIFIERstatic final String
REFstatic final String
REFERENCEstatic final String
RESTRICTEDstatic final String
SCOPEstatic final String
TOSUBCLASSstatic final String
TRANSLATABLEstatic final String
TRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
classDeclaration
(CIMClass pCl, String pInd) classDeclaration = [ qualifierList ] CLASS className [ superClass ] "{" *classFeature "}" ";" classFeature = propertyDeclaration | methodDeclaration superClass = ":" classNamestatic String
constantValue
(Object pObj, boolean pTyped, String pInd) constantValuestatic String
constantValue
(Object pObj, String pInd) constantValuestatic String
constantValue
(CIMValuedElement<?> pValuedElement, String pInd) constantValue = integerValue | realValue | charValue | stringValue | booleanValue | nullValue // | dateTimeValue | objectHandlestatic String
dataType
(CIMDataType pType) dataType = DT_UINT8 | DT_SINT8 | DT_UINT16 | DT_SINT16 | DT_UINT32 | DT_SINT32 | DT_UINT64 | DT_SINT64 | DT_REAL32 | DT_REAL64 | DT_CHAR16 | DT_STR | DT_BOOL | DT_DATETIMEstatic String
dataType
(CIMTypedElement pTypedElement) static String
flavor
(int flavor) flavor = ENABLEOVERRIDE | DISABLEOVERRIDE | RESTRICTED | TOSUBCLASS | TRANSLATABLEstatic String
instanceDeclaration
(CIMInstance pInst, String pInd) instanceDeclaration = [ qualifierList ] INSTANCE OF className [ alias ] "{" 1*valueInitializer "}" ";"static String
methodDeclaration
(CIMMethod<?> pMethod, String pInd) methodDeclaration = [ qualifierList ] dataType methodName "(" [ parameterList ] ")" ";"static String
objectHandle
(CIMObjectPath pPath) objectHandlestatic String
objectHandle
(CIMObjectPath pPath, boolean pTyped, boolean pLocal) objectHandlestatic String
objectHandleAsRef
(CIMObjectPath pPath) objectHandleAsRefstatic String
objectHandleAsRef
(CIMObjectPath pPath, boolean pTyped) objectHandleAsRefstatic String
parameter
(CIMParameter<?> pParam, String pInd) parameterstatic String
propertyDeclaration
(CIMProperty<?> pProp, String pInd) propertyDeclaration = typedElement [ defaultValue ] ";" defaultValue = "=" initializerstatic String
qualifier
(CIMQualifier<?> pQuali) qualifier = qualifierName [ qualifierParameter ] [ ":" 1*flavor ]static String
qualifierDeclaration
(CIMQualifierType<?> pQType) qualifierDeclaration = QUALIFIER qualifierName qualifierType scope [ defaultFlavor ] ";"static String
qualifierList
(CIMElement pElement, String pInd) qualifierList = "[" qualifier *( "," qualifier ) "]"static String
scope
(int pScopes) scope = "," SCOPE "(" metaElement *( "," metaElement ) ")" metaElement = CLASS | ASSOCIATION | INDICATION | QUALIFIER PROPERTY | REFERENCE | METHOD | PARAMETER | ANYstatic String
typedElement
(CIMTypedElement pTypedElement, String pInd) typedElement = [ qualifierList ] (dataType|objectRef) parameterName [ array ]static String
valuedElement
(CIMValuedElement<?> pValuedElement, String pInd) valuedElement = typedElement [ defaultValue ] ";" defaultValue = "=" initializerstatic String
valueInitializer
(CIMProperty<?> pProp, String pInd) valueInitializer = [ qualifierList ] ( propertyName | referenceName ) "=" initializer ";"
-
Field Details
-
CLASS
-
TRUE
-
FALSE
-
NULL
-
ENABLEOVERRIDE
-
DISABLEOVERRIDE
-
RESTRICTED
-
TOSUBCLASS
-
TRANSLATABLE
-
DT_BOOL
-
DT_CHAR16
-
DT_DATETIME
-
DT_REAL32
-
DT_REAL64
-
DT_SINT16
-
DT_SINT32
-
DT_SINT64
-
DT_SINT8
-
DT_STR
-
DT_UINT16
-
DT_UINT32
-
DT_UINT64
-
DT_UINT8
-
INVALID
-
REF
-
INSTOF
-
QUALIFIER
-
SCOPE
-
ANY
-
ASSOCIATION
-
INDICATION
-
METHOD
-
PARAMETER
-
PROPERTY
-
REFERENCE
-
INSTANCE
-
NAMESPACE
-
INDENT
-
EMPTY
-
DEF_FLAVOR
public static final int DEF_FLAVOROVERRIDABLE (true|false) 'true' -> DISABLEOVERRIDE=false TOSUBCLASS (true|false) 'true' -> RESTRICTED=false TOINSTANCE (true|false) 'false' TRANSLATABLE (true|false) 'false' -> TRANSLTE=false- See Also:
-
-
Constructor Details
-
MOF
public MOF()
-
-
Method Details
-
classDeclaration
-
instanceDeclaration
instanceDeclaration = [ qualifierList ] INSTANCE OF className [ alias ] "{" 1*valueInitializer "}" ";"- Parameters:
pInst
-pInd
-- Returns:
- the MOF string
-
methodDeclaration
-
parameter
parameter- Parameters:
pParam
- - CIMParameterpInd
-- Returns:
- the MOF string
-
typedElement
typedElement = [ qualifierList ] (dataType|objectRef) parameterName [ array ]- Parameters:
pTypedElement
-pInd
-- Returns:
- the MOF string
-
valuedElement
valuedElement = typedElement [ defaultValue ] ";" defaultValue = "=" initializer
- Parameters:
pValuedElement
-pInd
-- Returns:
- the MOF string
-
qualifierList
qualifierList = "[" qualifier *( "," qualifier ) "]"
- Parameters:
pElement
-pInd
-- Returns:
- the MOF string +newLine if qualifiers present or empty string
-
qualifierDeclaration
qualifierDeclaration = QUALIFIER qualifierName qualifierType scope [ defaultFlavor ] ";"
- Parameters:
pQType
-- Returns:
- the MOF string
-
scope
scope = "," SCOPE "(" metaElement *( "," metaElement ) ")" metaElement = CLASS | ASSOCIATION | INDICATION | QUALIFIER PROPERTY | REFERENCE | METHOD | PARAMETER | ANY
- Parameters:
pScopes
-- Returns:
- the MOF string
-
flavor
flavor = ENABLEOVERRIDE | DISABLEOVERRIDE | RESTRICTED | TOSUBCLASS | TRANSLATABLE
- Parameters:
flavor
-- Returns:
- the MOF string
-
qualifier
qualifier = qualifierName [ qualifierParameter ] [ ":" 1*flavor ]
- Parameters:
pQuali
-- Returns:
- the MOF string
-
propertyDeclaration
propertyDeclaration = typedElement [ defaultValue ] ";" defaultValue = "=" initializer
- Parameters:
pProp
-pInd
-- Returns:
- the MOF string
-
valueInitializer
valueInitializer = [ qualifierList ] ( propertyName | referenceName ) "=" initializer ";"
- Parameters:
pProp
-pInd
-- Returns:
- the MOF string
-
dataType
dataType = DT_UINT8 | DT_SINT8 | DT_UINT16 | DT_SINT16 | DT_UINT32 | DT_SINT32 | DT_UINT64 | DT_SINT64 | DT_REAL32 | DT_REAL64 | DT_CHAR16 | DT_STR | DT_BOOL | DT_DATETIME
Additionally it handles reference types too.objectType = objectRef objectRef = className REF
- Parameters:
pType
-- Returns:
- the MOF string
-
dataType
- Parameters:
pTypedElement
-- Returns:
- the MOF string
- See Also:
-
objectHandle
objectHandle- Parameters:
pPath
-- Returns:
- the Untyped MOF String
-
objectHandle
objectHandle- Parameters:
pPath
- The pathpTyped
- If true the URI is typedpLocal
- If true the path is local (omitting scheme, host and port)- Returns:
- the URI string
-
objectHandleAsRef
objectHandleAsRef- Parameters:
pPath
-- Returns:
- the Untyped MOF String
-
objectHandleAsRef
objectHandleAsRef- Parameters:
pPath
-pTyped
-- Returns:
- the MOF String
-
constantValue
constantValue = integerValue | realValue | charValue | stringValue | booleanValue | nullValue // | dateTimeValue | objectHandle
- Parameters:
pValuedElement
-pInd
-- Returns:
- the MOF string
-
constantValue
-
constantValue
-