Class AbstractForm

    • Constructor Detail

      • AbstractForm

        public AbstractForm​(int min,
                            int max)
      • AbstractForm

        public AbstractForm​(int min,
                            int max,
                            Form parent)
    • Method Detail

      • isAncestorOf

        public boolean isAncestorOf​(Form f)
        Specified by:
        isAncestorOf in interface Form
        Returns:
        true if the passed in Form is directly descended from this Form
      • getParent

        public Form getParent()
        Specified by:
        getParent in interface Form
        Returns:
        the Form containing this Form. Every Form has a parent except for the root which returns null
      • getMin

        public int getMin()
        Specified by:
        getMin in interface FormProvider
        Returns:
        the minimum number of times this Form can appear
      • getMax

        public int getMax()
        Specified by:
        getMax in interface FormProvider
        Returns:
        the maximum number of times this Form can appear
      • setMin

        public void setMin​(int min)
        Specified by:
        setMin in interface FormProvider
      • setMax

        public void setMax​(int max)
        Specified by:
        setMax in interface FormProvider
      • isFromDef

        public boolean isFromDef()
        Specified by:
        isFromDef in interface Form
        Returns:
        true if this From is originally from a Definition. If true, getDef() will return this Form's definition
      • getDef

        public Definition getDef()
        Specified by:
        getDef in interface Form
        Returns:
        the definition this form was originally contained in. Null if this form was not contained in a definition
      • deref

        public Form deref​(Form newParent,
                          Definition newDef)
        Specified by:
        deref in interface Form
        Returns:
        this form set with parent as its parent, isFromDef returns true and getDef returns def
      • setNamespace

        public void setNamespace​(java.lang.String ns)
      • getNamespace

        public java.lang.String getNamespace()
        Specified by:
        getNamespace in interface Form
        Returns:
        the namespace of this form
      • getXPath

        public java.lang.String getXPath()
        Specified by:
        getXPath in interface Form
      • copyGutsOver

        public void copyGutsOver​(AbstractForm copy)