Enum SchemaVersion

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SchemaVersion>

    public enum SchemaVersion
    extends java.lang.Enum<SchemaVersion>
    • Method Detail

      • values

        public static SchemaVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SchemaVersion c : SchemaVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SchemaVersion valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getVersion

        public static @Nullable SchemaVersion getVersion​(java.net.URI schemaUri)
        try to detect schema version. If schemaUri does not represent a known json schema draft it returns null.
        Parameters:
        schemaUri - a meta schema uri
        Returns:
        the detected schema version or null
      • getVersion

        public static SchemaVersion getVersion​(java.net.URI uri,
                                               SchemaVersion fallback)
        try to detect schema version. If uri does not represent a known json schema draft it returns the fallback schema version.
        Parameters:
        uri - current scope
        fallback - fallback version
        Returns:
        the detected schema version or the latest version
      • getSchemaUri

        public java.net.URI getSchemaUri()
      • getKeyword

        public @Nullable Keyword getKeyword​(java.lang.String name)
      • getIdProvider

        public IdProvider getIdProvider()
      • validatesRefSiblings

        public boolean validatesRefSiblings()
      • isLaterOrEqualTo201909

        public boolean isLaterOrEqualTo201909()
      • isBefore202012

        public boolean isBefore202012()
      • isBefore201909

        public boolean isBefore201909()
      • isApplicatorVocabulary

        public boolean isApplicatorVocabulary​(java.net.URI candidate)
      • isContentVocabulary

        public boolean isContentVocabulary​(java.net.URI candidate)
      • isCoreVocabulary

        public boolean isCoreVocabulary​(java.net.URI candidate)
      • isFormatAnnotationVocabulary

        public boolean isFormatAnnotationVocabulary​(java.net.URI candidate)
      • isFormatAssertionVocabulary

        public boolean isFormatAssertionVocabulary​(java.net.URI candidate)
      • isMetaDataVocabulary

        public boolean isMetaDataVocabulary​(java.net.URI candidate)
      • isValidationVocabulary

        public boolean isValidationVocabulary​(java.net.URI candidate)