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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClassificationValidation(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 voidassertDisplayNamePresent(EbXMLClassification classification, String classificationScheme) voidValidates 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:RegistryObjectValidatorValidates a registry object.- Specified by:
validatein interfaceRegistryObjectValidator- Parameters:
obj- the object.- Throws:
XDSMetaDataException- if the validation failed.
-
assertDisplayNamePresent
public static void assertDisplayNamePresent(EbXMLClassification classification, String classificationScheme)
-