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
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)
-
Constructor Details
-
AbstractForm
public AbstractForm(int min, int max) -
AbstractForm
-
-
Method Details
-
isAncestorOf
- Specified by:
isAncestorOf
in interfaceForm
- Returns:
- true if the passed in Form is directly descended from this Form
-
isAncestorOf
- Specified by:
isAncestorOf
in interfaceForm
-
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
- Specified by:
getForm
in interfaceFormProvider
-
setMax
public void setMax(int max)- Specified by:
setMax
in interfaceFormProvider
-
isFromDef
public boolean isFromDef() -
getDef
-
deref
-
setAnnotation
- Specified by:
setAnnotation
in interfaceFormProvider
-
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
-
getXPath
public java.lang.String getXPath() -
copyGutsOver
-