String sourcePathStr = matcher.group(2);
if (reposPathStr == null || sourcePathStr == null) return null;
reposPathStr = reposPathStr.trim();
sourcePathStr = sourcePathStr.trim();
if (reposPathStr.length() == 0 || sourcePathStr.length() == 0) return null;
PathFactory pathFactory = context.getValueFactories().getPathFactory();
Path repositoryPath = pathFactory.create(reposPathStr);
Path sourcePath = pathFactory.create(sourcePathStr);
// Grab the exceptions ...
List<Path> exceptions = new LinkedList<Path>();
while (matcher.find()) {
String exceptionStr = matcher.group(1);
Path exception = pathFactory.create(exceptionStr);
exceptions.add(exception);
}
return new PathRule(repositoryPath, sourcePath, exceptions);
}