class Relevanced::Processor

Public Instance Methods

process_addDocumentsToCentroid(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 736
def process_addDocumentsToCentroid(seqid, iprot, oprot)
  args = read_args(iprot, AddDocumentsToCentroid_args)
  result = AddDocumentsToCentroid_result.new()
  begin
    result.success = @handler.addDocumentsToCentroid(args.request)
  rescue ::ECentroidDoesNotExist => centroidErr
    result.centroidErr = centroidErr
  rescue ::EDocumentDoesNotExist => docErr
    result.docErr = docErr
  rescue ::EDocumentAlreadyInCentroid => bothErr
    result.bothErr = bothErr
  end
  write_result(result, oprot, 'addDocumentsToCentroid', seqid)
end
process_createCentroid(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 692
def process_createCentroid(seqid, iprot, oprot)
  args = read_args(iprot, CreateCentroid_args)
  result = CreateCentroid_result.new()
  begin
    result.success = @handler.createCentroid(args.request)
  rescue ::ECentroidAlreadyExists => err
    result.err = err
  end
  write_result(result, oprot, 'createCentroid', seqid)
end
process_createDocument(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 613
def process_createDocument(seqid, iprot, oprot)
  args = read_args(iprot, CreateDocument_args)
  result = CreateDocument_result.new()
  result.success = @handler.createDocument(args.text, args.language)
  write_result(result, oprot, 'createDocument', seqid)
end
process_createDocumentWithID(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 620
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, args.language)
  rescue ::EDocumentAlreadyExists => err
    result.err = err
  end
  write_result(result, oprot, 'createDocumentWithID', seqid)
end
process_debugEraseAllData(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 842
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 849
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 860
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 714
def process_deleteCentroid(seqid, iprot, oprot)
  args = read_args(iprot, DeleteCentroid_args)
  result = DeleteCentroid_result.new()
  begin
    result.success = @handler.deleteCentroid(args.request)
  rescue ::ECentroidDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'deleteCentroid', seqid)
end
process_deleteDocument(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 631
def process_deleteDocument(seqid, iprot, oprot)
  args = read_args(iprot, DeleteDocument_args)
  result = DeleteDocument_result.new()
  begin
    result.success = @handler.deleteDocument(args.request)
  rescue ::EDocumentDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'deleteDocument', seqid)
end
process_getCentroidSimilarity(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 602
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 653
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 554
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 547
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 580
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, args.lang)
  rescue ::ECentroidDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'getTextSimilarity', seqid)
end
process_joinCentroid(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 766
def process_joinCentroid(seqid, iprot, oprot)
  args = read_args(iprot, JoinCentroid_args)
  result = JoinCentroid_result.new()
  begin
    result.success = @handler.joinCentroid(args.request)
  rescue ::ECentroidDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'joinCentroid', seqid)
end
process_listAllCentroids(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 788
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 664
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 809
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 820
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 831
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 795
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 802
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 678
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 685
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_listUnusedDocuments(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 671
def process_listUnusedDocuments(seqid, iprot, oprot)
  args = read_args(iprot, ListUnusedDocuments_args)
  result = ListUnusedDocuments_result.new()
  result.success = @handler.listUnusedDocuments(args.limit)
  write_result(result, oprot, 'listUnusedDocuments', seqid)
end
process_multiCreateCentroids(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 703
def process_multiCreateCentroids(seqid, iprot, oprot)
  args = read_args(iprot, MultiCreateCentroids_args)
  result = MultiCreateCentroids_result.new()
  begin
    result.success = @handler.multiCreateCentroids(args.request)
  rescue ::ECentroidAlreadyExists => err
    result.err = err
  end
  write_result(result, oprot, 'multiCreateCentroids', seqid)
end
process_multiDeleteCentroids(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 725
def process_multiDeleteCentroids(seqid, iprot, oprot)
  args = read_args(iprot, MultiDeleteCentroids_args)
  result = MultiDeleteCentroids_result.new()
  begin
    result.success = @handler.multiDeleteCentroids(args.request)
  rescue ::ECentroidDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'multiDeleteCentroids', seqid)
end
process_multiDeleteDocuments(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 642
def process_multiDeleteDocuments(seqid, iprot, oprot)
  args = read_args(iprot, MultiDeleteDocuments_args)
  result = MultiDeleteDocuments_result.new()
  begin
    result.success = @handler.multiDeleteDocuments(args.request)
  rescue ::EDocumentDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'multiDeleteDocuments', seqid)
end
process_multiGetDocumentSimilarity(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 567
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) click to toggle source
# File lib/gen-rb/relevanced.rb, line 591
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, args.lang)
  rescue ::ECentroidDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'multiGetTextSimilarity', seqid)
end
process_multiJoinCentroids(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 777
def process_multiJoinCentroids(seqid, iprot, oprot)
  args = read_args(iprot, MultiJoinCentroids_args)
  result = MultiJoinCentroids_result.new()
  begin
    result.success = @handler.multiJoinCentroids(args.request)
  rescue ::ECentroidDoesNotExist => err
    result.err = err
  end
  write_result(result, oprot, 'multiJoinCentroids', seqid)
end
process_ping(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 540
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_removeDocumentsFromCentroid(seqid, iprot, oprot) click to toggle source
# File lib/gen-rb/relevanced.rb, line 751
def process_removeDocumentsFromCentroid(seqid, iprot, oprot)
  args = read_args(iprot, RemoveDocumentsFromCentroid_args)
  result = RemoveDocumentsFromCentroid_result.new()
  begin
    result.success = @handler.removeDocumentsFromCentroid(args.request)
  rescue ::ECentroidDoesNotExist => centroidErr
    result.centroidErr = centroidErr
  rescue ::EDocumentDoesNotExist => docErr
    result.docErr = docErr
  rescue ::EDocumentNotInCentroid => bothErr
    result.bothErr = bothErr
  end
  write_result(result, oprot, 'removeDocumentsFromCentroid', seqid)
end