Interface Schema
- All Known Implementing Classes:
Schema
public interface Schema
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAllows to build aSchema.static classstatic interfacestatic enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Schema.EntryavoidCollision(Schema.Entry newEntry, Function<String, Schema.Entry> entryGetter, 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.Entrydefault Map<String,Schema.Entry> default javax.json.JsonValuegetJsonProp(String name) Get a property values from schema with its name.getProps()getType()default Schema.EntriesOrderGet the EntriesOrder defined with Builder.static StringsanitizeConnectionName(String name) Deprecated.default Schema.BuilderGet a Builder from the current schema.
-
Field Details
-
SKIP_SANITIZE_PROPERTY
- See Also:
-
SKIP_SANITIZE
-
-
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.
-
getEntryMap
-
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
Deprecated.Sanitize name to be avro compatible.- Parameters:
name- : original name.- Returns:
- avro compatible name.
-
avoidCollision
@Deprecated static Schema.Entry avoidCollision(Schema.Entry newEntry, Function<String, Schema.Entry> entryGetter, BiConsumer<String, Schema.Entry> replaceFunction) Deprecated.Use instead
-