Class: Relevanced::Processor
- Inherits:
-
Object
- Object
- Relevanced::Processor
- Includes:
- Thrift::Processor
- Defined in:
- lib/gen-rb/relevanced.rb
Instance Method Summary collapse
- #process_addDocumentToCentroid(seqid, iprot, oprot) ⇒ Object
- #process_createCentroid(seqid, iprot, oprot) ⇒ Object
- #process_createDocument(seqid, iprot, oprot) ⇒ Object
- #process_createDocumentWithID(seqid, iprot, oprot) ⇒ Object
- #process_debugEraseAllData(seqid, iprot, oprot) ⇒ Object
- #process_debugGetFullCentroid(seqid, iprot, oprot) ⇒ Object
- #process_debugGetFullProcessedDocument(seqid, iprot, oprot) ⇒ Object
- #process_deleteCentroid(seqid, iprot, oprot) ⇒ Object
- #process_deleteDocument(seqid, iprot, oprot) ⇒ Object
- #process_getCentroidSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_getDocumentMetadata(seqid, iprot, oprot) ⇒ Object
- #process_getDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_getServerMetadata(seqid, iprot, oprot) ⇒ Object
- #process_getTextSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_joinCentroid(seqid, iprot, oprot) ⇒ Object
- #process_listAllCentroids(seqid, iprot, oprot) ⇒ Object
- #process_listAllDocuments(seqid, iprot, oprot) ⇒ Object
- #process_listAllDocumentsForCentroid(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidDocumentRange(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidRange(seqid, iprot, oprot) ⇒ Object
- #process_listCentroidRangeFromID(seqid, iprot, oprot) ⇒ Object
- #process_listDocumentRange(seqid, iprot, oprot) ⇒ Object
- #process_listDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
- #process_multiGetDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_multiGetTextSimilarity(seqid, iprot, oprot) ⇒ Object
- #process_ping(seqid, iprot, oprot) ⇒ Object
- #process_removeDocumentFromCentroid(seqid, iprot, oprot) ⇒ Object
Instance Method Details
#process_addDocumentToCentroid(seqid, iprot, oprot) ⇒ Object
629 630 631 632 633 634 635 636 637 638 639 640 641 642 |
# File 'lib/gen-rb/relevanced.rb', line 629 def process_addDocumentToCentroid(seqid, iprot, oprot) args = read_args(iprot, AddDocumentToCentroid_args) result = AddDocumentToCentroid_result.new() begin result.success = @handler.addDocumentToCentroid(args.centroidId, args.docId) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr rescue ::EDocumentAlreadyInCentroid => bothErr result.bothErr = bothErr end write_result(result, oprot, 'addDocumentToCentroid', seqid) end |
#process_createCentroid(seqid, iprot, oprot) ⇒ Object
574 575 576 577 578 579 580 581 582 583 |
# File 'lib/gen-rb/relevanced.rb', line 574 def process_createCentroid(seqid, iprot, oprot) args = read_args(iprot, CreateCentroid_args) result = CreateCentroid_result.new() begin result.success = @handler.createCentroid(args.centroidId) rescue ::ECentroidAlreadyExists => err result.err = err end write_result(result, oprot, 'createCentroid', seqid) end |
#process_createDocument(seqid, iprot, oprot) ⇒ Object
534 535 536 537 538 539 |
# File 'lib/gen-rb/relevanced.rb', line 534 def process_createDocument(seqid, iprot, oprot) args = read_args(iprot, CreateDocument_args) result = CreateDocument_result.new() result.success = @handler.createDocument(args.text) write_result(result, oprot, 'createDocument', seqid) end |
#process_createDocumentWithID(seqid, iprot, oprot) ⇒ Object
541 542 543 544 545 546 547 548 549 550 |
# File 'lib/gen-rb/relevanced.rb', line 541 def process_createDocumentWithID(seqid, iprot, oprot) args = read_args(iprot, CreateDocumentWithID_args) result = CreateDocumentWithID_result.new() begin result.success = @handler.createDocumentWithID(args.id, args.text) rescue ::EDocumentAlreadyExists => err result.err = err end write_result(result, oprot, 'createDocumentWithID', seqid) end |
#process_debugEraseAllData(seqid, iprot, oprot) ⇒ Object
712 713 714 715 716 717 |
# File 'lib/gen-rb/relevanced.rb', line 712 def process_debugEraseAllData(seqid, iprot, oprot) args = read_args(iprot, DebugEraseAllData_args) result = DebugEraseAllData_result.new() @handler.debugEraseAllData() write_result(result, oprot, 'debugEraseAllData', seqid) end |
#process_debugGetFullCentroid(seqid, iprot, oprot) ⇒ Object
719 720 721 722 723 724 725 726 727 728 |
# File 'lib/gen-rb/relevanced.rb', line 719 def process_debugGetFullCentroid(seqid, iprot, oprot) args = read_args(iprot, DebugGetFullCentroid_args) result = DebugGetFullCentroid_result.new() begin result.success = @handler.debugGetFullCentroid(args.centroidId) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'debugGetFullCentroid', seqid) end |
#process_debugGetFullProcessedDocument(seqid, iprot, oprot) ⇒ Object
730 731 732 733 734 735 736 737 738 739 |
# File 'lib/gen-rb/relevanced.rb', line 730 def process_debugGetFullProcessedDocument(seqid, iprot, oprot) args = read_args(iprot, DebugGetFullProcessedDocument_args) result = DebugGetFullProcessedDocument_result.new() begin result.success = @handler.debugGetFullProcessedDocument(args.documentId) rescue ::EDocumentDoesNotExist => err result.err = err end write_result(result, oprot, 'debugGetFullProcessedDocument', seqid) end |
#process_deleteCentroid(seqid, iprot, oprot) ⇒ Object
585 586 587 588 589 590 591 592 593 594 |
# File 'lib/gen-rb/relevanced.rb', line 585 def process_deleteCentroid(seqid, iprot, oprot) args = read_args(iprot, DeleteCentroid_args) result = DeleteCentroid_result.new() begin result.success = @handler.deleteCentroid(args.centroidId) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'deleteCentroid', seqid) end |
#process_deleteDocument(seqid, iprot, oprot) ⇒ Object
552 553 554 555 556 557 558 559 560 561 |
# File 'lib/gen-rb/relevanced.rb', line 552 def process_deleteDocument(seqid, iprot, oprot) args = read_args(iprot, DeleteDocument_args) result = DeleteDocument_result.new() begin result.success = @handler.deleteDocument(args.id) rescue ::EDocumentDoesNotExist => err result.err = err end write_result(result, oprot, 'deleteDocument', seqid) end |
#process_getCentroidSimilarity(seqid, iprot, oprot) ⇒ Object
523 524 525 526 527 528 529 530 531 532 |
# File 'lib/gen-rb/relevanced.rb', line 523 def process_getCentroidSimilarity(seqid, iprot, oprot) args = read_args(iprot, GetCentroidSimilarity_args) result = GetCentroidSimilarity_result.new() begin result.success = @handler.getCentroidSimilarity(args.centroid1Id, args.centroid2Id) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'getCentroidSimilarity', seqid) end |
#process_getDocumentMetadata(seqid, iprot, oprot) ⇒ Object
563 564 565 566 567 568 569 570 571 572 |
# File 'lib/gen-rb/relevanced.rb', line 563 def process_getDocumentMetadata(seqid, iprot, oprot) args = read_args(iprot, GetDocumentMetadata_args) result = GetDocumentMetadata_result.new() begin result.success = @handler.getDocumentMetadata(args.id) rescue ::EDocumentDoesNotExist => err result.err = err end write_result(result, oprot, 'getDocumentMetadata', seqid) end |
#process_getDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/gen-rb/relevanced.rb', line 475 def process_getDocumentSimilarity(seqid, iprot, oprot) args = read_args(iprot, GetDocumentSimilarity_args) result = GetDocumentSimilarity_result.new() begin result.success = @handler.getDocumentSimilarity(args.centroidId, args.docId) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr end write_result(result, oprot, 'getDocumentSimilarity', seqid) end |
#process_getServerMetadata(seqid, iprot, oprot) ⇒ Object
468 469 470 471 472 473 |
# File 'lib/gen-rb/relevanced.rb', line 468 def process_getServerMetadata(seqid, iprot, oprot) args = read_args(iprot, GetServerMetadata_args) result = GetServerMetadata_result.new() result.success = @handler.getServerMetadata() write_result(result, oprot, 'getServerMetadata', seqid) end |
#process_getTextSimilarity(seqid, iprot, oprot) ⇒ Object
512 513 514 515 516 517 518 519 520 521 |
# File 'lib/gen-rb/relevanced.rb', line 512 def process_getTextSimilarity(seqid, iprot, oprot) args = read_args(iprot, GetTextSimilarity_args) result = GetTextSimilarity_result.new() begin result.success = @handler.getTextSimilarity(args.centroidId, args.text) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'getTextSimilarity', seqid) end |
#process_joinCentroid(seqid, iprot, oprot) ⇒ Object
659 660 661 662 663 664 665 666 667 668 |
# File 'lib/gen-rb/relevanced.rb', line 659 def process_joinCentroid(seqid, iprot, oprot) args = read_args(iprot, JoinCentroid_args) result = JoinCentroid_result.new() begin result.success = @handler.joinCentroid(args.centroidId) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'joinCentroid', seqid) end |
#process_listAllCentroids(seqid, iprot, oprot) ⇒ Object
670 671 672 673 674 675 |
# File 'lib/gen-rb/relevanced.rb', line 670 def process_listAllCentroids(seqid, iprot, oprot) args = read_args(iprot, ListAllCentroids_args) result = ListAllCentroids_result.new() result.success = @handler.listAllCentroids() write_result(result, oprot, 'listAllCentroids', seqid) end |
#process_listAllDocuments(seqid, iprot, oprot) ⇒ Object
691 692 693 694 695 696 |
# File 'lib/gen-rb/relevanced.rb', line 691 def process_listAllDocuments(seqid, iprot, oprot) args = read_args(iprot, ListAllDocuments_args) result = ListAllDocuments_result.new() result.success = @handler.listAllDocuments() write_result(result, oprot, 'listAllDocuments', seqid) end |
#process_listAllDocumentsForCentroid(seqid, iprot, oprot) ⇒ Object
596 597 598 599 600 601 602 603 604 605 |
# File 'lib/gen-rb/relevanced.rb', line 596 def process_listAllDocumentsForCentroid(seqid, iprot, oprot) args = read_args(iprot, ListAllDocumentsForCentroid_args) result = ListAllDocumentsForCentroid_result.new() begin result.success = @handler.listAllDocumentsForCentroid(args.centroidId) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'listAllDocumentsForCentroid', seqid) end |
#process_listCentroidDocumentRange(seqid, iprot, oprot) ⇒ Object
607 608 609 610 611 612 613 614 615 616 |
# File 'lib/gen-rb/relevanced.rb', line 607 def process_listCentroidDocumentRange(seqid, iprot, oprot) args = read_args(iprot, ListCentroidDocumentRange_args) result = ListCentroidDocumentRange_result.new() begin result.success = @handler.listCentroidDocumentRange(args.centroidId, args.offset, args.count) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'listCentroidDocumentRange', seqid) end |
#process_listCentroidDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
618 619 620 621 622 623 624 625 626 627 |
# File 'lib/gen-rb/relevanced.rb', line 618 def process_listCentroidDocumentRangeFromID(seqid, iprot, oprot) args = read_args(iprot, ListCentroidDocumentRangeFromID_args) result = ListCentroidDocumentRangeFromID_result.new() begin result.success = @handler.listCentroidDocumentRangeFromID(args.centroidId, args.documentId, args.count) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'listCentroidDocumentRangeFromID', seqid) end |
#process_listCentroidRange(seqid, iprot, oprot) ⇒ Object
677 678 679 680 681 682 |
# File 'lib/gen-rb/relevanced.rb', line 677 def process_listCentroidRange(seqid, iprot, oprot) args = read_args(iprot, ListCentroidRange_args) result = ListCentroidRange_result.new() result.success = @handler.listCentroidRange(args.offset, args.count) write_result(result, oprot, 'listCentroidRange', seqid) end |
#process_listCentroidRangeFromID(seqid, iprot, oprot) ⇒ Object
684 685 686 687 688 689 |
# File 'lib/gen-rb/relevanced.rb', line 684 def process_listCentroidRangeFromID(seqid, iprot, oprot) args = read_args(iprot, ListCentroidRangeFromID_args) result = ListCentroidRangeFromID_result.new() result.success = @handler.listCentroidRangeFromID(args.centroidId, args.count) write_result(result, oprot, 'listCentroidRangeFromID', seqid) end |
#process_listDocumentRange(seqid, iprot, oprot) ⇒ Object
698 699 700 701 702 703 |
# File 'lib/gen-rb/relevanced.rb', line 698 def process_listDocumentRange(seqid, iprot, oprot) args = read_args(iprot, ListDocumentRange_args) result = ListDocumentRange_result.new() result.success = @handler.listDocumentRange(args.offset, args.count) write_result(result, oprot, 'listDocumentRange', seqid) end |
#process_listDocumentRangeFromID(seqid, iprot, oprot) ⇒ Object
705 706 707 708 709 710 |
# File 'lib/gen-rb/relevanced.rb', line 705 def process_listDocumentRangeFromID(seqid, iprot, oprot) args = read_args(iprot, ListDocumentRangeFromID_args) result = ListDocumentRangeFromID_result.new() result.success = @handler.listDocumentRangeFromID(args.documentId, args.count) write_result(result, oprot, 'listDocumentRangeFromID', seqid) end |
#process_multiGetDocumentSimilarity(seqid, iprot, oprot) ⇒ Object
488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/gen-rb/relevanced.rb', line 488 def process_multiGetDocumentSimilarity(seqid, iprot, oprot) args = read_args(iprot, MultiGetDocumentSimilarity_args) result = MultiGetDocumentSimilarity_result.new() begin result.success = @handler.multiGetDocumentSimilarity(args.centroidIds, args.documentId) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr end write_result(result, oprot, 'multiGetDocumentSimilarity', seqid) end |
#process_multiGetTextSimilarity(seqid, iprot, oprot) ⇒ Object
501 502 503 504 505 506 507 508 509 510 |
# File 'lib/gen-rb/relevanced.rb', line 501 def process_multiGetTextSimilarity(seqid, iprot, oprot) args = read_args(iprot, MultiGetTextSimilarity_args) result = MultiGetTextSimilarity_result.new() begin result.success = @handler.multiGetTextSimilarity(args.centroidIds, args.text) rescue ::ECentroidDoesNotExist => err result.err = err end write_result(result, oprot, 'multiGetTextSimilarity', seqid) end |
#process_ping(seqid, iprot, oprot) ⇒ Object
461 462 463 464 465 466 |
# File 'lib/gen-rb/relevanced.rb', line 461 def process_ping(seqid, iprot, oprot) args = read_args(iprot, Ping_args) result = Ping_result.new() @handler.ping() write_result(result, oprot, 'ping', seqid) end |
#process_removeDocumentFromCentroid(seqid, iprot, oprot) ⇒ Object
644 645 646 647 648 649 650 651 652 653 654 655 656 657 |
# File 'lib/gen-rb/relevanced.rb', line 644 def process_removeDocumentFromCentroid(seqid, iprot, oprot) args = read_args(iprot, RemoveDocumentFromCentroid_args) result = RemoveDocumentFromCentroid_result.new() begin result.success = @handler.removeDocumentFromCentroid(args.centroidId, args.docId) rescue ::ECentroidDoesNotExist => centroidErr result.centroidErr = centroidErr rescue ::EDocumentDoesNotExist => docErr result.docErr = docErr rescue ::EDocumentNotInCentroid => bothErr result.bothErr = bothErr end write_result(result, oprot, 'removeDocumentFromCentroid', seqid) end |