public class DefaultCompiler extends java.lang.Object implements ValueSetDefinitionCompiler
Constructor and Description |
---|
DefaultCompiler(VSDServiceHelper helper) |
Modifier and Type | Method and Description |
---|---|
CodedNodeSet |
compileValueSetDefinition(ValueSetDefinition vdd,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag,
java.util.HashMap<java.lang.String,ValueSetDefinition> referencedVSDs)
Compile value set definition.
|
protected CodedNodeSet |
getCodedNodeSetForValueSet(ValueSetDefinition vdd,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag,
java.util.HashMap<java.lang.String,ValueSetDefinition> referencedVSDs)
Resolves the supplied valueSetDefinition object against the list of coding scheme versions
|
protected CodedNodeSet |
getNodeSetForEntityReference(ValueSetDefinition vdd,
EntityReference entityRef,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Return a coded node set that represents the supplied entity reference
|
protected CodedNodeSet |
getNodeSetForPropertyReference(ValueSetDefinition vdd,
PropertyReference propertyRef,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Return a coded node set that represents the supplied property reference
|
protected CodedNodeSet |
leavesOfGraph(CodedNodeGraph cng,
boolean isTargetToSource,
ConceptReference root,
ValueSetDefinition vdd,
java.util.HashMap<java.lang.String,java.lang.String> refVersions,
java.lang.String versionTag)
Return the leaf nodes for the supplied graph.
|
public DefaultCompiler(VSDServiceHelper helper)
public CodedNodeSet compileValueSetDefinition(ValueSetDefinition vdd, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag, java.util.HashMap<java.lang.String,ValueSetDefinition> referencedVSDs) throws LBException
ValueSetDefinitionCompiler
compileValueSetDefinition
in interface ValueSetDefinitionCompiler
vdd
- the vddrefVersions
- the ref versionsversionTag
- the version tagreferencedVSDs
- - List of ValueSetDefinitions referenced by vsDef. If provided, these ValueSetDefinitions will be used to resolve vsDef.LBException
- the LB exceptionprotected CodedNodeSet getCodedNodeSetForValueSet(ValueSetDefinition vdd, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag, java.util.HashMap<java.lang.String,ValueSetDefinition> referencedVSDs) throws LBException
vdd
- - the value domain to be resolvedrefVersions
- - a map from coding scheme URIs to the corresponding versionversionTag
- - a tag (e.g. "production", "test", etc. used to resolve missing coding schemes)
If a coding scheme does not appear in this list the resolution will be as follows:
1) If the service supports a single version of the coding scheme it will be used.
2) If there is more than one version the one that uses the supplied versionTag will be used
3) If the versionTag isn't supplied, or if none of the versions matches it, then the one
marked "production" will be used
4) If there isn't one marked production, then the "latest" will be usedreferencedVSDs
- - List of ValueSetDefinitions referenced by vsDef. If provided, these ValueSetDefinitions will be used to resolve vsDef.LBException
protected CodedNodeSet getNodeSetForEntityReference(ValueSetDefinition vdd, EntityReference entityRef, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
vdd
- - containing value set definitionentityRef
- - entity reference to resolverefVersions
- - fixed versions to resolve againstversionTag
- - version tag to resolve elsewiseLBException
protected CodedNodeSet getNodeSetForPropertyReference(ValueSetDefinition vdd, PropertyReference propertyRef, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
vdd
- - containing value set definitionpropertyRef
- - property reference to resolverefVersions
- - fixed versions to resolve againstversionTag
- - version tag to resolve elsewiseLBException
protected CodedNodeSet leavesOfGraph(CodedNodeGraph cng, boolean isTargetToSource, ConceptReference root, ValueSetDefinition vdd, java.util.HashMap<java.lang.String,java.lang.String> refVersions, java.lang.String versionTag) throws LBException
cng
- - graph to be traversedisTargetToSource
- - direction to traverse the graphroot
- - the root node to start the traverse atvdd
- - value domain definition to resolve leaf nodes against if isLeaf is setrefVersions
- - map of coding Scheme URI to version (may be updated by this routine)versionTag
- - version tag (e.g. devel, production, etc.) to resolve new nodesLBException