public List <StoredQuery> GetStoredQueries(Project project)
        {
            var invoker = new SoapInvoker(this);
            var msg     = invoker.CreateEnvelope("GetStoredQueries", headerName);

            msg.Header.Add(GetHeaderElement());
            msg.Body.Add(new XElement(MessageNs + "rowVersion", 0));
            msg.Body.Add(new XElement(MessageNs + "projectId", project.Id));
            var response  = invoker.InvokeResponse();
            var extractor = new TableExtractor <StoredQuery>(response, "StoredQueries");

            return(extractor.Extract());
        }
Example #2
0
        private static void pdftronTransfer(string pdfPath, string txtPath)
        {
            pdftron.PDFNet.Initialize("Reuters Technology China Ltd.(thomsonreuters.com):CPU:1::W:AMC(20121010):AD5EE33F2505D1CAF1B425461F9C92BAA89204FA0AD8AAA17E07887EF0FA");
            TableLocator        locator = new TableLocator(pdfPath);
            LocateConfiguration Config  = new LocateConfiguration
            {
                TableEndFirstLetterRegex        = @"\d",
                TableEndRegex                   = @"\d{1,}/\d{1,}",
                TableNameNearbyFirstLetterRegex = "상",
                TableNameNearbyRegex            = "상장일"
            };
            List <TablePos>  tablePosList = locator.GetMultiTablePos(".*?추가상장\\s*내역", Config);
            List <FreeTable> tableList    = tablePosList.Select(tablePos => TableExtractor.Extract(locator.pdfDoc, tablePos)).ToList();

            WriteFreeTableToTxt(txtPath, " ", tableList);
        }
        private List <T> GetMetadata <T>(MetadataRowSetNames table)
            where T : class
        {
            var invoker  = new SoapInvoker(this);
            var envelope = invoker.CreateEnvelope("GetMetadataEx2", headerName);

            envelope.Header.Add(GetHeaderElement());
            envelope.Body.Add(new XElement(MessageNs + "metadataHave",
                                           new XElement(MessageNs + "MetadataTableHaveEntry",
                                                        new XElement(MessageNs + "TableName", table),
                                                        new XElement(MessageNs + "RowVersion", 0))));
            envelope.Body.Add(new XElement(MessageNs + "useMaster", "false"));
            var response  = invoker.InvokeResponse();
            var extractor = new TableExtractor <T>(response, table.ToString());

            return(extractor.Extract());
        }
        private static void pdftronTransfer(string pdfPath, string txtPath)
        {
            //pdftron.PDFNet.Initialize("Reuters Technology China Ltd.(thomsonreuters.com):CPU:1::W:AMC(20121010):AD5EE33F2505D1CAF1B425461F9C92BAA89204FA0AD8AAA17E07887EF0FA");
            TableLocator        locator = new TableLocator(pdfPath);
            LocateConfiguration config  = new LocateConfiguration();

            config.TableEndFirstLetterRegex        = @"\d";
            config.TableEndRegex                   = @"\d{1,}/\d{1,}";
            config.TableNameNearbyFirstLetterRegex = "상";
            config.TableNameNearbyRegex            = "상장일";
            List <TablePos>  tablePosList = locator.GetMultiTablePos(".*?추가상장\\s*내역", config);
            List <FreeTable> tableList    = new List <FreeTable>();

            foreach (var tablePos in tablePosList)
            {
                FreeTable table = TableExtractor.Extract(locator.pdfDoc, tablePos);
                tableList.Add(table);
            }
            WriteFreeTableToTxt(txtPath, " ", tableList);
        }