Class ClassificationValidation
java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.validate.ClassificationValidation
- All Implemented Interfaces:
RegistryObjectValidator
- Direct Known Subclasses:
AuthorClassificationValidation
Validates a classification.
- Author:
- Jens Riemschneider, Mitko Kolev
-
Field Summary
-
Constructor Summary
ConstructorDescriptionClassificationValidation
(String classScheme, int min, int max, Vocabulary.DisplayNameUsage displayNameUsage, Vocabulary.NodeRepresentationUsage nodeRepresentationUsage, SlotValueValidation[] slotValidations) Constructs the validation for classifications with the givenclassScheme
.ClassificationValidation
(String classScheme, int min, int max, Vocabulary.DisplayNameUsage displayNameUsage, SlotValueValidation[] slotValidations) Constructs the validation for classifications with the givenclassScheme
. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertDisplayNamePresent
(EbXMLClassification classification, String classificationScheme) void
Validates a registry object.
-
Field Details
-
classScheme
-
-
Constructor Details
-
ClassificationValidation
public ClassificationValidation(String classScheme, int min, int max, Vocabulary.DisplayNameUsage displayNameUsage, SlotValueValidation[] slotValidations) Constructs the validation for classifications with the givenclassScheme
.- Parameters:
classScheme
- the class scheme of the classification to check.min
- the minimum number of classifications allowed for the given scheme.max
- the maximum number of classifications allowed for the given scheme.displayNameUsage
- the usage of the display name element.slotValidations
- validations to apply to the slots of the classification.- See Also:
-
ClassificationValidation
public ClassificationValidation(String classScheme, int min, int max, Vocabulary.DisplayNameUsage displayNameUsage, Vocabulary.NodeRepresentationUsage nodeRepresentationUsage, SlotValueValidation[] slotValidations) Constructs the validation for classifications with the givenclassScheme
.- Parameters:
classScheme
- the class scheme of the classification to check.min
- the minimum number of classifications allowed for the given scheme.max
- the maximum number of classifications allowed for the given scheme.displayNameUsage
- the usage of the display name element.nodeRepresentationUsage
- optionality of the attributenodeRepresentation
.slotValidations
- validations to apply to the slots of the classification.- See Also:
-
-
Method Details
-
validate
Description copied from interface:RegistryObjectValidator
Validates a registry object.- Specified by:
validate
in interfaceRegistryObjectValidator
- Parameters:
obj
- the object.- Throws:
XDSMetaDataException
- if the validation failed.
-
assertDisplayNamePresent
public static void assertDisplayNamePresent(EbXMLClassification classification, String classificationScheme)
-