All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.tools.dataFormatWizard.SchemaItem

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

public abstract class SchemaItem
extends Object
implements PropertyChangeAnnouncer, Serializable, Transferable
The SchemaItem class is an abstract superclass for objects that comprise a file schema.


Variable Index

 o EMITTED_READ_LEGACY_STREAM_NAME
The default name for data stream variables in emitted reader code.

Constructor Index

 o SchemaItem()

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener object to the listener list.
 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 firePropertyChange(String, Object, Object)
Reports a bound property update to any registered listeners.
 o getAttributesAsText()
Gets a String representing the attributes of this schema item.
 o getParentItem()
Gets the parent item for this schema item.
 o getTransferData(DataFlavor)
Returns an object that represents the data to be transferred.
 o getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors in which the data can be provided.
 o getView()
Gets a graphical user interface component for displaying this schema item.
 o hasAttribute(Class)
Reports whether this schema item supports a given attribute interface.
 o insertNewItem(SchemaItem)
Inserts a new item into the schema:
 o isDataFlavorSupported(DataFlavor)
Reports whether the specified data flavor is supported for this object.
 o isSchemaItem(Object)
Reports whether a given object is a subclass of of a given class.
 o newItemFromString(String)
Converts a string into a schema item.
 o removeItem(SchemaItem)
Removes an item from the schema.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a PropertyChangeListener object from the listener list.
 o setParentItem(SchemaItem)
Sets the new parent item for this schema item.

Variables

 o EMITTED_READ_LEGACY_STREAM_NAME
 public static final String EMITTED_READ_LEGACY_STREAM_NAME
The default name for data stream variables in emitted reader code.

Constructors

 o SchemaItem
 public SchemaItem()

Methods

 o getParentItem
 public SchemaItem getParentItem()
Gets the parent item for this schema item.

Returns:
The parent item for this schema item.
 o setParentItem
 public void setParentItem(SchemaItem newParent)
Sets the new parent item for this schema item.

Parameters:
newParent - The new parent item for this schema item.
 o getAttributesAsText
 public abstract String getAttributesAsText()
Gets a String representing the attributes of this schema item.

Returns:
A String representing the attributes of this schema item.
 o isSchemaItem
 public static boolean isSchemaItem(Object candidate)
Reports whether a given object is a subclass of of a given class.

Returns:
true if the object is a subclass of the given class; false otherwise.
 o newItemFromString
 public static SchemaItem newItemFromString(String string)
Converts a string into a schema item.

Parameters:
string - A string containing the serialized data for a schema item.
Returns:
The schema item serialized within the string; or null if the string does not contain a valid serialized item.
 o insertNewItem
 public abstract void insertNewItem(SchemaItem newItem)
Inserts a new item into the schema:

Parameters:
newItem - The new item to be added to the schema.
 o removeItem
 public abstract void removeItem(SchemaItem item)
Removes an item from the schema.

Parameters:
item - The item to be removed from the schema.
 o emitDeclaration
 public abstract 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.
 o emitGetterMethod
 public abstract 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.
 o emitReadLegacyCode
 public abstract 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.
 o getView
 public abstract ViewForItem getView()
Gets a graphical user interface component for displaying this schema item.

Returns:
A view component for displaying this schema item.
 o hasAttribute
 public abstract boolean hasAttribute(Class attributeClass)
Reports whether this schema item supports a given attribute interface.

Returns:
true if the schema item supports the attribute interface; false otherwise.
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener object to the listener list.

Parameters:
listener - The listener to be added.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener object from the listener list.

Parameters:
listener - The listener object to be removed.
 o firePropertyChange
 public void firePropertyChange(String propertyName,
                                Object oldValue,
                                Object newValue)
Reports a bound property update to any registered listeners. No event should be fired if the old and new values are are equal and non-null.

Parameters:
propertyName - The name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.
 o getTransferDataFlavors
 public DataFlavor[] getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors in which the data can be provided. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).

Returns:
An array of data flavors in which this data can be transferred.
 o isDataFlavorSupported
 public boolean isDataFlavorSupported(DataFlavor flavor)
Reports whether the specified data flavor is supported for this object.

Parameters:
flavor - The requested flavor for the data.
Returns:
true if the specified data flavor is supported; false otherwise.
 o getTransferData
 public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
Returns an object that represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.

Parameters:
flavor - The requested flavor for the data.
Returns:
An object that represents the data to be transferred.
Throws: IOException
Thrown if the data is no longer available in the requested flavor.
Throws: UnsupportedFlavorException
Thrown if the requested data flavor is not supported.

All Packages  Class Hierarchy  This Package  Previous  Next  Index