All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.tools.dataFormatWizard.SchemaPrimitiveField
java.lang.Object
|
+----com.ibm.beans.tools.dataFormatWizard.SchemaItem
|
+----com.ibm.beans.tools.dataFormatWizard.SchemaField
|
+----com.ibm.beans.tools.dataFormatWizard.SchemaPrimitiveField
- public class SchemaPrimitiveField
- extends SchemaField
- implements PrimitiveTypeAttribute, DiscardAttribute, NameAttribute, RepeatAttribute
The SchemaPrimitiveField represents a field expected at a given point
within a file schema, which can be represented as a Java primitive type.
It contains a type field, used to indicate which Java primitive type can
contain the field value when reading, writing, or storing the stream.
- See Also:
- SchemaItem, PrimitiveTypeAttribute, DiscardAttribute, NameAttribute, RepeatAttribute
-
SchemaPrimitiveField()
- Creates a new SchemaPrimitiveField instance.
-
emitDeclaration(PrintWriter)
- Emits source code to declare storage for the field or record data
represented by this schema item.
-
emitGetterMethod(PrintWriter)
- Emits source code to get the field or record data represented
by this schema item.
-
emitReadLegacyCode(PrintWriter, String)
- Emits source code to read the field or record data represented
by this schema item.
-
getAttributesAsText()
- Gets a String representing the attributes of this primitive field.
-
getName()
- Returns the name of this schema.
-
getPrimitiveType()
- Gets the primitive type for this schema field.
-
getRepeatTest()
- Gets the repeat test for this schema item.
-
getRepeatType()
- Gets the repeat type for this schema item.
-
getView()
- Gets a graphical user interface component for displaying this
schema item.
-
hasAttribute(Class)
- Reports whether this field supports a given attribute interface.
-
isDiscardable()
- Reports whether this schema item is discardable.
-
setDiscardable(boolean)
- Controls whether this schema item is discardable.
-
setName(String)
- Sets the new name of this schema item.
-
setPrimitiveType(String)
- Sets the primitive type for this schema field.
-
setRepeatTest(String)
- Sets the repeat test for this schema item.
-
setRepeatType(byte)
- Sets the repeat type for this schema item.
SchemaPrimitiveField
public SchemaPrimitiveField()
- Creates a new SchemaPrimitiveField instance.
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
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
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
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
getAttributesAsText
public String getAttributesAsText()
- Gets a String representing the attributes of this primitive field.
- Returns:
- A String representing the attributes of this primitive field.
- Overrides:
- getAttributesAsText in class SchemaItem
hasAttribute
public boolean hasAttribute(Class attributeClass)
- Reports whether this field supports a given attribute interface.
- Returns:
- true if the field supports the attribute
interface; false otherwise.
- Overrides:
- hasAttribute in class SchemaItem
getPrimitiveType
public String getPrimitiveType()
- Gets the primitive type for this schema field.
- Returns:
- A string representing the primitive type for this schema
field.
- See Also:
- PrimitiveTypeAttribute
setPrimitiveType
public void setPrimitiveType(String newType) throws IllegalArgumentException
- Sets the primitive type for this schema field.
- Parameters:
- newType - The new primitive type of this schema field.
- Throws: IllegalArgumentException
- Thrown if the new type is not one of the
predefined values defined in the
PrimitiveTypeAttribute interface.
- See Also:
- PrimitiveTypeAttribute
isDiscardable
public boolean isDiscardable()
- Reports whether this schema item is discardable.
- Returns:
- true if this schema item is discardable;
false otherwise.
- See Also:
- DiscardAttribute
setDiscardable
public void setDiscardable(boolean newState)
- Controls whether this schema item is discardable.
- Parameters:
- newState - The new discardability status for this
schema item.
- See Also:
- DiscardAttribute
getName
public String getName()
- Returns the name of this schema.
- Returns:
- A string containing the name of this schema item.
- See Also:
- NameAttribute
setName
public void setName(String newName)
- Sets the new name of this schema item.
- Parameters:
- newName - The new name for this schema item.
- See Also:
- NameAttribute
getRepeatTest
public String getRepeatTest()
- Gets the repeat test for this schema item. The repeat test is a
boolean or numeric expression to control how many times this
item is repeated.
- Returns:
- A string containing the repeat test for this schema item.
- See Also:
- RepeatAttribute
getRepeatType
public byte getRepeatType()
- Gets the repeat type for this schema item.
- Returns:
- The repeat type for this schema item.
- See Also:
- RepeatAttribute
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
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 by interface RepeatAttribute.
- See Also:
- RepeatAttribute
All Packages Class Hierarchy This Package Previous Next Index