All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.tools.dataFormatWizard.SchemaAssertion

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

public class SchemaAssertion
extends SchemaField
implements OptionAttribute
The SchemaAssertion class contains an assertion to be thrown at a given point within a file schema. It will normally have an option test to determine whether the assertion should actually be thrown.

See Also:
SchemaItem, OptionAttribute

Constructor Index

 o SchemaAssertion()
Creates a SchemaAssertion 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 getAttributesAsText()
Gets a String representing the attributes of this assertion.
 o getOptionTest()
Gets the option test for this schema item.
 o getView()
Gets a graphical user interface component for displaying this schema item.
 o hasAttribute(Class)
Reports whether this assertion supports a given attribute interface.
 o setOptionTest(String)
Sets the option test for this schema item.

Constructors

 o SchemaAssertion
 public SchemaAssertion()
Creates a SchemaAssertion 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. Assertion items do not require storage.

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. Assertion items do not require a getter method.

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 assertion.

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

Returns:
true if the assertion supports the attribute interface; false otherwise.
Overrides:
hasAttribute in class SchemaItem
 o getOptionTest
 public String getOptionTest()
Gets the option test for this schema item.

If the option test is null (the default), this schema assertion will always be performed. If the option test is not null, it specifies when the assertion is to be done.

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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index