use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_LambdaFunction_Impl in project legend-engine by finos.
the class HelperMappingBuilder method processPurePropertyMappingTransform.
public static LambdaFunction processPurePropertyMappingTransform(PurePropertyMapping ppm, Lambda lambda, PropertyMappingsImplementation owner, org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type inputVarType, CompileContext context, String mappingName) {
List<ValueSpecification> expressions = lambda.body;
VariableExpression lambdaParam = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("src")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(inputVarType));
MutableList<VariableExpression> pureParameters = Lists.mutable.with(lambdaParam);
ProcessingContext ctx = new ProcessingContext("Pure M2M Transform Lambda");
ctx.addInferredVariables("src", lambdaParam);
MutableList<String> openVariables = Lists.mutable.empty();
MutableList<org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.ValueSpecification> valueSpecifications = ListIterate.collect(expressions, p -> p.accept(new ValueSpecificationBuilder(context, openVariables, ctx)));
MutableList<String> cleanedOpenVariables = openVariables.distinct();
cleanedOpenVariables.removeAll(pureParameters.collect(e -> e._name()));
GenericType functionType = context.pureModel.buildFunctionType(pureParameters, valueSpecifications.getLast()._genericType(), valueSpecifications.getLast()._multiplicity());
String propertyName = owner._id() + "." + ppm.property.property;
String mappingPath = Root_meta_pure_functions_meta_elementToPath_PackageableElement_1__String_1_(owner._parent(), context.pureModel.getExecutionSupport()).replace("::", "_");
ctx.flushVariable("src");
return new Root_meta_pure_metamodel_function_LambdaFunction_Impl(propertyName, new SourceInformation(mappingPath, 0, 0, 0, 0), null)._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::LambdaFunction"))._typeArguments(FastList.newListWith(functionType)))._openVariables(cleanedOpenVariables)._expressionSequence(valueSpecifications);
}
use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_LambdaFunction_Impl in project legend-engine by finos.
the class Milestoning method generateMilestoningRangeQualifiedProperty.
private static MutableList<QualifiedProperty<?>> generateMilestoningRangeQualifiedProperty(CompileContext context, Class<?> sourceClass, PropertyOwner propertyOwner, Property originalProperty, MilestoningStereotype returnTypeMilestoningStereotype, MutableList<Stereotype> stereotypes, Property edgePointProperty) {
MutableList<QualifiedProperty<?>> generatedMilestoningRangeQualifiedProperty = Lists.mutable.empty();
if (UNI_TEMPORAL_STEREOTYPE_NAMES.contains(returnTypeMilestoningStereotype.getPurePlatformStereotypeName())) {
String qualifiedPropertyName = MilestoningFunctions.getRangePropertyName(originalProperty._name());
String temporalDatePropertyName = returnTypeMilestoningStereotype.getTemporalDatePropertyNames().getFirst();
VariableExpression thisVar = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("this")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(sourceClass._classifierGenericType()._typeArguments().getFirst());
VariableExpression v_milestoning = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("v_milestoning")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(edgePointProperty._genericType());
VariableExpression inputStartDate = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("start")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(context.pureModel.getGenericType("Date"));
VariableExpression inputEndDate = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("end")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(context.pureModel.getGenericType("Date"));
SimpleFunctionExpression temporalDatePropertyExp = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(HelperModelBuilder.getOwnedProperty((Class<Object>) originalProperty._genericType()._rawType(), temporalDatePropertyName, context.pureModel.getExecutionSupport()))._propertyName(new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._values(Lists.mutable.of(temporalDatePropertyName)))._genericType(context.pureModel.getGenericType("Date"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(Lists.mutable.of(v_milestoning));
SimpleFunctionExpression equalExpression = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::boolean::eq_Any_1__Any_1__Boolean_1_", true))._functionName("eq")._genericType(context.pureModel.getGenericType("Boolean"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(Lists.mutable.of(temporalDatePropertyExp, inputStartDate));
LambdaFunction filterLambda = new Root_meta_pure_metamodel_function_LambdaFunction_Impl("")._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::LambdaFunction"))._typeArguments(Lists.mutable.of(PureModel.buildFunctionType(Lists.mutable.of(v_milestoning), context.pureModel.getGenericType("Boolean"), context.pureModel.getMultiplicity("one")))))._openVariables(Lists.mutable.of(temporalDatePropertyName))._expressionSequence(Lists.mutable.of(equalExpression));
InstanceValue filterInstanceValue = new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._genericType(filterLambda._classifierGenericType())._multiplicity(context.pureModel.getMultiplicity("one"))._values(Lists.mutable.of(filterLambda));
SimpleFunctionExpression filterLhs = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(edgePointProperty)._propertyName(new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._values(Lists.mutable.of(edgePointProperty._name())))._genericType(edgePointProperty._genericType())._multiplicity(edgePointProperty._multiplicity())._parametersValues(Lists.mutable.of(thisVar));
SimpleFunctionExpression filterExpression = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::collection::filter_T_MANY__Function_1__T_MANY_", true))._functionName("filter")._genericType(originalProperty._genericType())._multiplicity(context.pureModel.getMultiplicity("zeromany"))._parametersValues(Lists.mutable.of(filterLhs, filterInstanceValue));
QualifiedProperty<?> milestoningRangeQualifiedProperty = getQualifiedProperty(propertyOwner, originalProperty, qualifiedPropertyName, originalProperty._multiplicity(), stereotypes)._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::property::QualifiedProperty"))._typeArguments(Lists.mutable.of(PureModel.buildFunctionType(Lists.mutable.of(thisVar, inputStartDate, inputEndDate), originalProperty._genericType(), originalProperty._multiplicity()))))._expressionSequence(Lists.mutable.of(filterExpression));
generatedMilestoningRangeQualifiedProperty.add(milestoningRangeQualifiedProperty);
}
return generatedMilestoningRangeQualifiedProperty;
}
use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_LambdaFunction_Impl in project legend-engine by finos.
the class Milestoning method newSingleDateMilestoningQualifiedPropertyWithArg.
private static MutableList<QualifiedProperty<?>> newSingleDateMilestoningQualifiedPropertyWithArg(CompileContext context, Class<?> sourceClass, PropertyOwner propertyOwner, Property originalProperty, MilestoningStereotype returnTypeMilestoningStereotype, MutableList<Stereotype> stereotypes, Property edgePointProperty) {
String qualifiedPropertyName = originalProperty._name();
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.QualifiedProperty<?> qualifiedProperty = getQualifiedProperty(propertyOwner, originalProperty, qualifiedPropertyName, originalProperty._multiplicity(), stereotypes);
VariableExpression thisVar = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("this")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(sourceClass._classifierGenericType()._typeArguments().toList().get(0));
VariableExpression v_milestoning = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("v_milestoning")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(edgePointProperty._genericType());
ListIterable<Pair<VariableExpression, SimpleFunctionExpression>> datesToCompare = returnTypeMilestoningStereotype.getTemporalDatePropertyNames().collect(d -> {
VariableExpression inputTemporalDate = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name(d)._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(context.pureModel.getGenericType("Date"));
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> temporalDateProperty = ((Class<Object>) originalProperty._genericType()._rawType())._properties().detect(p -> p._name().equals(d));
SimpleFunctionExpression temporalDatePropertyExp = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(temporalDateProperty)._propertyName(new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._values(Lists.fixedSize.of(d)))._genericType(context.pureModel.getGenericType("Date"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(Lists.fixedSize.of(v_milestoning));
return Tuples.pair(inputTemporalDate, temporalDatePropertyExp);
});
ListIterable<SimpleFunctionExpression> equalExpressions = datesToCompare.collect(p -> new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::boolean::eq_Any_1__Any_1__Boolean_1_", true))._functionName("eq")._genericType(context.pureModel.getGenericType("Boolean"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(Lists.fixedSize.<ValueSpecification>of(p.getTwo(), p.getOne())));
SimpleFunctionExpression equalExpression = equalExpressions.size() == 1 ? equalExpressions.get(0) : new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::boolean::and_Boolean_1__Boolean_1__Boolean_1_", true))._functionName("and")._genericType(context.pureModel.getGenericType("Boolean"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(equalExpressions);
GenericType functionType = PureModel.buildFunctionType(Lists.fixedSize.of(v_milestoning), context.pureModel.getGenericType("Boolean"), context.pureModel.getMultiplicity("one"));
LambdaFunction filterLambda = new Root_meta_pure_metamodel_function_LambdaFunction_Impl("")._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::LambdaFunction"))._typeArguments(FastList.newListWith(functionType)))._openVariables(returnTypeMilestoningStereotype.getTemporalDatePropertyNames())._expressionSequence(Lists.fixedSize.of(equalExpression));
InstanceValue filterInstanceValue = new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._genericType(filterLambda._classifierGenericType())._multiplicity(context.pureModel.getMultiplicity("one"))._values(Lists.fixedSize.of(filterLambda));
SimpleFunctionExpression filterLhs = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(edgePointProperty)._propertyName(new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._values(Lists.fixedSize.of(edgePointProperty._name())))._genericType(edgePointProperty._genericType())._multiplicity(edgePointProperty._multiplicity())._parametersValues(Lists.fixedSize.of(thisVar));
SimpleFunctionExpression filterExpression = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::collection::filter_T_MANY__Function_1__T_MANY_", true))._functionName("filter")._genericType(qualifiedProperty._genericType())._multiplicity(context.pureModel.getMultiplicity("zeromany"))._parametersValues(Lists.fixedSize.of(filterLhs, filterInstanceValue));
GenericType classifierGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::property::QualifiedProperty"))._typeArguments(Lists.fixedSize.of(PureModel.buildFunctionType(Lists.mutable.of(thisVar).withAll(datesToCompare.collect(Functions.firstOfPair())), qualifiedProperty._genericType(), originalProperty._multiplicity())));
qualifiedProperty._classifierGenericType(classifierGenericType);
qualifiedProperty._expressionSequence(Lists.fixedSize.of(filterExpression));
return Lists.mutable.of(qualifiedProperty);
}
use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_LambdaFunction_Impl in project legend-engine by finos.
the class PropertyMappingBuilder method visit.
@Override
public PropertyMapping visit(XStorePropertyMapping propertyMapping) {
ProcessingContext ctx = new ProcessingContext("Create Xstore Property Mapping");
InstanceSetImplementation sourceSet = (InstanceSetImplementation) allClassMappings.detect(c -> c._id().equals(propertyMapping.source));
if (sourceSet == null) {
throw new EngineException("Can't find class mapping '" + propertyMapping.source + "' in mapping '" + HelperModelBuilder.getElementFullPath(mapping, this.context.pureModel.getExecutionSupport()) + "'", propertyMapping.sourceInformation, EngineErrorType.COMPILATION);
}
InstanceSetImplementation targetSet = (InstanceSetImplementation) allClassMappings.detect(c -> c._id().equals(HelperMappingBuilder.getPropertyMappingTargetId(propertyMapping)));
if (targetSet == null) {
throw new EngineException("Can't find class mapping '" + propertyMapping.target + "' in mapping '" + HelperModelBuilder.getElementFullPath(mapping, this.context.pureModel.getExecutionSupport()) + "'", propertyMapping.sourceInformation, EngineErrorType.COMPILATION);
}
Class thisClass = sourceSet._mappingClass() == null ? sourceSet._class() : sourceSet._mappingClass();
Class thatClass = targetSet._mappingClass() == null ? targetSet._class() : targetSet._mappingClass();
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.multiplicity.Multiplicity oneMultiplicity = this.context.pureModel.getMultiplicity("one");
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.VariableExpression thisVariable = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("this");
thisVariable._genericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(thisClass));
thisVariable._multiplicity(oneMultiplicity);
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.VariableExpression thatVariable = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("that");
thatVariable._genericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(thatClass));
thatVariable._multiplicity(oneMultiplicity);
MutableList<VariableExpression> pureParameters = FastList.newListWith(thisVariable, thatVariable);
ctx.addInferredVariables("this", thisVariable);
ctx.addInferredVariables("that", thatVariable);
MutableList<String> openVariables = Lists.mutable.empty();
MutableList<org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.ValueSpecification> valueSpecifications = ListIterate.collect(propertyMapping.crossExpression.body, p -> p.accept(new ValueSpecificationBuilder(this.context, openVariables, ctx)));
MutableList<String> cleanedOpenVariables = openVariables.distinct();
cleanedOpenVariables.removeAll(pureParameters.collect(e -> e._name()));
GenericType functionType = PureModel.buildFunctionType(pureParameters, valueSpecifications.getLast()._genericType(), valueSpecifications.getLast()._multiplicity());
String mappingPath = HelperModelBuilder.getElementFullPath(mapping, this.context.pureModel.getExecutionSupport()).replace("::", "_");
ctx.flushVariable("that");
ctx.flushVariable("this");
if (!valueSpecifications.getLast()._genericType()._rawType().equals(context.pureModel.getType("Boolean")) || !valueSpecifications.getLast()._multiplicity().equals(context.pureModel.getMultiplicity("one"))) {
throw new EngineException("XStore property mapping function should return 'Boolean[1]'", propertyMapping.crossExpression.body.get(propertyMapping.crossExpression.body.size() - 1).sourceInformation, EngineErrorType.COMPILATION);
}
LambdaFunction lambda = new Root_meta_pure_metamodel_function_LambdaFunction_Impl(parent._id() + "." + propertyMapping.property.property, new SourceInformation(mappingPath, 0, 0, 0, 0), null)._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(this.context.pureModel.getType("meta::pure::metamodel::function::LambdaFunction"))._typeArguments(FastList.newListWith(functionType)))._openVariables(cleanedOpenVariables)._expressionSequence(valueSpecifications);
org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.xStore.XStorePropertyMapping xpm = new Root_meta_pure_mapping_xStore_XStorePropertyMapping_Impl("");
String propertyName = propertyMapping.property.property;
String edgePointPropertyName = MilestoningFunctions.getEdgePointPropertyName(propertyName);
Function<Type, Boolean> isTypeTemporalMilestoned = type -> !Milestoning.temporalStereotypes(type._stereotypes()).isEmpty();
Property property = parent._association()._properties().detect(p -> (propertyName.equals(p.getName())) || (isTypeTemporalMilestoned.apply(p._genericType()._rawType()) && edgePointPropertyName.equals(p.getName())));
Assert.assertTrue(property != null, () -> "Can't find property '" + propertyName + "' in association '" + (HelperModelBuilder.getElementFullPath(parent._association(), context.pureModel.getExecutionSupport())) + "'", propertyMapping.property.sourceInformation, EngineErrorType.COMPILATION);
return xpm._property(property)._localMappingProperty(propertyMapping.localMappingProperty != null)._sourceSetImplementationId(propertyMapping.source == null ? parent._id() : propertyMapping.source)._targetSetImplementationId(HelperMappingBuilder.getPropertyMappingTargetId(propertyMapping))._owner(parent)._crossExpression(lambda);
}
use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_LambdaFunction_Impl in project legend-engine by finos.
the class Milestoning method newSingleDateMilestoningQualifiedPropertyNoArg.
private static QualifiedProperty<?> newSingleDateMilestoningQualifiedPropertyNoArg(CompileContext context, Class<?> sourceClass, PropertyOwner propertyOwner, Property originalProperty, MilestoningStereotype returnTypeMilestoningStereotype, MutableList<Stereotype> stereotypes, Property edgePointProperty) {
String qualifiedPropertyName = originalProperty._name();
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.QualifiedProperty<?> qualifiedProperty = getQualifiedProperty(propertyOwner, originalProperty, qualifiedPropertyName, originalProperty._multiplicity(), stereotypes);
VariableExpression thisVar = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("this")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(sourceClass._classifierGenericType()._typeArguments().toList().get(0));
VariableExpression v_milestoning = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name("v_milestoning")._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(edgePointProperty._genericType());
ListIterable<Pair<VariableExpression, SimpleFunctionExpression>> datesToCompare = returnTypeMilestoningStereotype.getTemporalDatePropertyNames().collect(d -> {
VariableExpression inputTemporalDate = new Root_meta_pure_metamodel_valuespecification_VariableExpression_Impl("")._name(d)._multiplicity(context.pureModel.getMultiplicity("one"))._genericType(context.pureModel.getGenericType("Date"));
org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> temporalDateProperty = ((Class<Object>) originalProperty._genericType()._rawType())._properties().detect(p -> p._name().equals(d));
SimpleFunctionExpression temporalDatePropertyExp = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(temporalDateProperty)._propertyName(new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._values(Lists.fixedSize.of(d)))._genericType(context.pureModel.getGenericType("Date"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(Lists.fixedSize.of(v_milestoning));
return Tuples.pair(inputTemporalDate, temporalDatePropertyExp);
});
ListIterable<SimpleFunctionExpression> equalExpressions = datesToCompare.collect(p -> new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::boolean::eq_Any_1__Any_1__Boolean_1_", true))._functionName("eq")._genericType(context.pureModel.getGenericType("Boolean"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(Lists.fixedSize.<ValueSpecification>of(p.getTwo(), p.getOne())));
SimpleFunctionExpression equalExpression = equalExpressions.size() == 1 ? equalExpressions.get(0) : new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::boolean::and_Boolean_1__Boolean_1__Boolean_1_", true))._functionName("and")._genericType(context.pureModel.getGenericType("Boolean"))._multiplicity(context.pureModel.getMultiplicity("one"))._parametersValues(equalExpressions);
GenericType functionType = PureModel.buildFunctionType(Lists.fixedSize.of(v_milestoning), context.pureModel.getGenericType("Boolean"), context.pureModel.getMultiplicity("one"));
LambdaFunction filterLambda = new Root_meta_pure_metamodel_function_LambdaFunction_Impl("")._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::LambdaFunction"))._typeArguments(FastList.newListWith(functionType)))._openVariables(Lists.fixedSize.of("this"))._expressionSequence(Lists.fixedSize.of(equalExpression));
InstanceValue filterInstanceValue = new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._genericType(filterLambda._classifierGenericType())._multiplicity(context.pureModel.getMultiplicity("one"))._values(Lists.fixedSize.of(filterLambda));
SimpleFunctionExpression filterLhs = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(edgePointProperty)._propertyName(new Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl("")._values(Lists.fixedSize.of(edgePointProperty._name())))._genericType(edgePointProperty._genericType())._multiplicity(edgePointProperty._multiplicity())._parametersValues(Lists.fixedSize.of(thisVar));
SimpleFunctionExpression filterExpression = new Root_meta_pure_metamodel_valuespecification_SimpleFunctionExpression_Impl("")._func(context.pureModel.getFunction("meta::pure::functions::collection::filter_T_MANY__Function_1__T_MANY_", true))._functionName("filter")._genericType(qualifiedProperty._genericType())._multiplicity(context.pureModel.getMultiplicity("zeromany"))._parametersValues(Lists.fixedSize.of(filterLhs, filterInstanceValue));
GenericType classifierGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::property::QualifiedProperty"))._typeArguments(Lists.fixedSize.of(PureModel.buildFunctionType(Lists.mutable.of(thisVar), qualifiedProperty._genericType(), originalProperty._multiplicity())));
qualifiedProperty._classifierGenericType(classifierGenericType);
qualifiedProperty._expressionSequence(Lists.fixedSize.of(filterExpression));
return qualifiedProperty;
}
Aggregations