/**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.emfstore.server.model.query.ESHistoryQueryFactory#pathQuery(org.eclipse.emf.emfstore.server.model.versionspec.ESPrimaryVersionSpec,
  *     org.eclipse.emf.emfstore.server.model.versionspec.ESPrimaryVersionSpec, boolean, boolean)
  */
 public ESPathQuery pathQuery(
     ESPrimaryVersionSpec source,
     ESPrimaryVersionSpec target,
     boolean allVersions,
     boolean includeChangePackages) {
   PrimaryVersionSpec sourceVersionSpec = ((ESPrimaryVersionSpecImpl) source).getInternalAPIImpl();
   PrimaryVersionSpec targetVersionSpec = ((ESPrimaryVersionSpecImpl) target).getInternalAPIImpl();
   PathQuery pathQuery =
       HistoryQueryBuilder.pathQuery(
           sourceVersionSpec, targetVersionSpec, allVersions, includeChangePackages);
   return pathQuery.getAPIImpl();
 }
 /**
  * Factory method for path query. Getting all changes from source to target.
  *
  * @param source source version
  * @param target target version
  * @param allVersions include all versions, from all branches
  * @param includeCp include changepackages
  * @return query
  */
 public static PathQuery pathQuery(
     PrimaryVersionSpec source,
     PrimaryVersionSpec target,
     boolean allVersions,
     boolean includeCp) {
   final PathQuery query = VersioningFactory.eINSTANCE.createPathQuery();
   query.setSource(ModelUtil.clone(source));
   query.setTarget(ModelUtil.clone(target));
   query.setIncludeAllVersions(allVersions);
   query.setIncludeChangePackages(includeCp);
   return query;
 }