Show / Hide Table of Contents

Class NamedSchema

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

Inheritance
System.Object
Schema
NamedSchema
EnumSchema
FixedSchema
RecordSchema
Inherited Members
Schema.Tag
Schema.Parse(String)
Schema.ToString()
Schema.GetTypeString(Schema.Type)
Schema.GetProperty(String)
Schema.GetHashCode()
Schema.CanRead(Schema)
Schema.areEqual(Object, Object)
Schema.getHashCode(Object)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Avro
Assembly: Avro.dll
Syntax
public abstract class NamedSchema : Schema

Constructors

| Improve this Doc View Source

NamedSchema(Schema.Type, SchemaName, IList<SchemaName>, PropertyMap, SchemaNames)

Constructor for named schema class

Declaration
protected NamedSchema(Schema.Type type, SchemaName name, IList<SchemaName> aliases, PropertyMap props, SchemaNames names)
Parameters
Type Name Description
Schema.Type type

schema type

SchemaName name

name

System.Collections.Generic.IList<SchemaName> aliases
PropertyMap props
SchemaNames names

list of named schemas already read

Properties

| Improve this Doc View Source

Fullname

Namespace.Name of the schema

Declaration
public string Fullname { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Name

Name of the schema

Declaration
public override string Name { get; }
Property Value
Type Description
System.String
Overrides
Schema.Name
| Improve this Doc View Source

Namespace

Namespace of the schema

Declaration
public string Namespace { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

SchemaName

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

Declaration
public SchemaName SchemaName { get; }
Property Value
Type Description
SchemaName

Methods

| Improve this Doc View Source

GetAliases(JToken, String, String)

Parses the 'aliases' property from the given JSON token

Declaration
protected static IList<SchemaName> GetAliases(JToken jtok, string space, string encspace)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken jtok

JSON object to read

System.String space

namespace of the name this alias is for

System.String encspace

enclosing namespace of the name this alias is for

Returns
Type Description
System.Collections.Generic.IList<SchemaName>

List of SchemaName that represents the list of alias. If no 'aliases' specified, then it returns null.

| Improve this Doc View Source

GetName(JToken, String)

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

Declaration
protected static SchemaName GetName(JToken jtok, string encspace)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken jtok

JSON object to read

System.String encspace

enclosing namespace

Returns
Type Description
SchemaName

new SchemaName object

| Improve this Doc View Source

InAliases(SchemaName)

Declaration
protected bool InAliases(SchemaName name)
Parameters
Type Name Description
SchemaName name
Returns
Type Description
System.Boolean
| Improve this Doc View Source

WriteJson(JsonTextWriter, SchemaNames, String)

Writes named schema in JSON format

Declaration
protected override void WriteJson(JsonTextWriter writer, SchemaNames names, string encspace)
Parameters
Type Name Description
Newtonsoft.Json.JsonTextWriter writer

JSON writer

SchemaNames names

list of named schemas already written

System.String encspace

enclosing namespace of the named schema

Overrides
Schema.WriteJson(JsonTextWriter, SchemaNames, String)
| Improve this Doc View Source

WriteJsonFields(JsonTextWriter, SchemaNames, String)

Writes named schema in JSON format

Declaration
protected override void WriteJsonFields(JsonTextWriter writer, SchemaNames names, string encspace)
Parameters
Type Name Description
Newtonsoft.Json.JsonTextWriter writer

JSON writer

SchemaNames names

list of named schemas already written

System.String encspace

enclosing namespace of the named schema

Overrides
Schema.WriteJsonFields(JsonTextWriter, SchemaNames, String)
  • Improve this Doc
  • View Source
Back to top Copyright © 2012 The Apache Software Foundation.