public MARCRecord(char[] rawRecord) { char[] temp = new char[MARCChar.LEADER_LEN]; init(); try { Array.Copy(rawRecord, temp, MARCChar.LEADER_LEN); _ldr = new MARCLeader(temp); int dirLength = _ldr.getBaseAddressOfData() - MARCChar.LEADER_LEN; char[] temp1 = new char[dirLength]; Array.Copy(rawRecord, MARCChar.LEADER_LEN, temp1, 0, dirLength); _dir = new MARCRecordDirectory(temp1); MARCField field; ArrayList dirEntries = _dir.getEntries(); foreach (MARCDirectoryEntry entry in dirEntries) { temp1 = new char[entry.fieldLength]; Array.Copy(rawRecord, _ldr.getBaseAddressOfData() + entry.dataEnd, temp1, 0, entry.fieldLength); field = new MARCField(entry.tagStr, entry.fieldLength, temp1); addField(field); } //char[] dir = new build_dir(); build_Leader(); } catch (Exception ex) { _warning = "Error!"; } }
public void addAField(MARCField field) { _fields.Add(field); }
public void addField(MARCField field) { _fields.Add(field); update(); }
private void replaceWith(MARCField field) { _data = field.data; _indicator1 = field.indicator1; _indicator2 = field.indicator2; _subfields = field.getSubFields(); _tag = field.mTag; }