Exemplo n.º 1
0
        public void FstProcessor_TransformRecord()
        {
            IrbisConnection connection = Connection.ThrowIfNull();
            IrbisProvider   provider   = new ConnectedClient(connection);

            MarcRecord   record      = _GetRecord();
            FstFile      fstFile     = _GetFstFile();
            FstProcessor processor   = new FstProcessor(provider, fstFile);
            MarcRecord   transformed = processor.TransformRecord
                                       (
                record,
                fstFile
                                       );

            Write(transformed);
        }
Exemplo n.º 2
0
        public void FstProcessor_Rusmarc()
        {
            IrbisConnection connection = Connection.ThrowIfNull();
            IrbisProvider   provider   = new ConnectedClient(connection);

            FileSpecification specification = new FileSpecification
                                              (
                IrbisPath.MasterFile,
                "IBIS",
                "rmarci.fst"
                                              );
            FstProcessor processor = new FstProcessor(provider, specification);

            MarcRecord record;
            string     fileName = Path.Combine
                                  (
                DataPath.ThrowIfNull("DataPath"),
                "TEST1.ISO"
                                  );

            using (Stream stream = File.OpenRead(fileName))
            {
                record = Iso2709.ReadRecord
                         (
                    stream,
                    IrbisEncoding.Ansi
                         )
                         .ThrowIfNull("Iso2709.ReadRecord");
            }
            MarcRecord transformed = processor.TransformRecord
                                     (
                record,
                processor.File
                                     );

            Write(transformed);
        }