Package org.scijava.io.location
Interface Location
-
- All Known Subinterfaces:
BrowsableLocation,RemoteLocation
- All Known Implementing Classes:
AbstractLocation,AbstractRemoteLocation,BytesLocation,DummyLocation,FileLocation,URILocation,URLLocation
public interface LocationA location is a data descriptor, such as a file on disk, a remote URL, or a database connection.Analogous to a uniform resource identifier (
URI), a location identifies where the data resides, without necessarily specifying how to access that data. TheDataHandleinterface defines a plugin that knows how to read and/or write bytes for a particular kind of location.- Author:
- Curtis Rueden, Gabriel Einsdorf
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default StringdefaultName()Gets the default name used when no explicit name is assigned.default StringgetName()Gets a (typically short) name expressing this location.default URIgetURI()Gets the location expressed as aURI, or null if the location cannot be expressed as such.
-
-
-
Method Detail
-
getURI
default URI getURI()
Gets the location expressed as aURI, or null if the location cannot be expressed as such.
-
getName
default String getName()
Gets a (typically short) name expressing this location. This string is not intended to unambiguously identify the location, but rather act as a friendly, human-readable name. The precise behavior will depend on the implementation, but as an example, a file-based location could return the name of the associated file without its full path.- Returns:
- The name, or an empty string if no name is available.
-
defaultName
default String defaultName()
Gets the default name used when no explicit name is assigned.Note: this is mostly intended for debugging, since most kinds of
Locationwill assign some non-default name. But in cases where that does not occur, this value can be useful to detect the situation.- Returns:
- The default name string.
-
-