Search in sources :

Example 1 with Root_meta_pure_metamodel_function_property_Property_Impl

use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl in project legend-engine by finos.

the class Milestoning method generateMilestoningRangeProperty.

private static Property generateMilestoningRangeProperty(CompileContext context, MilestoningStereotype milestoningStereotype, Class<Object> owner) {
    GenericType milestoningRangePropertyGenericType = context.resolveGenericType(milestoningStereotype.getMilestoningPropertyClassName());
    Property generatedMilestoningRangeProperty = new Root_meta_pure_metamodel_function_property_Property_Impl<>(MilestoningFunctions.MILESTONING)._name(MilestoningFunctions.MILESTONING)._genericType(milestoningRangePropertyGenericType)._classifierGenericType(new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::property::Property"))._typeArguments(Lists.fixedSize.of(owner._classifierGenericType(), milestoningRangePropertyGenericType)))._multiplicity(context.pureModel.getMultiplicity("zeroone"))._stereotypes(Lists.fixedSize.of(generatedMilestoningStereotype(context, GeneratedMilestoningStereotype.generatedmilestoningdateproperty)))._owner(owner);
    return generatedMilestoningRangeProperty;
}
Also used : GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) Root_meta_pure_metamodel_type_generics_GenericType_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl) Root_meta_pure_metamodel_function_property_Property_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl) AbstractProperty(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.AbstractProperty) QualifiedProperty(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.QualifiedProperty) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property)

Example 2 with Root_meta_pure_metamodel_function_property_Property_Impl

use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl in project legend-engine by finos.

the class Milestoning method newProperty.

private static org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> newProperty(PropertyOwner owner, org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> originalProperty, String name, org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.multiplicity.Multiplicity multiplicity, ListIterable<Stereotype> stereotypes) {
    org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property<?, ?> property = newAbstractProperty(owner, originalProperty, name, multiplicity, stereotypes, new Root_meta_pure_metamodel_function_property_Property_Impl(name));
    property._classifierGenericType(originalProperty._classifierGenericType());
    return property;
}
Also used : Root_meta_pure_metamodel_function_property_Property_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl)

Example 3 with Root_meta_pure_metamodel_function_property_Property_Impl

use of org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl in project legend-engine by finos.

the class HelperMappingBuilder method getMappedProperty.

public static Property getMappedProperty(PropertyMapping propertyMapping, CompileContext context) {
    if (propertyMapping.localMappingProperty != null) {
        // Local property mapping
        LocalMappingPropertyInfo localMappingPropertyInfo = propertyMapping.localMappingProperty;
        // Raw type will be populated when mapping class is built
        GenericType sourceGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("");
        GenericType targetGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.resolveType(localMappingPropertyInfo.type, localMappingPropertyInfo.sourceInformation));
        GenericType propertyClassifierGenericType = new Root_meta_pure_metamodel_type_generics_GenericType_Impl("")._rawType(context.pureModel.getType("meta::pure::metamodel::function::property::Property"))._typeArguments(Lists.fixedSize.of(sourceGenericType, targetGenericType))._multiplicityArgumentsAdd(context.pureModel.getMultiplicity(localMappingPropertyInfo.multiplicity));
        return new Root_meta_pure_metamodel_function_property_Property_Impl<>(propertyMapping.property.property)._name(propertyMapping.property.property)._classifierGenericType(propertyClassifierGenericType)._genericType(targetGenericType)._multiplicity(context.pureModel.getMultiplicity(localMappingPropertyInfo.multiplicity));
    }
    return HelperModelBuilder.getPropertyOrResolvedEdgePointProperty(context, context.resolveClass(propertyMapping.property._class, propertyMapping.sourceInformation), Optional.empty(), propertyMapping.property.property, propertyMapping.sourceInformation);
}
Also used : LocalMappingPropertyInfo(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.LocalMappingPropertyInfo) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) Root_meta_pure_metamodel_type_generics_GenericType_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl) Root_meta_pure_metamodel_function_property_Property_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl)

Aggregations

Root_meta_pure_metamodel_function_property_Property_Impl (org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl)3 Root_meta_pure_metamodel_type_generics_GenericType_Impl (org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl)2 GenericType (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)2 LocalMappingPropertyInfo (org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.LocalMappingPropertyInfo)1 AbstractProperty (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.AbstractProperty)1 Property (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property)1 QualifiedProperty (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.QualifiedProperty)1