Class FHIRModelResolver

  • All Implemented Interfaces:
    org.opencds.cqf.cql.engine.model.ModelResolver

    public class FHIRModelResolver
    extends java.lang.Object
    implements org.opencds.cqf.cql.engine.model.ModelResolver
    This is an implementation of the CQL Engine Model Resolver that supports model resolution for IBM FHIR Server model objects.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object as​(java.lang.Object value, java.lang.Class<?> type, boolean isStrict)  
      java.lang.Object createInstance​(java.lang.String typeName)  
      java.lang.Object getContextPath​(java.lang.String contextType, java.lang.String targetType)  
      java.lang.String getPackageName()  
      java.lang.Boolean is​(java.lang.Object value, java.lang.Class<?> type)  
      java.lang.Boolean objectEqual​(java.lang.Object left, java.lang.Object right)  
      java.lang.Boolean objectEquivalent​(java.lang.Object left, java.lang.Object right)  
      protected java.lang.Object patchResult​(java.lang.String path, java.lang.Object result)  
      java.lang.Object resolvePath​(java.lang.Object target, java.lang.String path)  
      java.lang.Class<?> resolveType​(java.lang.Object value)  
      java.lang.Class<?> resolveType​(java.lang.String typeName)  
      void setPackageName​(java.lang.String packageName)  
      void setValue​(java.lang.Object target, java.lang.String path, java.lang.Object value)  
      protected java.lang.Object unpack​(FHIRPathNode node, java.lang.String path)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.opencds.cqf.cql.engine.model.ModelResolver

        getPackageNames, setPackageNames
    • Field Detail

      • BASE_PACKAGE_NAME

        public static final java.lang.String BASE_PACKAGE_NAME
        See Also:
        Constant Field Values
      • RESOURCE_PACKAGE_NAME

        public static final java.lang.String RESOURCE_PACKAGE_NAME
        See Also:
        Constant Field Values
      • TYPE_PACKAGE_NAME

        public static final java.lang.String TYPE_PACKAGE_NAME
        See Also:
        Constant Field Values
      • CODE_PACKAGE_NAME

        public static final java.lang.String CODE_PACKAGE_NAME
        See Also:
        Constant Field Values
      • ALL_PACKAGES

        public static final java.lang.String[] ALL_PACKAGES
      • idPattern

        public static final java.util.regex.Pattern idPattern
      • urlPattern

        public static final java.util.regex.Pattern urlPattern
    • Constructor Detail

      • FHIRModelResolver

        public FHIRModelResolver()
    • Method Detail

      • getPackageName

        public java.lang.String getPackageName()
        Specified by:
        getPackageName in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • setPackageName

        public void setPackageName​(java.lang.String packageName)
        Specified by:
        setPackageName in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • resolvePath

        public java.lang.Object resolvePath​(java.lang.Object target,
                                            java.lang.String path)
        Specified by:
        resolvePath in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • unpack

        protected java.lang.Object unpack​(FHIRPathNode node,
                                          java.lang.String path)
      • patchResult

        protected java.lang.Object patchResult​(java.lang.String path,
                                               java.lang.Object result)
      • getContextPath

        public java.lang.Object getContextPath​(java.lang.String contextType,
                                               java.lang.String targetType)
        Specified by:
        getContextPath in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • resolveType

        public java.lang.Class<?> resolveType​(java.lang.String typeName)
        Specified by:
        resolveType in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • resolveType

        public java.lang.Class<?> resolveType​(java.lang.Object value)
        Specified by:
        resolveType in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • is

        public java.lang.Boolean is​(java.lang.Object value,
                                    java.lang.Class<?> type)
        Specified by:
        is in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • as

        public java.lang.Object as​(java.lang.Object value,
                                   java.lang.Class<?> type,
                                   boolean isStrict)
        Specified by:
        as in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • createInstance

        public java.lang.Object createInstance​(java.lang.String typeName)
        Specified by:
        createInstance in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • setValue

        public void setValue​(java.lang.Object target,
                             java.lang.String path,
                             java.lang.Object value)
        Specified by:
        setValue in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • objectEqual

        public java.lang.Boolean objectEqual​(java.lang.Object left,
                                             java.lang.Object right)
        Specified by:
        objectEqual in interface org.opencds.cqf.cql.engine.model.ModelResolver
      • objectEquivalent

        public java.lang.Boolean objectEquivalent​(java.lang.Object left,
                                                  java.lang.Object right)
        Specified by:
        objectEquivalent in interface org.opencds.cqf.cql.engine.model.ModelResolver