Class ModelImporter

java.lang.Object
org.cqframework.cql.cql2elm.model.ModelImporter

public class ModelImporter extends Object
  • Constructor Details

    • ModelImporter

      public ModelImporter(org.hl7.elm_modelinfo.r1.ModelInfo modelInfo, ModelManager modelManager)
  • Method Details

    • getTypes

      public Map<String,org.hl7.cql.model.DataType> getTypes()
    • getConversions

      public Iterable<Conversion> getConversions()
    • getContexts

      public Iterable<org.hl7.cql.model.ModelContext> getContexts()
    • getDefaultContextName

      public String getDefaultContextName()
    • validateFreeAndBoundParameters

      public void validateFreeAndBoundParameters(org.hl7.cql.model.ClassType type, org.hl7.elm_modelinfo.r1.ClassInfo definition)
      Method checks to see if a class' parameters covers its parent parameters. These represent remaining degrees of freedom in the child class. For instance,
      MyGeneric<T> extends SomeOtherGeneric<String,T>
      All parameters in the parent class, not covered by the child class must be bound to a concrete type. In the above example, the parameter S is bound to the type String.

      If a parameter in the parent type is not covered by a child parameter nor bound to a concrete type, an exception is thrown indicating that the symbol is not known. In the example below, T is neither covered nor bound and thus is an unknown symbol.

      MyGeneric extends SomeOtherGeneric<String,T>
      Parameters:
      type -
      definition -
    • isParentGeneric

      public boolean isParentGeneric(org.hl7.cql.model.ClassType type)
      Method returns true if the class' base type is a generic type.
      Parameters:
      type -
      Returns:
      True if the parent of class 'type' is a generic class.