public class LocalAddeEntry extends Object implements AddeEntry
Modifier and Type | Class and Description |
---|---|
static class |
LocalAddeEntry.AddeFormat
The various kinds of local ADDE data understood by McIDAS-V, along with
some helpful metadata.
|
static class |
LocalAddeEntry.Builder
A builder of (mostly) immutable
LocalAddeEntry instances. |
static class |
LocalAddeEntry.ServerName |
AddeEntry.EditorAction, AddeEntry.EntrySource, AddeEntry.EntryStatus, AddeEntry.EntryType, AddeEntry.EntryValidity
Modifier and Type | Field and Description |
---|---|
private String |
asStringId |
private String |
descriptor
N2
|
private String |
end
R2
|
private String |
entryAlias
Allows the user to refer to this entry with an arbitrary name.
|
private AddeEntry.EntryStatus |
entryStatus
Status of this entry.
|
private String |
fileMask
MASK
|
private LocalAddeEntry.AddeFormat |
format
MCV
|
private String |
group
N1
|
static List<LocalAddeEntry> |
INVALID_ENTRIES
Represents a "bad" collection of local ADDE entries.
|
static LocalAddeEntry |
INVALID_ENTRY
Represents a "bad" local ADDE entry.
|
private boolean |
isTemporary
Whether or not this entry is temporary.
|
(package private) static org.slf4j.Logger |
logger
Friendly neighborhood logging object.
|
private String |
name
C
|
private boolean |
realtime
RT
|
private String |
start
R1
|
DEFAULT_ACCOUNT
Modifier | Constructor and Description |
---|---|
private |
LocalAddeEntry(LocalAddeEntry.Builder builder)
Creates a new local ADDE entry from the given
builder object. |
Modifier and Type | Method and Description |
---|---|
String |
asStringId()
Currently used as a identifier for convenient storage by the server
manager.
|
boolean |
equals(Object obj)
Checks a given object for equality with the current
LocalAddeEntry
instance. |
static int |
generateHashCode(LocalAddeEntry entry) |
static int |
generateHashCode(String name,
String group,
String fileMask,
String entryAlias,
boolean isTemporary,
LocalAddeEntry.AddeFormat format) |
AddeAccount |
getAccount()
Accounting information associated with the current entry.
|
String |
getAddress()
Address of the server associated with the current entry.
|
String |
getDescriptor()
Gets the ADDE descriptor for the current local ADDE entry.
|
String |
getEnd()
Gets the ending number of the current local ADDE dataset.
|
String |
getEntryAlias() |
AddeEntry.EntrySource |
getEntrySource()
Source that specified this entry.
|
AddeEntry.EntryStatus |
getEntryStatus()
GUI status of the entry.
|
String |
getEntryText()
Handy
String representation of this ADDE entry. |
AddeEntry.EntryType |
getEntryType()
Type of chooser this entry should appear under.
|
AddeEntry.EntryValidity |
getEntryValidity()
Does this entry represent a "valid" ADDE server.
|
String |
getFileMask()
Gets the ADDE file mask for the current local ADDE entry.
|
LocalAddeEntry.AddeFormat |
getFormat()
Gets the ADDE dataset format for the current local ADDE entry.
|
String |
getGroup()
Dataset/group located on the server.
|
String |
getMask()
Gets the ADDE file mask for the current local ADDE entry.
|
String |
getName()
Name associated with this entry.
|
boolean |
getRealtime()
Gets the ADDE realtime status of the current local ADDE entry.
|
String |
getRealtimeAsString()
Gets the local ADDE dataset's realtime status as a value suitable for
RESOLV.SRV (one of "Y" or "N").
|
String |
getStart()
Gets the starting number of the current local ADDE dataset.
|
int |
hashCode() |
boolean |
isEntryTemporary()
Determine whether or not this entry will be saved between application
sessions.
|
boolean |
isValid()
Tests the current local ADDE dataset for validity.
|
void |
setEntryAlias(String newAlias) |
void |
setEntryStatus(AddeEntry.EntryStatus newStatus) |
String |
toString()
String representation of this entry.
|
static final org.slf4j.Logger logger
public static final LocalAddeEntry INVALID_ENTRY
public static final List<LocalAddeEntry> INVALID_ENTRIES
private AddeEntry.EntryStatus entryStatus
private final String descriptor
private final boolean realtime
private final LocalAddeEntry.AddeFormat format
private String asStringId
private final boolean isTemporary
private String entryAlias
private LocalAddeEntry(LocalAddeEntry.Builder builder)
builder
object.builder
- Builder that represents a local ADDE entry.LocalAddeEntry.Builder
public AddeAccount getAccount()
AddeEntry
AddeEntry.DEFAULT_ACCOUNT
.getAccount
in interface AddeEntry
public String getAddress()
AddeEntry
LocalAddeEntries
will return localhost
.getAddress
in interface AddeEntry
public AddeEntry.EntrySource getEntrySource()
AddeEntry
getEntrySource
in interface AddeEntry
public AddeEntry.EntryStatus getEntryStatus()
AddeEntry
AddeEntry.EntryValidity
in that
EntryStatus
controls this entry showing up in a chooser and has
nothing to do with whether or not the entry is a valid ADDE server.getEntryStatus
in interface AddeEntry
public String getEntryText()
AddeEntry
String
representation of this ADDE entry. Currently looks
like ADDRESS/GROUP
, but this is subject to change.getEntryText
in interface AddeEntry
String
.public AddeEntry.EntryType getEntryType()
AddeEntry
getEntryType
in interface AddeEntry
public AddeEntry.EntryValidity getEntryValidity()
AddeEntry
getEntryValidity
in interface AddeEntry
public String getEntryAlias()
getEntryAlias
in interface AddeEntry
public void setEntryAlias(String newAlias)
setEntryAlias
in interface AddeEntry
public void setEntryStatus(AddeEntry.EntryStatus newStatus)
setEntryStatus
in interface AddeEntry
public boolean isEntryTemporary()
AddeEntry
isEntryTemporary
in interface AddeEntry
public String getGroup()
AddeEntry
public String getName()
AddeEntry
public String getDescriptor()
public LocalAddeEntry.AddeFormat getFormat()
public String getMask()
public String getFileMask()
public boolean getRealtime()
public String getStart()
public String getEnd()
public boolean isValid()
public String getRealtimeAsString()
public int hashCode()
hashCode
in class Object
generateHashCode(String, String, String, String, boolean, AddeFormat)
public boolean equals(Object obj)
LocalAddeEntry
instance.public String asStringId()
AddeEntry
asStringId
in interface AddeEntry
public String toString()
AddeEntry
Output will typically contain internal details and as such will differ
from AddeEntry.getEntryText()
.
public static int generateHashCode(LocalAddeEntry entry)
public static int generateHashCode(String name, String group, String fileMask, String entryAlias, boolean isTemporary, LocalAddeEntry.AddeFormat format)