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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyGutsOver
(AbstractForm copy) deref
(Form newParent, Definition newDef) getDef()
getForm()
int
getMax()
int
getMin()
getXPath()
boolean
isAncestorOf
(Form f) boolean
isAncestorOf
(Form f, Form root) boolean
void
setAnnotation
(Annotation ann) void
setMax
(int max) void
setMin
(int min) void
setNamespace
(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 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
-
getNamespace
- Specified by:
getNamespace
in interfaceForm
- Returns:
- the namespace of this form
-
getXPath
-
copyGutsOver
-