Package 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
-
-
Constructor Summary
Constructors Constructor Description AbstractForm(int min, int max)
AbstractForm(int min, int max, Form parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyGutsOver(AbstractForm copy)
Form
deref(Form newParent, Definition newDef)
Annotation
getAnnotation()
Definition
getDef()
Form
getForm()
int
getMax()
int
getMin()
java.lang.String
getNamespace()
Form
getParent()
java.lang.String
getXPath()
boolean
isAncestorOf(Form f)
boolean
isAncestorOf(Form f, Form root)
boolean
isFromDef()
void
setAnnotation(Annotation ann)
void
setMax(int max)
void
setMin(int min)
void
setNamespace(java.lang.String ns)
-
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.FormProvider
copyWithNewParent
-
-
-
-
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 interfaceForm
- 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 interfaceForm
-
getParent
public Form getParent()
-
getMin
public int getMin()
- Specified by:
getMin
in interfaceFormProvider
- Returns:
- the minimum number of times this Form can appear
-
getMax
public int getMax()
- Specified by:
getMax
in interfaceFormProvider
- Returns:
- the maximum number of times this Form can appear
-
setMin
public void setMin(int min)
- Specified by:
setMin
in interfaceFormProvider
-
getForm
public Form getForm()
- Specified by:
getForm
in interfaceFormProvider
-
setMax
public void setMax(int max)
- Specified by:
setMax
in interfaceFormProvider
-
isFromDef
public boolean isFromDef()
-
getDef
public Definition getDef()
-
deref
public Form deref(Form newParent, Definition newDef)
-
setAnnotation
public void setAnnotation(Annotation ann)
- Specified by:
setAnnotation
in interfaceFormProvider
-
getAnnotation
public Annotation getAnnotation()
- Specified by:
getAnnotation
in interfaceForm
-
setNamespace
public void setNamespace(java.lang.String ns)
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interfaceForm
- Returns:
- the namespace of this form
-
copyGutsOver
public void copyGutsOver(AbstractForm copy)
-
-