|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.java4less.ocr.docparser.fields.FieldDef
public class FieldDef
defines the location, type, format... of a field
Field Summary | |
---|---|
static java.lang.String |
TYPE_D
type date |
static java.lang.String |
TYPE_N
type number |
static java.lang.String |
TYPE_S
type string |
Constructor Summary | |
---|---|
FieldDef(java.lang.String name,
FieldPositionDef x,
FieldPositionDef y)
create field definition |
Method Summary | |
---|---|
java.lang.String |
getFormat()
get format of the field. |
java.lang.String |
getName()
name of the field |
FieldPositionDef |
getPosX()
get column position |
FieldPositionDef |
getPosY()
get line position |
java.lang.String |
getType()
can be TYPE_D (date), TYPE_N (number), TYPE_S (string) |
TextValue |
getValue()
return current value for this field |
boolean |
isMandatory()
is this field mandatory or optional? default is mandatory |
void |
load(org.w3c.dom.Node n,
SectionDef sec)
load from XML node |
void |
saveToXml(org.w3c.dom.Document document,
org.w3c.dom.Node parent)
save field definition to XML |
void |
setFormat(java.lang.String format)
set format of the field. |
void |
setMandatory(boolean f)
is this field mandatory or optional? default is mandatory |
void |
setName(java.lang.String name)
name of the field |
void |
setType(java.lang.String type)
can be TYPE_D (date), TYPE_N (number), TYPE_S (string) |
void |
setValue(TextValue v)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String TYPE_S
public static java.lang.String TYPE_D
public static java.lang.String TYPE_N
Constructor Detail |
---|
public FieldDef(java.lang.String name, FieldPositionDef x, FieldPositionDef y)
name
- namex
- position xy
- position y (line)Method Detail |
---|
public void setMandatory(boolean f)
f
- public boolean isMandatory()
public TextValue getValue()
getValue
in interface IReference
public void setValue(TextValue v)
public java.lang.String getName()
getName
in interface IReference
public void setName(java.lang.String name)
name
- public FieldPositionDef getPosX()
public FieldPositionDef getPosY()
public void saveToXml(org.w3c.dom.Document document, org.w3c.dom.Node parent) throws java.lang.Exception
document
- parent
-
java.lang.Exception
public void load(org.w3c.dom.Node n, SectionDef sec)
n
- public java.lang.String getFormat()
public void setFormat(java.lang.String format)
format
- public java.lang.String getType()
public void setType(java.lang.String type)
type
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |