Search in sources :

Example 1 with ModelInfo

use of org.whole.lang.models.util.ModelInfo in project whole by wholeplatform.

the class ModelsJavaModelGeneratorVisitor method visit.

public void visit(Model modelOrig) {
    Model model = EntityUtils.clone(modelOrig);
    modelInfo = new ModelInfo(model);
    modelInfo.addInheritedFeatures(model);
    modelInfo.addUndeclaredTypes(model);
    modelInfo.sortFeatures(model);
    beforeModel(model);
    modelsGen.visitorsBuilder();
    modelsGen.entityInterfaceBuilder();
    modelsGen.entityFactoryBuilder();
    if (hasUI)
        modelsGen.partFactoryVisitorBuilder();
    model.getDeclarations().accept(this);
    model.getTypeRelations().accept(this);
    // modelsGen.applyTypeDeclarations();
    afterModel();
}
Also used : ModelInfo(org.whole.lang.models.util.ModelInfo) Model(org.whole.lang.models.model.Model)

Example 2 with ModelInfo

use of org.whole.lang.models.util.ModelInfo in project whole by wholeplatform.

the class ModelsInterpreterVisitor method configureLanguageKit.

public void configureLanguageKit(DynamicLanguageKit languageKit, Model model) {
    modelInfo = new ModelInfo(model);
    modelInfo.addInheritedFeatures(model);
    modelInfo.addUndeclaredTypes(model);
    modelInfo.sortFeatures(model);
    entityDescriptorEnum = languageKit.getEntityDescriptorEnum();
    featureDescriptorEnum = languageKit.getFeatureDescriptorEnum();
    model.getDeclarations().accept(new EntityDescriptorDefinitionVisitor());
    model.getDeclarations().accept(new EntityDescriptorCompletionVisitor());
    model.getTypeRelations().accept(new TypeRelationsVisitor());
}
Also used : ModelInfo(org.whole.lang.models.util.ModelInfo)

Example 3 with ModelInfo

use of org.whole.lang.models.util.ModelInfo in project whole by wholeplatform.

the class ModelsValidatorVisitor method visit.

@Override
public void visit(Model entity) {
    modelInfo = new ModelInfo(entity);
    super.visit(entity);
}
Also used : ModelInfo(org.whole.lang.models.util.ModelInfo)

Example 4 with ModelInfo

use of org.whole.lang.models.util.ModelInfo in project whole by wholeplatform.

the class ModelsNormalizerVisitor method visit.

@Override
public void visit(Model entity) {
    ModelInfo modelInfo = new ModelInfo(entity);
    modelInfo.addInheritedFeatures(entity);
    modelInfo.addUndeclaredTypes(entity);
    modelInfo.sortFeatures(entity);
}
Also used : ModelInfo(org.whole.lang.models.util.ModelInfo)

Aggregations

ModelInfo (org.whole.lang.models.util.ModelInfo)4 Model (org.whole.lang.models.model.Model)1