A schema may be one of:
SchemaBuilder. The schema objects
are logically immutable. There are only two mutating methods -
setFields(List) and addProp(String, String). The following
restrictions apply on these two methods.
setFields(List), can be called at most once. This method exists
in order to enable clients to build recursive schemas.
addProp(String, String) can be called with property names that
are not present already. It is not possible to change or delete an existing
property.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| public static class | Schema.Field
A field within a record. |
| private static class | |
| private static class | |
| private static class | |
| pack-priv static class | Schema.LockableArrayList<E>
No change is permitted on LockableArrayList once lock() has been called on it. |
| private static class | |
| private static class | |
| pack-priv static class | |
| private abstract static class | |
| pack-priv static class | |
| private static class | |
| public static class | Schema.Parser
A parser for JSON-format schemas. |
| private static class | |
| public static class | Schema.SeenPair
Useful as key of |
| private static class | |
| private static class | |
| public static enum | Schema.Type
The type of a schema. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Set | |
| pack-priv static final JsonFactory | |
| private static final Set | |
| pack-priv int | |
| pack-priv static final Logger | |
| private LogicalType | |
| pack-priv static final ObjectMapper | |
| private static final int | |
| pack-priv static final Map | |
| private static final Set | |
| private static final ThreadLocal | |
| private static final ThreadLocal | |
| private static final long | |
| private final Schema. | |
| private static final ThreadLocal | |
| private static ThreadLocal |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | addProp(String
The name of the property to add name, String The value for the property to add value)Overrides org. |
| public void | |
| public static Schema | applyAliases(Schema writer, Schema reader)
Rewrite a writer's schema using the aliases from a reader's schema. |
| private static Schema | |
| pack-priv int | |
| public static Schema | |
| public static Schema | |
| public static Schema | |
| public static Schema | |
| public static Schema | |
| public static Schema | |
| public static Schema | createRecord(List<Schema.
Deprecated
This method allows to create Schema objects that cannot be parsed
by
Create an anonymous record schema.
Schema..
|
| public static Schema | createRecord(String name, String doc, String namespace, boolean isError)
Create a named record schema. |
| public static Schema | |
| public static Schema | |
| public static Schema | |
| pack-priv final boolean | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| pack-priv void | |
| public Set | |
| private static void | |
| public String | |
| public Schema | |
| public String | |
| public int | |
| public List | |
| public Schema. | |
| private static String | |
| public List | |
| public int | |
| public String | getFullName()
If this is a record, enum or fixed, returns its namespace-qualified name, otherwise returns the name of the primitive type. |
| public Integer | |
| public LogicalType | |
| public String | getName()
If this is a record, enum or fixed, returns its name, otherwise the name of the primitive type. |
| public String | |
| private static String | getOptionalText(JsonNode container, String key)
Extracts text value associated to key from the container JsonNode. |
| private static String | getRequiredText(JsonNode
Container where to find key. container, String Key to look for in container. key, String String to prepend to the SchemaParseException. error)Extracts text value associated to key from the container JsonNode, and throws
|
| public Schema. | |
| public List | |
| public Schema | |
| public boolean | |
| public boolean | |
| public final int | |
| public boolean | |
| public boolean | |
| public boolean | |
| private static boolean | |
| public static Schema | Returns: The freshly built Schema.The file to read the schema from. file)
Deprecated
use
Constructs a Schema object from JSON schema file file.
Schema. instead.
|
| public static Schema | Returns: The freshly built Schema.The input stream to read the schema from. in)
Deprecated
use
Constructs a Schema object from JSON schema stream in.
Schema. instead.
|
| public static Schema | |
| public static Schema | parse(String jsonSchema, boolean
true if names should be validated, false if not. validate)
Deprecated
use
Construct a schema from JSON text.
Schema. instead.
|
| pack-priv static Schema | |
| pack-priv static Set | |
| pack-priv static JsonNode | |
| public static Object | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public String | |
| public String | |
| public String | toString(Collection<Schema>
referenced schemas referencedSchemas, boolean if true, pretty-print JSON. pretty)
Deprecated
Render this as JSON, but without inlining the
referenced schemas.
|
| pack-priv String | |
| private static JsonNode | |
| private static String | |
| protected Object |