moos.ssds.model
Class DataProducer

java.lang.Object
  extended bymoos.ssds.model.DataProducer
All Implemented Interfaces:
IDataProducer, IDateRange, IDescription, ResourceOwner, java.io.Serializable, ValueObject
Direct Known Subclasses:
Deployment, HumanIntervention, ProcessRun

public abstract class DataProducer
extends java.lang.Object
implements ResourceOwner, java.io.Serializable, IDateRange, IDescription, ValueObject, IDataProducer

Description

A Producer generates DataContainers

UML


 

License

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement. This information should not be published or distributed to third parties without specific written permission from MBARI.

Copyright 2003 MBARI. MBARI Proprietary Information. All rights reserved.

Version:
$Id: DataProducer.java,v 1.10 2004/02/04 22:37:15 mccann Exp $
Author:
Brian Schlining
See Also:
Serialized Form

Field Summary
protected  java.lang.String ojbConcreteClass
          Description of the Field
 
Constructor Summary
DataProducer()
          Default contructor required for XML marshalling unmarshalling.
 
Method Summary
 void addEvent(IEvent event)
          Adds a feature to the Event attribute of the DataProducer object
 void addInput(IDataContainer dataContainer)
          Add a dataContainer as a source of data used by the producer.
 void addOutput(IDataContainer dataContainer)
          Add a dataContainer as a Product generated by this producer.
 void addResource(IResource dr)
          Adds a feature to the Resource attribute of the DataProducer object
 IPerson getContact()
          Gets the contact attribute of the DataProducer object
 java.lang.Long getContactId()
           
 IDateRange getDateRange()
          Gets the dateRange attribute of the DataProducer object
 java.lang.String getDescription()
          Gets the description attribute of the DataProducer object
 java.util.Date getEndDate()
          Gets the endDate attribute of the DataProducer object
 java.lang.Long getId()
          Gets the id attribute of the DataProducer object
 java.lang.String getName()
          Gets the name attribute of the DataProducer object
 java.lang.String getOjbConcreteClass()
          Gets the ojbConcreteClass attribute of the DataProducer object
 java.util.Date getStartDate()
          Gets the startDate attribute of the DataProducer object
 java.util.Collection listAllOutputs()
           
 IDataContainer listBestOutput()
          For the case when a client (such as HOOVES OutputTabShower) wants just the best output to use.
 java.util.Collection listDerivedOutputs()
          Returns a list of derived products.
 java.util.Collection listEvents()
          Description of the Method
 java.util.Collection listInputs()
          Access to all the DataContainers used by this producer.
 java.util.Collection listOutputs()
          List all the DataContainers produced by a single DataProducer.
 java.util.Collection listResources()
          List all the configuration files associatied with this device
 void removeEvent(IEvent event)
          Description of the Method
 void removeInput(IDataContainer dataContainer)
          Remove a dataCOntainer from the list of data sources used by a Producer.
 void removeOutput(IDataContainer dataContainer)
          Remove a dataContainer from the list of products generated by this producer Do NOT get tht output collection and remove direclty from it.
 void removeResource(IResource dr)
          Description of the Method
 void setContact(IPerson contact)
          Sets the contact attribute of the DataProducer object
 void setContactId(java.lang.Long contactId)
           
 void setDescription(java.lang.String description)
          Sets the description attribute of the DataProducer object
 void setEndDate(java.util.Date endDate)
          Sets the endDate attribute of the DataProducer object
 void setId(java.lang.Long id)
          Sets the id attribute of the DataProducer object
 void setName(java.lang.String name)
          Sets the name attribute of the DataProducer object
 void setOjbConcreteClass(java.lang.String ojbConcreteClass)
          Sets the ojbConcreteClass attribute of the DataProducer object
 void setStartDate(java.util.Date startDate)
          Sets the startDate attribute of the DataProducer object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ojbConcreteClass

protected java.lang.String ojbConcreteClass
Description of the Field

Constructor Detail

DataProducer

public DataProducer()
Default contructor required for XML marshalling unmarshalling.

Method Detail

addEvent

public void addEvent(IEvent event)
Adds a feature to the Event attribute of the DataProducer object

Specified by:
addEvent in interface IDataProducer
Parameters:
event - The feature to be added to the Event attribute

addInput

public void addInput(IDataContainer dataContainer)
Add a dataContainer as a source of data used by the producer. WARNING: DO NOT get the input collection, using listInputs()and add directly to it!! Use this method only. listInputs() returns a copy of the internal collection of inputs.

Specified by:
addInput in interface IDataProducer
Parameters:
dataContainer - The dataContainer to be added.

addOutput

public void addOutput(IDataContainer dataContainer)
Add a dataContainer as a Product generated by this producer. DONOT get the output collection and add direclty to it. Use this method instead

Specified by:
addOutput in interface IDataProducer
Parameters:
dataContainer - The container to be listed as a product of this producer.

addResource

public void addResource(IResource dr)
Adds a feature to the Resource attribute of the DataProducer object

Specified by:
addResource in interface ResourceOwner
Parameters:
dr - The feature to be added to the Resource attribute

getContact

public IPerson getContact()
Gets the contact attribute of the DataProducer object

Specified by:
getContact in interface IDataProducer
Returns:
The contact value

getContactId

public java.lang.Long getContactId()
Specified by:
getContactId in interface IDataProducer

getDateRange

public IDateRange getDateRange()
Gets the dateRange attribute of the DataProducer object

Specified by:
getDateRange in interface IDateRange
Returns:
The dateRange value

getDescription

public java.lang.String getDescription()
Gets the description attribute of the DataProducer object

Specified by:
getDescription in interface IDescription
Returns:
The description value

getEndDate

public java.util.Date getEndDate()
Gets the endDate attribute of the DataProducer object

Specified by:
getEndDate in interface IDateRange
Returns:
The endDate value

getId

public java.lang.Long getId()
Gets the id attribute of the DataProducer object

Specified by:
getId in interface ValueObject
Returns:
The id value

getName

public java.lang.String getName()
Gets the name attribute of the DataProducer object

Specified by:
getName in interface IDescription
Returns:
The name value

getOjbConcreteClass

public java.lang.String getOjbConcreteClass()
Gets the ojbConcreteClass attribute of the DataProducer object

Specified by:
getOjbConcreteClass in interface IDataProducer
Returns:
The ojbConcreteClass value

getStartDate

public java.util.Date getStartDate()
Gets the startDate attribute of the DataProducer object

Specified by:
getStartDate in interface IDateRange
Returns:
The startDate value

listAllOutputs

public java.util.Collection listAllOutputs()
Specified by:
listAllOutputs in interface IDataProducer
Returns:
A collection of DataContainers that include the outputs of this DataContainer and its derived Outputs.

listDerivedOutputs

public java.util.Collection listDerivedOutputs()
Returns a list of derived products. Derived products are DataContainers which are derived from the outputs (which are also DataContainers. For Example:
 // p1 is the container we're really interested in
 // We'll add c1 as an output
 DataProducer p1 = new DataProducer();
 DataContainer c1 = new DataContainer();
 p1.addOutput(c1);

 // Another dataproducer uses c1 as an input and c2 as an output
 DataProcuder p2 = new DataProducer();
 DataContainer c2 = new DataContainer();
 p2.addInput(c1);
 p2.addOutput(c2);

 // Let's go back to our original DataProducer, p1
 // This should return a collection containing only c2
 Collection prods = p1.listDerivedProducts();

Specified by:
listDerivedOutputs in interface IDataProducer
Returns:
Collection of all products derived from the DataContainers available in listOutputs()

listBestOutput

public IDataContainer listBestOutput()
For the case when a client (such as HOOVES OutputTabShower) wants just the best output to use. HOOVES uses the best output to simplify drawing the data lineage graph.
  • Best: DODS Url
  • Better: Direct Url
  • O.K.: File:// Url or local file name

Specified by:
listBestOutput in interface IDataProducer
Returns:
a DataContainer that best represents the output (DODS, then Url, then file)

listEvents

public java.util.Collection listEvents()
Description of the Method

Specified by:
listEvents in interface IDataProducer
Returns:
Description of the Return Value

listInputs

public java.util.Collection listInputs()
Access to all the DataContainers used by this producer. This returns a copy of the internal Collection. So adding or removing from the Collection will not affect the internal list. Use addInput or removeInput to change the inputs.

Specified by:
listInputs in interface IDataProducer
Returns:
A Collection of DataContainers

listOutputs

public java.util.Collection listOutputs()
List all the DataContainers produced by a single DataProducer. This returns a copy of the internal Collection. So adding or removing from the Collection will not affect the internal list. Use addOutput or removeOutput to change the inputs.

Specified by:
listOutputs in interface IDataProducer
Returns:
A Collection of DataContainers

listResources

public java.util.Collection listResources()
List all the configuration files associatied with this device

Specified by:
listResources in interface ResourceOwner
Returns:
Description of the Return Value

removeEvent

public void removeEvent(IEvent event)
Description of the Method

Specified by:
removeEvent in interface IDataProducer
Parameters:
event - Description of the Parameter

removeInput

public void removeInput(IDataContainer dataContainer)
Remove a dataCOntainer from the list of data sources used by a Producer. DO NOT get the input collection and remove direclty from it. Use this method instead!

Specified by:
removeInput in interface IDataProducer
Parameters:
dataContainer - The dataContainer to be removed

removeOutput

public void removeOutput(IDataContainer dataContainer)
Remove a dataContainer from the list of products generated by this producer Do NOT get tht output collection and remove direclty from it. Use this method instead.

Specified by:
removeOutput in interface IDataProducer
Parameters:
dataContainer - The dataContainer to be removed from the product list

removeResource

public void removeResource(IResource dr)
Description of the Method

Specified by:
removeResource in interface ResourceOwner
Parameters:
dr - Description of the Parameter

setContact

public void setContact(IPerson contact)
Sets the contact attribute of the DataProducer object

Specified by:
setContact in interface IDataProducer
Parameters:
contact - The new contact value

setContactId

public void setContactId(java.lang.Long contactId)
Specified by:
setContactId in interface IDataProducer

setDescription

public void setDescription(java.lang.String description)
Sets the description attribute of the DataProducer object

Specified by:
setDescription in interface IDescription
Parameters:
description - The new description value

setEndDate

public void setEndDate(java.util.Date endDate)
Sets the endDate attribute of the DataProducer object

Specified by:
setEndDate in interface IDateRange
Parameters:
endDate - The new endDate value

setId

public void setId(java.lang.Long id)
Sets the id attribute of the DataProducer object

Specified by:
setId in interface ValueObject
Parameters:
id - The new id value

setName

public void setName(java.lang.String name)
Sets the name attribute of the DataProducer object

Specified by:
setName in interface IDescription
Parameters:
name - The new name value

setOjbConcreteClass

public void setOjbConcreteClass(java.lang.String ojbConcreteClass)
Sets the ojbConcreteClass attribute of the DataProducer object

Specified by:
setOjbConcreteClass in interface IDataProducer
Parameters:
ojbConcreteClass - The new ojbConcreteClass value

setStartDate

public void setStartDate(java.util.Date startDate)
Sets the startDate attribute of the DataProducer object

Specified by:
setStartDate in interface IDateRange
Parameters:
startDate - The new startDate value