org.apache.hadoop.zebra.schema
Class Schema.ColumnSchema

java.lang.Object
  extended by org.apache.hadoop.zebra.schema.Schema.ColumnSchema
Enclosing class:
Schema

public static class Schema.ColumnSchema
extends Object

Column Schema in Schema


Constructor Summary
Schema.ColumnSchema(Schema.ColumnSchema cs)
          copy ctor
Schema.ColumnSchema(String a, ColumnType t)
          construct a ColumnSchema for a native type
Schema.ColumnSchema(String a, Schema s)
          construct a Column schema for a RECORD column type
Schema.ColumnSchema(String a, Schema s, ColumnType t)
          construct a column schema for a complex column type
 
Method Summary
static boolean equals(Schema.ColumnSchema fschema, Schema.ColumnSchema fother)
          Compare two field schema for equality
 int getIndex()
          access function to get the column name
 String getName()
          access function to get the column name
 Schema getSchema()
           
 ColumnType getType()
          access function to get the column type
 String toString()
          string representation of the schema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schema.ColumnSchema

public Schema.ColumnSchema(String a,
                           ColumnType t)
construct a ColumnSchema for a native type

Parameters:
a - column name
t - native column type

Schema.ColumnSchema

public Schema.ColumnSchema(String a,
                           Schema s)
construct a Column schema for a RECORD column type

Parameters:
a - column name
s - column schema

Schema.ColumnSchema

public Schema.ColumnSchema(String a,
                           Schema s,
                           ColumnType t)
                    throws ParseException
construct a column schema for a complex column type

Parameters:
a - column name
s - column schema
t - complex column type
Throws:
ParseException

Schema.ColumnSchema

public Schema.ColumnSchema(Schema.ColumnSchema cs)
copy ctor

Parameters:
cs - source column schema
Method Detail

getName

public String getName()
access function to get the column name

Returns:
name of the column

getType

public ColumnType getType()
access function to get the column type

Returns:
column type

getIndex

public int getIndex()
access function to get the column name

Returns:
column index in the parent schema

equals

public static boolean equals(Schema.ColumnSchema fschema,
                             Schema.ColumnSchema fother)
Compare two field schema for equality

Parameters:
fschema - one column schema to be compared
fother - the other column schema to be compared
Returns:
true if ColumnSchema are equal, false otherwise

toString

public String toString()
string representation of the schema

Overrides:
toString in class Object

getSchema

public Schema getSchema()


Copyright © 2012 The Apache Software Foundation