Interface Schema
- All Known Implementing Classes:
Schema
public interface Schema
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Allows to build aSchema
.static class
static interface
static enum
-
Method Summary
Modifier and TypeMethodDescriptionstatic Schema.Entry
avoidCollision
(Schema.Entry newEntry, Function<String, Schema.Entry> entryGetter, BiConsumer<String, Schema.Entry> replaceFunction) static Schema.Entry
avoidCollision
(Schema.Entry newEntry, Supplier<Stream<Schema.Entry>> allEntriesSupplier, BiConsumer<String, Schema.Entry> replaceFunction) Deprecated.default List<Schema.Entry>
Get all entries sorted by schema designed order.default List<Schema.Entry>
getEntriesOrdered
(Comparator<Schema.Entry> comparator) Get all entries sorted using a custom comparator.default Schema.Entry
default javax.json.JsonValue
getJsonProp
(String name) Get a property values from schema with its name.getProps()
getType()
default Schema.EntriesOrder
Get the EntriesOrder defined with Builder.static String
sanitizeConnectionName
(String name) Sanitize name to be avro compatible.default Schema.Builder
Get a Builder from the current schema.
-
Method Details
-
getType
- Returns:
- the type of this schema.
-
getElementSchema
- Returns:
- the nested element schema for arrays.
-
getEntries
- Returns:
- the data entries for records (not contains meta data entries).
-
getMetadata
- Returns:
- the metadata entries for records (not contains ordinary data entries).
-
getAllEntries
- Returns:
- All entries, including data and metadata, of this schema.
-
toBuilder
Get a Builder from the current schema.- Returns:
- a
Schema.Builder
-
getEntriesOrdered
Get all entries sorted by schema designed order.- Returns:
- all entries ordered
-
getEntriesOrdered
Get all entries sorted using a custom comparator.- Parameters:
comparator
- the comparator- Returns:
- all entries ordered with provided comparator
-
naturalOrder
Get the EntriesOrder defined with Builder.- Returns:
- the EntriesOrder
-
getEntry
-
getProps
- Returns:
- the metadata props
-
getProp
- Parameters:
property
- : property name.- Returns:
- the requested metadata prop
-
getJsonProp
Get a property values from schema with its name.- Parameters:
name
- : property's name.- Returns:
- property's value.
-
sanitizeConnectionName
Sanitize name to be avro compatible.- Parameters:
name
- : original name.- Returns:
- avro compatible name.
-
avoidCollision
@Deprecated static Schema.Entry avoidCollision(Schema.Entry newEntry, Supplier<Stream<Schema.Entry>> allEntriesSupplier, BiConsumer<String, Schema.Entry> replaceFunction) Deprecated. -
avoidCollision
static Schema.Entry avoidCollision(Schema.Entry newEntry, Function<String, Schema.Entry> entryGetter, BiConsumer<String, Schema.Entry> replaceFunction)
-