public void integrateFile(
     final DelphiProfile profile,
     final MimPackage targetPackage,
     final File file,
     final String encoding)
     throws IOException {
   LOGGER.info(String.format("Integrating file %s.", file.getAbsolutePath()));
   Unit unit = new DelphiSourceParserDriver().readFile(file, encoding);
   unit.setSourceLocation(file);
   integrate(profile, targetPackage, unit);
 }
 /**
  * Integrates the given unit below the given target namespace. The package hierarchy is derived
  * from the fully qualified path name stored in the unit as expressed relative to the absolute
  * root folder specified for the integrator.
  *
  * @param targetPackage
  * @param unit
  */
 public void integrate(
     final DelphiProfile profile, final MimPackage targetPackage, final Unit unit) {
   MimPackage parent = ensurePackageHierarchy(targetPackage, unit.getSourceLocation());
   DelphiASTMapper visitor = new DelphiASTMapper(profile, parent);
   unit.accept(visitor);
 }