Package com.wombat.mama
Class MamaSourceManager
- java.lang.Object
-
- com.wombat.mama.MamaSourceManager
-
- Direct Known Subclasses:
MamaSource
public class MamaSourceManager extends java.lang.Object
A Mama source manager maintains information about a set of data sources, including the quality of the data coming from sources.
-
-
Constructor Summary
Constructors Constructor Description MamaSourceManager()
Constructor - creates a new MamaSourceManager object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSource(MamaSource mamaSource)
Add an existing mama Source to the source manager.void
addSource(MamaSource mamaSource, java.lang.String sourceName)
Add an existing mama Source to the source manager.void
destroy()
MamaSource
findOrCreateSource(java.lang.String sourceName)
Locates an existing mamaSource for a given name, if none exists a new one is created and added to the source manager.MamaSource
findSource(java.lang.String sourceName)
locates an existing source for a given name, if none is found null is returned, The caller has to validate null value on return.int
getSize()
Return the size of the contents of source managerjava.util.Iterator
sourceIterator()
-
-
-
Method Detail
-
findOrCreateSource
public MamaSource findOrCreateSource(java.lang.String sourceName)
Locates an existing mamaSource for a given name, if none exists a new one is created and added to the source manager.- Parameters:
sourceName
- The string identifier for the mamaSource- Returns:
- MamaSource
-
findSource
public MamaSource findSource(java.lang.String sourceName)
locates an existing source for a given name, if none is found null is returned, The caller has to validate null value on return.- Parameters:
sourceName
- The string identifier for the MamaSource- Returns:
- MamaSource
-
addSource
public void addSource(MamaSource mamaSource)
Add an existing mama Source to the source manager. The id of the source will be used instead of the name to identify the source within the source manager.- Parameters:
mamaSource
- an existing mama source
-
addSource
public void addSource(MamaSource mamaSource, java.lang.String sourceName)
Add an existing mama Source to the source manager. The name will used to uniquely identify the source within the source manager.- Parameters:
mamaSource
- an existing mama sourcesourceName
- The string identifier for the MamaSource
-
getSize
public int getSize()
Return the size of the contents of source manager
-
sourceIterator
public java.util.Iterator sourceIterator()
-
destroy
public void destroy()
-
-