Class EMediplanExtension
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanExtension
- All Implemented Interfaces:
EMediplanExtendable
,EMediplanObject
Extensions can be used to include additional information within an eMediplan that is not explicitly modelled by the
ChMed specification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable List<@NonNull EMediplanExtension>
The list of nested extensions.protected String
Name of the field.protected String
The Schema.protected @Nullable String
The value of the field. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable EMediplanExtension
findExtension
(@Nullable List<@NonNull EMediplanExtension> extensions, String schema, String name) Finds an extension within the provided list of extensions whose schema and name match the provided ones.List<@NonNull EMediplanExtension>
Gets the list of this object's extensions.Validates the eMediplan object, without any further context than its JSON path and its own content, against the eMediplan specs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanExtendable
addExtension, findExtension
Methods inherited from interface org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanObject
getFieldValidationPath, getFieldValidationPath, getIgnoredFieldValidationIssue, getRequiredFieldValidationIssue, getValidationIssue, trim, validate
-
Field Details
-
name
Name of the field. Mandatory. -
value
The value of the field. Optional. -
schema
The Schema. It can be any string and can be used to determine how to interpret the extension. It is mandatory. -
extensions
The list of nested extensions. Optional if empty.
-
-
Constructor Details
-
EMediplanExtension
public EMediplanExtension()
-
-
Method Details
-
getExtensions
Description copied from interface:EMediplanExtendable
Gets the list of this object's extensions.- Specified by:
getExtensions
in interfaceEMediplanExtendable
- Returns:
- The list of extensions.
-
validate
Description copied from interface:EMediplanObject
Validates the eMediplan object, without any further context than its JSON path and its own content, against the eMediplan specs.- Specified by:
validate
in interfaceEMediplanObject
- Parameters:
basePath
- The JSON path of this object. Ifnull
, the object is considered to be root. Any validation issues produced by the validation will use this path as a base for each issue's path.- Returns:
- The validation result containing all the encountered validation issues, if any.
-
findExtension
@ExpectsValidResource public static @Nullable EMediplanExtension findExtension(@Nullable List<@NonNull EMediplanExtension> extensions, String schema, String name) Finds an extension within the provided list of extensions whose schema and name match the provided ones. If the list of extensions is null or empty, or if no match is found,null
is returned.- Parameters:
extensions
- The list of extensions within to perform the search.schema
- The schema to be matched.name
- The field name to be matched.- Returns:
- The matching extension, if any,
null
otherwise.
-