moos.ssds.model
Class DataContainer

java.lang.Object
  extended bymoos.ssds.model.DataContainer
All Implemented Interfaces:
IDataContainer, IDateRange, IDescription, ResourceOwner, java.io.Serializable, ValueObject
Direct Known Subclasses:
DataFile, DataStream

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

Description

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: DataContainer.java,v 1.12 2004/02/20 01:04:18 kgomes Exp $
Author:
Brian Schlining
See Also:
Serialized Form

Field Summary
protected  java.lang.String ojbConcreteClass
          Description of the Field
 
Constructor Summary
DataContainer()
          Constructor for the DataContainer object
 
Method Summary
 void addConsumer(IDataProducer producer)
          Add a Producer that consumed this DataContainer.
 void addRecordDescription(IRecordDescription rd)
           
 void addResource(IResource dr)
          Adds a feature to the Resource attribute of the DataContainer object
 IPerson getContact()
          Gets the contact attribute of the DataContainer object
 IDataProducer getCreator()
          Gets the creator attribute of the DataContainer object
 java.lang.Long getDataProducerId()
          Gets the dataProducerId attribute of the DataContainer object
 IDateRange getDateRange()
          Gets the dateRange attribute of the DataContainer object
 java.lang.String getDescription()
          Gets the description attribute of the DataContainer object
 java.util.Date getEndDate()
          Gets the endDate attribute of the DataContainer object
 java.lang.Long getId()
          Gets the id attribute of the DataContainer object
 java.lang.String getName()
          Gets the name attribute of the DataContainer object
 IPerson getPerson()
          Gets the person attribute of the DataContainer object
 java.lang.Long getPersonId()
          Gets the personId attribute of the DataContainer object
 IRecordDescription getRecordDescription()
          Returns the first recordDescirption in the interanl list
 java.util.Collection getRecordDescriptions()
          WARNING:This method is for OJB use not for production code.
 java.util.Date getStartDate()
          Gets the startDate attribute of the DataContainer object
 boolean isOriginal()
          Is this a original data? Original data is usually produced directly from a LogicalInstrumentDeployment
 java.util.Collection listAllConsumers()
          Returns a Collection of Producers that used this data set.
 java.util.Collection listAllInputs()
          Lists the DataContainers that were used by the chain of producers that created this instance
 java.util.Collection listAllOutputs()
           
 java.util.Collection listAllProducers()
          Returns a Collection of Producers that produced this data set.
 java.util.Collection listDerivedOutputs()
          Lists all DataContainers that used data or data derived from this container.
 java.util.Collection listDirectConsumers()
          Get the Producers that used this dataset directly.
 java.util.Collection listDirectInputs()
           
 java.util.Collection listIndirectConsumers()
          Description of the Method
 java.util.Collection listIndirectCreators()
           
 java.util.Collection listIndirectInputs()
           
 java.util.Collection listRecordDescriptions()
           
 java.util.Collection listResources()
          List all the configuration files associatied with this device
 void removeConsumer(IDataProducer producer)
          Description of the Method
 void removeRecordDescription(IRecordDescription rd)
           
 void removeResource(IResource dr)
          Description of the Method
 void setContact(IPerson contact)
          Sets the contact attribute of the DataContainer object
 void setCreator(IDataProducer creator)
          Sets the creator attribute of the DataContainer object
 void setDataProducerId(java.lang.Long dataProducerId)
          Sets the dataProducerId attribute of the DataContainer object
 void setDescription(java.lang.String description)
          Sets the description attribute of the DataContainer object
 void setEndDate(java.util.Date endDate)
          Sets the endDate attribute of the DataContainer object
 void setId(java.lang.Long id)
          Sets the id attribute of the DataContainer object
 void setName(java.lang.String name)
          Sets the name attribute of the DataContainer object
 void setOriginal(boolean original)
          Sets the original attribute of the DataContainer object
 void setPerson(IPerson person)
          Sets the person attribute of the DataContainer object
 void setPersonId(java.lang.Long personId)
          Sets the personId attribute of the DataContainer object
 void setRecordDescription(IRecordDescription recordDescription)
          Clears all recordDescriptions already stored and adds the recordDescription supplied as an argument.
 void setRecordDescriptions(java.util.Collection recordDescriptions)
          WARNING:This method is for OJB use, not for production code.
 void setStartDate(java.util.Date startDate)
          Sets the startDate attribute of the DataContainer object
 java.lang.String toString()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ojbConcreteClass

protected java.lang.String ojbConcreteClass
Description of the Field

Constructor Detail

DataContainer

public DataContainer()
Constructor for the DataContainer object

Method Detail

addResource

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

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

addConsumer

public void addConsumer(IDataProducer producer)
Add a Producer that consumed this DataContainer. Only add Producers that actually use this container, not producers that use a product derived from this (a.k.a A Child DataContainer)

Specified by:
addConsumer in interface IDataContainer
Parameters:
producer - A Producer that consumed this DataContainer to produce another dataContainer.

getContact

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

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

getCreator

public IDataProducer getCreator()
Gets the creator attribute of the DataContainer object

Specified by:
getCreator in interface IDataContainer
Returns:
The creator value

getDataProducerId

public java.lang.Long getDataProducerId()
Gets the dataProducerId attribute of the DataContainer object

Specified by:
getDataProducerId in interface IDataContainer
Returns:
The dataProducerId value

getDateRange

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

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

getDescription

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

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

getEndDate

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

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

getId

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

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

getName

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

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

getPerson

public IPerson getPerson()
Gets the person attribute of the DataContainer object

Specified by:
getPerson in interface IDataContainer
Returns:
The person value

getPersonId

public java.lang.Long getPersonId()
Gets the personId attribute of the DataContainer object

Specified by:
getPersonId in interface IDataContainer
Returns:
The personId value

getRecordDescription

public IRecordDescription getRecordDescription()
Returns the first recordDescirption in the interanl list

Specified by:
getRecordDescription in interface IDataContainer
Returns:
The recordDescription value

getStartDate

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

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

isOriginal

public boolean isOriginal()
Is this a original data? Original data is usually produced directly from a LogicalInstrumentDeployment

Specified by:
isOriginal in interface IDataContainer
Returns:
The original value

listAllInputs

public java.util.Collection listAllInputs()
Lists the DataContainers that were used by the chain of producers that created this instance

Specified by:
listAllInputs in interface IDataContainer
Returns:
a Collection of Producers

listDerivedOutputs

public java.util.Collection listDerivedOutputs()
Lists all DataContainers that used data or data derived from this container.

Specified by:
listDerivedOutputs in interface IDataContainer
Returns:
DataContainersthat used data from this instance.

listAllConsumers

public java.util.Collection listAllConsumers()
Returns a Collection of Producers that used this data set. Note this only returns a copy of the Collection so that adds or removes will have no affect on what's persisted. Use addToDestiny() and removeFromDestiny() instead.

Specified by:
listAllConsumers in interface IDataContainer
Returns:
Description of the Return Value

listDirectConsumers

public java.util.Collection listDirectConsumers()
Get the Producers that used this dataset directly. Only a copy of a Collection is returned, so adds or removes to it will have no affect on persistance.

Specified by:
listDirectConsumers in interface IDataContainer
Returns:
A Collection of Producers

listAllProducers

public java.util.Collection listAllProducers()
Returns a Collection of Producers that produced this data set. Note this only returns a copy of the History. Adds or removes on this copy will have no effect on what's persisted.

Specified by:
listAllProducers in interface IDataContainer
Returns:
Description of the Return Value

listIndirectConsumers

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

Specified by:
listIndirectConsumers in interface IDataContainer
Returns:
Description of the Return Value

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

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 DataContainer object

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

setDataProducerId

public void setDataProducerId(java.lang.Long dataProducerId)
Sets the dataProducerId attribute of the DataContainer object

Specified by:
setDataProducerId in interface IDataContainer
Parameters:
dataProducerId - The new dataProducerId value

setDescription

public void setDescription(java.lang.String description)
Sets the description attribute of the DataContainer 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 DataContainer 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 DataContainer 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 DataContainer object

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

setOriginal

public void setOriginal(boolean original)
Sets the original attribute of the DataContainer object

Specified by:
setOriginal in interface IDataContainer
Parameters:
original - The new original value

setPerson

public void setPerson(IPerson person)
Sets the person attribute of the DataContainer object

Specified by:
setPerson in interface IDataContainer
Parameters:
person - The new person value

setPersonId

public void setPersonId(java.lang.Long personId)
Sets the personId attribute of the DataContainer object

Specified by:
setPersonId in interface IDataContainer
Parameters:
personId - The new personId value

setRecordDescription

public void setRecordDescription(IRecordDescription recordDescription)
Clears all recordDescriptions already stored and adds the recordDescription supplied as an argument. This makes it easier to work with DataContainers that have a single record description

Specified by:
setRecordDescription in interface IDataContainer
Parameters:
recordDescription - The new recordDescription value
See Also:
addRecordDescription

setStartDate

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

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

toString

public java.lang.String toString()
Description of the Method

Specified by:
toString in interface IDataContainer
Returns:
Description of the Return Value

removeConsumer

public void removeConsumer(IDataProducer producer)
Description of the Method

Specified by:
removeConsumer in interface IDataContainer
Parameters:
producer - Description of the Parameter

setCreator

public void setCreator(IDataProducer creator)
Sets the creator attribute of the DataContainer object

Specified by:
setCreator in interface IDataContainer
Parameters:
creator - The new creator value

listIndirectCreators

public java.util.Collection listIndirectCreators()
Specified by:
listIndirectCreators in interface IDataContainer

getRecordDescriptions

public java.util.Collection getRecordDescriptions()
WARNING:This method is for OJB use not for production code. Use listRecordDescription instead.

Specified by:
getRecordDescriptions in interface IDataContainer

setRecordDescriptions

public void setRecordDescriptions(java.util.Collection recordDescriptions)
WARNING:This method is for OJB use, not for production code. Use addRecordDescription and removeRecordDescription instead.

Specified by:
setRecordDescriptions in interface IDataContainer

addRecordDescription

public void addRecordDescription(IRecordDescription rd)
Specified by:
addRecordDescription in interface IDataContainer

removeRecordDescription

public void removeRecordDescription(IRecordDescription rd)
Specified by:
removeRecordDescription in interface IDataContainer

listDirectInputs

public java.util.Collection listDirectInputs()
Specified by:
listDirectInputs in interface IDataContainer

listIndirectInputs

public java.util.Collection listIndirectInputs()
Specified by:
listIndirectInputs in interface IDataContainer

listRecordDescriptions

public java.util.Collection listRecordDescriptions()
Specified by:
listRecordDescriptions in interface IDataContainer

listAllOutputs

public java.util.Collection listAllOutputs()
Specified by:
listAllOutputs in interface IDataContainer