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 StringANYstatic final StringASSOCIATIONstatic final StringCLASSstatic final intOVERRIDABLE (true|false) 'true' -> DISABLEOVERRIDE=false TOSUBCLASS (true|false) 'true' -> RESTRICTED=false TOINSTANCE (true|false) 'false' TRANSLATABLE (true|false) 'false' -> TRANSLTE=falsestatic final StringDISABLEOVERRIDEstatic final StringDT_BOOLstatic final StringDT_CHAR16static final StringDT_DATETIMEstatic final StringDT_REAL32static final StringDT_REAL64static final StringDT_SINT16static final StringDT_SINT32static final StringDT_SINT64static final StringDT_SINT8static final StringDT_STRstatic final StringDT_UINT16static final StringDT_UINT32static final StringDT_UINT64static final StringDT_UINT8static final StringEMPTYstatic final StringENABLEOVERRIDEstatic final StringFALSEstatic final StringINDENTstatic final StringINDICATIONstatic final StringINSTANCEstatic final StringINSTOFstatic final StringINVALIDstatic final StringMETHODstatic final StringNAMESPACEstatic final StringNULLstatic final StringPARAMETERstatic final StringPROPERTYstatic final StringQUALIFIERstatic final StringREFstatic final StringREFERENCEstatic final StringRESTRICTEDstatic final StringSCOPEstatic final StringTOSUBCLASSstatic final StringTRANSLATABLEstatic final StringTRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringclassDeclaration(CIMClass pCl, String pInd) classDeclaration = [ qualifierList ] CLASS className [ superClass ] "{" *classFeature "}" ";" classFeature = propertyDeclaration | methodDeclaration superClass = ":" classNamestatic StringconstantValue(Object pObj, boolean pTyped, String pInd) constantValuestatic StringconstantValue(Object pObj, String pInd) constantValuestatic StringconstantValue(CIMValuedElement<?> pValuedElement, String pInd) constantValue = integerValue | realValue | charValue | stringValue | booleanValue | nullValue // | dateTimeValue | objectHandlestatic StringdataType(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 StringdataType(CIMTypedElement pTypedElement) static Stringflavor(int flavor) flavor = ENABLEOVERRIDE | DISABLEOVERRIDE | RESTRICTED | TOSUBCLASS | TRANSLATABLEstatic StringinstanceDeclaration(CIMInstance pInst, String pInd) instanceDeclaration = [ qualifierList ] INSTANCE OF className [ alias ] "{" 1*valueInitializer "}" ";"static StringmethodDeclaration(CIMMethod<?> pMethod, String pInd) methodDeclaration = [ qualifierList ] dataType methodName "(" [ parameterList ] ")" ";"static StringobjectHandle(CIMObjectPath pPath) objectHandlestatic StringobjectHandle(CIMObjectPath pPath, boolean pTyped, boolean pLocal) objectHandlestatic StringobjectHandleAsRef(CIMObjectPath pPath) objectHandleAsRefstatic StringobjectHandleAsRef(CIMObjectPath pPath, boolean pTyped) objectHandleAsRefstatic Stringparameter(CIMParameter<?> pParam, String pInd) parameterstatic StringpropertyDeclaration(CIMProperty<?> pProp, String pInd) propertyDeclaration = typedElement [ defaultValue ] ";" defaultValue = "=" initializerstatic Stringqualifier(CIMQualifier<?> pQuali) qualifier = qualifierName [ qualifierParameter ] [ ":" 1*flavor ]static StringqualifierDeclaration(CIMQualifierType<?> pQType) qualifierDeclaration = QUALIFIER qualifierName qualifierType scope [ defaultFlavor ] ";"static StringqualifierList(CIMElement pElement, String pInd) qualifierList = "[" qualifier *( "," qualifier ) "]"static Stringscope(int pScopes) scope = "," SCOPE "(" metaElement *( "," metaElement ) ")" metaElement = CLASS | ASSOCIATION | INDICATION | QUALIFIER PROPERTY | REFERENCE | METHOD | PARAMETER | ANYstatic StringtypedElement(CIMTypedElement pTypedElement, String pInd) typedElement = [ qualifierList ] (dataType|objectRef) parameterName [ array ]static StringvaluedElement(CIMValuedElement<?> pValuedElement, String pInd) valuedElement = typedElement [ defaultValue ] ";" defaultValue = "=" initializerstatic StringvalueInitializer(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_DATETIMEAdditionally 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
-