public class ExtendedParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_POWER_OF_TWO |
| Constructor and Description |
|---|
ExtendedParser() |
ExtendedParser(ExtendedNames names) |
| Modifier and Type | Method and Description |
|---|---|
ExtendedParser |
addTypes(Map<String,org.apache.avro.Schema> types)
Adds the provided types to the set of defined, named types known to this parser.
|
static Boolean |
getAllowUndefinedLogicalTypesThreadLocal() |
Map<String,org.apache.avro.Schema> |
getTypes()
Returns the set of defined, named types known to this parser.
|
boolean |
getValidate()
True iff names are validated.
|
boolean |
getValidateDefaults()
True iff default values are validated.
|
static boolean |
isAllowUndefinedLogicalTypes() |
static <K,V> LinkedHashMap<K,V> |
newLinkedHashMapWithExpectedSize(int expectedSize) |
org.apache.avro.Schema |
parse(File file)
Parse a schema from the provided file.
|
org.apache.avro.Schema |
parse(InputStream in) |
org.apache.avro.Schema |
parse(InputStream in,
boolean allowUndefinedLogicalTypes)
Parse a schema from the provided stream.
|
org.apache.avro.Schema |
parse(com.fasterxml.jackson.core.JsonParser parser) |
org.apache.avro.Schema |
parse(com.fasterxml.jackson.core.JsonParser parser,
boolean allowUndefinedLogicalTypes) |
org.apache.avro.Schema |
parse(String s) |
org.apache.avro.Schema |
parse(String s,
boolean allowUndefinedLogicalTypes)
Parse a schema from the provided string.
|
org.apache.avro.Schema |
parse(String s,
String... more)
Read a schema from one or more json strings
|
static void |
setAllowUndefinedLogicalTypesThreadLocal(Boolean isAllowUndefinedLogicalTypes) |
ExtendedParser |
setValidate(boolean validate)
Enable or disable name validation.
|
ExtendedParser |
setValidateDefaults(boolean pvalidateDefaults)
Enable or disable default value validation.
|
String |
toString()
Overwrite as appropriate.
|
public static final int MAX_POWER_OF_TWO
public ExtendedParser(ExtendedNames names)
public ExtendedParser()
public static boolean isAllowUndefinedLogicalTypes()
public static void setAllowUndefinedLogicalTypesThreadLocal(Boolean isAllowUndefinedLogicalTypes)
public static Boolean getAllowUndefinedLogicalTypesThreadLocal()
public final ExtendedParser addTypes(Map<String,org.apache.avro.Schema> types)
public final Map<String,org.apache.avro.Schema> getTypes()
public final ExtendedParser setValidate(boolean validate)
public final boolean getValidate()
public final ExtendedParser setValidateDefaults(boolean pvalidateDefaults)
public final boolean getValidateDefaults()
public final org.apache.avro.Schema parse(File file) throws IOException
IOExceptionpublic final org.apache.avro.Schema parse(InputStream in) throws IOException
IOExceptionpublic final org.apache.avro.Schema parse(InputStream in, boolean allowUndefinedLogicalTypes) throws IOException
IOExceptionpublic final org.apache.avro.Schema parse(String s, String... more)
public final org.apache.avro.Schema parse(String s)
public final org.apache.avro.Schema parse(String s, boolean allowUndefinedLogicalTypes)
public final org.apache.avro.Schema parse(com.fasterxml.jackson.core.JsonParser parser)
throws IOException
IOExceptionpublic final org.apache.avro.Schema parse(com.fasterxml.jackson.core.JsonParser parser,
boolean allowUndefinedLogicalTypes)
throws IOException
IOExceptionpublic static <K,V> LinkedHashMap<K,V> newLinkedHashMapWithExpectedSize(int expectedSize)
Copyright © 2020 SPF4J. All rights reserved.