p

au.csiro.pathling

encoders

package encoders

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. encoders
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AttachExtensions(targetObject: Expression, extensionMapObject: Expression) extends Expression with NonSQLExpression with Product with Serializable

    Attaches the Extensions from the provided fid->Extension map to objects registered in the _fid_mapping with RegisterFid.

    Attaches the Extensions from the provided fid->Extension map to objects registered in the _fid_mapping with RegisterFid.

    targetObject

    the container object that should be the result of evaluation.

    extensionMapObject

    the expression which evaluates to Map(Integer,Array(Extension)) which maps fid to the list of Extensions for the object with this fid.

  2. trait Deserializer extends AnyRef
  3. class DeserializerBuilder extends AnyRef

    The builder of deserializer expressions for HAPI representation of FHIR resources.

  4. case class EncoderConfig(maxNestingLevel: Int, openTypes: Set[String], supportsExtensions: Boolean, generateFid: Boolean) extends EncoderSettings with Product with Serializable

    Default implementation of EncoderSettings.

    Default implementation of EncoderSettings.

    maxNestingLevel

    @see EncoderSettings.maxNestingLevel

    openTypes

    @see EncoderSettings.openTypes

    supportsExtensions

    @see EncoderSettings.supportsExtensions

    generateFid

    @see EncoderSettings.generateFid

  5. trait EncoderContext extends EncoderSettings

    Access to common objects required by schema processing operations.

  6. trait EncoderSettings extends AnyRef

    Configuration setting for encoders.

  7. type ExpressionWithName = (String, Expression)
  8. class FhirEncoders extends AnyRef

    Spark Encoders for FHIR Resources.

    Spark Encoders for FHIR Resources. This object is thread safe.

  9. case class GetClassFromContained(targetObject: Expression, containedClass: Class[_]) extends Expression with NonSQLExpression with Product with Serializable

    An Expression extracting an object having the given class definition from a List of FHIR Resources.

  10. case class GetHapiValue(value: Expression, dataType: DataType, hasMethod: String, getMethod: String) extends Expression with NonSQLExpression with Product with Serializable

    Gets value of an element of a HAPI object.

    Gets value of an element of a HAPI object. This is could be composed from If and Invoke expression but having it as a dedicated expression makes the serializer expression more readable and also avoids the problems with 'If' optimisations.

    value

    the expression with the reference to the HAPI object

    dataType

    the data type of the element to get

    hasMethod

    the name of method to check if the element is present, e.g. hasNameElement()

    getMethod

    the name of method to get the value of the element, e.g. getNameElement()

    returns

    the value of the element or null if the element is not present or the object is null

  11. case class InstanceOf(value: Expression, checkedType: Class[_]) extends Expression with NonSQLExpression with Product with Serializable

    Determines if the given value is an instanceof a given class

    Determines if the given value is an instanceof a given class

    value

    the value to check

    checkedType

    the class to check the value against

  12. case class ObjectCast(value: Expression, resultType: DataType) extends Expression with NonSQLExpression with Product with Serializable

    Casts the result of an expression to another type.

    Casts the result of an expression to another type.

    value

    The value to cast

    resultType

    The type to which the value should be cast

  13. case class RegisterFid(targetObject: Expression, fidValue: Expression) extends Expression with NonSQLExpression with Product with Serializable

    Registers the mapping of a deserialized object to its _fid value.

    Registers the mapping of a deserialized object to its _fid value. The mapping is saved in '_fid_mapping' immutable state variable. Evaluates as identity.

    targetObject

    the expression, which value should be registered.

    fidValue

    the fid value to use.

  14. class SchemaConverter extends EncoderContext

    The converter from FHIR schemas to SQL schemas.

  15. trait SchemaProcessor[DT, SF] extends SchemaVisitor[DT, SF] with EncoderSettings

    A specialized SchemaVisitor for building schema encoders and converters.

    A specialized SchemaVisitor for building schema encoders and converters.

    DT

    the type which represents the final result of traversing a resource (or composite), e.g: for a schema converter this can be org.apache.spark.sql.types.DataType.

    SF

    the type which represents the result of traversing an element of a composite, e.g: for a schema converter this can be org.apache.spark.sql.types.StructField.

  16. abstract class SchemaProcessorWithTypeMappings[DT, SF] extends SchemaProcessor[DT, SF] with EncoderContext

    Default implementation of SchemaProcessor delegating relevant functionality to DataTypeMappings

    Default implementation of SchemaProcessor delegating relevant functionality to DataTypeMappings

    DT

    the type which represents the final result of traversing a resource (or composite), e.g: for a schema converter this can be org.apache.spark.sql.types.DataType.

    SF

    the type which represents the result of traversing an element of a composite, e.g: for a schema converter this can be org.apache.spark.sql.types.StructField.

  17. type Serializer = (Expression) ⇒ Expression
  18. class SerializerBuilder extends AnyRef

    The builder of serializer expressions for HAPI representation of FHIR resources.

  19. case class StaticField(staticObject: Class[_], dataType: DataType, fieldName: String) extends Expression with NonSQLExpression with Product with Serializable

    Invokes a static function, returning the result.

    Invokes a static function, returning the result. By default, any of the arguments being null will result in returning null instead of calling the function.

    staticObject

    The target of the static call. This can either be the object itself (methods defined on scala objects), or the class object (static methods defined in java).

    dataType

    The expected type of the static field

    fieldName

    The name of the field to retrieve

  20. class UnsupportedResourceError extends RuntimeException

    Thrown when encoding is requested for an unsupported resource type.

Value Members

  1. object Catalyst

    This class provides a compatibility layer for Spark Catalyst.

    This class provides a compatibility layer for Spark Catalyst. It is used to createnew Expressions using constructors compatible with the runtime version of Spark Catalyst. This is necessary to address running Pathling in Databricks environments, which habitually use different (newer) version of Catalyst that one used by the corresponding Spark public release.

  2. object DeserializerBuilder

    Companion object for DeserializerBuilder

  3. object EncoderBuilder

    Spark Encoder for FHIR data models.

  4. object EncoderConfig extends Serializable
  5. object EncoderUtils
  6. object EncodingContext

    Provides a context for tracking nesting depth of element definition for encoders.

    Provides a context for tracking nesting depth of element definition for encoders. Usage:

    EncodingContext.runWithContext {
    
     // anywhere in the call stack to increase the nesting level
     // of someDefinition
    
     EncodingContext.withDefinition(someDefinition) {
       // anywhere in the call stack to check the current nesting
       // level of someDefinition
    
       EncodingContext.currentNestingLevel(someDefinition)
     }
    }
  7. object ExtensionSupport

    Helper class with constants related to FHIR extension support.

  8. object QuantitySupport

    Helper class for serialization of Quantities.

    Helper class for serialization of Quantities. In order to improve the performance of comparisons we store with each quantity canonicalized value (its value in the base unit of the quantity) and the base (canonicalized) unit code.

  9. object SerializerBuilder

    Companion object for SerializerBuilder

Inherited from AnyRef

Inherited from Any

Ungrouped