Javadoc's overview: mention the new API possibilities wrt messages

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Push down Comparable<?> implementation to JsonFragment

Its inheritors will benefit from it, even though only JsonFragment really uses
it.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
JsonFragment: code "clearance"

In .equals(). Gains nothing, loses nothing, but is more readable -- which is
better than nothing already.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Move Validation{Message,Domain,Report} classes to a dedicated package

Breaks 0.5.x users... But it feels a better model on the whole compared to what
existed before.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Package reorganization (BREAKS EXISTING CODE)

The most user-visible change, but of some importance: SchemaContainer has
changed packages. All other moves are internal only and generate a nontrivial
diffstat, but moving that class' location in particular is non-neutral.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
FormatSpecifier: make it use a ValidationMessage

Convert all children along the way.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Add a URIDownloader for the "resource" scheme

Resource as in Java resource.

Add it to the list of natively supported schemes.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
JsonSchemaFactory: fix misleading Javadoc

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
AbstractKeywordValidatorTest: use Guava's Lists

Better than using a home-grown solution which sucked anyway.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
AbstractSyntaxCheckerTest: use Guava's Lists

Ditto.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
JsonSchemaFactory: get rid of the .getValidatorCache() function

Modify the two tests which were using it accordingly.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Tests for relative schema loading

[fge: cherry pick, rewrite]

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
ValidationReport: make it implement .toString()

Just to quickly see whether there are messages in it while debugging.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Issue #14: only push/pop the context's container where needed

And that is only in one place: InstanceValidator.

Prior to this, it was needlessly pushed by "the four problem keywords",
ObjectValidator and ArrayValidator, but this led to a bug, highlighted by issue

As InstanceValidator is the only entrypoint into validation, only push and pop
in there: this cures the bug.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
README.markdown: 0.5.5

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
IDEA inspection run

Minor fixes again.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
JsonSchema: remove an unneeded call

Now that InstanceValidator is the place to call .setContainer(), it has nothing
to do in schemas anymore.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
ValidationContext: implement push()/pop()

This is better than .setContainer() and is more explanative.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Move two tests to their appropriate package

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
ValidationContext: make it responsible to spawn validators

This allows to get rid of its two accessors at the same time.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>