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_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
485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'lib/gen-rb/relevanced.rb', line 485 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
452 453 454 455 456 457 458 459 460 461 |
# File 'lib/gen-rb/relevanced.rb', line 452 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
412 413 414 415 416 417 |
# File 'lib/gen-rb/relevanced.rb', line 412 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
419 420 421 422 423 424 425 426 427 428 |
# File 'lib/gen-rb/relevanced.rb', line 419 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
540 541 542 543 544 545 |
# File 'lib/gen-rb/relevanced.rb', line 540 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
547 548 549 550 551 552 553 554 555 556 |
# File 'lib/gen-rb/relevanced.rb', line 547 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
558 559 560 561 562 563 564 565 566 567 |
# File 'lib/gen-rb/relevanced.rb', line 558 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
463 464 465 466 467 468 469 470 471 472 |
# File 'lib/gen-rb/relevanced.rb', line 463 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
430 431 432 433 434 435 436 437 438 439 |
# File 'lib/gen-rb/relevanced.rb', line 430 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
401 402 403 404 405 406 407 408 409 410 |
# File 'lib/gen-rb/relevanced.rb', line 401 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
441 442 443 444 445 446 447 448 449 450 |
# File 'lib/gen-rb/relevanced.rb', line 441 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
366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/gen-rb/relevanced.rb', line 366 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
359 360 361 362 363 364 |
# File 'lib/gen-rb/relevanced.rb', line 359 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
390 391 392 393 394 395 396 397 398 399 |
# File 'lib/gen-rb/relevanced.rb', line 390 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
515 516 517 518 519 520 521 522 523 524 |
# File 'lib/gen-rb/relevanced.rb', line 515 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
526 527 528 529 530 531 |
# File 'lib/gen-rb/relevanced.rb', line 526 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
533 534 535 536 537 538 |
# File 'lib/gen-rb/relevanced.rb', line 533 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
474 475 476 477 478 479 480 481 482 483 |
# File 'lib/gen-rb/relevanced.rb', line 474 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_multiGetTextSimilarity(seqid, iprot, oprot) ⇒ Object
379 380 381 382 383 384 385 386 387 388 |
# File 'lib/gen-rb/relevanced.rb', line 379 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
352 353 354 355 356 357 |
# File 'lib/gen-rb/relevanced.rb', line 352 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
500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/gen-rb/relevanced.rb', line 500 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 |