org.apache.pig
Class ResourceSchema.ResourceFieldSchema

java.lang.Object
  extended by org.apache.pig.ResourceSchema.ResourceFieldSchema
All Implemented Interfaces:
Serializable
Enclosing class:
ResourceSchema

public static class ResourceSchema.ResourceFieldSchema
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
ResourceSchema.ResourceFieldSchema()
          Construct an empty field schema.
ResourceSchema.ResourceFieldSchema(LogicalSchema.LogicalFieldSchema fieldSchema)
          Construct using a LogicalSchema.LogicalFieldSchema as the template.
ResourceSchema.ResourceFieldSchema(Schema.FieldSchema fieldSchema)
          Construct using a Schema.FieldSchema as the template.
 
Method Summary
 String calcCastString()
           
 String getDescription()
          Get a free form text description of this field.
 String getName()
          Get the name of this field.
 ResourceSchema getSchema()
          Get the schema for this field.
 byte getType()
          Get the type of this field.
 ResourceSchema.ResourceFieldSchema setDescription(String description)
          Set the description
 ResourceSchema.ResourceFieldSchema setName(String name)
          Set the name of this filed.
 ResourceSchema.ResourceFieldSchema setSchema(ResourceSchema schema)
          Set the schema for this field.
 ResourceSchema.ResourceFieldSchema setType(byte type)
          Set the type of this field
static void throwInvalidSchemaException()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceSchema.ResourceFieldSchema

public ResourceSchema.ResourceFieldSchema()
Construct an empty field schema.


ResourceSchema.ResourceFieldSchema

public ResourceSchema.ResourceFieldSchema(Schema.FieldSchema fieldSchema)
Construct using a Schema.FieldSchema as the template.

Parameters:
fieldSchema - fieldSchema to copy from

ResourceSchema.ResourceFieldSchema

public ResourceSchema.ResourceFieldSchema(LogicalSchema.LogicalFieldSchema fieldSchema)
Construct using a LogicalSchema.LogicalFieldSchema as the template.

Parameters:
fieldSchema - fieldSchema to copy from
Method Detail

getName

public String getName()
Get the name of this field.

Returns:
name

setName

public ResourceSchema.ResourceFieldSchema setName(String name)
Set the name of this filed.

Parameters:
name - new name
Returns:
this

getType

public byte getType()
Get the type of this field.

Returns:
type, as a DataType static final byte

setType

public ResourceSchema.ResourceFieldSchema setType(byte type)
Set the type of this field

Parameters:
type - new type
Returns:
this

getDescription

public String getDescription()
Get a free form text description of this field.

Returns:
description

setDescription

public ResourceSchema.ResourceFieldSchema setDescription(String description)
Set the description

Parameters:
description - new description
Returns:
this

getSchema

public ResourceSchema getSchema()
Get the schema for this field. Type tuple/bag/map may have a schema.

Returns:
schema

setSchema

public ResourceSchema.ResourceFieldSchema setSchema(ResourceSchema schema)
                                             throws IOException
Set the schema for this field. Type tuple/bag/map may have a schema.

Parameters:
schema - new schema
Returns:
this
Throws:
IOException

throwInvalidSchemaException

public static void throwInvalidSchemaException()
                                        throws FrontendException
Throws:
FrontendException

toString

public String toString()
Overrides:
toString in class Object

calcCastString

public String calcCastString()


Copyright © 2007-2012 The Apache Software Foundation