Class ConstraintLoader


  • public class ConstraintLoader
    extends AbstractLoader<IConstraintSet>
    Provides methods to load a constraint set expressed in XML.

    Loaded constraint instances are cached to avoid the need to load them for every use. Any constraint set imported is also loaded and cached automatically.

    • Method Detail

      • parseConstraintSet

        @NonNull
        protected gov.nist.secauto.metaschema.core.model.xml.xmlbeans.METASCHEMACONSTRAINTSDocument parseConstraintSet​(@NonNull
                                                                                                                       URI resource)
                                                                                                                throws IOException
        Parse the provided XML resource as a Metaschema constraints.
        Parameters:
        resource - the resource to parse
        Returns:
        the XMLBeans representation of the Metaschema contraints
        Throws:
        IOException - if a parsing error occurred
      • parseScopedConstraints

        @NonNull
        protected List<IScopedContraintsparseScopedConstraints​(@NonNull
                                                                 gov.nist.secauto.metaschema.core.model.xml.xmlbeans.METASCHEMACONSTRAINTSDocument xmlObject,
                                                                 @NonNull
                                                                 URI source)
        Parse individual constraint definitions from the provided XMLBeans object.
        Parameters:
        xmlObject - the XMLBeans object
        source - the source of the constraint content
        Returns:
        the scoped constraint definitions