On 21.11.12 11:30, Jukka Zitting wrote:
Hi,

On Wed, Nov 21, 2012 at 11:13 AM, Thomas Mueller <muel...@adobe.com> wrote:
For the query engine, I will need a "validate and normalize path" function
that verifies a path is syntactically correct, and simplifies it if possible,

That should be doable in PathUtils as a purely syntactic operation,
something like this:

     String resolvedPath = PathUtils.resolve(originalPath, relativePath);
     if (resolvedPath == null) {
         throw new Exception("Invalid path");
     }

Or we could have a convenience method that automatically handles the throwing:

     String resolvedPath = PathUtils.resolveOrThrow(originalPath, relativePath);

Normalisation is already done within the PathMapper. I'll follow up with a separate mail with details in a moment.

Michael


BR,

Jukka Zitting

Reply via email to