java.lang.Object
org.sblim.cimclient.internal.util.MOF

public class MOF extends Object
Class MOF is responsible for helping MOF String generation.
  • Field Details

  • Constructor Details

    • MOF

      public MOF()
  • Method Details

    • classDeclaration

      public static String classDeclaration(CIMClass pCl, String pInd)
              classDeclaration                =       [ qualifierList ] CLASS className [ superClass ]
                                              "{" *classFeature "}" ";"
              classFeature                    =       propertyDeclaration | methodDeclaration
              
              superClass                              =       ":" className
       
      Parameters:
      pCl -
      pInd -
      Returns:
      the MOF string
    • instanceDeclaration

      public static String instanceDeclaration(CIMInstance pInst, String pInd)
      instanceDeclaration = [ qualifierList ] INSTANCE OF className [ alias ] "{" 1*valueInitializer "}" ";"
      Parameters:
      pInst -
      pInd -
      Returns:
      the MOF string
    • methodDeclaration

      public static String methodDeclaration(CIMMethod<?> pMethod, String pInd)
              methodDeclaration               =       [ qualifierList ] dataType methodName
                                                              "(" [ parameterList ] ")" ";"
       
      Parameters:
      pMethod -
      pInd -
      Returns:
      the MOF string
    • parameter

      public static String parameter(CIMParameter<?> pParam, String pInd)
      parameter
      Parameters:
      pParam - - CIMParameter
      pInd -
      Returns:
      the MOF string
    • typedElement

      public static String typedElement(CIMTypedElement pTypedElement, String pInd)
      typedElement = [ qualifierList ] (dataType|objectRef) parameterName [ array ]
      Parameters:
      pTypedElement -
      pInd -
      Returns:
      the MOF string
    • valuedElement

      public static String valuedElement(CIMValuedElement<?> pValuedElement, String pInd)
              valuedElement           =       typedElement [ defaultValue ] ";"
              defaultValue                    =       "=" initializer
       
      Parameters:
      pValuedElement -
      pInd -
      Returns:
      the MOF string
    • qualifierList

      public static String qualifierList(CIMElement pElement, String pInd)
              qualifierList                   =       "[" qualifier *( "," qualifier ) "]"
       
      Parameters:
      pElement -
      pInd -
      Returns:
      the MOF string +newLine if qualifiers present or empty string
    • qualifierDeclaration

      public static String qualifierDeclaration(CIMQualifierType<?> pQType)
              qualifierDeclaration    =       QUALIFIER qualifierName qualifierType scope 
                                                                      [ defaultFlavor ] ";"
       
      Parameters:
      pQType -
      Returns:
      the MOF string
    • scope

      public static String scope(int pScopes)
              scope           =       "," SCOPE "(" metaElement *( "," metaElement ) ")"
              metaElement     =       CLASS | ASSOCIATION | INDICATION | QUALIFIER
                                              PROPERTY | REFERENCE | METHOD | PARAMETER | ANY
       
      Parameters:
      pScopes -
      Returns:
      the MOF string
    • flavor

      public static String flavor(int flavor)
       flavor = ENABLEOVERRIDE | DISABLEOVERRIDE | RESTRICTED | TOSUBCLASS | TRANSLATABLE
       
      Parameters:
      flavor -
      Returns:
      the MOF string
    • qualifier

      public static String qualifier(CIMQualifier<?> pQuali)
              qualifier                               =       qualifierName [ qualifierParameter ] [ ":" 1*flavor ]
       
      Parameters:
      pQuali -
      Returns:
      the MOF string
    • propertyDeclaration

      public static String propertyDeclaration(CIMProperty<?> pProp, String pInd)
              propertyDeclaration     =       typedElement [ defaultValue ] ";"
              defaultValue                    =       "=" initializer
       
      Parameters:
      pProp -
      pInd -
      Returns:
      the MOF string
    • valueInitializer

      public static String valueInitializer(CIMProperty<?> pProp, String pInd)
              valueInitializer                = [ qualifierList ] ( propertyName | referenceName ) "="
                                                                              initializer ";"
       
      Parameters:
      pProp -
      pInd -
      Returns:
      the MOF string
    • dataType

      public static 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_DATETIME
       
      Additionally it handles reference types too.
              objectType      =       objectRef
              objectRef               =       className REF
       
      Parameters:
      pType -
      Returns:
      the MOF string
    • dataType

      public static String dataType(CIMTypedElement pTypedElement)
      Parameters:
      pTypedElement -
      Returns:
      the MOF string
      See Also:
    • objectHandle

      public static String objectHandle(CIMObjectPath pPath)
      objectHandle
      Parameters:
      pPath -
      Returns:
      the Untyped MOF String
    • objectHandle

      public static String objectHandle(CIMObjectPath pPath, boolean pTyped, boolean pLocal)
      objectHandle
      Parameters:
      pPath - The path
      pTyped - If true the URI is typed
      pLocal - If true the path is local (omitting scheme, host and port)
      Returns:
      the URI string
    • objectHandleAsRef

      public static String objectHandleAsRef(CIMObjectPath pPath)
      objectHandleAsRef
      Parameters:
      pPath -
      Returns:
      the Untyped MOF String
    • objectHandleAsRef

      public static String objectHandleAsRef(CIMObjectPath pPath, boolean pTyped)
      objectHandleAsRef
      Parameters:
      pPath -
      pTyped -
      Returns:
      the MOF String
    • constantValue

      public static String constantValue(CIMValuedElement<?> pValuedElement, String pInd)
       constantValue = integerValue | realValue | charValue | stringValue | booleanValue | nullValue
       // | dateTimeValue | objectHandle
       
      Parameters:
      pValuedElement -
      pInd -
      Returns:
      the MOF string
    • constantValue

      public static String constantValue(Object pObj, boolean pTyped, String pInd)
      constantValue
      Parameters:
      pObj -
      pTyped -
      pInd -
      Returns:
      the MOF string
      See Also:
    • constantValue

      public static String constantValue(Object pObj, String pInd)
      constantValue
      Parameters:
      pObj -
      pInd -
      Returns:
      the untyped MOF String