Class ModelValidator


  • public class ModelValidator
    extends java.lang.Object
    A Model Validator.
    Since:
    3 May 2023
    • Field Detail

      • errorMap

        protected java.util.Map<ModelValidator.ErrorKind,​java.util.List<org.ivoa.vodml.validation.ModelValidator.ErrorDescription>> errorMap
    • Constructor Detail

      • ModelValidator

        public ModelValidator​(VodmlModel<?> model)
        Create modelValidator from XML Schema.
        Parameters:
        model - the model description.
    • Method Detail

      • validate

        public <T> ModelValidator.ValidationResult validate​(T p)
        validate an object from the model.
        Type Parameters:
        T - The type of the object
        Parameters:
        p - The type to be validated.
        Returns:
        the result of the validation.
      • validate

        public ModelValidator.ValidationResult validate​(java.io.File file)
        Validate the file content against the model
        Parameters:
        file - containing xml instance of the model.
        Returns:
        the validation