net.sourceforge.esw.collection
Class MetaCollection

java.lang.Object
  |
  +--net.sourceforge.esw.util.SupportObject
        |
        +--net.sourceforge.esw.graph.Node
              |
              +--net.sourceforge.esw.collection.MetaCollection
All Implemented Interfaces:
java.lang.Cloneable, ICloneable, IMetaCollection, INode, ISupportObject, java.io.Serializable

public class MetaCollection
extends Node
implements IMetaCollection

Default implementation of the IMetaCollection interface.

Provides the abilities to retrieve data from any data source, anywhere within the enterprise.

An IMetaCollection instance is an INode instance. All the abilities of the INode architecture are availiable to the IMetaCollection architecture. Since nearly all data structures can be represented as a graph of one sort or another, IMetaCollection instances can contain any kind of data.

Once you set an ITransducer instance on an IMetaCollection you can get() and put() (transduce) data from/to the specified external data source.

Initially, IMetaCollection instances have a DefaultTransducer instance assigned to it during their creational pattern. This DefaultTransducer instance throws TransducerExceptions during any get or put method invocation to handle accedental use of transduction without a viable ITransducer instance assigned to this IMetaCollection instance.

To create an instance of this IMetaCollection, see MetaFactory.createMetaCollection().

Examples:

    IMetaCollection meta = MetaFactory.createMetaCollection();
 

See Also:
MetaFactory, INode, ITransducer, Serialized Form

Field Summary
protected  ITransducer transducer
          Represents the operations against a data source.
 
Fields inherited from class net.sourceforge.esw.graph.Node
list, map, parents, value
 
Fields inherited from class net.sourceforge.esw.util.SupportObject
id, properties, propertyChildren, propertyListeners, vetoableChildren, vetoableListeners
 
Constructor Summary
protected MetaCollection()
          Creates a new MetaCollection instance.
 
Method Summary
 void get()
          Gets the data referrences by the current ITransducer instance into this IMetaCollection instance.
 ITransducer getTransducer()
          Returns the ITransducer instance used by this IMetaCollection instance during the put() or get() method invocations.
 void put()
          Puts the data contained within this IMetaCollection instance into the data source referenced by the current ITransducer instance.
 void setTransducer(ITransducer aTransducer)
          Sets the ITransducer instance to be used by this IMetaCollection instance during the put() or get() method invocations.
 
Methods inherited from class net.sourceforge.esw.graph.Node
acceptVisitor, add, add, addParent, clear, clone, containsID, equals, get, get, getList, getParents, getValue, hashCode, hashCodeForNode, isEmpty, iterator, nodesEqual, remove, removeParent, setValue, size, toString
 
Methods inherited from class net.sourceforge.esw.util.SupportObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getID, getProperty, getPropertySize, propertyKeys, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setID, setProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.esw.graph.INode
acceptVisitor, add, add, addParent, clear, containsID, get, get, getList, getParents, getValue, isEmpty, iterator, remove, removeParent, setValue, size
 
Methods inherited from interface net.sourceforge.esw.util.ISupportObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getID, getProperty, getPropertySize, propertyKeys, removeProperty, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setID, setProperty
 
Methods inherited from interface net.sourceforge.esw.util.ICloneable
clone
 

Field Detail

transducer

protected ITransducer transducer
Represents the operations against a data source.
Constructor Detail

MetaCollection

protected MetaCollection()
Creates a new MetaCollection instance.
Method Detail

setTransducer

public void setTransducer(ITransducer aTransducer)
Sets the ITransducer instance to be used by this IMetaCollection instance during the put() or get() method invocations.

Fires a IMetaResources.TRANSDUCER_PROPERTY property change event.

Specified by:
setTransducer in interface IMetaCollection
Parameters:
aTransducer - the ITransducer instance to be used for transduction.
See Also:
getTransducer()

getTransducer

public ITransducer getTransducer()
Returns the ITransducer instance used by this IMetaCollection instance during the put() or get() method invocations.

Specified by:
getTransducer in interface IMetaCollection
Returns:
the ITransducer instance for this IMetaCollection instance.
See Also:
setTransducer( ITransducer )

put

public void put()
         throws TransducerException
Puts the data contained within this IMetaCollection instance into the data source referenced by the current ITransducer instance.

Specified by:
put in interface IMetaCollection
Throws:
TransducerException - if an error occurred during the execution of put on the ITransducer instance.
See Also:
get()

get

public void get()
         throws TransducerException
Gets the data referrences by the current ITransducer instance into this IMetaCollection instance.

Specified by:
get in interface IMetaCollection
Throws:
TransducerException - if an error occurred during the execution of get on the ITransducer instance.
See Also:
put()


Copyright 2002 Free Software Foundation. All Rights Reserved.