Package com.github.fge.jsonschema.processors.data

Examples of com.github.fge.jsonschema.processors.data.SchemaDigest


        final SchemaTree tree
            = new CanonicalSchemaTree(SchemaKey.anonymousKey(), schema);
        final SchemaContext context = new SchemaContext(tree, type);
        final ProcessingReport report = mock(ProcessingReport.class);

        final SchemaDigest digest = schemaDigester.process(report, context);
        verify(digester1).digest(schema);
        verify(digester2).digest(schema);

        final Map<String,JsonNode> digests = digest.getDigests();

        if (TYPES1.contains(type))
            assertSame(digests.get(K1), digest1);
        else
            assertFalse(digests.containsKey(K1));
View Full Code Here


    {
        final Map<String, JsonNode> digests = Maps.newTreeMap();
        digests.put(K1, JacksonUtils.nodeFactory().nullNode());
        digests.put(CHALLENGED, JacksonUtils.nodeFactory().nullNode());

        final SchemaDigest digest = new SchemaDigest(null, digests);
        final ProcessingReport report = mock(ProcessingReport.class);

        try {
            validatorBuilder.process(report, digest);
            fail("No exception thrown??");
View Full Code Here

        throws ProcessingException
    {
        final Map<String, JsonNode> digests = Maps.newTreeMap();
        digests.put(K1, JacksonUtils.nodeFactory().nullNode());

        final SchemaDigest digest = new SchemaDigest(null, digests);
        final ProcessingReport report = mock(ProcessingReport.class);

        final ValidatorList context
            = validatorBuilder.process(report, digest);
View Full Code Here

    {
        final Map<String, JsonNode> digests = Maps.newTreeMap();
        digests.put(K1, JacksonUtils.nodeFactory().nullNode());
        digests.put(K2, JacksonUtils.nodeFactory().nullNode());

        final SchemaDigest digest = new SchemaDigest(null, digests);
        final ProcessingReport report = mock(ProcessingReport.class);

        final ValidatorList context
            = validatorBuilder.process(report, digest);
View Full Code Here

    {
        final JsonNode schema = input.getSchema().getNode();
        final NodeType type = input.getInstanceType();
        final Map<String, JsonNode> map = Maps.newHashMap(buildDigests(schema));
        map.keySet().retainAll(typeMap.get(type));
        return new SchemaDigest(input, map);
    }
View Full Code Here

TOP

Related Classes of com.github.fge.jsonschema.processors.data.SchemaDigest

Copyright © 2018 www.massapicom. 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.