Examples of ProcessingReport


Examples of com.github.fge.jsonschema.core.report.ProcessingReport

     * @param schema the schema
     * @return true if the schema is valid
     */
    public boolean schemaIsValid(final JsonNode schema)
    {
        final ProcessingReport report = new DevNullProcessingReport();
        return getResult(schema, report).isSuccess();
    }
View Full Code Here

Examples of com.github.fge.jsonschema.core.report.ProcessingReport

     * @param schema the schema
     * @return a report
     */
    public ProcessingReport validateSchema(final JsonNode schema)
    {
        final ProcessingReport report = new ListProcessingReport();
        return getResult(schema, report).getReport();
    }
View Full Code Here

Examples of com.github.fge.jsonschema.core.report.ProcessingReport

        final ProcessingReport report, final MessageBundle bundle,
        final FullData data)
        throws ProcessingException
    {
        final SchemaTree tree = data.getSchema();
        final ProcessingReport subReport
            = new ListProcessingReport(report.getLogLevel(), LogLevel.FATAL);

        processor.process(subReport, data.withSchema(tree.append(PTR)));

        if (subReport.isSuccess())
            report.error(newMsg(data, bundle, "err.draftv4.not.fail"));
    }
View Full Code Here

Examples of com.github.fge.jsonschema.report.ProcessingReport

public class JsonSchemaUtil {

  public static boolean validData(final String rawSchema, final String rawData) {
    boolean valid = false;
    try {
      final ProcessingReport report = buildReport(rawSchema, rawData, true, false);
      valid = report.isSuccess();
    } catch (ServiceException e) {
      return valid;
    } catch (IOException e) {
      return valid;
    }
View Full Code Here

Examples of com.github.fge.jsonschema.report.ProcessingReport

  public static JsonNode buildResult(final String rawSchema,
      final String rawData, final boolean useV3, final boolean useId)
      throws IOException {
    final ObjectNode ret = JsonNodeFactory.instance.objectNode();
    try {
      final ProcessingReport report = buildReport(rawSchema, rawData,
          useV3, useId);
      final boolean success = report.isSuccess();
      ret.put(ValidateResponse.VALID, success);
      ret.put(ValidateResponse.RESULTS, ((AsJson) report).asJson());
      return ret;

    } catch (ServiceException e) {
View Full Code Here

Examples of com.github.fge.jsonschema.report.ProcessingReport

          + " Data valid?" + invalidData);
    }
    final JsonNode schemaNode = ret.remove(ValidateResponse.SCHEMA);
    final JsonNode data = ret.remove(ValidateResponse.DATA);
    final JsonValidator validator = JsonValidators.withOptions(useV3, useId);
    final ProcessingReport report = validator.validateUnchecked(schemaNode,
        data);

    return report;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.