public class org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension extends java.lang.Object implements org.finos.legend.engine.external.shared.runtime.ExternalFormatRuntimeExtension
{
private static final java.lang.String CONTENT_TYPE;
public void <init>()
{
org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension v;
v := @this: org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
public java.util.List getContentTypes()
{
org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension v;
java.util.List v;
v := @this: org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension;
v = staticinvoke <java.util.Collections: java.util.List singletonList(java.lang.Object)>("application/json");
return v;
}
public org.eclipse.collections.api.list.MutableList group()
{
org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension v;
java.lang.String[] v;
org.eclipse.collections.api.factory.list.MutableListFactory v;
org.eclipse.collections.api.list.MutableList v;
v := @this: org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension;
v = <org.eclipse.collections.impl.factory.Lists: org.eclipse.collections.api.factory.list.MutableListFactory mutable>;
v = newarray (java.lang.String)[2];
v[0] = "External_Format";
v[1] = "JSON";
v = interfaceinvoke v.<org.eclipse.collections.api.factory.list.MutableListFactory: org.eclipse.collections.api.list.MutableList 'with'(java.lang.Object[])>(v);
return v;
}
public org.finos.legend.engine.plan.execution.result.object.StreamingObjectResult executeInternalizeExecutionNode(org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatInternalizeExecutionNode, java.io.InputStream, org.finos.legend.engine.shared.core.identity.Identity, org.finos.legend.engine.plan.execution.nodes.state.ExecutionState)
{
org.finos.legend.engine.shared.core.identity.Identity v;
java.lang.Object[] v, v;
org.finos.legend.engine.plan.execution.nodes.state.ExecutionState v;
org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatInternalizeExecutionNode v;
org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension v;
org.finos.legend.engine.plan.dependencies.store.inMemory.IStoreStreamReader v;
java.lang.reflect.Constructor v, v;
org.finos.legend.engine.plan.execution.result.object.StreamingObjectResult v;
java.lang.String v;
org.finos.legend.engine.plan.execution.stores.inMemory.plugin.StoreStreamReadingObjectsIterator v;
boolean v;
java.lang.Class[] v, v, v;
java.lang.RuntimeException v;
java.lang.Exception v;
org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.PlatformImplementation v;
java.util.List v;
java.util.stream.Stream v;
org.finos.legend.engine.external.format.json.read.JsonDataReader v;
java.lang.Class v;
java.lang.Object v, v;
java.util.Spliterator v;
java.io.InputStream v;
v := @this: org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension;
v := @parameter: org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatInternalizeExecutionNode;
v := @parameter: java.io.InputStream;
v := @parameter: org.finos.legend.engine.shared.core.identity.Identity;
v := @parameter: org.finos.legend.engine.plan.execution.nodes.state.ExecutionState;
label:
v = v.<org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatInternalizeExecutionNode: org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.PlatformImplementation implementation>;
v = staticinvoke <org.finos.legend.engine.plan.execution.nodes.helpers.platform.JavaHelper: java.lang.String getExecutionClassFullName(org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.JavaPlatformImplementation)>(v);
v = staticinvoke <org.finos.legend.engine.plan.execution.nodes.helpers.platform.ExecutionNodeJavaPlatformHelper: java.lang.Class getClassToExecute(org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.ExecutionNode,java.lang.String,org.finos.legend.engine.plan.execution.nodes.state.ExecutionState,org.finos.legend.engine.shared.core.identity.Identity)>(v, v, v, v);
v = virtualinvoke v.<java.lang.Class: java.lang.Class[] getInterfaces()>();
v = staticinvoke <java.util.Arrays: java.util.List asList(java.lang.Object[])>(v);
v = interfaceinvoke v.<java.util.List: boolean contains(java.lang.Object)>(class "Lorg/finos/legend/engine/external/format/json/read/IJsonInternalizeExecutionNodeSpecifics;");
if v == 0 goto label;
v = newarray (java.lang.Class)[0];
v = virtualinvoke v.<java.lang.Class: java.lang.reflect.Constructor getConstructor(java.lang.Class[])>(v);
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<java.lang.reflect.Constructor: java.lang.Object newInstance(java.lang.Object[])>(v);
v = interfaceinvoke v.<org.finos.legend.engine.external.format.json.read.IJsonInternalizeExecutionNodeSpecifics: org.finos.legend.engine.external.format.json.read.JsonDataReader createReader(java.io.InputStream)>(v);
v = virtualinvoke v.<org.finos.legend.engine.external.format.json.read.JsonDataReader: java.util.stream.Stream startStream()>();
goto label;
label:
v = newarray (java.lang.Class)[0];
v = virtualinvoke v.<java.lang.Class: java.lang.reflect.Constructor getConstructor(java.lang.Class[])>(v);
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<java.lang.reflect.Constructor: java.lang.Object newInstance(java.lang.Object[])>(v);
v = interfaceinvoke v.<org.finos.legend.engine.external.format.json.read.IJsonDeserializeExecutionNodeSpecifics: org.finos.legend.engine.plan.dependencies.store.inMemory.IStoreStreamReader streamReader(java.io.InputStream)>(v);
v = staticinvoke <org.finos.legend.engine.plan.execution.stores.inMemory.plugin.StoreStreamReadingObjectsIterator: org.finos.legend.engine.plan.execution.stores.inMemory.plugin.StoreStreamReadingObjectsIterator newObjectsIterator(org.finos.legend.engine.plan.dependencies.store.inMemory.IStoreStreamReader,boolean,boolean)>(v, 0, 1);
v = staticinvoke <java.util.Spliterators: java.util.Spliterator spliteratorUnknownSize(java.util.Iterator,int)>(v, 16);
v = staticinvoke <java.util.stream.StreamSupport: java.util.stream.Stream stream(java.util.Spliterator,boolean)>(v, 0);
label:
v = new org.finos.legend.engine.plan.execution.result.object.StreamingObjectResult;
specialinvoke v.<org.finos.legend.engine.plan.execution.result.object.StreamingObjectResult: void <init>(java.util.stream.Stream)>(v);
label:
return v;
label:
v := @caughtexception;
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.Throwable)>(v);
throw v;
catch java.lang.Exception from label to label with label;
}
public org.finos.legend.engine.plan.execution.result.Result executeExternalizeExecutionNode(org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatExternalizeExecutionNode, org.finos.legend.engine.plan.execution.result.Result, org.finos.legend.engine.shared.core.identity.Identity, org.finos.legend.engine.plan.execution.nodes.state.ExecutionState)
{
org.finos.legend.engine.shared.core.identity.Identity v;
java.lang.Object[] v;
org.finos.legend.engine.plan.execution.nodes.helpers.platform.DefaultExecutionNodeContext v;
org.finos.legend.engine.plan.execution.nodes.state.ExecutionState v;
org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension v;
java.lang.ReflectiveOperationException v;
java.lang.reflect.Constructor v;
java.lang.String v, v;
boolean v, v;
org.finos.legend.engine.plan.execution.result.Result v, v;
org.finos.legend.engine.external.shared.runtime.write.ExternalFormatSerializeResult v;
java.lang.Class[] v, v;
java.lang.RuntimeException v, v;
org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.PlatformImplementation v, v, v;
java.util.List v;
java.util.stream.Stream v;
org.finos.legend.engine.external.format.json.write.JsonDataWriter v;
java.lang.Class v;
java.lang.Object v, v;
org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatExternalizeExecutionNode v;
v := @this: org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension;
v := @parameter: org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatExternalizeExecutionNode;
v := @parameter: org.finos.legend.engine.plan.execution.result.Result;
v := @parameter: org.finos.legend.engine.shared.core.identity.Identity;
v := @parameter: org.finos.legend.engine.plan.execution.nodes.state.ExecutionState;
label:
v = v.<org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatExternalizeExecutionNode: org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.PlatformImplementation implementation>;
v = v instanceof org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.JavaPlatformImplementation;
if v != 0 goto label;
v = new java.lang.RuntimeException;
v = v.<org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatExternalizeExecutionNode: org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.PlatformImplementation implementation>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.PlatformImplementation)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Only Java implementations are currently supported, found: \u0001");
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.String)>(v);
throw v;
label:
v = v.<org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.externalFormat.ExternalFormatExternalizeExecutionNode: org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.PlatformImplementation implementation>;
v = staticinvoke <org.finos.legend.engine.plan.execution.nodes.helpers.platform.JavaHelper: java.lang.String getExecutionClassFullName(org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.JavaPlatformImplementation)>(v);
v = staticinvoke <org.finos.legend.engine.plan.execution.nodes.helpers.platform.ExecutionNodeJavaPlatformHelper: java.lang.Class getClassToExecute(org.finos.legend.engine.protocol.pure.v.model.executionPlan.nodes.ExecutionNode,java.lang.String,org.finos.legend.engine.plan.execution.nodes.state.ExecutionState,org.finos.legend.engine.shared.core.identity.Identity)>(v, v, v, v);
v = new org.finos.legend.engine.plan.execution.nodes.helpers.platform.DefaultExecutionNodeContext;
specialinvoke v.<org.finos.legend.engine.plan.execution.nodes.helpers.platform.DefaultExecutionNodeContext: void <init>(org.finos.legend.engine.plan.execution.nodes.state.ExecutionState,org.finos.legend.engine.plan.execution.result.Result)>(v, v);
v = virtualinvoke v.<java.lang.Class: java.lang.Class[] getInterfaces()>();
v = staticinvoke <java.util.Arrays: java.util.List asList(java.lang.Object[])>(v);
v = interfaceinvoke v.<java.util.List: boolean contains(java.lang.Object)>(class "Lorg/finos/legend/engine/external/format/json/write/IJsonExternalizeExecutionNodeSpecifics;");
if v == 0 goto label;
v = newarray (java.lang.Class)[0];
v = virtualinvoke v.<java.lang.Class: java.lang.reflect.Constructor getConstructor(java.lang.Class[])>(v);
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<java.lang.reflect.Constructor: java.lang.Object newInstance(java.lang.Object[])>(v);
v = new org.finos.legend.engine.external.format.json.write.JsonDataWriter;
v = staticinvoke <org.finos.legend.engine.external.format.json.JsonSchemaRuntimeExtension: java.util.stream.Stream extractStreamFromResult(org.finos.legend.engine.plan.execution.result.Result)>(v);
specialinvoke v.<org.finos.legend.engine.external.format.json.write.JsonDataWriter: void <init>(org.finos.legend.engine.external.format.json.write.IJsonExternalizeExecutionNodeSpecifics,java.util.stream.Stream,org.finos.legend.engine.plan.dependencies.store.shared.IExecutionNodeContext)>(v, v, v);
v = new org.finos.legend.engine.external.shared.runtime.write.ExternalFormatSerializeResult;
specialinvoke v.<org.finos.legend.engine.external.shared.runtime.write.ExternalFormatSerializeResult: void <init>(org.finos.legend.engine.external.shared.runtime.write.ExternalFormatWriter,org.finos.legend.engine.plan.execution.result.Result,java.lang.String)>(v, v, "application/json");
label:
return v;
label:
v = virtualinvoke v.<java.lang.Class: java.lang.Object newInstance()>();
v = staticinvoke <org.finos.legend.engine.plan.execution.nodes.helpers.ExecutionNodeSerializerHelper: org.finos.legend.engine.plan.execution.result.Result executeSerialize(org.finos.legend.engine.plan.dependencies.store.platform.IPlatformPureExpressionExecutionNodeSerializeSpecifics,org.finos.legend.engine.protocol.pure.v.model.valueSpecification.raw.classInstance.SerializationConfig,org.finos.legend.engine.plan.execution.result.Result,org.finos.legend.engine.plan.dependencies.store.shared.IExecutionNodeContext)>(v, null, v, v);
label:
return v;
label:
v := @caughtexception;
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.Throwable)>(v);
throw v;
catch java.lang.InstantiationException from label to label with label;
catch java.lang.IllegalAccessException from label to label with label;
catch java.lang.NoSuchMethodException from label to label with label;
catch java.lang.reflect.InvocationTargetException from label to label with label;
catch java.lang.InstantiationException from label to label with label;
catch java.lang.IllegalAccessException from label to label with label;
catch java.lang.NoSuchMethodException from label to label with label;
catch java.lang.reflect.InvocationTargetException from label to label with label;
}
private static java.util.stream.Stream extractStreamFromResult(org.finos.legend.engine.plan.execution.result.Result)
{
org.finos.legend.engine.plan.execution.result.Result v;
java.lang.IllegalArgumentException v;
java.util.stream.Stream v;
java.lang.Class v;
java.lang.Object v;
java.lang.String v, v;
boolean v, v, v, v;
v := @parameter: org.finos.legend.engine.plan.execution.result.Result;
v = v instanceof org.finos.legend.engine.plan.execution.result.ConstantResult;
if v == 0 goto label;
v = virtualinvoke v.<org.finos.legend.engine.plan.execution.result.ConstantResult: java.lang.Object getValue()>();
v = v instanceof java.util.List;
if v == 0 goto label;
v = interfaceinvoke v.<java.util.List: java.util.stream.Stream stream()>();
label:
v = v instanceof java.util.stream.Stream;
if v != 0 goto label;
v = staticinvoke <java.util.stream.Stream: java.util.stream.Stream of(java.lang.Object)>(v);
label:
return v;
label:
v = v instanceof org.finos.legend.engine.plan.execution.result.object.StreamingObjectResult;
if v == 0 goto label;
v = virtualinvoke v.<org.finos.legend.engine.plan.execution.result.object.StreamingObjectResult: java.util.stream.Stream getObjectStream()>();
return v;
label:
v = new java.lang.IllegalArgumentException;
v = virtualinvoke v.<java.lang.Object: java.lang.Class getClass()>();
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Unexpected result: \u0001");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
}
}