HiRISE

HiRISE.HiPlan.Shapes
Class Live_From_Mars

java.lang.Object
  extended by HiRISE.HiPlan.Shapes.Live_From_Mars
All Implemented Interfaces:
edu.asu.jmars.layer.util.features.FeatureProvider

public class Live_From_Mars
extends Object
implements edu.asu.jmars.layer.util.features.FeatureProvider

Version:
1.19
Author:
Christian Schaller - UA/PIRL

Field Summary
static String ID
          Class identification name with source code version and date.
static String SERVICE_DESCRIPTION
           
 
Constructor Summary
Live_From_Mars()
           
 
Method Summary
 String getDescription()
          Gets a description of this feature provider.
 File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, String baseName)
          Gets the names of the files output by a save with the given base name and feature collection.
 String getExtension()
          Gets the file extension.
 boolean isFileBased()
          Tests whether this provider pulls data from a file.
 boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
          Tests whether the given can be completely represented in the source format of this provider.
 edu.asu.jmars.layer.util.features.FeatureCollection load(String filename)
          Gets a new feature collection containing data from the provider's database.
 int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, String filename)
          Writes the specified features to source the feature provider was constructed from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

SERVICE_DESCRIPTION

public static final String SERVICE_DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

Live_From_Mars

public Live_From_Mars()
Method Detail

getDescription

public String getDescription()
Gets a description of this feature provider. This value appears in the Shape layer's menu.

Specified by:
getDescription in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
"Live from Mars"

getExistingSaveToFiles

public File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
                                     String baseName)
Gets the names of the files output by a save with the given base name and feature collection.

Specified by:
getExistingSaveToFiles in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the feature collection in question.
baseName - the base name in question.
Returns:
the names of the output files.

getExtension

public String getExtension()
Gets the file extension. Since this provider pulls data from a database rather than from a file, there is no file extension.

Specified by:
getExtension in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
null.

isFileBased

public boolean isFileBased()
Tests whether this provider pulls data from a file. This provider does not.

Specified by:
isFileBased in interface edu.asu.jmars.layer.util.features.FeatureProvider
Returns:
false.

isRepresentable

public boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
Tests whether the given can be completely represented in the source format of this provider.

Specified by:
isRepresentable in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the collection to be tested.
Returns:
false.

load

public edu.asu.jmars.layer.util.features.FeatureCollection load(String filename)
Gets a new feature collection containing data from the provider's database. No dialog is presented to the operator; a default SQL query is used. If there was a problem with the configuration or with the database connection during construction of this provider, this method returns an empty collection.

Specified by:
load in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
filename - unused, but required by the interface.
Returns:
a new single feature collection, which may be empty.

save

public int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
                String filename)
Writes the specified features to source the feature provider was constructed from. This method is unsupported, so an UnsupportedOperationException is thrown if this method is called.

Specified by:
save in interface edu.asu.jmars.layer.util.features.FeatureProvider
Parameters:
featureCollection - the collection of features in question.
filename - a filename.
Returns:
the number of features saved.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona