net.sourceforge.esw.collection
Class DefaultMetaFactory

java.lang.Object
  |
  +--net.sourceforge.esw.collection.DefaultMetaFactory
All Implemented Interfaces:
IMetaFactory

public class DefaultMetaFactory
extends java.lang.Object
implements IMetaFactory

Defines the methods for creation of IMetaCollection instances.

This is the default implementation of the IMetaFactory interface which simply creates and returns the default ESW framework implementation of the IMetaCollection interface.

This is the Abstract Factory of the Abstract Factory design pattern.

If a client of the MetaFactory or graph package wishes to provide custom implementations of the IMetaCollection interface, they would also need to create a new IMetaFactory implementor. This IMetaFactory implementor would be set on the MetaFactory and would allow the new custom IMetaCollection instances to be used throughout the architecture.

Examples:

   MyCustomMetaFactory customFactory = new MyCustomMetaFactory();
   MetaFactory.setMetaFactory( customFactory );
 


Constructor Summary
DefaultMetaFactory()
           
 
Method Summary
 IMetaCollection createMetaCollection()
          Creates a new empty IMetaCollection instance.
 IMetaCollection createMetaCollection(INode aNode)
          Creates a new IMetaCollection that decorates the given INode instance.
 IMetaCollection createMetaCollection(java.lang.Object aID)
          Creates a new IMetaCollection instance with the specified identifier.
 IMetaCollection createMetaCollection(java.lang.Object aID, java.lang.Object aValue)
          Creates a new IMetaCollection instance with the specified identifier and value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMetaFactory

public DefaultMetaFactory()
Method Detail

createMetaCollection

public IMetaCollection createMetaCollection()
Creates a new empty IMetaCollection instance.

Specified by:
createMetaCollection in interface IMetaFactory
Returns:
an empty IMetaCollection instance.

createMetaCollection

public IMetaCollection createMetaCollection(java.lang.Object aID)
Creates a new IMetaCollection instance with the specified identifier.

Specified by:
createMetaCollection in interface IMetaFactory
Parameters:
aID - the identifier used by the IMetaCollection instance.
Returns:
an new IMetaCollection instance with the specified identifier.

createMetaCollection

public IMetaCollection createMetaCollection(INode aNode)
Creates a new IMetaCollection that decorates the given INode instance.

Specified by:
createMetaCollection in interface IMetaFactory
Parameters:
aNode - the INode instance to wrap in the returned IMetaCollection instance.
Returns:
a new IMetaCollection that decorates the given INode instance.

createMetaCollection

public IMetaCollection createMetaCollection(java.lang.Object aID,
                                            java.lang.Object aValue)
Creates a new IMetaCollection instance with the specified identifier and value.
Specified by:
createMetaCollection in interface IMetaFactory
Parameters:
aID - the identifier used by the IMetaCollection instance.
aValue - the value used by the IMetaCollection instance.
Returns:
an IMetaCollection instance with the specified identifier and value.


Copyright 2002 Free Software Foundation. All Rights Reserved.