edu.sc.seis.sod.validator.model
Class AbstractForm
java.lang.Object
edu.sc.seis.sod.validator.model.AbstractForm
- All Implemented Interfaces:
- Form, FormProvider
- Direct Known Subclasses:
- AbstractGenitorForm, AbstractMultigenitorForm, Data, Empty, NotAllowed, Text
public abstract class AbstractForm
- extends java.lang.Object
- implements Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.sc.seis.sod.validator.model.Form |
accept |
AbstractForm
public AbstractForm(int min,
int max)
AbstractForm
public AbstractForm(int min,
int max,
Form parent)
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
isAncestorOf
public boolean isAncestorOf(Form f,
Form root)
- Specified by:
isAncestorOf
in interface 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
getForm
public Form getForm()
- Specified by:
getForm
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
setAnnotation
public void setAnnotation(Annotation ann)
- Specified by:
setAnnotation
in interface FormProvider
getAnnotation
public Annotation getAnnotation()
- Specified by:
getAnnotation
in interface Form
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)