示例#1
0
        static void Main()
        {
            try
            {
                string recordText = File.ReadAllText
                                    (
                    "record.txt",
                    IrbisEncoding.Ansi
                                    );
                StringReader reader = new StringReader(recordText);
                MarcRecord   record = PlainText.ReadRecord(reader)
                                      .ThrowIfNull("record!");

                LocalFstProcessor processor = new LocalFstProcessor
                                              (
                    "C:\\IRBIS64",
                    "SANDBOX"
                                              );
                FstFile fstFile = processor.ReadFile("marc_irb.fst")
                                  .ThrowIfNull("fstFile!");

                MarcRecord transformed = processor.TransformRecord
                                         (
                    record,
                    fstFile
                                         );
                string result = transformed.ToPlainText();
                Console.WriteLine(result);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
示例#2
0
        public void ReadRecord_SimpleRead()
        {
            MarcRecord record = Connection.ReadRecord(1);

            Write
            (
                record.ToPlainText().Substring(0, 50).Trim()
            );
        }
示例#3
0
        public void WriteRecord_Test1()
        {
            MarcRecord record = _GetRecord();

            record = Connection.WriteRecord(record);
            Write
            (
                record.ToPlainText().Substring(0, 50).Trim()
            );
        }
示例#4
0
        public void ReadRecord_ReadAndFormat()
        {
            MarcRecord record = Connection.ReadRecord
                                (
                "IBIS",
                1,
                false,
                "@brief"
                                );

            Write
            (
                record.ToPlainText().Substring(0, 50).Trim()
            );
            Write(" | ");
            Write(record.Description);
        }