public class EventPoints
extends java.lang.Object
implements edu.asu.jmars.layer.util.features.FeatureProvider
Note that, because this provider returns true with isFileBased()
, it is accessed via the Load File... menu item
of the shape layer's File menu. It does not appear as a separate
menu item. In the resulting file load dialog box, select getDescription()
from the Files of Type popup.
The input event file (FILE.events) consists of one or more lines of comma-separated items: a label and a spacecraft event time. Commas in the label may be escaped with a backslash; a literal backslash may also be escaped. The time is assumed to be in day-of-year format (2016-047T00:00:00.000). A line that starts with a hashmark is ignored completely, as are blank lines. Hashmarks appearing anywhere else on a line are treated as normal characters.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMENT_MARKER
Indicates a line of input is to be treated as a comment and ignored.
|
static java.lang.String |
FILE_EXTENSION
The file extension for an event points file.
|
static java.lang.String |
ID
Class identification name with source code version and date.
|
static java.lang.String |
SERVICE_DESCRIPTION
The name of this feature provider.
|
Constructor and Description |
---|
EventPoints()
Creates a new event point feature provider for the JMARS shape layer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Gets a description of this feature provider.
|
java.io.File[] |
getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
java.lang.String basename)
Gets the names of the files output by a save with the given base name and
feature collection.
|
java.lang.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 collection can be completely represented in the
source format of this provider.
|
edu.asu.jmars.layer.util.features.FeatureCollection |
load(java.lang.String filename)
Gets a new feature collection from the input filename.
|
int |
save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
java.lang.String filename)
Writes the specified features to the source from which the feature provider
was constructed.
|
public static final java.lang.String ID
public static final java.lang.String SERVICE_DESCRIPTION
getDescription()
method.public static final java.lang.String FILE_EXTENSION
public static final java.lang.String COMMENT_MARKER
public EventPoints()
public java.lang.String getDescription()
getDescription
in interface edu.asu.jmars.layer.util.features.FeatureProvider
SERVICE_DESCRIPTION
public java.io.File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, java.lang.String basename)
getExistingSaveToFiles
in interface edu.asu.jmars.layer.util.features.FeatureProvider
featureCollection
- the feature collection in question.basename
- the base name in question.public java.lang.String getExtension()
getExtension
in interface edu.asu.jmars.layer.util.features.FeatureProvider
FILE_EXTENSION
public boolean isFileBased()
isFileBased
in interface edu.asu.jmars.layer.util.features.FeatureProvider
public boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
isRepresentable
in interface edu.asu.jmars.layer.util.features.FeatureProvider
featureCollection
- the collection to be tested.public edu.asu.jmars.layer.util.features.FeatureCollection load(java.lang.String filename)
load
in interface edu.asu.jmars.layer.util.features.FeatureProvider
filename
- the input file's filename, supplied from the Shape
layer's file chooser.public int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, java.lang.String filename)
UnsupportedOperationException
is thrown if this method is called.save
in interface edu.asu.jmars.layer.util.features.FeatureProvider
featureCollection
- the collection of features in question.filename
- a filename.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona