Class FHIRModelResolver
- java.lang.Object
-
- org.linuxforhealth.fhir.cql.engine.model.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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
ALL_PACKAGES
static java.lang.String
BASE_PACKAGE_NAME
static java.lang.String
CODE_PACKAGE_NAME
static java.util.regex.Pattern
idPattern
static java.lang.String
RESOURCE_PACKAGE_NAME
static java.lang.String
TYPE_PACKAGE_NAME
static java.util.regex.Pattern
urlPattern
-
Constructor Summary
Constructors Constructor Description FHIRModelResolver()
-
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)
-
-
-
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
-
-
Method Detail
-
getPackageName
public java.lang.String getPackageName()
- Specified by:
getPackageName
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
setPackageName
public void setPackageName(java.lang.String packageName)
- Specified by:
setPackageName
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
resolvePath
public java.lang.Object resolvePath(java.lang.Object target, java.lang.String path)
- Specified by:
resolvePath
in interfaceorg.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 interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
resolveType
public java.lang.Class<?> resolveType(java.lang.String typeName)
- Specified by:
resolveType
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
resolveType
public java.lang.Class<?> resolveType(java.lang.Object value)
- Specified by:
resolveType
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
is
public java.lang.Boolean is(java.lang.Object value, java.lang.Class<?> type)
- Specified by:
is
in interfaceorg.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 interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
createInstance
public java.lang.Object createInstance(java.lang.String typeName)
- Specified by:
createInstance
in interfaceorg.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 interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
objectEqual
public java.lang.Boolean objectEqual(java.lang.Object left, java.lang.Object right)
- Specified by:
objectEqual
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
objectEquivalent
public java.lang.Boolean objectEquivalent(java.lang.Object left, java.lang.Object right)
- Specified by:
objectEquivalent
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
-