Package ucar.unidata.data.imagery
Class AddeImageDescriptor
java.lang.Object
ucar.unidata.data.imagery.AddeImageDescriptor
- All Implemented Interfaces:
Comparable
,XmlDelegate
,XmlPersistable
A class to hold an image directory + the location
- Version:
- $Revision: 1.27 $
- Author:
- IDV Development Team
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for unpersistence; does nothingAddeImageDescriptor
(int relativeIndex, AddeImageDescriptor that) Create a descriptor from another, but change the relative indexAddeImageDescriptor
(AreaDirectory directory, String imageSource) Create an image descriptor from the source and AreaDirectoryAddeImageDescriptor
(AreaDirectory directory, String imageSource, AddeImageInfo info) Create an image descriptor from the source and AreaDirectoryAddeImageDescriptor
(String imageSource) Create an image descriptor from the sourceCreate a descriptor from another. -
Method Summary
Modifier and TypeMethodDescriptionint
Implementation for Comparable.createElement
(XmlEncoder encoder) We just have this here so we can define a XmlDelegate for the AreaDirectory classcreateElement
(XmlEncoder encoder, Object object) This is the delegate method for AreaDirectorycreateObject
(XmlEncoder encoder, Element element) Create an image descriptor from the XML elementboolean
See if this AddeImageDescriptor is equal to the object in questionGet the AreaDirectory (used by XML persistence)Get the image info of this image (used by persistence)Get the time of the imageboolean
Get the IsRelative property.int
Get the RelativeIndex property.Get the source of this image (used by persistence)boolean
initFromXml
(XmlEncoder encoder, Element element) DO nothing.protected boolean
Does this represent a fileprotected AreaDirectory
processSourceAsAddeUrl
(String imageSource) Create anAreaDirectory
from the ADDE URL.void
Set the AreaDirectory (used by XML persistence)void
Set the image info of this image (used by persistence)void
setIsRelative
(boolean value) Set the IsRelative property.void
setRelativeIndex
(int value) Set the RelativeIndex property.void
Set the source of this image (used by persistence)toString()
Get a text representation of this object
-
Constructor Details
-
AddeImageDescriptor
public AddeImageDescriptor()Default constructor for unpersistence; does nothing -
AddeImageDescriptor
Create a descriptor from another, but change the relative index- Parameters:
relativeIndex
- new relative indexthat
- other image descriptor
-
AddeImageDescriptor
Create a descriptor from another.- Parameters:
that
- other image descriptor
-
AddeImageDescriptor
Create an image descriptor from the source- Parameters:
imageSource
- ADDE URL
-
AddeImageDescriptor
Create an image descriptor from the source and AreaDirectory- Parameters:
directory
- image metadataimageSource
- ADDE URL of image
-
AddeImageDescriptor
Create an image descriptor from the source and AreaDirectory- Parameters:
directory
- image metadataimageSource
- ADDE URL of imageinfo
- Image info
-
-
Method Details
-
isFromFile
protected boolean isFromFile()Does this represent a file- Returns:
- Is it a file
-
processSourceAsAddeUrl
Create anAreaDirectory
from the ADDE URL. If the URL is a data request (imagedata) then munge it to make an imagedir request.- Parameters:
imageSource
- ADDE URL- Returns:
- corresponding image metadata
-
createElement
We just have this here so we can define a XmlDelegate for the AreaDirectory class- Specified by:
createElement
in interfaceXmlPersistable
- Parameters:
encoder
- encoder to use- Returns:
- encoded version of this
-
createObject
Create an image descriptor from the XML element- Specified by:
createObject
in interfaceXmlDelegate
- Parameters:
encoder
- encoder to useelement
- XML description of this object- Returns:
- image description based on the element
-
initFromXml
DO nothing. Just here for the XmlPersistable interface.- Specified by:
initFromXml
in interfaceXmlPersistable
- Parameters:
encoder
- encoder for XMLelement
- XML element- Returns:
- true
-
createElement
This is the delegate method for AreaDirectory- Specified by:
createElement
in interfaceXmlDelegate
- Parameters:
encoder
- XML encoder for this objectobject
- an AddeImageDescriptor- Returns:
- XML representation
-
getDirectory
Get the AreaDirectory (used by XML persistence)- Returns:
- this objects image metadata
-
setDirectory
Set the AreaDirectory (used by XML persistence)- Parameters:
d
- image metadata
-
getSource
Get the source of this image (used by persistence)- Returns:
- ADDE URL
-
setSource
Set the source of this image (used by persistence)- Parameters:
s
- the ADDE URL for this image
-
getImageInfo
Get the image info of this image (used by persistence)- Returns:
- AddeImageInfo
-
setImageInfo
Set the image info of this image (used by persistence)- Parameters:
s
- the AddeImageInfo for this image
-
setIsRelative
public void setIsRelative(boolean value) Set the IsRelative property.- Parameters:
value
- The new value for IsRelative
-
getIsRelative
public boolean getIsRelative()Get the IsRelative property.- Returns:
- The IsRelative property
-
setRelativeIndex
public void setRelativeIndex(int value) Set the RelativeIndex property.- Parameters:
value
- The new value for RelativeIndex
-
getRelativeIndex
public int getRelativeIndex()Get the RelativeIndex property.- Returns:
- The RelativeIndex
-
getImageTime
Get the time of the image- Returns:
- nominal time of the image (may be null)
-
toString
Get a text representation of this object -
compareTo
Implementation for Comparable.- Specified by:
compareTo
in interfaceComparable
- Parameters:
o
- object in question- Returns:
- comparison
- See Also:
-
equals
See if this AddeImageDescriptor is equal to the object in question
-