Interface Schema
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Schema.Builder
Allows to build a schema.static interface
Schema.Entry
static class
Schema.Type
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Stream<Schema.Entry>
getAllEntries()
Schema
getElementSchema()
List<Schema.Entry>
getEntries()
default Schema.Entry
getEntry(String name)
default javax.json.JsonValue
getJsonProp(String name)
Get a property values from schema with its name.List<Schema.Entry>
getMetadata()
String
getProp(String property)
Map<String,String>
getProps()
Schema.Type
getType()
static String
sanitizeConnectionName(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.
-
-