Protected Member Functions | Static Protected Member Functions | Properties

Avro::NamedSchema Class Reference

Base class for all named schemas: fixed, enum, record. More...

Inheritance diagram for Avro::NamedSchema:
Avro::Schema Avro::EnumSchema Avro::FixedSchema Avro::RecordSchema

List of all members.

Protected Member Functions

 NamedSchema (Type type, SchemaName name, IList< SchemaName > aliases, PropertyMap props, SchemaNames names)
 Constructor for named schema class.
bool InAliases (SchemaName name)
internal override void WriteJson (Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace)
 Writes named schema in JSON format.
internal override void WriteJsonFields (Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace)
 Writes named schema in JSON format.

Static Protected Member Functions

static SchemaName GetName (JToken jtok, string encspace)
 Parses the name and namespace from the given JSON schema object then creates SchemaName object including the given enclosing namespace.
static IList< SchemaNameGetAliases (JToken jtok, string space, string encspace)
 Parses the 'aliases' property from the given JSON token.

Properties

SchemaName SchemaName [get, set]
 Name of the schema, contains name, namespace and enclosing namespace.
override string Name [get]
 Name of the schema.
string Namespace [get]
 Namespace of the schema.
string Fullname [get]
 Namespace.Name of the schema.

Detailed Description

Base class for all named schemas: fixed, enum, record.


Constructor & Destructor Documentation

Avro::NamedSchema::NamedSchema ( Type  type,
SchemaName  name,
IList< SchemaName aliases,
PropertyMap  props,
SchemaNames  names 
) [inline, protected]

Constructor for named schema class.

Parameters:
type schema type
name name
names list of named schemas already read

Member Function Documentation

static IList<SchemaName> Avro::NamedSchema::GetAliases ( JToken  jtok,
string  space,
string  encspace 
) [inline, static, protected]

Parses the 'aliases' property from the given JSON token.

Parameters:
jtok JSON object to read
space namespace of the name this alias is for
encspace enclosing namespace of the name this alias is for
Returns:
List of SchemaName that represents the list of alias. If no 'aliases' specified, then it returns null.
static SchemaName Avro::NamedSchema::GetName ( JToken  jtok,
string  encspace 
) [inline, static, protected]

Parses the name and namespace from the given JSON schema object then creates SchemaName object including the given enclosing namespace.

Parameters:
jtok JSON object to read
encspace enclosing namespace
Returns:
new SchemaName object
internal override void Avro::NamedSchema::WriteJson ( Newtonsoft.Json.JsonTextWriter  writer,
SchemaNames  names,
string  encspace 
) [inline, protected]

Writes named schema in JSON format.

Parameters:
writer JSON writer
names list of named schemas already written
encspace enclosing namespace of the named schema
internal override void Avro::NamedSchema::WriteJsonFields ( Newtonsoft.Json.JsonTextWriter  writer,
SchemaNames  names,
string  encspace 
) [inline, protected]

Writes named schema in JSON format.

Parameters:
writer JSON writer
names list of named schemas already written
encspace enclosing namespace of the named schema

Reimplemented in Avro::EnumSchema, Avro::FixedSchema, and Avro::RecordSchema.


Property Documentation

string Avro::NamedSchema::Fullname [get]

Namespace.Name of the schema.

override string Avro::NamedSchema::Name [get]

Name of the schema.

Reimplemented from Avro::Schema.

string Avro::NamedSchema::Namespace [get]

Namespace of the schema.

SchemaName Avro::NamedSchema::SchemaName [get, set]

Name of the schema, contains name, namespace and enclosing namespace.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties