def execute(token): message = token.message body = message.get_body() decompressed_body_parts = SoSCompression.decompress_sparqlresponse(body) decompressed_body = (b' '.join(decompressed_body_parts)).decode('utf-8') # re-assign compressed body token.message.body = ' '.join(decompressed_body.split())
def execute(token): message = token.message body = message.get_body() decompressed_body_parts = SoSCompression.decompress_sparql(body) decompressed_body = (b" ".join(decompressed_body_parts)).decode("utf-8") # only if no errors occured if not decompressed_body.startswith("org.apache.jena"): token.message.body = " ".join(decompressed_body.split())
def execute(token): message = token.message body = message.get_body() compressed_body_parts = SoSCompression.decompress_sparql(body) compressed_body = (b' '.join(compressed_body_parts)).decode('utf-8') # only if no errors occured if not compressed_body.startswith('org.apache.jena'): token.message.body = ' '.join(compressed_body.split())