code: Package getPackage(IntermediateParseResults intermediateResults, String packageId) {
      Package aPackage = intermediateResults.getPackage(packageId);
      if (aPackage == null) {
        aPackage = dataService.findOneById(PackageMetadata.PACKAGE, packageId, Package.class);
      }
      return aPackage;
    }
docs: Retrieves a {@link Package} by name from parsed data or existing data.
  
  @param intermediateResults parsed data
  @param packageId package name
  @return package or <code>null</code> if no package with the given name exists in parsed or
  existing data