All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.tools.dataFormatWizard.SchemaClassField

java.lang.Object
   |
   +----com.ibm.beans.tools.dataFormatWizard.SchemaItem
           |
           +----com.ibm.beans.tools.dataFormatWizard.SchemaField
                   |
                   +----com.ibm.beans.tools.dataFormatWizard.SchemaClassField

public class SchemaClassField
extends SchemaField
implements ClassnameAttribute, ArgumentsAttribute, DiscardAttribute, NameAttribute, OptionAttribute, RepeatAttribute
The SchemaClassField class represents a field expected at a given point within a file schema which can be read or stored as an existing Java class.

It contains a classname field and a constructor-arguments field. These fields are used by emitted beans to declare and instantiate the Java class as needed, when reading or storing the stream.

See Also:
SchemaItem, ClassnameAttribute, DiscardAttribute, NameAttribute, OptionAttribute, RepeatAttribute

Constructor Index

 o SchemaClassField()
Creates a SchemaClassField instance.

Method Index

 o emitDeclaration(PrintWriter)
Emits source code to declare storage for the field or record data represented by this schema item.
 o emitGetterMethod(PrintWriter)
Emits source code to get the field or record data represented by this schema item.
 o emitReadLegacyCode(PrintWriter, String)
Emits source code to read the field or record data represented by this schema item.
 o getArguments()
Gets the constructor arguments for this schema field.
 o getAttributesAsText()
Gets a string representing the attributes of this class field.
 o getClassname()
Gets the class name for this schema field.
 o getName()
Returns the name of this schema item.
 o getOptionTest()
Gets the option test for this schema item.
 o getRepeatTest()
Gets the repeat test for this schema item.
 o getRepeatType()
Gets the repeat type for this schema item.
 o getView()
Gets a graphical user interface component for displaying this schema item.
 o hasAttribute(Class)
Reports whether this field supports a given attribute interface.
 o isDiscardable()
Reports whether this schema item is discardable.
 o setArguments(String)
Sets the constructor arguments for this schema field.
 o setClassname(String)
Sets the class name for this schema field.
 o setDiscardable(boolean)
Controls whether this schema item is discardable.
 o setName(String)
Sets the new name of this schema item.
 o setOptionTest(String)
Sets the option test for this schema item.
 o setRepeatTest(String)
Sets the repeat test for this schema item.
 o setRepeatType(byte)
Sets the repeat type for this schema item.

Constructors

 o SchemaClassField
 public SchemaClassField()
Creates a SchemaClassField instance.

Methods

 o emitDeclaration
 public void emitDeclaration(PrintWriter sourceCodeStream)
Emits source code to declare storage for the field or record data represented by this schema item.

Parameters:
sourceCodeStream - The source code output stream.
Overrides:
emitDeclaration in class SchemaItem
 o emitGetterMethod
 public void emitGetterMethod(PrintWriter sourceCodeStream)
Emits source code to get the field or record data represented by this schema item.

Parameters:
sourceCodeStream - The source code output stream.
Overrides:
emitGetterMethod in class SchemaItem
 o emitReadLegacyCode
 public void emitReadLegacyCode(PrintWriter sourceCodeStream,
                                String inputStreamName)
Emits source code to read the field or record data represented by this schema item.

Parameters:
sourceCodeStream -
The source code output stream.
inputStreamName -
The input stream name to be used by the emitted code.
Overrides:
emitReadLegacyCode in class SchemaItem
 o getView
 public ViewForItem getView()
Gets a graphical user interface component for displaying this schema item.

Returns:
A view component for displaying this schema item.
Overrides:
getView in class SchemaItem
 o getAttributesAsText
 public String getAttributesAsText()
Gets a string representing the attributes of this class field.

Returns:
A string representing the attributes of this class field.
Overrides:
getAttributesAsText in class SchemaItem
 o hasAttribute
 public boolean hasAttribute(Class attributeClass)
Reports whether this field supports a given attribute interface.

Parameters:
attributeClass - The attribute interface to be tested.
Returns:
true if this field supports the attribute interface; false otherwise.
Overrides:
hasAttribute in class SchemaItem
 o getClassname
 public String getClassname()
Gets the class name for this schema field.

Returns:
The class name for this schema field.
 o setClassname
 public void setClassname(String newClassname)
Sets the class name for this schema field.

Parameters:
newClassname - The new class name of this schema field.
 o getArguments
 public String getArguments()
Gets the constructor arguments for this schema field.

Returns:
The constructor arguments for this schema field.
 o setArguments
 public void setArguments(String newArgs)
Sets the constructor arguments for this schema field.

Parameters:
newArgs - The new constructor arguments for this schema field.
 o isDiscardable
 public boolean isDiscardable()
Reports whether this schema item is discardable.

Returns:
true if this schema item is discardable; false otherwise.
 o setDiscardable
 public void setDiscardable(boolean newState)
Controls whether this schema item is discardable.

Parameters:
newState - true if this schema item should be made discardable; false otherwise.
 o getName
 public String getName()
Returns the name of this schema item.

Returns:
The name of this schema item.
 o setName
 public void setName(String newName)
Sets the new name of this schema item.

Parameters:
newName - The new name for this schema item.
 o getOptionTest
 public String getOptionTest()
Gets the option test for this schema item.

If the option test is null (the default), this schema item is always expected to appear in the data stream. If the option test is not null, it specifies when the item is expected.

The option test must be a valid Java boolean expression. It may use constants or values of other schema items.

Returns:
The option test for this schema item.
 o setOptionTest
 public void setOptionTest(String newTest)
Sets the option test for this schema item.

Parameters:
newTest - The new option test for this schema item.
 o getRepeatTest
 public String getRepeatTest()
Gets the repeat test for this schema item. The repeat test specifies conditions for reading a schema item more than once, when certain values are set for the repeat type.

If the repeat type value is REPEAT_N_TIMES, the repeat test must be a valid Java numeric expression. It may use constants, or numeric values of other schema items.

If the repeat type value is REPEAT_WHILE_X or REPEAT_UNTIL_X, the repeat test must be a valid Java boolean expression. It may use constants, or boolean values of other schema items.

If the repeat type value is any other value, the repeat test is ignored.

Returns:
The repeat test for this schema item.
See Also:
RepeatAttribute
 o getRepeatType
 public byte getRepeatType()
Gets the repeat type for this schema item. The repeat type controls the number of times that a schema item is read from the input stream.

Returns:
The repeat type for this schema item.
See Also:
RepeatAttribute
 o setRepeatTest
 public void setRepeatTest(String newTest)
Sets the repeat test for this schema item.

Parameters:
newTest - The new repeat test for this schema item.
See Also:
RepeatAttribute
 o setRepeatType
 public void setRepeatType(byte newType)
Sets the repeat type for this schema item.

Parameters:
newType - The new repeat type for this schema item.
Throws: IllegalArgumentException
Thrown if the new repeat type is not one of the legal values for a repeat type, as defined in interface RepeatAttribute.
See Also:
RepeatAttribute

All Packages  Class Hierarchy  This Package  Previous  Next  Index