uk.co.weft.iso8211
Class Field
java.lang.Object
|
+--uk.co.weft.iso8211.Field
- Direct Known Subclasses:
- DDRField
- public class Field
- extends java.lang.Object
A field (not a DDR field, see separate class DDRField) in an
ISO8211 record.
- Version:
- $Revision: 1.6 $
This revision: $Author: simon $
$Log: Field.java,v $
Revision 1.6 2002/11/04 14:11:15 simon
Now generating (some) XML. Tidy up for first public release.
Revision 1.5 2002/11/02 00:09:16 simon
Promising, but still not there. Problems include not correctly finding
the start of the next record.
Revision 1.4 2002/11/01 14:46:09 simon
Much better! Now parsing most fields reasonably well.
Revision 1.3 2002/10/31 23:04:28 simon
Not in all truth a lot of progress. I'm parsing the DDR OK but when I come
to real records I'm still not parsing them, and the reason seems to be that
I'm not associating the right formats with the right field types. I'm still
finding this very opaque.
Revision 1.2 2002/10/31 19:25:22 simon
This package of work is to take a parser which correctly recognised
all the record and field boundaries, and try to make it read actual
data. The DDR is now reading correctly (I believe) but the data are
not being read, primarily because (I think) I'm not correctly making
use of the data I read from the DDR.
Revision 1.1.1.1 2002/10/29 11:27:33 simon
More or less parses
- Author:
- Simon Brooke (simon@jasmine.org.uk)
|
Field Summary |
protected int |
index
which field I am within my record |
protected Record |
record
the record of which this field forms part |
protected java.util.Vector |
subfields
my subfields |
protected java.lang.String |
tag
my field name |
|
Constructor Summary |
protected |
Field()
An empty constructer so that DDRField can do it's own
thing. |
|
Field(ISO8211InputStream in,
Record record,
int index,
DDR ddr,
boolean debug)
create and return a Field object by reading from the current
point in this stream |
|
Method Summary |
protected org.w3c.dom.Element |
generate(org.w3c.dom.Document doc,
uk.co.weft.dbutil.Context context)
Generate XML element representing this field. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
record
protected Record record
- the record of which this field forms part
index
protected int index
- which field I am within my record
tag
protected java.lang.String tag
- my field name
subfields
protected java.util.Vector subfields
- my subfields
Field
protected Field()
- An empty constructer so that DDRField can do it's own
thing. Do not use unless you really know what you are
doing.
Field
public Field(ISO8211InputStream in,
Record record,
int index,
DDR ddr,
boolean debug)
throws java.lang.Exception
- create and return a Field object by reading from the current
point in this stream
- Parameters:
in - the stream to read me fromrecord - the record of which I form partindex - my index number within the recordddr - the data description record for this file (?) needed?debug - whether or not I'm in debug mode
generate
protected org.w3c.dom.Element generate(org.w3c.dom.Document doc,
uk.co.weft.dbutil.Context context)
throws uk.co.weft.domutil.GenerationException
- Generate XML element representing this field.
- Parameters:
doc - the document in which the element is to be generatedcontext - a context containin any bits and pieces I might
need to know about- Throws:
- uk.co.weft.domutil.GenerationException - if anything goes wrong