Interface Schema
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSchema.BuilderAllows to build a schema.static interfaceSchema.Entrystatic classSchema.Type
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Stream<Schema.Entry>getAllEntries()SchemagetElementSchema()List<Schema.Entry>getEntries()default Schema.EntrygetEntry(String name)default javax.json.JsonValuegetJsonProp(String name)Get a property values from schema with its name.List<Schema.Entry>getMetadata()StringgetProp(String property)Map<String,String>getProps()Schema.TypegetType()static StringsanitizeConnectionName(String name)Sanitize name to be avro compatible.
-
-
-
Method Detail
-
getType
Schema.Type getType()
- Returns:
- the type of this schema.
-
getElementSchema
Schema getElementSchema()
- Returns:
- the nested element schema for arrays.
-
getEntries
List<Schema.Entry> getEntries()
- Returns:
- the data entries for records (not contains meta data entries).
-
getMetadata
List<Schema.Entry> getMetadata()
- Returns:
- the metadata entries for records (not contains ordinary data entries).
-
getAllEntries
Stream<Schema.Entry> getAllEntries()
- Returns:
- All entries, including data and metadata, of this schema.
-
getEntry
default Schema.Entry getEntry(String name)
-
getProp
String getProp(String property)
- Parameters:
property- : property name.- Returns:
- the requested metadata prop
-
getJsonProp
default javax.json.JsonValue getJsonProp(String name)
Get a property values from schema with its name.- Parameters:
name- : property's name.- Returns:
- property's value.
-
sanitizeConnectionName
static String sanitizeConnectionName(String name)
Sanitize name to be avro compatible.- Parameters:
name- : original name.- Returns:
- avro compatible name.
-
-