Exemplo n.º 1
0
        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!";
            }
        }
Exemplo n.º 2
0
 public void addAField(MARCField field)
 {
     _fields.Add(field);
 }
Exemplo n.º 3
0
 public void addField(MARCField field)
 {
     _fields.Add(field);
     update();
 }
Exemplo n.º 4
0
 private void replaceWith(MARCField field)
 {
     _data = field.data;
     _indicator1 = field.indicator1;
     _indicator2 = field.indicator2;
     _subfields = field.getSubFields();
     _tag = field.mTag;
 }