moos.ssds.model
Class Resource
java.lang.Object
moos.ssds.model.Resource
- All Implemented Interfaces:
- IDateRange, IDescription, IResource, IUrlAccess, java.io.Serializable, ValueObject
- public class Resource
- extends java.lang.Object
- implements java.io.Serializable, IDateRange, IDescription, IUrlAccess, ValueObject, IResource
A class for maintaining references to just about any type of file. Most likely
to be used for referencing configuration files and technical documents. But
could be used to reference executables, jars, etc.
Use as:
DeviceResource dr = new DeviceResource();
dr.setUrl(new URL("http://predator.shore.mbari.org/auvdata/cfg/flow_20020130.cfg"));
dr.setStartDate(new GregorianCalendar(2002, Calendar.JANUARY, 30, 0, 0, 0).getTime());
dr.setEndDate(new GregorianCalendar(2003, Calendar.JANUARY, 01, 0, 0, 0).getTime());
IResourceOwner owner; // can be a DataContainer, Producer, or Device
owner.addResource(dr);
- Version:
- : $Revision: 1.9 $
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 2002 MBARI.
MBARI Proprietary Information. All rights reserved.
- Author:
- : $Author: achase $
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Resource
public Resource()
Resource
public Resource(java.net.URL url)
Resource
public Resource(IResource rs)
- Copy constructor
- Parameters:
rs - The resource to copy
getResourceOwner
public ResourceOwner getResourceOwner()
- Specified by:
getResourceOwner in interface IResource
- Returns:
- The Owner of this resource. An owner can be a
DataContainer,
a Producer or a Device
setResourceOwner
public void setResourceOwner(ResourceOwner owner)
- Specified by:
setResourceOwner in interface IResource
- Parameters:
owner - The owner of this device. The owner can be a DataContainer,
a Producer or a Device
getUrl
public java.net.URL getUrl()
- Specified by:
getUrl in interface IUrlAccess
- Returns:
- The URL specifying the location of the resource
setUrl
public void setUrl(java.net.URL url)
- Specified by:
setUrl in interface IUrlAccess
- Parameters:
url - The URL specifying the location of this resource
setUrl
public void setUrl(java.lang.String url)
- Specified by:
setUrl in interface IResource
getDateRange
public IDateRange getDateRange()
- Specified by:
getDateRange in interface IDateRange
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription in interface IDescription
setDescription
public void setDescription(java.lang.String description)
- Specified by:
setDescription in interface IDescription
getStartDate
public java.util.Date getStartDate()
- Specified by:
getStartDate in interface IDateRange
setStartDate
public void setStartDate(java.util.Date startDateTime)
- Specified by:
setStartDate in interface IDateRange
getEndDate
public java.util.Date getEndDate()
- Specified by:
getEndDate in interface IDateRange
setEndDate
public void setEndDate(java.util.Date endDateTime)
- Specified by:
setEndDate in interface IDateRange
getName
public java.lang.String getName()
- Specified by:
getName in interface IDescription
setName
public void setName(java.lang.String name)
- Specified by:
setName in interface IDescription
isWebAccessible
public boolean isWebAccessible()
- Specified by:
isWebAccessible in interface IUrlAccess
getId
public java.lang.Long getId()
- Specified by:
getId in interface ValueObject
setId
public void setId(java.lang.Long id)
- Specified by:
setId in interface ValueObject
getResourceType
public java.lang.String getResourceType()
- Specified by:
getResourceType in interface IResource
setResourceType
public void setResourceType(java.lang.String resourceType)
- Specified by:
setResourceType in interface IResource
getPersonId
public java.lang.Long getPersonId()
- Specified by:
getPersonId in interface IResource
setPersonId
public void setPersonId(java.lang.Long personId)
- Specified by:
setPersonId in interface IResource
getDevices
public java.util.Collection getDevices()
- Specified by:
getDevices in interface IResource
setDevices
public void setDevices(java.util.Collection devices)
- Specified by:
setDevices in interface IResource
getDataContainers
public java.util.Collection getDataContainers()
- Specified by:
getDataContainers in interface IResource
setDataContainers
public void setDataContainers(java.util.Collection dataContainers)
- Specified by:
setDataContainers in interface IResource
getDataProducers
public java.util.Collection getDataProducers()
- Specified by:
getDataProducers in interface IResource
setDataProducers
public void setDataProducers(java.util.Collection dataProducers)
- Specified by:
setDataProducers in interface IResource
getPerson
public IPerson getPerson()
- Specified by:
getPerson in interface IResource
setPerson
public void setPerson(IPerson person)
- Specified by:
setPerson in interface IResource
toString
public java.lang.String toString()
- Specified by:
toString in interface IResource
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals in interface IResource
getSoftwares
public java.util.Collection getSoftwares()
- Specified by:
getSoftwares in interface IResource
setSoftwares
public void setSoftwares(java.util.Collection property)
- Specified by:
setSoftwares in interface IResource