public class ClassificationValidation extends Object implements RegistryObjectValidator
Modifier and Type | Field and Description |
---|---|
protected String |
classScheme |
Constructor and Description |
---|
ClassificationValidation(String classScheme,
int min,
int max,
Vocabulary.DisplayNameUsage displayNameUsage,
SlotValueValidation[] slotValidations)
Constructs the validation for classifications with the given
classScheme . |
ClassificationValidation(String classScheme,
int min,
int max,
Vocabulary.DisplayNameUsage displayNameUsage,
Vocabulary.NodeRepresentationUsage nodeRepresentationUsage,
SlotValueValidation[] slotValidations)
Constructs the validation for classifications with the given
classScheme . |
Modifier and Type | Method and Description |
---|---|
static void |
assertDisplayNamePresent(EbXMLClassification classification,
String classificationScheme) |
void |
validate(EbXMLRegistryObject obj)
Validates a registry object.
|
protected final String classScheme
public ClassificationValidation(String classScheme, int min, int max, Vocabulary.DisplayNameUsage displayNameUsage, SlotValueValidation[] slotValidations)
classScheme
.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.Vocabulary.DisplayNameUsage
public ClassificationValidation(String classScheme, int min, int max, Vocabulary.DisplayNameUsage displayNameUsage, Vocabulary.NodeRepresentationUsage nodeRepresentationUsage, SlotValueValidation[] slotValidations)
classScheme
.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 attribute nodeRepresentation
.slotValidations
- validations to apply to the slots of the classification.Vocabulary.DisplayNameUsage
public void validate(EbXMLRegistryObject obj) throws XDSMetaDataException
RegistryObjectValidator
validate
in interface RegistryObjectValidator
obj
- the object.XDSMetaDataException
- if the validation failed.public static void assertDisplayNamePresent(EbXMLClassification classification, String classificationScheme)
Copyright © 2018 Open eHealth Foundation. All rights reserved.