Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the Lesser GNU General Public License as
   * published by the Free Software Foundation, either version 3 of the
   * License, or (at your option) any later version.
   *
   * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * Lesser GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 package com.github.fge.jsonschema.library.syntax;
 
Draft v4 specific syntax checkers
 
 public final class DraftV4SyntaxCheckerDictionary
 {
     private static final Dictionary<SyntaxCheckerDICTIONARY;
 
     public static Dictionary<SyntaxCheckerget()
     {
         return ;
     }
 
     {
     }
 
     static {
         final DictionaryBuilder<SyntaxCheckerbuilder
             = Dictionary.newBuilder();
 
         /*
          * Put all common checkers
          */
         builder.addAll(CommonSyntaxCheckerDictionary.get());
 
         String keyword;
         SyntaxChecker checker;
 
         /*
          * Array
          */
         keyword = "items";
         checker = DraftV4ItemsSyntaxChecker.getInstance();
         builder.addEntry(keywordchecker);
 
         /*
          * Integers and numbers
          */
         keyword = "multipleOf";
         checker = new DivisorSyntaxChecker(keyword);
         builder.addEntry(keywordchecker);
 
         /*
          * Objects
          */
         keyword = "minProperties";
         checker = new PositiveIntegerSyntaxChecker(keyword);
         builder.addEntry(keywordchecker);
 
         keyword = "maxProperties";
         checker = new PositiveIntegerSyntaxChecker(keyword);
         builder.addEntry(keywordchecker);
 
         keyword = "properties";
         checker = DraftV4PropertiesSyntaxChecker.getInstance();
         builder.addEntry(keywordchecker);
 
         keyword = "required";
         checker = RequiredSyntaxChecker.getInstance();
         builder.addEntry(keywordchecker);
 
         keyword = "dependencies";
         checker = DraftV4DependenciesSyntaxChecker.getInstance();
         builder.addEntry(keywordchecker);
 
         /*
         * All / metadata
         */
        keyword = "allOf";
        checker = new SchemaArraySyntaxChecker(keyword);
        builder.addEntry(keywordchecker);
        keyword = "anyOf";
        checker = new SchemaArraySyntaxChecker(keyword);
        builder.addEntry(keywordchecker);
        keyword = "oneOf";
        checker = new SchemaArraySyntaxChecker(keyword);
        builder.addEntry(keywordchecker);
        keyword = "not";
        checker = NotSyntaxChecker.getInstance();
        builder.addEntry(keywordchecker);
        keyword = "definitions";
        checker = DefinitionsSyntaxChecker.getInstance();
        builder.addEntry(keywordchecker);
        keyword = "type";
        checker = DraftV4TypeSyntaxChecker.getInstance();
        builder.addEntry(keywordchecker);
         = builder.freeze();
    }
New to GrepCode? Check out our FAQ X