Search in sources :

Example 1 with Root_meta_data_DataElementReference

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

the class PackageableElementSecondPassBuilder method visit.

@Override
public PackageableElement visit(DataElement dataElement) {
    String fullPath = context.pureModel.buildPackageString(dataElement._package, dataElement.name);
    Root_meta_data_DataElement compiled = (Root_meta_data_DataElement) context.pureModel.getPackageableElement(fullPath);
    ProcessingContext processingContext = new ProcessingContext("Data '" + fullPath + "' Second Pass");
    Root_meta_data_Data compiledData = EmbeddedDataCompilerHelper.compileEmbeddedData(dataElement.data, context, processingContext);
    if (compiledData instanceof Root_meta_data_DataElementReference) {
        throw new EngineException("Cannot use Data element reference in a Data element", dataElement.data.sourceInformation, EngineErrorType.COMPILATION);
    }
    compiled._data(compiledData);
    return null;
}
Also used : Root_meta_data_Data(org.finos.legend.pure.generated.Root_meta_data_Data) EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) Root_meta_data_DataElementReference(org.finos.legend.pure.generated.Root_meta_data_DataElementReference) Root_meta_data_DataElement(org.finos.legend.pure.generated.Root_meta_data_DataElement)

Aggregations

EngineException (org.finos.legend.engine.shared.core.operational.errorManagement.EngineException)1 Root_meta_data_Data (org.finos.legend.pure.generated.Root_meta_data_Data)1 Root_meta_data_DataElement (org.finos.legend.pure.generated.Root_meta_data_DataElement)1 Root_meta_data_DataElementReference (org.finos.legend.pure.generated.Root_meta_data_DataElementReference)1