Package com.ibm.fhir.cql.engine.model
Class FHIRModelResolver
- java.lang.Object
-
- com.ibm.fhir.cql.engine.model.FHIRModelResolver
-
- All Implemented Interfaces:
org.opencds.cqf.cql.engine.model.ModelResolver
public class FHIRModelResolver extends 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 String[]
ALL_PACKAGES
static String
BASE_PACKAGE_NAME
static String
CODE_PACKAGE_NAME
static String
RESOURCE_PACKAGE_NAME
static String
TYPE_PACKAGE_NAME
static Pattern
urlPattern
-
Constructor Summary
Constructors Constructor Description FHIRModelResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
as(Object value, Class<?> type, boolean isStrict)
Object
createInstance(String typeName)
Object
getContextPath(String contextType, String targetType)
String
getPackageName()
Boolean
is(Object value, Class<?> type)
Boolean
objectEqual(Object left, Object right)
Boolean
objectEquivalent(Object left, Object right)
protected Object
patchResult(String path, Object result)
Object
resolvePath(Object target, String path)
Class<?>
resolveType(Object value)
Class<?>
resolveType(String typeName)
void
setPackageName(String packageName)
void
setValue(Object target, String path, Object value)
protected Object
unpack(FHIRPathNode node, String path)
-
-
-
Field Detail
-
BASE_PACKAGE_NAME
public static final String BASE_PACKAGE_NAME
- See Also:
- Constant Field Values
-
RESOURCE_PACKAGE_NAME
public static final String RESOURCE_PACKAGE_NAME
- See Also:
- Constant Field Values
-
TYPE_PACKAGE_NAME
public static final String TYPE_PACKAGE_NAME
- See Also:
- Constant Field Values
-
CODE_PACKAGE_NAME
public static final String CODE_PACKAGE_NAME
- See Also:
- Constant Field Values
-
ALL_PACKAGES
public static final String[] ALL_PACKAGES
-
urlPattern
public static final Pattern urlPattern
-
-
Method Detail
-
getPackageName
public String getPackageName()
- Specified by:
getPackageName
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
setPackageName
public void setPackageName(String packageName)
- Specified by:
setPackageName
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
resolvePath
public Object resolvePath(Object target, String path)
- Specified by:
resolvePath
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
unpack
protected Object unpack(FHIRPathNode node, String path)
-
getContextPath
public Object getContextPath(String contextType, String targetType)
- Specified by:
getContextPath
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
resolveType
public Class<?> resolveType(String typeName)
- Specified by:
resolveType
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
resolveType
public Class<?> resolveType(Object value)
- Specified by:
resolveType
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
is
public Boolean is(Object value, Class<?> type)
- Specified by:
is
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
as
public Object as(Object value, Class<?> type, boolean isStrict)
- Specified by:
as
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
createInstance
public Object createInstance(String typeName)
- Specified by:
createInstance
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
setValue
public void setValue(Object target, String path, Object value)
- Specified by:
setValue
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
objectEqual
public Boolean objectEqual(Object left, Object right)
- Specified by:
objectEqual
in interfaceorg.opencds.cqf.cql.engine.model.ModelResolver
-
-