+ public EffectiveSchemaContext buildEffective() throws SourceException, ReactorException {
+ for(ModelProcessingPhase phase : PHASE_EXECUTION_ORDER) {
+ startPhase(phase);
+ loadPhaseStatements();
+ completePhaseActions();
+ endPhase(phase);
+ }
+ return transformEffective();
+ }
+
+ private EffectiveSchemaContext transformEffective() {
+ Preconditions.checkState(finishedPhase == ModelProcessingPhase.EFFECTIVE_MODEL);
+ List<DeclaredStatement<?>> rootStatements = new ArrayList<>();
+ List<EffectiveStatement<?,?>> rootEffectiveStatements = new ArrayList<>();
+
+ for(SourceSpecificContext source : sources) {
+ DeclaredStatement<?> root = source.getRoot().buildDeclared();
+ rootStatements.add(root);
+
+ EffectiveStatement<?,?> rootEffective = source.getRoot().buildEffective();
+ rootEffectiveStatements.add(rootEffective);
+ }
+
+ return new EffectiveSchemaContext(rootStatements,rootEffectiveStatements);
+ }
+