public static Graphs loadGraph ( File graphFile , File graphDirectory , ApplicationLoadResult alr ) { FromGraphDefinition fromDef = new FromGraphDefinition ( graphDirectory ) ; Graphs graph = fromDef . buildGraphs ( graphFile ) ; alr . getParsedFiles ( ) . addAll ( fromDef . getProcessedImports ( ) ) ; if ( ! fromDef . getErrors ( ) . isEmpty ( ) ) { alr . loadErrors . addAll ( fromDef . getErrors ( ) ) ; } else { Collection < ModelError > errors = RuntimeModelValidator . validate ( graph ) ; alr . loadErrors . addAll ( errors ) ; errors = RuntimeModelValidator . validate ( graph , graphDirectory . getParentFile ( ) ) ; alr . loadErrors . addAll ( errors ) ; alr . objectToSource . putAll ( fromDef . getObjectToSource ( ) ) ; alr . typeAnnotations . putAll ( fromDef . getTypeAnnotations ( ) ) ; } return graph ; }
Loads a graph file .